Grid2op/grid2op

Prevent the environment from disconnecting a chosen set of lines even in case of overflow

Closed this issue · 3 comments

Description of the feature request

By default, the environment disconnects the powerlines above their thermal limit. I need a feature that prevents the environment from disconnecting a chosen set of lines even if their flow is above their thermal limit.

Additional context

I need to train an agent that handles a specific zone of the power grid. The agent only cares about the safety of its zone. Overflows outside its zone do not concern it and would interfere with its training.
I need this feature to avoid blackouts caused by an overflow on the rest of the grid.

Hello,

You can use the new feature by:

First nstalling grid2op from source from the github https://github.com/rte-france/Grid2Op.git installing branch dev_1.9.8 (it should show version 1.9.8.dev0)

Then you can create a masked environment with:

import grid2op
from grid2op.Environment import MaskedEnvironment

lines_I_care_about = np.zeros(n_line, dtype=bool)
lines_I_care_about[IDs of these lines] = True

env = MaskedEnvironment(grid2op.make(env_name),
                        lines_of_interest=lines_I_care_about))

I did not completely test it but it should be working relatively well, i'll try to test it more in depth ASAP

Hello Benjamin,

Thank you a lot for making this feature available so quickly !

:)

Added in 1.9.8 version :-)