Skip to content

Commit

Permalink
Merge pull request #668 from BDonnot/bd_dev
Browse files Browse the repository at this point in the history
Fix issue #665 and CI build
  • Loading branch information
BDonnot authored Nov 28, 2024
2 parents 26e8e33 + 2483987 commit c6754d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
manylinux_build:
name: Build linux ${{ matrix.python.name }} wheel
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
container: quay.io/pypa/manylinux_2_28_x86_64
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
GHA_USE_NODE_20: false
Expand Down
15 changes: 11 additions & 4 deletions grid2op/Observation/baseObservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,10 +1253,10 @@ def reset(self) -> None:
self.rho[:] = np.NaN

# cool down and reconnection time after hard overflow, soft overflow or cascading failure
self.time_before_cooldown_line[:] = -1
self.time_before_cooldown_sub[:] = -1
self.time_next_maintenance[:] = -1
self.duration_next_maintenance[:] = -1
self.time_before_cooldown_line[:] = 0
self.time_before_cooldown_sub[:] = 0
self.time_next_maintenance[:] = 0
self.duration_next_maintenance[:] = 0
self.timestep_overflow[:] = 0

# calendar data
Expand Down Expand Up @@ -1318,6 +1318,13 @@ def reset(self) -> None:
self.current_step = dt_int(0)
self.max_step = dt_int(np.iinfo(dt_int).max)
self.delta_time = dt_float(5.0)

self._thermal_limit[:] = 0.
self.curtailment_limit[:] = 0.
self.gen_margin_up[:] = 0.
self.gen_margin_down[:] = 0.
self.curtailment_limit_effective[:] = 0.
self.curtailment[:] = 0.

def set_game_over(self,
env: Optional["grid2op.Environment.Environment"]=None) -> None:
Expand Down
1 change: 1 addition & 0 deletions grid2op/gym_compat/box_gym_obsspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ def __init__(

# handle the "functional" part
self._template_obs = ob_sp._template_obj.copy()
self._template_obs.reset()
self.__func = {}

self._dims = None
Expand Down

0 comments on commit c6754d1

Please sign in to comment.