-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improve performance of incremental outer loops #895
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
cb683c0
improve transfo outerloop
caioluke 58b6fa8
improve shunt outerloop
caioluke 394480e
remove useless code
caioluke 06c8910
Merge branch 'main' into improve_sentivity_outerloops
caioluke b24fea6
Merge branch 'main' into improve_sentivity_outerloops
caioluke d94a0f3
transfo outerloop ok
caioluke 37b978a
shunt outerloop ok
caioluke 75afffe
shunt outerloop now is ok
caioluke 0c8784e
Merge branch 'main' into improve_sentivity_outerloops
jeandemanged 221aaa2
Merge branch 'main' into improve_sentivity_outerloops
caioluke b7d7535
Merge branch 'main' into improve_sentivity_outerloops
annetill ec17cb4
Merge branch 'main' into improve_sentivity_outerloops
caioluke 7be85a9
Merge branch 'main' into improve_sentivity_outerloops
caioluke 1995b01
Merge branch 'main' into improve_sentivity_outerloops
annetill 5e560d0
proposition of refactoring getControlledBuses and getControllerElemen…
caioluke 7139686
Proposal.
annetill 121c9f8
wip
caioluke dfa20cd
Revert "wip"
annetill 39242b2
Fix.
annetill 4d4fed2
Fix.
annetill f2780f6
add test for transformerIncrementalOuterloop
caioluke 592a1a2
Fix unit test.
annetill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -363,6 +363,85 @@ void remoteVoltageControlT2wtTest2() { | |
assertEquals(3, t2wt.getRatioTapChanger().getTapPosition()); | ||
} | ||
|
||
@Test | ||
void testIncrementalVoltageControlWithGenerator() { | ||
selectNetwork(VoltageControlNetworkFactory.createNetworkWithT2wt()); | ||
|
||
Substation substation = network.newSubstation() | ||
.setId("SUBSTATION4") | ||
.setCountry(Country.FR) | ||
.add(); | ||
VoltageLevel vl4 = substation.newVoltageLevel() | ||
.setId("VL_4") | ||
.setNominalV(33.0) | ||
.setLowVoltageLimit(0) | ||
.setHighVoltageLimit(100) | ||
.setTopologyKind(TopologyKind.BUS_BREAKER) | ||
.add(); | ||
Bus bus4 = vl4.getBusBreakerView().newBus() | ||
.setId("BUS_4") | ||
.add(); | ||
vl4.newLoad() | ||
.setId("LOAD_4") | ||
.setBus("BUS_4") | ||
.setP0(2.) | ||
.setQ0(0.5) | ||
.add(); | ||
|
||
Line line34 = network.newLine() | ||
.setId("LINE_34") | ||
.setBus1("BUS_3") | ||
.setBus2("BUS_4") | ||
.setR(1.05) | ||
.setX(10.0) | ||
.setG1(0.0000005) | ||
.add(); | ||
|
||
parameters.setTransformerVoltageControlOn(true); | ||
parametersExt.setTransformerVoltageControlMode(OpenLoadFlowParameters.TransformerVoltageControlMode.INCREMENTAL_VOLTAGE_CONTROL); | ||
|
||
t2wt.getRatioTapChanger() | ||
.setTargetDeadband(0) | ||
.setRegulating(true) | ||
.setTapPosition(0) | ||
.setRegulationTerminal(line34.getTerminal2()) | ||
.setTargetV(33.0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change this targetV to 30.0 to show the benefit of the bug fix. |
||
|
||
Generator g4 = vl4.newGenerator() | ||
.setId("GEN_4") | ||
.setBus("BUS_4") | ||
.setMinP(0.0) | ||
.setMaxP(30) | ||
.setTargetP(5) | ||
.setTargetV(33) | ||
.setVoltageRegulatorOn(true) | ||
.add(); | ||
|
||
// Generator reactive capability is enough to hold voltage target | ||
LoadFlowResult result = loadFlowRunner.run(network, parameters); | ||
assertTrue(result.isOk()); | ||
assertVoltageEquals(33, bus4); | ||
assertEquals(0, t2wt.getRatioTapChanger().getTapPosition()); | ||
assertReactivePowerEquals(-7.110, g4.getTerminal()); | ||
|
||
g4.newMinMaxReactiveLimits().setMinQ(-3.5).setMaxQ(3.5).add(); | ||
// Generator reactive capability is not enough to hold voltage target and rtc is deactivated | ||
t2wt.getRatioTapChanger().setRegulating(false); | ||
LoadFlowResult result2 = loadFlowRunner.run(network, parameters); | ||
assertTrue(result2.isOk()); | ||
assertVoltageEquals(31.032, bus4); | ||
assertEquals(0, t2wt.getRatioTapChanger().getTapPosition()); | ||
assertReactivePowerEquals(-3.5, g4.getTerminal()); | ||
|
||
// Generator reactive capability is not enough to hold voltage alone but with rtc it is ok | ||
t2wt.getRatioTapChanger().setRegulating(true); | ||
LoadFlowResult result3 = loadFlowRunner.run(network, parameters); | ||
assertTrue(result3.isOk()); | ||
assertVoltageEquals(33, bus4); | ||
assertEquals(1, t2wt.getRatioTapChanger().getTapPosition()); | ||
assertReactivePowerEquals(-1.172, g4.getTerminal()); | ||
} | ||
|
||
@Test | ||
void nonSupportedVoltageControlT2wtTest() { | ||
selectNetwork(VoltageControlNetworkFactory.createNetworkWithT2wt()); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jeandemanged and @geofjamg bug fix here. We have to check the voltage difference against the voltage control of highest priority, most of the time those of the generator and not those of the transformer.