Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fixed issue pybamm-team#3724

Documentation added for pybamm.Experiment.read_termination

* Issue pybamm-team#3724
Updated the documentation based on the discussion so that the argument passed to read_termination is of type str or list[str]

---------

Co-authored-by: Ferran Brosa Planella <[email protected]>
Co-authored-by: Agriya Khetarpal <[email protected]>
Co-authored-by: Robert Timms <[email protected]>
  • Loading branch information
4 people authored and js1tr3 committed Aug 12, 2024
1 parent 3bf9fd5 commit b5a3f9e
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit b5a3f9e

Please sign in to comment.