From 7f9c0e38e1fce45bff4d8ce3a190407c35a46fd1 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:02:33 +0530 Subject: [PATCH 01/11] Remove setter for `parameter_values`, mark pararameter_values as private --- pybamm/simulation.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 52c1922545..87337a16ee 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -74,8 +74,8 @@ def __init__( output_variables=None, C_rate=None, ): - self.parameter_values = parameter_values or model.default_parameter_values - self._unprocessed_parameter_values = self.parameter_values + self._parameter_values = parameter_values or model.default_parameter_values + self._unprocessed_parameter_values = self._parameter_values if isinstance(model, pybamm.lithium_ion.BasicDFNHalfCell): if experiment is not None: @@ -210,7 +210,7 @@ def set_up_and_parameterise_model_for_experiment(self): self.experiment_unique_steps_to_model = {} for op_number, op in enumerate(self.experiment.unique_steps): new_model = self.model.new_copy() - new_parameter_values = self.parameter_values.copy() + new_parameter_values = self._parameter_values.copy() if op.type != "current": # Voltage or power control @@ -261,7 +261,7 @@ def set_up_and_parameterise_model_for_experiment(self): if self.experiment.initial_start_time: new_model = self.model.new_copy() # Update parameter values - new_parameter_values = self.parameter_values.copy() + new_parameter_values = self._parameter_values.copy() self._original_temperature = new_parameter_values["Ambient temperature [K]"] new_parameter_values.update( {"Current function [A]": 0, "Ambient temperature [K]": "[input]"}, @@ -372,7 +372,7 @@ def set_initial_soc(self, initial_soc): self.op_conds_to_built_solvers = None param = self.model.param - self.parameter_values = ( + self._parameter_values = ( self._unprocessed_parameter_values.set_initial_stoichiometries( initial_soc, param=param, inplace=False ) @@ -857,7 +857,7 @@ def solve( # Calculate capacity_start using the first cycle if cycle_num == 1: # Note capacity_start could be defined as - # self.parameter_values["Nominal cell capacity [A.h]"] instead + # self._parameter_values["Nominal cell capacity [A.h]"] instead if "capacity" in self.experiment.termination: capacity_start = all_summary_variables[0]["Capacity [A.h]"] logs["start capacity"] = capacity_start @@ -948,7 +948,7 @@ def _get_esoh_solver(self, calc_esoh): return None return pybamm.lithium_ion.ElectrodeSOHSolver( - self.parameter_values, self.model.param + self._parameter_values, self.model.param ) def plot(self, output_variables=None, **kwargs): @@ -1033,10 +1033,6 @@ def geometry(self, geometry): def parameter_values(self): return self._parameter_values - @parameter_values.setter - def parameter_values(self, parameter_values): - self._parameter_values = parameter_values.copy() - @property def submesh_types(self): return self._submesh_types From 1f2e62bc050b2eb98e96a3779a94ffe59741fe46 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:04:35 +0530 Subject: [PATCH 02/11] Remove setter and mark `geometry` as private --- pybamm/simulation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 87337a16ee..1c4ad09f05 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -116,7 +116,7 @@ def __init__( self._unprocessed_model = model self.model = model - self.geometry = geometry or self.model.default_geometry + self._geometry = geometry or self.model.default_geometry self.submesh_types = submesh_types or self.model.default_submesh_types self.var_pts = var_pts or self.model.default_var_pts self.spatial_methods = spatial_methods or self.model.default_spatial_methods @@ -360,7 +360,7 @@ def set_parameters(self): self._model_with_set_params = self._parameter_values.process_model( self._unprocessed_model, inplace=False ) - self._parameter_values.process_geometry(self.geometry) + self._parameter_values.process_geometry(self._geometry) self.model = self._model_with_set_params def set_initial_soc(self, initial_soc): @@ -1025,10 +1025,6 @@ def built_model(self): def geometry(self): return self._geometry - @geometry.setter - def geometry(self, geometry): - self._geometry = geometry - @property def parameter_values(self): return self._parameter_values From b93ed40c8535704e2b39b6cb670be1651c60a521 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:07:21 +0530 Subject: [PATCH 03/11] Remove setter for submesh types --- pybamm/simulation.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 1c4ad09f05..6320e3bc61 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -117,7 +117,7 @@ def __init__( self.model = model self._geometry = geometry or self.model.default_geometry - self.submesh_types = submesh_types or self.model.default_submesh_types + self._submesh_types = submesh_types or self.model.default_submesh_types self.var_pts = var_pts or self.model.default_var_pts self.spatial_methods = spatial_methods or self.model.default_spatial_methods self.solver = solver or self.model.default_solver @@ -1033,10 +1033,6 @@ def parameter_values(self): def submesh_types(self): return self._submesh_types - @submesh_types.setter - def submesh_types(self, submesh_types): - self._submesh_types = submesh_types.copy() - @property def mesh(self): return self._mesh From bc3463154b389bb9eef2da7c41ccb13ff3a5ef98 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:08:42 +0530 Subject: [PATCH 04/11] Remove setter for spatial variable points --- pybamm/simulation.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 6320e3bc61..5a3a64cace 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -118,7 +118,7 @@ def __init__( self._geometry = geometry or self.model.default_geometry self._submesh_types = submesh_types or self.model.default_submesh_types - self.var_pts = var_pts or self.model.default_var_pts + self._var_pts = var_pts or self.model.default_var_pts self.spatial_methods = spatial_methods or self.model.default_spatial_methods self.solver = solver or self.model.default_solver self.output_variables = output_variables @@ -1041,10 +1041,6 @@ def mesh(self): def var_pts(self): return self._var_pts - @var_pts.setter - def var_pts(self, var_pts): - self._var_pts = var_pts.copy() - @property def spatial_methods(self): return self._spatial_methods From 8609cc4447d6275ecdca57222004a169462dc010 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:10:54 +0530 Subject: [PATCH 05/11] Remove setters for spatial methods and output variables --- pybamm/simulation.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 5a3a64cace..2515eb9efe 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -119,9 +119,9 @@ def __init__( self._geometry = geometry or self.model.default_geometry self._submesh_types = submesh_types or self.model.default_submesh_types self._var_pts = var_pts or self.model.default_var_pts - self.spatial_methods = spatial_methods or self.model.default_spatial_methods + self._spatial_methods = spatial_methods or self.model.default_spatial_methods self.solver = solver or self.model.default_solver - self.output_variables = output_variables + self._output_variables = output_variables # Initialize empty built states self._model_with_set_params = None @@ -973,7 +973,7 @@ def plot(self, output_variables=None, **kwargs): ) if output_variables is None: - output_variables = self.output_variables + output_variables = self._output_variables self.quick_plot = pybamm.dynamic_plot( self._solution, output_variables=output_variables, **kwargs @@ -1045,10 +1045,6 @@ def var_pts(self): def spatial_methods(self): return self._spatial_methods - @spatial_methods.setter - def spatial_methods(self, spatial_methods): - self._spatial_methods = spatial_methods.copy() - @property def solver(self): return self._solver @@ -1061,10 +1057,6 @@ def solver(self, solver): def output_variables(self): return self._output_variables - @output_variables.setter - def output_variables(self, output_variables): - self._output_variables = copy.copy(output_variables) - @property def solution(self): return self._solution From 91ee8e14028187dd8d753036bc9a52df6778b637 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:12:43 +0530 Subject: [PATCH 06/11] Remove setter for solver options --- pybamm/simulation.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 2515eb9efe..aa955437b5 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -120,7 +120,7 @@ def __init__( self._submesh_types = submesh_types or self.model.default_submesh_types self._var_pts = var_pts or self.model.default_var_pts self._spatial_methods = spatial_methods or self.model.default_spatial_methods - self.solver = solver or self.model.default_solver + self._solver = solver or self.model.default_solver self._output_variables = output_variables # Initialize empty built states @@ -447,7 +447,7 @@ def build_for_experiment(self, check_model=True, initial_soc=None): built_model = self._disc.process_model( model_with_set_params, inplace=True, check_model=check_model ) - solver = self.solver.copy() + solver = self._solver.copy() self.op_conds_to_built_solvers[op_cond] = solver self.op_conds_to_built_models[op_cond] = built_model @@ -519,7 +519,7 @@ def solve( """ # Setup if solver is None: - solver = self.solver + solver = self._solver callbacks = pybamm.callbacks.setup_callbacks(callbacks) logs = {} @@ -927,7 +927,7 @@ def step( self.build() if solver is None: - solver = self.solver + solver = self._solver if starting_solution is None: starting_solution = self._solution @@ -1049,10 +1049,6 @@ def spatial_methods(self): def solver(self): return self._solver - @solver.setter - def solver(self, solver): - self._solver = solver.copy() - @property def output_variables(self): return self._output_variables From 6dbf7d8342ac2e95fe82158bb612d5b3c8019d34 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:21:54 +0530 Subject: [PATCH 07/11] Remove setter and mark model inputs as private --- pybamm/simulation.py | 45 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index aa955437b5..2691a79688 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -4,7 +4,6 @@ import pickle import pybamm import numpy as np -import copy import warnings import sys from functools import lru_cache @@ -114,13 +113,13 @@ def __init__( self.experiment = experiment.copy() self._unprocessed_model = model - self.model = model + self._model = model - self._geometry = geometry or self.model.default_geometry - self._submesh_types = submesh_types or self.model.default_submesh_types - self._var_pts = var_pts or self.model.default_var_pts - self._spatial_methods = spatial_methods or self.model.default_spatial_methods - self._solver = solver or self.model.default_solver + self._geometry = geometry or self._model.default_geometry + self._submesh_types = submesh_types or self._model.default_submesh_types + self._var_pts = var_pts or self._model.default_var_pts + self._spatial_methods = spatial_methods or self._model.default_spatial_methods + self._solver = solver or self._model.default_solver self._output_variables = output_variables # Initialize empty built states @@ -201,7 +200,7 @@ def set_up_and_parameterise_experiment(self): def set_up_and_parameterise_model_for_experiment(self): """ - Set up self.model to be able to run the experiment (new version). + Set up self._model to be able to run the experiment (new version). In this version, a new model is created for each step. This increases set-up time since several models to be processed, but @@ -209,7 +208,7 @@ def set_up_and_parameterise_model_for_experiment(self): """ self.experiment_unique_steps_to_model = {} for op_number, op in enumerate(self.experiment.unique_steps): - new_model = self.model.new_copy() + new_model = self._model.new_copy() new_parameter_values = self._parameter_values.copy() if op.type != "current": @@ -259,7 +258,7 @@ def set_up_and_parameterise_model_for_experiment(self): # Set up rest model if experiment has start times if self.experiment.initial_start_time: - new_model = self.model.new_copy() + new_model = self._model.new_copy() # Update parameter values new_parameter_values = self._parameter_values.copy() self._original_temperature = new_parameter_values["Ambient temperature [K]"] @@ -361,7 +360,7 @@ def set_parameters(self): self._unprocessed_model, inplace=False ) self._parameter_values.process_geometry(self._geometry) - self.model = self._model_with_set_params + self._model = self._model_with_set_params def set_initial_soc(self, initial_soc): if self._built_initial_soc != initial_soc: @@ -371,7 +370,7 @@ def set_initial_soc(self, initial_soc): self.op_conds_to_built_models = None self.op_conds_to_built_solvers = None - param = self.model.param + param = self._model.param self._parameter_values = ( self._unprocessed_parameter_values.set_initial_stoichiometries( initial_soc, param=param, inplace=False @@ -403,9 +402,9 @@ def build(self, check_model=True, initial_soc=None): if self.built_model: return - elif self.model.is_discretised: - self._model_with_set_params = self.model - self._built_model = self.model + elif self._model.is_discretised: + self._model_with_set_params = self._model + self._built_model = self._model else: self.set_parameters() self._mesh = pybamm.Mesh(self._geometry, self._submesh_types, self._var_pts) @@ -537,7 +536,7 @@ def solve( ) if ( self.operating_mode == "without experiment" - or self.model.name == "ElectrodeSOH model" + or self._model.name == "ElectrodeSOH model" ): if t_eval is None: raise pybamm.SolverError( @@ -941,14 +940,14 @@ def step( def _get_esoh_solver(self, calc_esoh): if ( calc_esoh is False - or isinstance(self.model, pybamm.lead_acid.BaseModel) - or isinstance(self.model, pybamm.equivalent_circuit.Thevenin) - or self.model.options["working electrode"] != "both" + or isinstance(self._model, pybamm.lead_acid.BaseModel) + or isinstance(self._model, pybamm.equivalent_circuit.Thevenin) + or self._model.options["working electrode"] != "both" ): return None return pybamm.lithium_ion.ElectrodeSOHSolver( - self._parameter_values, self.model.param + self._parameter_values, self._model.param ) def plot(self, output_variables=None, **kwargs): @@ -1009,10 +1008,6 @@ def create_gif(self, number_of_images=80, duration=0.1, output_filename="plot.gi def model(self): return self._model - @model.setter - def model(self, model): - self._model = copy.copy(model) - @property def model_with_set_params(self): return self._model_with_set_params @@ -1059,7 +1054,7 @@ def solution(self): def save(self, filename): """Save simulation using pickle""" - if self.model.convert_to_format == "python": + if self._model.convert_to_format == "python": # We currently cannot save models in the 'python' format raise NotImplementedError( """ From 9393f6f41433b8d4ae9126d7c5cb421d57ae1513 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 5 Sep 2023 22:58:23 +0530 Subject: [PATCH 08/11] Add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ec5e39b8b..6c96bf171d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Bug fixes +- Attributes of `pybamm.Simulation` objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created ([#3267](https://github.com/pybamm-team/PyBaMM/pull/3267) - Fixed a bug with `_Heaviside._evaluate_for_shape` which meant some expressions involving heaviside function and subtractions did not work ([#3306](https://github.com/pybamm-team/PyBaMM/pull/3306)) - The `OneDimensionalX` thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. ([#3042](https://github.com/pybamm-team/PyBaMM/pull/3042)) - Fixed a bug where the "basic" lithium-ion models gave incorrect results when using nonlinear particle diffusivity ([#3207](https://github.com/pybamm-team/PyBaMM/pull/3207)) From 68584c1890682c45b3aeb4bd8a18dab54fad45a2 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:33:51 +0530 Subject: [PATCH 09/11] Sort CHANGELOG --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c96bf171d..8127a2885e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,16 +9,16 @@ ## Bug fixes -- Attributes of `pybamm.Simulation` objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created ([#3267](https://github.com/pybamm-team/PyBaMM/pull/3267) - Fixed a bug with `_Heaviside._evaluate_for_shape` which meant some expressions involving heaviside function and subtractions did not work ([#3306](https://github.com/pybamm-team/PyBaMM/pull/3306)) -- The `OneDimensionalX` thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. ([#3042](https://github.com/pybamm-team/PyBaMM/pull/3042)) +- Attributes of `pybamm.Simulation` objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created ([#3267](https://github.com/pybamm-team/PyBaMM/pull/3267) - Fixed a bug where the "basic" lithium-ion models gave incorrect results when using nonlinear particle diffusivity ([#3207](https://github.com/pybamm-team/PyBaMM/pull/3207)) - Particle size distributions now work with SPMe and NewmanTobias models ([#3207](https://github.com/pybamm-team/PyBaMM/pull/3207)) - Fix to simulate c_rate steps with drive cycles ([#3186](https://github.com/pybamm-team/PyBaMM/pull/3186)) -- Parameters in `Prada2013` have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019. -- Error generated when invalid parameter values are passed. ([#3132](https://github.com/pybamm-team/PyBaMM/pull/3132)) -- Thevenin() model is now constructed with standard variables: `Time [s], Time [min], Time [h]` ([#3143](https://github.com/pybamm-team/PyBaMM/pull/3143)) - Fix SEI Example Notebook ([#3166](https://github.com/pybamm-team/PyBaMM/pull/3166)) +- Thevenin() model is now constructed with standard variables: `Time [s], Time [min], Time [h]` ([#3143](https://github.com/pybamm-team/PyBaMM/pull/3143)) +- Error generated when invalid parameter values are passed. ([#3132](https://github.com/pybamm-team/PyBaMM/pull/3132)) +- Parameters in `Prada2013` have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019. ([#3096](https://https://github.com/pybamm-team/PyBaMM/pull/3096)) +- The `OneDimensionalX` thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. ([#3042](https://github.com/pybamm-team/PyBaMM/pull/3042)) ## Breaking changes From 91c8966039e189d635fead4742cbb0d91041e25b Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 19 Sep 2023 19:50:32 +0530 Subject: [PATCH 10/11] Update and sort CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cff4551ef8..f2d94a1dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,8 @@ - Fixed a bug that caused incorrect results of “{Domain} electrode thickness change [m]” due to the absence of dimension for the variable `electrode_thickness_change`([#3329](https://github.com/pybamm-team/PyBaMM/pull/3329)). - Fixed a bug that occured in `check_ys_are_not_too_large` when trying to reference `y-slice` where the referenced variable was not a `pybamm.StateVector` ([#3313](https://github.com/pybamm-team/PyBaMM/pull/3313) - Fixed a bug with `_Heaviside._evaluate_for_shape` which meant some expressions involving heaviside function and subtractions did not work ([#3306](https://github.com/pybamm-team/PyBaMM/pull/3306)) +- Attributes of `pybamm.Simulation` objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created ([#3267](https://github.com/pybamm-team/PyBaMM/pull/3267) - Fixed bug causing incorrect activation energies using `create_from_bpx()` ([#3242](https://github.com/pybamm-team/PyBaMM/pull/3242)) -- The `OneDimensionalX` thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. ([#3042](https://github.com/pybamm-team/PyBaMM/pull/3042)) - Fixed a bug where the "basic" lithium-ion models gave incorrect results when using nonlinear particle diffusivity ([#3207](https://github.com/pybamm-team/PyBaMM/pull/3207)) - Particle size distributions now work with SPMe and NewmanTobias models ([#3207](https://github.com/pybamm-team/PyBaMM/pull/3207)) - Fix to simulate c_rate steps with drive cycles ([#3186](https://github.com/pybamm-team/PyBaMM/pull/3186)) @@ -24,6 +24,7 @@ - Thevenin() model is now constructed with standard variables: `Time [s]`, `Time [min]`, `Time [h]` ([#3143](https://github.com/pybamm-team/PyBaMM/pull/3143)) - Error generated when invalid parameter values are passed ([#3132](https://github.com/pybamm-team/PyBaMM/pull/3132)) - Parameters in `Prada2013` have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019 ([#3096](https://github.com/pybamm-team/PyBaMM/pull/3096)) +- The `OneDimensionalX` thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. ([#3042](https://github.com/pybamm-team/PyBaMM/pull/3042)) ## Optimizations From 5cdf00b71ecc7842b864498db0200ebbd4841f88 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 19 Sep 2023 20:08:11 +0530 Subject: [PATCH 11/11] Fix parameters semi-private object --- pybamm/simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybamm/simulation.py b/pybamm/simulation.py index a2a2bcff67..04a373b436 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -373,7 +373,7 @@ def set_initial_soc(self, initial_soc): options = self.model.options param = self._model.param if options["open-circuit potential"] == "MSMR": - self.parameter_values = self._unprocessed_parameter_values.set_initial_ocps( + self._parameter_values = self._unprocessed_parameter_values.set_initial_ocps( # noqa: E501 initial_soc, param=param, inplace=False, options=options ) else: