-
Notifications
You must be signed in to change notification settings - Fork 115
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
Expand Observation + Action to check for game-ending topology changes #597
Comments
Hello, Sorry for the late reply. This sounds like a super interesting idea. I am not sure the current implementation you propose is correct though. To check this we need to run an algorithm to check if the graph is connected or not. For example you could have one part of the graph with substation 0, 1 and 4 and all the substations connected together (for example by disconnecting lines 4->5, 4->3, 1->3 and 1-> 2). And if my understanding of your algorithm is correct, this would be ok (but maybe I read it too fast, sorry if I'm wrong here) One solution would be to convert the action to a networkx graph and then run a I'll try to work on it ASAP but it will probably not be in grid2op 1.10.2 release unfortunately |
Wahou, awesome work thank you :-) Let me know if something can be done on my end. Best Benjamin |
Not sure, we are currently using it to check whether a maintenance action is safe. Since it only works for power line status changes (won't generalize to substation topology changes) its utility is somewhat limited. Can make a pull request but not sure where it would belong? |
Expand Observation + Action to check for game-ending topology changes
I am playing around with the various options to simulate the environment. In the latest version there appear to be 4 ways:
I wanted to do a quick topology check to see that my agent does not isolate any substations For this I wanted to use Observati
Ex. This is what i do:
However, the Observation + Action method does not return a sensible bus_connectivity_matrix() nor get_energy_graph():
![EnergyGraph](https://private-user-images.githubusercontent.com/35366296/316938752-c106bfe8-5a5f-40c8-871e-5429ae88bd08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3MjczOTQsIm5iZiI6MTcyNTcyNzA5NCwicGF0aCI6Ii8zNTM2NjI5Ni8zMTY5Mzg3NTItYzEwNmJmZTgtNWE1Zi00MGM4LTg3MWUtNTQyOWFlODhiZDA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDE2MzgxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyZmRkNTE5YjRiZjE0NzI1M2NjYmMyNzMwZTM4YTYxMDliODI2ODE4MzQwYzBlNTcyMGJlNzdmOGQzMTE3ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GnF7zDwI4YRVR7EMRNcYqIx6ziRtKopOsVlUuC_NOPc)
Since there are no power flows, the energy graph is naturally empty. The bus connectivity graph is also empty, however, which I would not expect. This appears to be because "(obs + action)._done" is always True.
While the comments on add_act() method state that this functionality is not intended to check for game over conditions, it does seem to me like it would be perfect for checking if a substation (and hence any connected elements) becomes disconnected.
An equality check between the elements matrix before and after the action can see if anything has been disconnected, but this will also return False for legal bus changes (such as the
![ValidButIllegal](https://private-user-images.githubusercontent.com/35366296/316939614-2604eeea-7f60-4859-9576-24cf422374fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3MjczOTQsIm5iZiI6MTcyNTcyNzA5NCwicGF0aCI6Ii8zNTM2NjI5Ni8zMTY5Mzk2MTQtMjYwNGVlZWEtN2Y2MC00ODU5LTk1NzYtMjRjZjQyMjM3NGZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDE2MzgxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0NmI3OGEzYmNkZjk3M2FmYjFiZTBmNjYxM2YxMGZkMjFjZGE4ZTliNzAyODY4MzUwOGQwNzMyNGVmMDIyZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-Wz4rH5fT2nDSXl0r1CM8RMmU8hU7GB83YDFA5ocvzE)
change from bus 1 to 2 on Substation 12 below):
Describe alternatives you've considered
Interestingly if I set "_done = False" on the sim_obs I can get access the bus_connectivity matrix. Not sure if this is intended behaviour, but seems to me it would be nicer to be able to access it since it is not actually a game over.
Additional context
Working on extending this into a topology-check PR.
The text was updated successfully, but these errors were encountered: