pybop.problems.base_problem#
Classes#
Base class for defining a problem within the PyBOP framework, compatible with PINTS. |
Module Contents#
- class pybop.problems.base_problem.BaseProblem(parameters: pybop.Parameters, model: pybop.BaseModel | None = None, check_model: bool = True, signal: list[str] | None = None, domain: str | None = None, additional_variables: list[str] | None = None, initial_state: dict | None = None)[source]#
Base class for defining a problem within the PyBOP framework, compatible with PINTS.
- Parameters:
parameters (pybop.Parameter or pybop.Parameters) – An object or list of the parameters for the problem.
model (object, optional) – The model to be used for the problem (default: None).
check_model (bool, optional) – Flag to indicate if the model should be checked (default: True).
signal (list[str], optional) – A list of variables to analyse (default: [“Voltage [V]”]).
domain (str, optional) – The name of the domain (default: “Time [s]”).
additional_variables (list[str], optional) – Additional variables to observe and store in the solution (default: []).
initial_state (dict, optional) – A valid initial state (default: None).
- abstract evaluate(inputs: pybop.parameters.parameter.Inputs, eis=False)[source]#
Evaluate the model with the given parameters and return the signal.
- Parameters:
inputs (Inputs) – Parameters for evaluation of the model.
- Raises:
NotImplementedError – This method must be implemented by subclasses.
- abstract evaluateS1(inputs: pybop.parameters.parameter.Inputs)[source]#
Evaluate the model with the given parameters and return the signal and its derivatives.
- Parameters:
inputs (Inputs) – Parameters for evaluation of the model.
- Raises:
NotImplementedError – This method must be implemented by subclasses.
- get_target()[source]#
Return the target dataset.
- Returns:
The target dataset array.
- Return type:
np.ndarray
- set_initial_state(initial_state: dict | None = None)[source]#
Set the initial state to be applied to evaluations of the problem.
- Parameters:
initial_state (dict, optional) – A valid initial state (default: None).
- set_target(dataset: pybop.Dataset)[source]#
Set the target dataset.
- Parameters:
target (Dataset) – The target dataset array.