Skip to content

Commit

Permalink
Merge pull request pybamm-team#3650 from AbhishekChaudharii/issue_3623
Browse files Browse the repository at this point in the history
Improved error handling and added type hinting in Experiment
  • Loading branch information
kratman authored Jan 3, 2024
2 parents ad3b816 + 6f50b40 commit 56b3386
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pybamm/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Experiment class
#

from __future__ import annotations
import pybamm
from .step._steps_util import (
_convert_time_to_seconds,
Expand All @@ -21,17 +22,17 @@ class Experiment:
Parameters
----------
operating_conditions : list
List of operating conditions
operating_conditions : list[str]
List of strings representing the operating conditions.
period : string, optional
Period (1/frequency) at which to record outputs. Default is 1 minute. Can be
overwritten by individual operating conditions.
temperature: float, optional
The ambient air temperature in degrees Celsius at which to run the experiment.
Default is None whereby the ambient temperature is taken from the parameter set.
This value is overwritten if the temperature is specified in a step.
termination : list, optional
List of conditions under which to terminate the experiment. Default is None.
termination : list[str], optional
List of strings representing the conditions to terminate the experiment. Default is None.
This is different from the termination for individual steps. Termination for
individual steps is specified in the step itself, and the simulation moves to
the next step when the termination condition is met
Expand All @@ -42,13 +43,14 @@ class Experiment:

def __init__(
self,
operating_conditions,
period="1 minute",
temperature=None,
termination=None,
operating_conditions: list[str],
period: str = "1 minute",
temperature: float | None = None,
termination: list[str] | None = None,
drive_cycles=None,
cccv_handling=None,
):

if cccv_handling is not None:
raise ValueError(
"cccv_handling has been deprecated, use "
Expand Down

0 comments on commit 56b3386

Please sign in to comment.