You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "grid2op/Observation/CompleteObservation.py", line 206, in update
self._shunt_p[:] = sh_p
ValueError: could not broadcast input array from shape (0) into shape (6)
When doing env.step(action) your get the following:
Environment
1.6.0
osx
Bug description
Bug when simulating an action leading to a diverging powerflow with LightSim.
How to reproduce
Code snippet
Current output
File "grid2op/Observation/CompleteObservation.py", line 206, in update
self._shunt_p[:] = sh_p
ValueError: could not broadcast input array from shape (0) into shape (6)
When doing env.step(action) your get the following:
(<grid2op.Space.GridObjects.CompleteObservation_input_data_val at 0x7f815e84aa60>,
-1.0,
True,
{'disc_lines': array([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1,
1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
0, -1, -1, -1, -1, -1, -1, -1], dtype=int32),
'is_illegal': False,
'is_ambiguous': False,
'is_dispatching_illegal': False,
'is_illegal_reco': False,
'reason_alarm_illegal': None,
'opponent_attack_line': None,
'opponent_attack_sub': None,
'opponent_attack_duration': 0,
'exception': [Grid2OpException DivergingPowerFlow DivergingPowerFlow('divergence of powerflow (non connected grid)')],
'rewards': {}})
Or doing the same simulate but with pandapower you get:
(<grid2op.Space.GridObjects.CompleteObservation_input_data_val at 0x7fd3ab019eb0>,
-1.0,
True,
{'disc_lines': array([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1,
1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
0, -1, -1, -1, -1, -1, -1, -1], dtype=int32),
'is_illegal': False,
'is_ambiguous': False,
'is_dispatching_illegal': False,
'is_illegal_reco': False,
'reason_alarm_illegal': None,
'opponent_attack_line': None,
'opponent_attack_sub': None,
'opponent_attack_duration': 0,
'exception': [Grid2OpException DivergingPowerFlow DivergingPowerFlow('powerflow diverged with error :"Power Flow nr did not converge after 10 iterations!"')],
'rewards': {}})
Expected output
The text was updated successfully, but these errors were encountered: