Skip to content

Commit

Permalink
fix a bug when setting thermal limit with obs_env
Browse files Browse the repository at this point in the history
Signed-off-by: DONNOT Benjamin <[email protected]>
  • Loading branch information
BDonnot committed Dec 2, 2024
1 parent f10836e commit ea78fdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ Native multi agents support:
object you tried to modified (for example a list with a size of `n_load` that affected the loads))
- [FIXED] a bug when using the `DoNothingHandler` for the maintenance and the
environment data
- [FIXED] an issue preventing to set the thermal limit in the options
if the last simulated action lead to a game over
- [ADDED] possibility to set the "thermal limits" when calling `env.reset(..., options={"thermal limit": xxx})`
- [ADDED] possibility to retrieve some structural information about elements with
with `gridobj.get_line_info(...)`, `gridobj.get_load_info(...)`, `gridobj.get_gen_info(...)`
Expand Down
2 changes: 2 additions & 0 deletions grid2op/Environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,8 @@ def reset(self,
if ambiguous:
raise Grid2OpException("You provided an invalid (ambiguous) action to set the 'init state'") from except_tmp
init_state.remove_change()
if self.observation_space.obs_env is not None:
self.observation_space.obs_env.reset()
super().reset(seed=seed, options=options)

if options is not None and "max step" in options:
Expand Down

0 comments on commit ea78fdb

Please sign in to comment.