Skip to content

Commit

Permalink
Fixed issue #3724 (#3726)
Browse files Browse the repository at this point in the history
* Fixed issue #3724

Documentation added for pybamm.Experiment.read_termination

* Issue #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 Feb 5, 2024
1 parent 9bfbcfd commit c0c00c1
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 c0c00c1

Please sign in to comment.