Objectives¶
The base class for all objectives is Objective
.
- class ionworkspipeline.objectives.Objective(data_input, options=None, callbacks=None, custom_parameters=None)¶
A pipeline element that constructs an objective function used to fit a model to data.
Parameters¶
- data_inputstr or dict
The data to use for the fit. Can be a string giving the path to the data, or a dictionary with keys “data” and “metadata”. “data” should be a DataFrame that supplies the raw data, and “metadata” should be a dictionary that supplies metadata about the data.
- optionsdict, optional
A dictionary of options to pass to the data fit.
- callbacks
Callback
or list of callbacks A class with methods that get called at various points during the datafit process
- custom_parametersdict of str: float or callable, optional
A dictionary of parameters to use within this objective only. Values in this dictionary will override any values for the simulation within this objective but will not be passed on as results of the DataFit object. If a callable is provided, it must take the form of a function that takes in a dictionary of parameters and the data_input “data” dictionary and returns the value of the parameter (which can be a float or function, as in PyBaMM).
Extends:
ionworkspipeline.controllers.OptionsController
- class ionworkspipeline.objectives.SimulationObjective(*args, **kwargs)¶
A pipeline element that constructs an objective function used to fit a model to data. SimulationObjective is a subclass of Objective that intended for use with objectives that run a pybamm simulation.
Parameters¶
- data_inputstr or dict
The data to use for the fit. Can be a string giving the path to the data, or a dictionary with keys “data” and “metadata”. “data” should be a DataFrame that supplies the raw data, and “metadata” should be a dictionary that supplies metadata about the data.
- optionsdict, optional
A dictionary of options to pass to the data fit.
- callbacks
Callback
or list of callbacks A class with methods that get called at various points during the datafit process
- custom_parametersdict of str: float or callable, optional
A dictionary of parameters to use within this objective only. Values in this dictionary will override any values for the simulation within this objective but will not be passed on as results of the DataFit object. If a callable is provided, it must take the form of a function that takes in a dictionary of parameters and the data_input “data” dictionary and returns the value of the parameter (which can be a float or function, as in PyBaMM).
Extends:
ionworkspipeline.data_fits.objectives.objective.Objective
For the objectives that are implemented in the pipeline, see the following sections.
- Open-circuit potential objectives
- Open-circuit potential objectives with MSMR model
- Objectives
- Utility functions
get_msmr_params_for_fit()
default_msmr_bounds_function()
get_msmr_capacity_params_for_fit()
default_msmr_capacity_bounds_function()
msmr_half_cell_initial_guess()
get_initial_capacity_and_lower_excess_capacity()
get_theta_half_cell_msmr()
get_q_half_cell_msmr()
plot_each_species_msmr()
plot_half_cell_ocp()
plot_full_cell_ocv()
msmr_Qj_to_Xj()
msmr_Xj_to_Qj()
msmr_sort_params()
- Callbacks
- Resistance objective
- Pulse objective
- Current-driven objective
- EIS objective
- Calendar ageing objective
- Cycle ageing objective