-
Notifications
You must be signed in to change notification settings - Fork 43
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
Support of condensers #3065
Support of condensers #3065
Changes from all commits
309b9d1
b5285a3
9803f80
efc4472
ab2f147
de42480
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,8 @@ class GeneratorAdderImpl extends AbstractInjectionAdder<GeneratorAdderImpl> impl | |
|
||
private double ratedS = Double.NaN; | ||
|
||
private boolean isCondenser = false; | ||
|
||
GeneratorAdderImpl(VoltageLevelExt voltageLevel) { | ||
this.voltageLevel = voltageLevel; | ||
} | ||
|
@@ -96,6 +98,12 @@ public GeneratorAdder setRatedS(double ratedS) { | |
return this; | ||
} | ||
|
||
@Override | ||
public GeneratorAdder setCondenser(boolean isCondenser) { | ||
this.isCondenser = isCondenser; | ||
return this; | ||
} | ||
|
||
@Override | ||
public GeneratorImpl add() { | ||
NetworkImpl network = getNetwork(); | ||
|
@@ -121,7 +129,7 @@ id, getName(), isFictitious(), energySource, | |
minP, maxP, | ||
voltageRegulatorOn, regulatingTerminal != null ? regulatingTerminal : terminal, | ||
targetP, targetQ, targetV, | ||
ratedS); | ||
ratedS, isCondenser); | ||
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. @geofjamg I think that we have to add a validity checks or not, need to think about it:
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.
I'd be against that, or, for a practical use, it would require
My call would be that isCondenser should be used/checked only when targetP is zero. |
||
generator.addTerminal(terminal); | ||
voltageLevel.attach(terminal, false); | ||
network.getIndex().checkAndAdd(generator); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.serde; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* @author Florian Dupuy {@literal <florian.dupuy at rte-france.com>} | ||
*/ | ||
class GeneratorSerDeTest extends AbstractIidmSerDeTest { | ||
|
||
@Test | ||
void isCondenserTest() throws IOException { | ||
allFormatsRoundTripFromVersionedXmlFromMinVersionTest("generator.xml", IidmVersion.V_1_12); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<iidm:network xmlns:iidm="http://www.powsybl.org/schema/iidm/1_12" id="internal-connections" caseDate="2018-11-08T12:33:26.208+01:00" forecastDistance="0" sourceFormat="test" minimumValidationLevel="STEADY_STATE_HYPOTHESIS"> | ||
<iidm:substation id="substation" country="FI"> | ||
<iidm:voltageLevel id="voltageLevel" nominalV="400.0" topologyKind="NODE_BREAKER"> | ||
<iidm:nodeBreakerTopology> | ||
<iidm:busbarSection id="bbs" node="3"/> | ||
<iidm:switch id="breaker1" kind="BREAKER" retained="false" open="false" node1="0" node2="3"/> | ||
<iidm:switch id="breaker2" kind="BREAKER" retained="false" open="false" node1="1" node2="3"/> | ||
<iidm:switch id="breaker3" kind="BREAKER" retained="false" open="false" node1="2" node2="3"/> | ||
</iidm:nodeBreakerTopology> | ||
<iidm:generator id="generator1" energySource="OTHER" minP="0.0" maxP="100.0" voltageRegulatorOn="true" targetP="10.0" targetV="400.0" node="0"> | ||
<iidm:minMaxReactiveLimits minQ="-1.7976931348623157E308" maxQ="1.7976931348623157E308"/> | ||
</iidm:generator> | ||
<iidm:generator id="generator2" energySource="OTHER" minP="0.0" maxP="100.0" voltageRegulatorOn="true" targetP="10.0" targetV="400.0" node="1"> | ||
<iidm:minMaxReactiveLimits minQ="-1.7976931348623157E308" maxQ="1.7976931348623157E308"/> | ||
</iidm:generator> | ||
<iidm:load id="load" loadType="UNDEFINED" p0="10.0" q0="1.0" node="2"/> | ||
</iidm:voltageLevel> | ||
</iidm:substation> | ||
</iidm:network> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<iidm:network xmlns:iidm="http://www.powsybl.org/schema/iidm/1_13" id="internal-connections" caseDate="2018-11-08T12:33:26.208+01:00" forecastDistance="0" sourceFormat="test" minimumValidationLevel="STEADY_STATE_HYPOTHESIS"> | ||
<iidm:substation id="substation" country="FI"> | ||
<iidm:voltageLevel id="voltageLevel" nominalV="400.0" topologyKind="NODE_BREAKER"> | ||
<iidm:nodeBreakerTopology> | ||
<iidm:busbarSection id="bbs" node="3"/> | ||
<iidm:switch id="breaker1" kind="BREAKER" retained="false" open="false" node1="0" node2="3"/> | ||
<iidm:switch id="breaker2" kind="BREAKER" retained="false" open="false" node1="1" node2="3"/> | ||
<iidm:switch id="breaker3" kind="BREAKER" retained="false" open="false" node1="2" node2="3"/> | ||
</iidm:nodeBreakerTopology> | ||
<iidm:generator id="generator1" energySource="OTHER" minP="0.0" maxP="100.0" voltageRegulatorOn="true" targetP="10.0" targetV="400.0" isCondenser="true" node="0"> | ||
<iidm:minMaxReactiveLimits minQ="-1.7976931348623157E308" maxQ="1.7976931348623157E308"/> | ||
</iidm:generator> | ||
<iidm:generator id="generator2" energySource="OTHER" minP="0.0" maxP="100.0" voltageRegulatorOn="true" targetP="10.0" targetV="400.0" node="1"> | ||
<iidm:minMaxReactiveLimits minQ="-1.7976931348623157E308" maxQ="1.7976931348623157E308"/> | ||
</iidm:generator> | ||
<iidm:load id="load" loadType="UNDEFINED" p0="10.0" q0="1.0" node="2"/> | ||
</iidm:voltageLevel> | ||
</iidm:substation> | ||
</iidm:network> |
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 or under Pmin?
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.
in OLF we have another parameter to disable voltage control if outside Pmin or Pmax (globally, not specific to condensers).