ChroniX2Grid
ChroniX2Grid copied to clipboard
Some solar generators are above Pmax
It is the case for the environment "l2rpn_icaps_2021_small".
how to reproduce:
import grid2op
from lightsim2grid import LightSimBackend
import numpy as np
env = grid2op.make("l2rpn_icaps_2021_small", backend=LightSimBackend())
done = False
step = 0
while not done:
obs, reward, done, info = env.step(env.action_space())
if (obs.gen_p > obs.gen_pmax).any():
print(f"Pmax error at step {step}")
break
step += 1
which_gen = np.where(obs.gen_p > obs.gen_pmax)[0][0]
gen_type = obs.gen_type[which_gen]
print(f"Generator {which_gen} ({gen_type}) is above Pmax at step {step}! "
f"({obs.gen_p[which_gen]:.2f} MW > {obs.gen_pmax[which_gen]:.2f} MW)")
It prints:
Pmax error at step 109
Generator 18 (solar) is above Pmax at step 109! (77.50 MW > 74.70 MW)
It should not happen and there should have been tests to make sur this does not !