pybop.problems.meta_problem#

Classes#

MetaProblem

Problem class for joining mulitple problems into one combined problem.

Module Contents#

class pybop.problems.meta_problem.MetaProblem(*problems, weights: list[float] | None = None)[source]#

Bases: pybop.Problem

Problem class for joining mulitple problems into one combined problem.

Evaluates multiple problems, which must first be defined individually.

Parameters:

problems (pybop.Problem) – The individual PyBOP fitting problems.

evaluate_batch(inputs: list[pybop.parameters.parameter.Inputs], calculate_sensitivities: bool) numpy.ndarray | tuple[numpy.ndarray, numpy.ndarray][source]#

Evaluate each problem for each set of inputs and return the cost values and (optionally) the sensitivities with respect to each input parameter.

Parameters:
  • inputs (list[Inputs]) – A list of input parameters.

  • calculate_sensitivities (bool) – Whether to also return the sensitivities (default: False).

Returns:

Cost values of len(inputs) and (optionally) the gradient of the cost with respect to each input parameter with shape (len(inputs), len(parameters)).

Return type:

Evaluation

_has_sensitivities = True[source]#
parameters[source]#
problems[source]#