[WIP] Create Protection and ThermalLimits classes to delegate calculations from the backend#687
[WIP] Create Protection and ThermalLimits classes to delegate calculations from the backend#687YacineAbd wants to merge 8 commits intoGrid2op:dev_1.11.0from
Conversation
|
Hello, Thanks for this. Can you please :
Thanks 😊 |
BDonnot
left a comment
There was a problem hiding this comment.
We cannot merge it in the correct branch.
And there are some other tests that need to be made, especially for the soft overflow but also for some corner cases (see my comments above)
| from grid2op.Backend.thermalLimits import ThermalLimits | ||
| from grid2op.Backend.protectionScheme import DefaultProtection, NoProtection | ||
|
|
||
| class TestProtection(unittest.TestCase): |
There was a problem hiding this comment.
General comment: coding language of grid2op is english. Would it be possible to translate all French here please ? Thanks
| self.default_protection._disconnect_lines(lines_to_disconnect, timestep=1) | ||
| self.mock_backend._disconnect_line.assert_called_once_with(1) | ||
|
|
||
| def test_next_grid_state(self): |
There was a problem hiding this comment.
For the "normal" protection there are 3 cases:
- no overflow with consequences: overflow counter is reset to 0, lines in this case are not disconnected
- "hard overflow" (flow above HARD_OVERFLOW_THRESHOLD * limit for a line), line is instantly disconnected and cannod be reconnected
- "soft overflow" : with two expected behaviour
- either the line is on overflow for less than "NB_TIMESTEP_OVERFLOW_ALLOWED" (or a similar name not checked in the code) in this case the only consquence is that the overflow counter is increased by 1
- or the line has been on overflow for more than "NB_TIMESTEP_OVERFLOW_ALLOWED" in this case the line is disconnected
If the line is disconnected, then another powerflow you be called.
The "overflow counter" should be increased by at most 1 for each powerline for a given call to "next_grid_state" (because a call to "next grid state" is supposed to happen instantly)
I am not sure all of the above are tested.
I don't see any test :
- for the overflow counter, in all cases
- for the soft overflow
- for the fact that the overflow counter should be increased by more than one (this is tricky to test and i'm not sure if it's covered in grid2op)
…ace of next_grid function from backend
…s functionality, while the rest of the code remains unchanged.
Signed-off-by: yassine abdou <yassine@lajavaness.com>
|



No description provided.