Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #3724 #3726

Merged
merged 8 commits into from
Feb 5, 2024
15 changes: 15 additions & 0 deletions pybamm/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ def __repr__(self):
def read_termination(termination):
"""
Read the termination reason. If this condition is hit, the experiment will stop.

Parameters
----------
termination : str or list[str], optional
A single string, or a list of strings, representing the conditions to terminate the experiment.
Only capacity or voltage can be provided as a termination reason.
e.g. '4 Ah capacity' or ['80% capacity', '2.5 V']

Returns
-------
dict
A dictionary of the termination conditions.
e.g. {'capacity': (4.0, 'Ah')} or
{'capacity': (80.0, '%'), 'voltage': (2.5, 'V')}

"""
if termination is None:
return {}
Expand Down
Loading