Skip to content

Commit 52a4eec

Browse files
committed
[src/rl] Fix action steps
1 parent 6059acc commit 52a4eec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/evsim/envs/fleet_env.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def realtime(self):
4343
def init_sim(self):
4444
cfg = SimulationConfig()
4545
self.controller = Controller(
46-
cfg, strategy.integrated, accuracy=(70, 90), imbalance_costs=3000
46+
cfg, strategy.integrated, accuracy=(70, 90), imbalance_costs=8000
4747
)
4848
self.sim = Simulation(cfg, self.controller)
4949

@@ -56,8 +56,8 @@ def seed(self, seed=None):
5656

5757
def step(self, action):
5858
# Transform "flat" action back to tuple
59-
rb = 0.5 + (action // 11) / 20
60-
ri = 0.5 + (action % 11) / 20
59+
rb = (action // 11) / 20
60+
ri = (action % 11) / 20
6161

6262
balance, done = self.sim.step(risk=(rb, ri), minutes=15)
6363
reward = balance - self.curr_balance

0 commit comments

Comments
 (0)