-
Notifications
You must be signed in to change notification settings - Fork 12
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
Topovec is wrong when elements are lost by propagation #966
Conversation
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
@@ -113,3 +113,23 @@ def test_backend_copy(): | |||
with open(data_file, 'rb') as f: | |||
with pickle.load(f) as backend2: | |||
npt.assert_allclose(np.array([630.0]), backend2.get_double_value(grid2op.DoubleValueType.LOAD_P), rtol=TOLERANCE, atol=TOLERANCE) | |||
|
|||
|
|||
def test_backend_disconnection_issue(): |
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.
Perfect test :-)
private final LoadFlowProvider loadFlowProvider = LoadFlowProvider.findAll().stream() | ||
.filter(p -> p.getName().equals("OpenLoadFlow")) | ||
.findFirst() | ||
.orElseThrow(); | ||
private final LoadFlow.Runner loadFlowRunner = new LoadFlow.Runner(loadFlowProvider); | ||
|
||
public Backend(Network network, boolean considerOpenBranchReactiveFlow, int busesPerVoltageLevel, boolean connectAllElementsToFirstBus) { | ||
public Backend(Network network, boolean considerOpenBranchReactiveFlow, boolean checkIsolatedAndDisconnectedInjections, |
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.
Not sure i'm entirely following everything happening here, but I think I have a global understanding of what is happening.
Plus there is a test to make sure the behaviour is working as intended.
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.
Fine by me, even though i'm not 100% qualified to comment exactly on the java implementation.
|
|
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Grid2op/pypowsybl2grid#12
What kind of change does this PR introduce?
Bug fix
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: