-
Notifications
You must be signed in to change notification settings - Fork 134
[WIP] Create Protection and ThermalLimits classes to delegate calculations from the backend #687
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
base: dev_1.11.0
Are you sure you want to change the base?
Conversation
|
Hello, Thanks for this. Can you please :
Thanks 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
|



No description provided.