I am not sure whether this a bug per se, but it is something that impacts agents performance significantly. When applying (simulate or step) with a set action while a line is disconnected, all substations that are adjacent to the line are rendered useless. This is the case because the substation reconf. actions always set all buses (inlcuding that of the disconnected powerline) which results in an error. This is particularly bad when a line adjacent to a large substation is disconnected, leading to invalidation of almost the whole action space.
(<grid2op.Space.GridObjects.CompleteObservation_l2rpn_wcci_2022 object at 0x7efba377c2e0>, 0.0, False, {'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, -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, -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, -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],
dtype=int32), 'is_illegal': True, 'is_ambiguous': False, 'is_dispatching_illegal': False, 'is_illegal_reco': False, 'reason_alarm_illegal': None, 'reason_alert_illegal': None, 'opponent_attack_line': None, 'opponent_attack_sub': None, 'opponent_attack_duration': 0, 'exception': [Grid2OpException IllegalAction IllegalAction('Powerline with ids [0] have been modified illegally (cooldown of [3])')], 'time_series_id': None, 'rewards': {}})
Environment.
1.9.8Rocky Linux 9.4Bug description
I am not sure whether this a bug per se, but it is something that impacts agents performance significantly. When applying (simulate or step) with a set action while a line is disconnected, all substations that are adjacent to the line are rendered useless. This is the case because the substation reconf. actions always set all buses (inlcuding that of the disconnected powerline) which results in an error. This is particularly bad when a line adjacent to a large substation is disconnected, leading to invalidation of almost the whole action space.
How to reproduce
Code snippet
Current output
Expected output