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

Allow for grid elements that are not controllable but part of the power grid #217

Closed
janviebahn opened this issue Jun 3, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@janviebahn
Copy link

janviebahn commented Jun 3, 2021

Is your feature request related to a problem? Please describe.

My grid.json (a pandapower grid) includes elements like sgen or trafo3w. These elements are currently not modelled in grid2op. When initializing the grid (using grid2op.make) I do NOT get an error in the Pandapower backend but in GridObjects.py (line 1574)

BackendError: Grid2OpException BackendError "There are 245 bus with 0 element connected to it."

The reason is that these extra elements are not included in sub_info, and that some busbars only connect to these kind of elements.

Note that I'm using Grid2Op v1.5.0.

Describe the solution you'd like

It would be great if all power system elements in a pandapower grid model are accepted by grid2op. These are, of course, important for the load flow calculations.
I'm not asking (yet) that these elements need to be controllable by the agent. They do not need to appear in the action space.

@janviebahn janviebahn added the enhancement New feature or request label Jun 3, 2021
@BDonnot BDonnot added the help wanted Extra attention is needed label Jun 3, 2021
@BDonnot
Copy link
Collaborator

BDonnot commented Jun 3, 2021

Hello,

In order to help you solve your issue, an access to a grid (maybe not the grid you're using) that has the same problem you encounter would be much appreciated.

It is really hard (if not impossible) to solve a problem without being able to reproduce it.

@BDonnot
Copy link
Collaborator

BDonnot commented Jun 3, 2021

This causes this kind of bug:
image

And can be solved (ugly manner) by deactivating the check.:

Just comment the two lines 1573 and 1574 in the file in /home/cdsw/.local/lib/python3.6/site-packages/grid2op/grid2op/Space/GridObjects.py

@janviebahn janviebahn mentioned this issue Jun 3, 2021
@janviebahn
Copy link
Author

janviebahn commented Jun 3, 2021

Hello,

In order to help you solve your issue, an access to a grid (maybe not the grid you're using) that has the same problem you encounter would be much appreciated.

It is really hard (if not impossible) to solve a problem without being able to reproduce it.

The problem can be easily reproduced. In order to create a grid_modified.json (it is also attached) you can start out from rte_case5_example/grid.json and apply the following code

`import pandapower as pp

net = pp.from_json("grid.json")

pp.create_bus(net, name = "substation_6", vn_kv = 20)
pp.create_bus(net, name = "substation_7", vn_kv = 10)
pp.create_transformer3w(net, hv_bus = 4, mv_bus = 5, lv_bus = 6, name = "trafo3w", std_type = "63/25/38 MVA 110/20/10 kV")
pp.create_sgen(net, 6, p_mw = -10)
pp.create_shunt(net, 5, 10)

pp.to_json(net, "grid_modified.json")`

Then use grid_modified.json in rte_case5_example and try to do

env = grid2op.make("/home/cdsw/.local/lib/python3.6/site-packages/grid2op/data/rte_case5_example")

For grid2op the two new buses substation_6 and substation_7 will not be connected to any elements although they are connected to a trafo3w, a sgen and a shunt, respectively.

image

grid_modified.zip

@BDonnot
Copy link
Collaborator

BDonnot commented Jun 9, 2021

Issue is fixed, new changes can be obtained by installing the dev version of grid2op:

pip install git+git://github.com/rte-france/grid2op.git@dev_1.6.0

@BDonnot
Copy link
Collaborator

BDonnot commented Jun 22, 2021

Fixed and merged in version 1.6.0, now available on pypi

@BDonnot BDonnot closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants