Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure a DC Load Flow backend #666

Open
mhassouna95 opened this issue Nov 25, 2024 · 1 comment
Open

Configure a DC Load Flow backend #666

mhassouna95 opened this issue Nov 25, 2024 · 1 comment

Comments

@mhassouna95
Copy link

mhassouna95 commented Nov 25, 2024

Hi,

Is it possible to configure grid2op to use a DC solver e.g. with lightsim2grid or with Pandapower backend?

I see some code regarding DC in the PandapowerBackend but nowhere on how to configure it.

Thanks!

@BDonnot
Copy link
Collaborator

BDonnot commented Nov 26, 2024

Hello,

Yes it is perfectly possible to do so.

You can easily do it in the parameters, for example with

import grid2op
from lightsim2grid import LightSimBackend
env_name = "l2rpn_case14_sandbox"
env = grid2op.make(env_name, backend=LightSimBackend())
params = env.parameters
params.ENV_DC = True
env.change_parameters(params)
env.change_forecast_parameters(params)
obs = env.reset(...)

If you create an environment, you can also pass it into the "parameters" used by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants