Skip to content

Commit

Permalink
fix issue #65
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed May 5, 2020
1 parent 537b5cc commit d045efe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grid2op/Reward/L2RPNSandBoxScore.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from grid2op.Reward.BaseReward import BaseReward
from grid2op.dtypes import dt_float


class L2RPNSandBoxScore(BaseReward):
"""
This score represent the L2RPN score.
Expand All @@ -32,7 +33,7 @@ def __call__(self, action, env, has_error, is_done, is_illegal, is_ambiguous):
losses = np.sum(gen_p, dtype=dt_float) - np.sum(load_p, dtype=dt_float)

# compute the marginal cost
p_t = np.max(env.gen_cost_per_MW[env.gen_activeprod_t > 0.], dtype=dt_float)
p_t = np.max(env.gen_cost_per_MW[env.gen_activeprod_t > 0.]).astype(dt_float)

# redispatching amount
c_redispatching = dt_float(2.0) * self.alpha_redisph * np.sum(np.abs(env.actual_dispatch)) * p_t
Expand Down

0 comments on commit d045efe

Please sign in to comment.