pybop-team / PyBOP

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

[Bug]: SciPy bounds are not enforced #476

Closed BradyPlanden closed 2 weeks ago

BradyPlanden commented 2 weeks ago

Python Version

3.12

Describe the bug

The current bounds construction for the SciPy optimisers applies the user-selected bounds, but with SciPy's keep_feasible argument defaulted to False. This results in the selected bounds not being enforced within the optimiser.

Steps to reproduce the behaviour

This can be seen here: https://github.com/pybop-team/PyBOP/blob/1eebc18f87694d787af01b345e3312e82707cdb9/examples/notebooks/ecm_trust-constr.ipynb

Relevant log output

No response

BradyPlanden commented 2 weeks ago

Fixed in #371