diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92a60c6f..a3cdc17e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/grid2op/Observation/baseObservation.py b/grid2op/Observation/baseObservation.py index 0b716e81..1f9849aa 100644 --- a/grid2op/Observation/baseObservation.py +++ b/grid2op/Observation/baseObservation.py @@ -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 @@ -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: diff --git a/grid2op/gym_compat/box_gym_obsspace.py b/grid2op/gym_compat/box_gym_obsspace.py index 298488cb..fa88d303 100644 --- a/grid2op/gym_compat/box_gym_obsspace.py +++ b/grid2op/gym_compat/box_gym_obsspace.py @@ -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