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

A problem about flow_bus_matrix method. #220

Closed
wzz-wzz-wzz opened this issue Jun 6, 2021 · 6 comments
Closed

A problem about flow_bus_matrix method. #220

wzz-wzz-wzz opened this issue Jun 6, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@wzz-wzz-wzz
Copy link

Environment

  • Grid2op version: 1.5.2
  • System: ubuntu18.04

Bug description

In the l2rpn_case14_sandbox environment, if I perform an action related to disconnection, the flow bus matrix can not be obtained, and because of this, I can not get the networkx graph either.

How to reproduce

Code snippet

import grid2op
env_name = 'l2rpn_case14_sandbox'
env = grid2op.make(env_name)
obs = env.reset()
action = env.action_space()
action.change_line_status = [9]
new_obs, *_ = env.step(action)
flow_matrix = new_obs.flow_bus_matrix()

Current output

ValueError: row, column, and data array must all be the same length

Expected output

I want to get a flow bus matrix or networkx graph when I perform an action related to disconnection. Thanks a lot!
@wzz-wzz-wzz wzz-wzz-wzz added the bug Something isn't working label Jun 6, 2021
BDonnot referenced this issue in BDonnot/Grid2Op Jun 7, 2021
@BDonnot
Copy link
Collaborator

BDonnot commented Jun 7, 2021

Hello,

Thanks for reporting this issue. I just fixed in the branch development. It will be included in the next release (coming soon, this week or the next)

@BDonnot
Copy link
Collaborator

BDonnot commented Jun 7, 2021

The bugfix is available in the "development" version of grid2op that you can install with:
pip install git+git://github.com/rte-france/grid2op.git@dev_1.6.0

@wzz-wzz-wzz
Copy link
Author

Oh, thank you very much! I just tried this new version and it worked! @BDonnot

@BDonnot BDonnot reopened this Jun 7, 2021
@BDonnot
Copy link
Collaborator

BDonnot commented Jun 7, 2021

I am reoppening this issue because the fix is not pushed on pypi (yet) and other people can encounter this issue with version 1.5.2 (last stable release).

I will close it after the fix is stable :-)

EDIT: by "fix is stable" I mean "the fix i made is merged in the stable package version". This fix is final, in the sense that except if another bug is found, the fix will stay "as is" :-)

@wzz-wzz-wzz
Copy link
Author

OK, I understand. Thanks again! @BDonnot

@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
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants