pybop.problems.base_problem#

Classes#

BaseProblem

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, 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]) – The signal to observe.

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

_dataset = None[source]#
_domain_data = None[source]#
_model[source]#
_target = None[source]#
additional_variables[source]#
check_model[source]#
property dataset[source]#
domain = 'Time [s]'[source]#
property domain_data[source]#
eis = False[source]#
failure_output[source]#
property model[source]#
property n_outputs[source]#
property n_parameters[source]#
output_vars[source]#
parameters[source]#
signal[source]#
property target[source]#
verbose = False[source]#