Skip to content

Commit 8934ddd

Browse files
author
yassine abdou
committed
fix : bug update thermal limit
1 parent a9d6ff0 commit 8934ddd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

grid2op/Environment/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def reset_grid(self,
962962
# self.backend.assert_grid_correct()
963963

964964
if self._thermal_limit_a is not None:
965-
self.backend.set_thermal_limit(self._thermal_limit_a.astype(dt_float))
965+
self.ts_manager.limits = self._thermal_limit_a.astype(dt_float)
966966

967967
self._backend_action = self._backend_action_class()
968968
self.nb_time_step = -1 # to have init obs at step 1 (and to prevent 'setting to proper state' "action" to be illegal)

grid2op/Episode/EpisodeReboot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def load(self, backend, agent_path=None, name=None, data=None, env_kwargs={}):
182182
del env_kwargs["opponent_class"]
183183
if "name" in env_kwargs:
184184
del env_kwargs["name"]
185+
if "ts_manager" in env_kwargs:
186+
del env_kwargs["ts_manager"]
185187

186188
seed = None
187189
with open(os.path.join(agent_path, name, "episode_meta.json")) as f:

0 commit comments

Comments
 (0)