calibration
CalibrationFitness
Bases: FitnessBase
check_smoothness
class-attribute
instance-attribute
check_smoothness: bool = False
Whether to check if the data is smooth
data_get_kwargs
class-attribute
instance-attribute
Keyword arguments for the get
method of the state variable exporter
error_fitness
class-attribute
instance-attribute
error_fitness: float = 10000000000.0
The error fitness.
error_raise
class-attribute
instance-attribute
error_raise: bool = False
Whether to raise an error if the fitness is not valid
experiment_excludes
class-attribute
instance-attribute
Skipped experiments
experiment_get_kwargs
class-attribute
instance-attribute
Keyword arguments for the get
method of experiment
experiment_includes
class-attribute
instance-attribute
Included experiments
experiment_options
class-attribute
instance-attribute
Override the options for each experiment
experiment_weights
class-attribute
instance-attribute
Weights for the experiments
keys
class-attribute
instance-attribute
keys: List[str | CalibrationKey] = []
Optimization keys, a list of strings or tuples of strings (experiment name, material parameter name).
line_additions
class-attribute
instance-attribute
Additional lines that can be expressions of the existing lines
line_clip_state_variables
class-attribute
instance-attribute
Clip state variables
line_ensure_increasing_xdata
class-attribute
instance-attribute
Ensure xdata is increasing by reconstructing the data with positive differences between every two points
line_experiment_additions
class-attribute
instance-attribute
Additional lines that can be expressions of the existing lines for each experiment
line_experiment_clip_state_variables
class-attribute
instance-attribute
Clip state variables for each experiment
line_experiment_ensure_increasing_xdata
class-attribute
instance-attribute
Ensure xdata is increasing by reconstructing the data with positive differences between every two points for each experiment
line_experiment_excludes
class-attribute
instance-attribute
Excluded lines for each experiment
line_experiment_includes
class-attribute
instance-attribute
Included lines for each experiment
line_experiment_override_xydata
class-attribute
instance-attribute
Override experimental data for each experiment
line_experiment_weights
class-attribute
instance-attribute
Weights for the lines for each experiment
line_experiment_xptps
class-attribute
instance-attribute
Point-to-point y-axis distance for normalizing the similarity for each experiment
line_experiment_xys
class-attribute
instance-attribute
Override default calibrated line x-y pairs for each experiment.
line_experiment_yptps
class-attribute
instance-attribute
Point-to-point y-axis distance for normalizing the similarity for each experiment
line_includes
class-attribute
instance-attribute
Included lines
line_override_xydata
class-attribute
instance-attribute
Override experimental data
line_weights
class-attribute
instance-attribute
Weights for the lines
line_xptps
class-attribute
instance-attribute
Point-to-point x-axis distance for normalizing the similarity
line_xys
class-attribute
instance-attribute
Override default calibrated line x-y pairs.
line_yptps
class-attribute
instance-attribute
Point-to-point y-axis distance for normalizing the similarity
lognormal_parameters
class-attribute
instance-attribute
lognormal_parameters: List[str | CalibrationKey] = []
Parameters to be distributed in the lognormal space
phase_steps
class-attribute
instance-attribute
Override the number of steps for each load phase
similarity_method
class-attribute
instance-attribute
similarity_method: Literal[
"interpolate", "pcm", "area", "frechet-dist", "curve-length", "dtw"
] = "interpolate"
The similarity method.
smoothness_threshold
class-attribute
instance-attribute
smoothness_threshold: float = 0.05
Smooth threshold
create
classmethod
create(
fitness: Union[
"CalibrationFitness", Type["CalibrationFitness"], str, None
] = None,
**kwargs
) -> "CalibrationFitness"
evaluate
evaluate(
results: Dict[str, SVExporter | bool],
) -> Tuple[Dict[str, Dict[str, float]], Dict[str, Dict[str, float]]]
get
get(
x: str, y: str, experiment: Experiment, line_name: str, sv: SVExporter
) -> Tuple[ndarray, ndarray, ndarray, ndarray]
Get experimental and simulated data.
preprocess
preprocess(
expx: ndarray, expy: ndarray, simx: ndarray, simy: ndarray
) -> Tuple[ndarray, ndarray, ndarray, ndarray]
Preprocess the experimental and simulated data.
PARAMETER | DESCRIPTION |
---|---|
expx
|
The x-axis of the experimental data.
TYPE:
|
expy
|
The y-axis of the experimental data.
TYPE:
|
simx
|
The x-axis of the simulated data.
TYPE:
|
simy
|
The y-axis of the simulated data.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tuple[ndarray, ndarray, ndarray, ndarray]
|
The preprocessed data. |
run
run(
x: Iterable | dict, *args, return_results: bool = False, **kwargs
) -> float | Tuple[float, Dict[str, SVExporter]]
serialize_lognormal_parameters
serialize_lognormal_parameters(value: List[str | CalibrationKey]) -> List[str]
setModelParameters
setModelParameters(
model: "MicromechanicalBase", x: Iterable | dict, experiment: Experiment
)
Set the material parameters (for the given experiment) to the model.
setOptions
classmethod
Set the calculation options for the micromechanical model, the contact law, the integration, or the material.
PARAMETER | DESCRIPTION |
---|---|
model
|
The micromechanical model.
TYPE:
|
kwargs
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
similarity
similarity(
experiment_name: str,
line_name: str,
expx: ndarray,
expy: ndarray,
simx: ndarray,
simy: ndarray,
) -> float
Calculate the similarity between the experimental and simulated data.
PARAMETER | DESCRIPTION |
---|---|
experiment_name
|
The name of the experiment.
TYPE:
|
line_name
|
The name of the line.
TYPE:
|
expx
|
The x-axis of the experimental data.
TYPE:
|
expy
|
The y-axis of the experimental data.
TYPE:
|
simx
|
The x-axis of the simulated data.
TYPE:
|
simy
|
The y-axis of the simulated data.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
The similarity value. |
simulate
Simulate the model and return the results as a dictionary of SVExporter objects. If the simulation fails, return False instead.
validate_lognormal_parameters
classmethod
validate_lognormal_parameters(value: List[str | CalibrationKey])