calibration
AbstractCalibrationFitness
Bases: FitnessBase, CalibrationOptionsProxy
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]
setCalculationOptions
classmethod
setCalculationOptions(
model: Union["MicromechanicalBase", "ElastoplasticModel"],
*,
errstate: Literal["raise", "warn", "ignore"] = "raise",
**kwargs
)
Set the calculation options for the micromechanical model, the contact law, the integration, or the material.
| PARAMETER | DESCRIPTION |
|---|---|
model
|
The micromechanical model.
TYPE:
|
errstate
|
How to handle unsupported options.
TYPE:
|
kwargs
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
setModelParameters
setModelParameters(
model: Union["MicromechanicalBase", "ElastoplasticModel"],
x: Iterable | dict,
experiment: Experiment,
)
Set the material parameters (for the given experiment) to the model.
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(x: Iterable | dict) -> Dict[str, SVExporter | bool]
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])
CalibrationFitnessOptions
Bases: TypedDict
line_clip_state_variables
instance-attribute
line_ensure_increasing_xdata
instance-attribute
line_experiment_additions
instance-attribute
line_experiment_clip_state_variables
instance-attribute
line_experiment_clip_xydata
instance-attribute
line_experiment_ensure_increasing_xdata
instance-attribute
line_experiment_excludes
instance-attribute
line_experiment_includes
instance-attribute
line_experiment_override_xydata
instance-attribute
line_experiment_override_xydata: NotRequired[
Dict[str, Dict[str, Tuple[List[float], List[float]]]]
]
line_experiment_swap_xydata_to_ensure_increasing_xdata
instance-attribute
line_experiment_weights
instance-attribute
line_experiment_xptps
instance-attribute
line_experiment_xys
instance-attribute
line_experiment_yptps
instance-attribute
line_override_xydata
instance-attribute
line_swap_xydata_to_ensure_increasing_xdata
instance-attribute
lognormal_parameters
instance-attribute
lognormal_parameters: NotRequired[List[str | CalibrationKey]]
CalibrationOptionsProxy
Bases: HashableBaseModelIO
check_smoothness
class-attribute
instance-attribute
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
The error fitness.
error_raise
class-attribute
instance-attribute
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_clip_xydata
class-attribute
instance-attribute
Lines to clip the x and y data to the range of the experiment data
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_clip_xydata
class-attribute
instance-attribute
Lines to clip the x and y data to the range of the experiment data 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_swap_xydata_to_ensure_increasing_xdata
class-attribute
instance-attribute
Ensure xdata is increasing by swap xdata/ydata if ydata is increasing 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_swap_xydata_to_ensure_increasing_xdata
class-attribute
instance-attribute
Ensure xdata is increasing by swap xdata/ydata if ydata is increasing
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
return_all_fitness
class-attribute
instance-attribute
Whether to return all fitness values or only the average fitness value.
ElastoplasticCalibrationFitness
Bases: AbstractCalibrationFitness
MicromechanicalCalibrationFitness
Bases: AbstractCalibrationFitness