Skip to content

elasticityfitness

ElasticityFitness

Bases: FitnessBase

data_get_kwargs class-attribute instance-attribute

data_get_kwargs: Dict[str, Any] = {'{x}': '<expx>'}

Keyword arguments for the get method of elasticity, the key can contain placeholders {x} and {y}, the value can be strings in the format of <expx>, <expy>, or any other variables that can be obtained from experiment.get(x) method.

error_fitness class-attribute instance-attribute

error_fitness: float = 10000000000.0

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

experiment_excludes: List[str] = []

Excluded experiments

experiment_get_kwargs class-attribute instance-attribute

experiment_get_kwargs: Dict[str, Any] = {}

Keyword arguments for the get method of experiment

experiment_includes class-attribute instance-attribute

experiment_includes: List[str] | None = None

Included experiments

experiment_weights class-attribute instance-attribute

experiment_weights: Dict[str, float] = {}

Weights for the experiments

experiments instance-attribute

experiments: List[Experiment]

List of experiments to evaluate.

io instance-attribute

io: Any

The IO object to create the model.

io_ property

io_: 'ElasticityBase'

Only for type annotation.

keys class-attribute instance-attribute

keys: List[str | CalibrationKey] = []

Optimization keys

line_additions class-attribute instance-attribute

line_additions: Dict[str, Tuple[str, str]] = {}

Additional lines that can be expressions of the existing lines

line_excludes class-attribute instance-attribute

line_excludes: List[str] = []

Excluded lines

line_experiment_additions class-attribute instance-attribute

line_experiment_additions: Dict[str, Dict[str, Tuple[str, str]]] = {}

Additional lines that can be expressions of the existing lines for each experiment

line_experiment_excludes class-attribute instance-attribute

line_experiment_excludes: Dict[str, List[str]] = {}

Excluded lines for each experiment

line_experiment_includes class-attribute instance-attribute

line_experiment_includes: Dict[str, List[str]] = {}

Included lines for each experiment

line_experiment_weights class-attribute instance-attribute

line_experiment_weights: Dict[str, Dict[str, float]] = {}

Weights for the lines for each experiment

line_experiment_xys class-attribute instance-attribute

line_experiment_xys: Dict[str, Dict[str, Tuple[str, str]]] | None = None

Override default calibrated line x-y pairs for each experiment.

line_includes class-attribute instance-attribute

line_includes: List[str] | None = None

Included lines

line_weights class-attribute instance-attribute

line_weights: Dict[str, float] = {}

Weights for the lines

line_xys class-attribute instance-attribute

line_xys: Dict[str, Tuple[str, str]] | None = None

Override default calibrated line x-y pairs.

evaluate

evaluate(
    x: Iterable | dict, *args, **kwargs
) -> Tuple[Dict[str, Dict[str, float]], Dict[str, Dict[str, float]]]

run

run(x: Iterable | dict, *args, **kwargs) -> float

serialize_keys

serialize_keys(value: List[str | CalibrationKey]) -> List[str]

setModelParameters

setModelParameters(
    elasticity: "ElasticityBase", x: Iterable | dict, experiment: Experiment
)

Set the material parameters (for the given experiment) to the model.

validate_keys classmethod

validate_keys(value: List[str | CalibrationKey])