Skip to content

Commit

Permalink
Refactor: Add deprecation warning in `set_up_and_parameterise_experim…
Browse files Browse the repository at this point in the history
…ent` func
  • Loading branch information
Akhil-Sharma30 committed Oct 8, 2024
1 parent 47ef2a9 commit ea4176d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pybamm/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ def _set_random_seed(self):
% (2**32)
)

def set_up_and_parameterise_experiment(self, solve_kwargs=None):
msg = "pybamm.simulation.set_up_and_parameterise_experiment is deprecated and not meant to be accessed by users."
warnings.warn(msg, DeprecationWarning, stacklevel=2)
self._set_up_and_parameterise_experiment(solve_kwargs=solve_kwargs)

def _set_up_and_parameterise_experiment(self, solve_kwargs=None):
"""
Create and parameterise the models for each step in the experiment.
Expand All @@ -182,8 +187,7 @@ def _set_up_and_parameterise_experiment(self, solve_kwargs=None):
reduces simulation time since the model formulation is efficient.
"""
parameter_values = self._parameter_values.copy()
msg = "pybamm.simulation.set_up_and_parameterise_experiment is deprecated and not meant to be accessed by users."
warnings(msg, DeprecationWarning)

# some parameters are used to control the experiment, and should not be
# input parameters
restrict_list = {"Initial temperature [K]", "Ambient temperature [K]"}
Expand Down Expand Up @@ -252,6 +256,7 @@ def _set_up_and_parameterise_experiment(self, solve_kwargs=None):
self.experiment_unique_steps_to_model["Rest for padding"] = (
parameterised_model
)

def set_parameters(self):
msg = (
"pybamm.set_paramters is deprecated and not meant to be accessed by users."
Expand Down

0 comments on commit ea4176d

Please sign in to comment.