Current-driven objective

Objectives for fitting the data generated by a current-driven experiment.

class ionworkspipeline.objectives.CurrentDriven(data_input, options=None, callbacks=None, custom_parameters=None)

Objective for generic current-driven experiment.

Parameters

data_inputstr or dict

The data to use for the fit, see Objective.

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).

  • independent variable: string

    Whether to use voltage or time as the independent variable. Default is “time”. In some cases, it may be more appropriate to use voltage as the independent variable, and the objective variables will be interpolated to match the voltage data.

  • solver: pybamm.BaseSolver

    The solver to use for the simulation. Default is model.default_solver.

  • simulation_kwargs: dict

    Keyword arguments to pass to the simulation (pybamm.Simulation). Default is None. Note that the “solver” option takes precedence if “solver” if also in simulation_kwargs.

  • objective variables: list of strings

    The variables to fit to. If independent variable is “time”, this defaults to [“Voltage [V]”] and can be a list of any variables except “Time [s]”. If independent variable is “voltage”, this defaults to [“Time [s]”] and cannot be changed.

  • interpolant_atol: float

    Absolute tolerance for the current interpolant. Default is the solver atol.

  • interpolant_rtol: float

    Relative tolerance for the current interpolant. Default is the solver rtol.

  • solver_max_save_points: int

    Maximum number of points to save in the solver. Default is 10000.

callbackslist of callable, optional

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

custom_parametersdict, optional

A dictionary of parameters to use within this objective only. See Objective.

Extends: ionworkspipeline.data_fits.objectives.objective.Objective