Calendar ageing objective

Objectives for fitting the data generated by a calendar ageing experiment.

class ionworkspipeline.objectives.CalendarAgeing(data_input, options=None, callbacks=None, custom_parameters=None, constraints=None, penalties=None, parameters=None)

Objective for fitting LLI and/or LAM to calendar ageing data for a full cell.

Parameters

data_inputstr or dict

The data to use for the fit, see FittingObjective.

optionsdict, optional

A dictionary of options to pass to the objective.

  • model: :class:pybamm.BaseModel

    The model to fit. No default is provided, but this option is required (a model must be passed in).

  • modes: list of str

    The degradation modes to fit. Can be any combination of “LLI [%]”, “LAM_ne [%]”, “LAM_pe [%]”. Default is [“LLI [%]”].

  • simulation_kwargs: dict

    Keyword arguments to pass to the simulation (iwp.Simulation). May include solver_kwargs to tune the auto-built solver (e.g. {"options": {"compile": True}} to enable compilation), ignored if an explicit solver is also provided. May also include solve_kwargs forwarded to the runtime solve regardless of the solver (e.g. starting_solution). Default is None.

callbackslist of callable, optional

A class with methods that get called at various points during the datafit process

custom_parametersdict, optional

A dictionary of custom parameters to use for the objective. Deprecated, use parameters instead.

constraintslist[Constraint], optional

A list of equality and inequality constraints to apply to the objective.

penaltieslist[Penalty], optional

A list of penalties to apply to the objective.

parametersdict or pybamm.ParameterValues, optional

Objective-specific parameter values merged into the global parameter values before fitting. Default is None.

See also: CalendarAgeing — field-level documentation.

build(parameter_values)

Build the objective.

Parameters

parameter_valuespybamm.ParameterValues

The parameter values to use for the objective.

classmethod default_options() → dict[str, Any]

Return the default options for the CalendarAgeing objective.

prepare_validation_results(results: dict, summary_stats: list) → tuple[list[dict[str, float]], dict[str, float]]

Prepare validation results for CalendarAgeing objective.

Parameters

resultsdict

The raw results from running the objective (keys = degradation mode names, values = arrays over time).

summary_statslist

List of summary statistic cost functions to compute.

Returns

tuple[list[dict[str, float]], dict[str, float]]

A tuple of (computed_statistics, validation_result) where computed_statistics is a list of dictionaries with computed metric names and values, and validation_result is a dictionary of validation data (Time and per-mode model/data).

property remove_model_events: bool

Whether to remove the model events during simulation. Default is True.

validation_x_key: str = 'Time [s]'

Key of the independent variable within validation_result.

validation_x_label: str = 'Time [s]'

Axis label for that variable.