pybamm-team / liionpack

A battery pack simulation tool that uses the PyBaMM framework
https://liionpack.readthedocs.io/en/latest/
MIT License
90 stars 30 forks source link

Catch "High/Low voltage limit reached" #212

Closed avarf closed 1 year ago

avarf commented 1 year ago

Description

I couldn't find a way to catch the "High/Low voltage limit reached" condition. I checked the solver and it is logging the message and returns vlims_ok = False but it is not passed/visible at the main output and the output is just a dictionary with less number of elements than it should.

It would be great if you can pass this exception/warning explicitly as a field in the output or return two values, one the output and the other one the exception.

Motivation

No response

Possible Implementation

No response

Additional context

Code:

output = lp.solve(
    netlist=netlist,
    parameter_values=parameter_values,
    experiment=experiment,
    initial_soc=SoC,
)
TomTranter commented 1 year ago

Hey @avarf thanks for raising the issue. Do you want to contribute the change?

TomTranter commented 1 year ago

I have had no response from you so assume this is not a major problem. You are right to identify this as an issue but it is quite minor and should be addressed in future releases once the solving and experiment instruction handling is managed by PyBaMM directly