pybop-team / PyBOP

A parameterisation and optimisation package for battery models.
https://pybop-docs.readthedocs.io
BSD 3-Clause "New" or "Revised" License
73 stars 22 forks source link

Add multiple cost optimisation and sampling #525

Open BradyPlanden opened 1 month ago

BradyPlanden commented 1 month ago

Feature description

This issue aims to add multiple cost evaluations to the optimiser and sampler classes. This would allow a list-like cost object to be passed to the optimiser/sampler for individual evaluation. The results are then stored in an optimisation/sampler result object for each cost. This issue relates to #238, specifically the N models and 1 dataset workflow.

This functionality is different from the MultiFittingProblem where multiple problems are combined into a single instance for cost evaluation, or the WeightedCost class where parameter values are weighted for a single cost function.

Motivation

This is a first step towards structured model comparison.

Possible implementation

Refactor the optimiser and sampler classes to accept a list of costs and individually optimise each. The Pints' ParallelEvaluator could be used for concurrent optimisation.

Additional context

No response