Skip to content

Commit

Permalink
Change ordering of obs in EVChargingEnv to match paper
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisyeh96 committed Oct 16, 2023
1 parent 5a231ca commit 16464ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sustaingym/envs/evcharging/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,20 @@ def __init__(self, data_generator: AbstractTraceGenerator,
self._timestep_obs = np.zeros(1, dtype=np.float32) # timestep normalized to [0, 1]

self.observation_space = spaces.Dict({
'timestep': spaces.Box(0, 1, shape=(1,), dtype=np.float32),
'est_departures': spaces.Box(-288, 288, shape=(self.num_stations,), dtype=np.float32),
'demands': spaces.Box(0, self.data_generator.requested_energy_cap,
shape=(self.num_stations,), dtype=np.float32),
'prev_moer': spaces.Box(0, 1, shape=(1,), dtype=np.float32),
'forecasted_moer': spaces.Box(0, 1, shape=(self.moer_forecast_steps,), dtype=np.float32),
'timestep': spaces.Box(0, 1, shape=(1,), dtype=np.float32),
})

self._obs = {
'timestep': self._timestep_obs,
'est_departures': self._est_departures,
'demands': self._demands,
'prev_moer': self._prev_moer,
'forecasted_moer': self._forecasted_moer,
'timestep': self._timestep_obs,
}

# Track cumulative components of reward signal
Expand Down

0 comments on commit 16464ab

Please sign in to comment.