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

[Bug]: pybamm.Simulation.set_parameters, pybamm.Simulation.set_up_and_parameterise_experiment and pybamm.Simulation.set_up_and_parameterise_model_for_experiment made private in simulation.py #3752

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# [Unreleased](https://github.com/pybamm-team/PyBaMM/)

- Deprecated `pybamm.Simulation.set_parameters`, `pybamm.Simulation.set_up_and_parameterise_experiment` and `pybamm.Simulation.set_up_and_parameterise_model_for_experiment` functions in `pybamm.simulation.py`. ([#3752](https://github.com/pybamm-team/PyBaMM/pull/3752))

## Features

- Added support for macOS arm64 (M-series) platforms. ([#3789](https://github.com/pybamm-team/PyBaMM/pull/3789))
Expand Down
7 changes: 6 additions & 1 deletion pybamm/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def set_up_and_parameterise_experiment(self):
This needs to be done here and not in the Experiment class because the nominal
cell capacity (from the parameters) is used to convert C-rate to current.
"""
msg = "pybamm.simulation.set_up_and_parameterise_experiment is deprecated and not meant to be accessed by users."
warn(msg, DeprecationWarning)
# Update experiment using capacity
capacity = self._parameter_values["Nominal cell capacity [A.h]"]
for op_conds in self.experiment.operating_conditions_steps:
Expand Down Expand Up @@ -216,6 +218,8 @@ def set_up_and_parameterise_model_for_experiment(self):
This increases set-up time since several models to be processed, but
reduces simulation time since the model formulation is efficient.
"""
msg = "pybamm.simulation.set_up_and_parameterise_model_for_experiment is deprecated not meant to be accessed by users."
warn(msg, DeprecationWarning)
self.experiment_unique_steps_to_model = {}
for op_number, op in enumerate(self.experiment.unique_steps):
new_model = self._model.new_copy()
Expand Down Expand Up @@ -326,7 +330,8 @@ def set_parameters(self):
"""
A method to set the parameters in the model and the associated geometry.
"""

msg = "pybamm.set_paramters is deprecated and not meant to be accessed by users."
warn(msg, DeprecationWarning)
if self.model_with_set_params:
return

Expand Down