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, model=None, check_model=True, signal=['Voltage [V]'], additional_variables=[], init_soc=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: []).

  • init_soc (float, optional) – Initial state of charge (default: None).

abstract evaluate(inputs: pybop.parameters.parameter.Inputs)[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_target(dataset)[source]#

Set the target dataset.

Parameters:

target (np.ndarray) – The target dataset array.

time_data()[source]#

Returns the time data.

Returns:

The time array.

Return type:

np.ndarray

property model[source]#
property n_parameters[source]#