marota / ExpertOp4Grid

Expert System agent to operate a power grid
https://expertop4grid.readthedocs.io/en/latest
Mozilla Public License 2.0
7 stars 2 forks source link

Avoid Error because no hubs were found #14

Closed marota closed 4 years ago

marota commented 4 years ago

At the current stage of development, AlphaDeeps only looks for substations typed as hubs to do actions there. If no hubs are detected, it is unable to find good actions, rank them and it fails. In that case we should return a do nothing action because we get an error

marota commented 4 years ago

@mjothy @NMegel

NMegel commented 4 years ago

Hi, In case there are no hubs, expert_operator function now returns ranked_combinations = [] Expert_system_results = empy dataframe actions = list with only one grid2op do_nothing action

See commit 5483f95c0f719c41d1e50683f4017cd9bf1f4a13

marota commented 4 years ago

@NMegel did you have a test case for that on which you validated it is now working?

NMegel commented 4 years ago

You can test with: python -m alphaDeesp.main -l 9 -t 2 -c 1 on network l2rpn_2019

marota commented 4 years ago

Ok it is a good case and works. Can you add this test ("when no hubs exist") also to the test suit ?

NMegel commented 4 years ago

Done in commit cc033044422aa07134320be30287e2ec8c6ae7e2