diff --git a/closed_loop_AFC/jet_cylinder/environment.py b/closed_loop_AFC/jet_cylinder/environment.py index 32e7ca3..277270b 100644 --- a/closed_loop_AFC/jet_cylinder/environment.py +++ b/closed_loop_AFC/jet_cylinder/environment.py @@ -249,6 +249,10 @@ def step(self, action): r"""Distribute the control action smoothly and linearly over `self.action_interval` simulation time steps.""" return self._smooth_step(action) + def reset(self, seed=None, options=None): + self._prerun_data_required = self._latest_available_sim_time > 0.0 + return super().reset(seed=seed, options=options) + def _get_action(self, action, write_var_list): acuation_interface_field = self._action_to_patch_field(action) write_data = { diff --git a/closed_loop_AFC/rotating_cylinder/environment.py b/closed_loop_AFC/rotating_cylinder/environment.py index 42c6be5..f7689a7 100644 --- a/closed_loop_AFC/rotating_cylinder/environment.py +++ b/closed_loop_AFC/rotating_cylinder/environment.py @@ -240,6 +240,10 @@ def step(self, action): r"""Distribute the control action smoothly and linearly over `self.action_interval` simulation time steps.""" return self._smooth_step(action) + def reset(self, seed=None, options=None): + self._prerun_data_required = self._latest_available_sim_time > 0.0 + return super().reset(seed=seed, options=options) + def _get_action(self, action, write_var_list): acuation_interface_field = self._action_to_patch_field(action) write_data = {