Skip to content

Commit a6f9a1c

Browse files
SylvestreSaktiolperr1jeandemanged
authored
Integration and bump powsybl-core version to 7.2.0-RC1 (#1344)
* Bump IIDM version to 1.16 in unit test files (#1343) * Rename DanglingLine to BoundaryLine (#1364) * Adapt to core 3669 - Properties on MinMaxReactiveLimits (#1376) * Minimal adaptation for sensitivity analysis with operator strategies (powsybl-core 3670) (#1375) * Adaptation for new security analysis API (powsybl-core 3789) (#1377) * Bump to powsybl-core 7.2.0-RC1 * Fix doc issue : Dangling Line to Boundary Line --------- Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com> Co-authored-by: Olivier Perrin <olivier.perrin@rte-france.com> Co-authored-by: Damien Jeandemange <damien.jeandemange@artelys.com>
1 parent 35548d9 commit a6f9a1c

File tree

57 files changed

+583
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+583
-524
lines changed

docs/loadflow/loadflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Grid modeling
44

55
Open Load Flow computes power flows from IIDM grid model in bus/view topology. From the view, a very simple network, composed
6-
of only buses and branches is created. In the graph vision, we rely on a $\Pi$ model for branches (lines, transformers, dangling lines, etc.):
6+
of only buses and branches is created. In the graph vision, we rely on a $\Pi$ model for branches (lines, transformers, boundary lines, etc.):
77

88
- $R$ and $X$ are respectively the real part (resistance) and the imaginary part (reactance) of the complex impedance ;
99
- $G_1$ and $G_2$ are the real parts (conductance) on respectively side 1 and side 2 of the branch ;
@@ -272,9 +272,9 @@ In such cases the involved areas are not considered in the Area Interchange Cont
272272

273273
In iIDM each area defines the boundary points to be considered in the interchange. iIDM supports two ways of modeling area boundaries:
274274
- either via an equipment terminal,
275-
- or via a DanglingLine boundary.
275+
- or via a BoundaryLine boundary.
276276

277-
In the DanglingLine case, the flow at the boundary side is considered as it should be, for both unpaired DanglingLines and DanglingLines paired in a TieLine.
277+
In the BoundaryLine case, the flow at the boundary side is considered as it should be, for both unpaired BoundaryLines and BoundaryLines paired in a TieLine.
278278

279279
### Slack bus mismatch attribution
280280
Depending on the location of the slack bus(es), the role of distributing the active power mismatch will be attributed based on the following logic:

docs/loadflow/parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ small reactive power ranger means limited to zero voltage control capability. Th
383383
- Generators
384384
- Batteries
385385
- Voltage Source Converters
386-
- The optional generation part of a Dangling Line
386+
- The optional generation part of a Boundary Line
387387
- Static VAR compensators
388388

389389
For a given active power output, the reactive power range is defined as $MaxQ - MinQ$ (always a positive value).

docs/sensitivity/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Here is a table to summarize supported use cases:
4747
## Input function types
4848

4949
### Branch sensitivity functions :
50-
BRANCH_ACTIVE_POWER_#, BRANCH_REACTIVE_POWER_# or BRANCH_CURRENT_# are associated to branch objects (lines, transformers, dangling lines, tie lines). The # index corresponding to the side of the studied branch.
50+
BRANCH_ACTIVE_POWER_#, BRANCH_REACTIVE_POWER_# or BRANCH_CURRENT_# are associated to branch objects (lines, transformers, boundary lines, tie lines). The # index corresponding to the side of the studied branch.
5151
- If it is a line, a tie line, or a two windings transformer : The side is 1 or 2.
5252
- If it is a three windings transformer : The side is 1, 2 or 3 corresponding to the studied leg of the transformer.
53-
- If it is a dangling line : The side is 1 (network side) or 2 (boundary side). Note that if the dangling line is paired, only side 1 (network side) can be specified, and the sensitivity function is computed at the corresponding tie line side.
53+
- If it is a boundary line : The side is 1 (network side) or 2 (boundary side). Note that if the boundary line is paired, only side 1 (network side) can be specified, and the sensitivity function is computed at the corresponding tie line side.
5454

5555
### Bus sensitivity functions :
5656
BUS_VOLTAGE or BUS_REACTIVE_POWER are associated to the bus of the given network element.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<slf4jtoys.version>1.6.3</slf4jtoys.version>
5454
<asciitable.version>0.3.2</asciitable.version>
5555

56-
<powsybl-core.version>7.1.1</powsybl-core.version>
56+
<powsybl-core.version>7.2.0-RC1</powsybl-core.version>
5757

5858
<!-- This is required for later correct replacement of argline -->
5959
<argLine/>

src/main/java/com/powsybl/openloadflow/network/LfBranch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum BranchType {
3030
TRANSFO_3_LEG_1,
3131
TRANSFO_3_LEG_2,
3232
TRANSFO_3_LEG_3,
33-
DANGLING_LINE,
33+
BOUNDARY_LINE,
3434
SWITCH,
3535
TIE_LINE
3636
}

src/main/java/com/powsybl/openloadflow/network/LfBus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
package com.powsybl.openloadflow.network;
99

10+
import com.powsybl.contingency.violations.ViolationLocation;
1011
import com.powsybl.iidm.network.Country;
1112
import com.powsybl.openloadflow.util.Evaluable;
12-
import com.powsybl.security.ViolationLocation;
1313
import com.powsybl.security.results.BusResult;
1414

1515
import java.util.*;

src/main/java/com/powsybl/openloadflow/network/impl/ContingencyTripping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static ContingencyTripping createContingencyTripping(Network network, Ide
104104
TWO_WINDINGS_TRANSFORMER,
105105
TIE_LINE:
106106
return ContingencyTripping.createBranchTripping(network, (Branch<?>) identifiable);
107-
case DANGLING_LINE,
107+
case BOUNDARY_LINE,
108108
GENERATOR,
109109
LOAD,
110110
SHUNT_COMPENSATOR,

src/main/java/com/powsybl/openloadflow/network/impl/LfAreaImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ public double getP() {
101101
}
102102
if (branch instanceof LfTieLineBranch lfTieLineBranch) {
103103
if (side == TwoSides.ONE) {
104-
DanglingLine danglingLine1 = lfTieLineBranch.getHalf1();
105-
double nominalV1 = danglingLine1.getTerminal().getVoltageLevel().getNominalV();
104+
BoundaryLine boundaryLine1 = lfTieLineBranch.getHalf1();
105+
double nominalV1 = boundaryLine1.getTerminal().getVoltageLevel().getNominalV();
106106
return new SV(lfTieLineBranch.getP1().eval() * PerUnit.SB, lfTieLineBranch.getQ1().eval() * PerUnit.SB, lfTieLineBranch.getV1() * nominalV1, Math.toDegrees(lfTieLineBranch.getAngle1()), side)
107-
.otherSideP(danglingLine1, false) / PerUnit.SB;
107+
.otherSideP(boundaryLine1, false) / PerUnit.SB;
108108
} else if (side == TwoSides.TWO) {
109-
DanglingLine danglingLine = lfTieLineBranch.getHalf2();
110-
double nominalV2 = danglingLine.getTerminal().getVoltageLevel().getNominalV();
109+
BoundaryLine boundaryLine = lfTieLineBranch.getHalf2();
110+
double nominalV2 = boundaryLine.getTerminal().getVoltageLevel().getNominalV();
111111
return new SV(lfTieLineBranch.getP2().eval() * PerUnit.SB, lfTieLineBranch.getQ2().eval() * PerUnit.SB, lfTieLineBranch.getV2() * nominalV2, Math.toDegrees(lfTieLineBranch.getAngle2()), side)
112-
.otherSideP(danglingLine, false) / PerUnit.SB;
112+
.otherSideP(boundaryLine, false) / PerUnit.SB;
113113
}
114114
}
115115
return switch (side) {

src/main/java/com/powsybl/openloadflow/network/impl/LfDanglingLineBranch.java renamed to src/main/java/com/powsybl/openloadflow/network/impl/LfBoundaryLineBranch.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
package com.powsybl.openloadflow.network.impl;
99

10-
import com.powsybl.iidm.network.DanglingLine;
10+
import com.powsybl.iidm.network.BoundaryLine;
1111
import com.powsybl.iidm.network.LimitType;
1212
import com.powsybl.iidm.network.LoadingLimits;
1313
import com.powsybl.iidm.network.TwoSides;
@@ -23,46 +23,46 @@
2323
/**
2424
* @author Geoffroy Jamgotchian {@literal <geoffroy.jamgotchian at rte-france.com>}
2525
*/
26-
public class LfDanglingLineBranch extends AbstractImpedantLfBranch {
26+
public class LfBoundaryLineBranch extends AbstractImpedantLfBranch {
2727

28-
private final Ref<DanglingLine> danglingLineRef;
28+
private final Ref<BoundaryLine> boundaryLineRef;
2929

30-
protected LfDanglingLineBranch(LfNetwork network, LfBus bus1, LfBus bus2, PiModel piModel, DanglingLine danglingLine,
30+
protected LfBoundaryLineBranch(LfNetwork network, LfBus bus1, LfBus bus2, PiModel piModel, BoundaryLine boundaryLine,
3131
LfNetworkParameters parameters) {
3232
super(network, bus1, bus2, piModel, parameters);
33-
this.danglingLineRef = Ref.create(danglingLine, parameters.isCacheEnabled());
33+
this.boundaryLineRef = Ref.create(boundaryLine, parameters.isCacheEnabled());
3434
}
3535

36-
public static LfDanglingLineBranch create(DanglingLine danglingLine, LfNetwork network, LfBus bus1, LfBus bus2,
36+
public static LfBoundaryLineBranch create(BoundaryLine boundaryLine, LfNetwork network, LfBus bus1, LfBus bus2,
3737
LfNetworkParameters parameters) {
38-
Objects.requireNonNull(danglingLine);
38+
Objects.requireNonNull(boundaryLine);
3939
Objects.requireNonNull(bus1);
4040
Objects.requireNonNull(bus2);
4141
Objects.requireNonNull(parameters);
42-
double zb = PerUnit.zb(danglingLine.getTerminal().getVoltageLevel().getNominalV());
43-
// iIDM DanglingLine shunt admittance is network side only which is always side 1 (boundary is side 2).
42+
double zb = PerUnit.zb(boundaryLine.getTerminal().getVoltageLevel().getNominalV());
43+
// iIDM BoundaryLine shunt admittance is network side only which is always side 1 (boundary is side 2).
4444
PiModel piModel = new SimplePiModel()
45-
.setR(danglingLine.getR() / zb)
46-
.setX(danglingLine.getX() / zb)
47-
.setG1(danglingLine.getG() * zb)
45+
.setR(boundaryLine.getR() / zb)
46+
.setX(boundaryLine.getX() / zb)
47+
.setG1(boundaryLine.getG() * zb)
4848
.setG2(0)
49-
.setB1(danglingLine.getB() * zb)
49+
.setB1(boundaryLine.getB() * zb)
5050
.setB2(0);
51-
return new LfDanglingLineBranch(network, bus1, bus2, piModel, danglingLine, parameters);
51+
return new LfBoundaryLineBranch(network, bus1, bus2, piModel, boundaryLine, parameters);
5252
}
5353

54-
private DanglingLine getDanglingLine() {
55-
return danglingLineRef.get();
54+
private BoundaryLine getBoundaryLine() {
55+
return boundaryLineRef.get();
5656
}
5757

5858
@Override
5959
public String getId() {
60-
return getDanglingLine().getId();
60+
return getBoundaryLine().getId();
6161
}
6262

6363
@Override
6464
public BranchType getBranchType() {
65-
return BranchType.DANGLING_LINE;
65+
return BranchType.BOUNDARY_LINE;
6666
}
6767

6868
@Override
@@ -76,19 +76,19 @@ public List<BranchResult> createBranchResult(double preContingencyBranchP1, doub
7676
LoadFlowModel loadFlowModel) {
7777
// in a security analysis, we don't have any way to monitor the flows at boundary side. So in the branch result,
7878
// we follow the convention side 1 for network side and side 2 for boundary side.
79-
double currentScale = PerUnit.ib(getDanglingLine().getTerminal().getVoltageLevel().getNominalV());
79+
double currentScale = PerUnit.ib(getBoundaryLine().getTerminal().getVoltageLevel().getNominalV());
8080
return List.of(buildBranchResult(loadFlowModel, zeroImpedanceFlows, currentScale, currentScale, Double.NaN, Double.NaN));
8181
}
8282

8383
@Override
8484
public List<LfLimit> getLimits1(final LimitType type, LimitReductionManager limitReductionManager) {
8585
switch (type) {
8686
case ACTIVE_POWER:
87-
return getLimits1(type, () -> getDanglingLine().getActivePowerLimits(), limitReductionManager);
87+
return getLimits1(type, () -> getBoundaryLine().getActivePowerLimits(), limitReductionManager);
8888
case APPARENT_POWER:
89-
return getLimits1(type, () -> getDanglingLine().getApparentPowerLimits(), limitReductionManager);
89+
return getLimits1(type, () -> getBoundaryLine().getApparentPowerLimits(), limitReductionManager);
9090
case CURRENT:
91-
return getLimits1(type, () -> getDanglingLine().getCurrentLimits(), limitReductionManager);
91+
return getLimits1(type, () -> getBoundaryLine().getCurrentLimits(), limitReductionManager);
9292
case VOLTAGE:
9393
default:
9494
throw new UnsupportedOperationException(String.format("Getting %s limits is not supported.", type.name()));
@@ -108,7 +108,7 @@ public void updateState(LfNetworkStateUpdateParameters parameters, LfNetworkUpda
108108
@Override
109109
public void updateFlows(double p1, double q1, double p2, double q2) {
110110
// Network side is always on side 1.
111-
getDanglingLine().getTerminal().setP(p1 * PerUnit.SB)
111+
getBoundaryLine().getTerminal().setP(p1 * PerUnit.SB)
112112
.setQ(q1 * PerUnit.SB);
113113
}
114114
}

src/main/java/com/powsybl/openloadflow/network/impl/LfDanglingLineBus.java renamed to src/main/java/com/powsybl/openloadflow/network/impl/LfBoundaryLineBus.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,56 @@
77
*/
88
package com.powsybl.openloadflow.network.impl;
99

10-
import com.powsybl.iidm.network.DanglingLine;
10+
import com.powsybl.contingency.violations.ViolationLocation;
11+
import com.powsybl.iidm.network.BoundaryLine;
1112
import com.powsybl.openloadflow.network.LfNetwork;
1213
import com.powsybl.openloadflow.network.LfNetworkParameters;
1314
import com.powsybl.openloadflow.network.LfNetworkStateUpdateParameters;
14-
import com.powsybl.security.ViolationLocation;
1515

1616
import java.util.List;
1717

1818
/**
1919
* @author Geoffroy Jamgotchian {@literal <geoffroy.jamgotchian at rte-france.com>}
2020
*/
21-
public class LfDanglingLineBus extends AbstractLfBus {
21+
public class LfBoundaryLineBus extends AbstractLfBus {
2222

23-
private final Ref<DanglingLine> danglingLineRef;
23+
private final Ref<BoundaryLine> boundaryLineRef;
2424

2525
private final double nominalV;
2626

27-
public LfDanglingLineBus(LfNetwork network, DanglingLine danglingLine, LfNetworkParameters parameters, LfNetworkLoadingReport report) {
28-
super(network, Networks.getPropertyV(danglingLine), Math.toRadians(Networks.getPropertyAngle(danglingLine)), parameters);
29-
this.distributedOnConformLoad = false; // AbstractLfBus sets by default distributedOnConformLoad = true, we set it to false for LfDanglingLineBus
30-
this.danglingLineRef = Ref.create(danglingLine, parameters.isCacheEnabled());
31-
nominalV = danglingLine.getTerminal().getVoltageLevel().getNominalV();
32-
getOrCreateLfLoad(null, parameters).add(danglingLine);
33-
DanglingLine.Generation generation = danglingLine.getGeneration();
27+
public LfBoundaryLineBus(LfNetwork network, BoundaryLine boundaryLine, LfNetworkParameters parameters, LfNetworkLoadingReport report) {
28+
super(network, Networks.getPropertyV(boundaryLine), Math.toRadians(Networks.getPropertyAngle(boundaryLine)), parameters);
29+
this.distributedOnConformLoad = false; // AbstractLfBus sets by default distributedOnConformLoad = true, we set it to false for LfBoundaryLineBus
30+
this.boundaryLineRef = Ref.create(boundaryLine, parameters.isCacheEnabled());
31+
nominalV = boundaryLine.getTerminal().getVoltageLevel().getNominalV();
32+
getOrCreateLfLoad(null, parameters).add(boundaryLine);
33+
BoundaryLine.Generation generation = boundaryLine.getGeneration();
3434
if (generation != null) {
35-
add(LfDanglingLineGenerator.create(danglingLine, network, getId(), parameters, report));
35+
add(LfBoundaryLineGenerator.create(boundaryLine, network, getId(), parameters, report));
3636
}
3737
}
3838

39-
private DanglingLine getDanglingLine() {
40-
return danglingLineRef.get();
39+
private BoundaryLine getBoundaryLine() {
40+
return boundaryLineRef.get();
4141
}
4242

43-
public static String getId(DanglingLine danglingLine) {
44-
return danglingLine.getId() + "_BUS";
43+
public static String getId(BoundaryLine boundaryLine) {
44+
return boundaryLine.getId() + "_BUS";
4545
}
4646

4747
@Override
4848
public List<String> getOriginalIds() {
49-
return List.of(getDanglingLine().getId());
49+
return List.of(getBoundaryLine().getId());
5050
}
5151

5252
@Override
5353
public String getId() {
54-
return getId(getDanglingLine());
54+
return getId(getBoundaryLine());
5555
}
5656

5757
@Override
5858
public String getVoltageLevelId() {
59-
return getDanglingLine().getTerminal().getVoltageLevel().getId();
59+
return getBoundaryLine().getTerminal().getVoltageLevel().getId();
6060
}
6161

6262
@Override
@@ -71,9 +71,9 @@ public double getNominalV() {
7171

7272
@Override
7373
public void updateState(LfNetworkStateUpdateParameters parameters) {
74-
var danglingLine = getDanglingLine();
75-
Networks.setPropertyV(danglingLine, v);
76-
Networks.setPropertyAngle(danglingLine, Math.toDegrees(angle));
74+
var boundaryLine = getBoundaryLine();
75+
Networks.setPropertyV(boundaryLine, v);
76+
Networks.setPropertyAngle(boundaryLine, Math.toDegrees(angle));
7777

7878
super.updateState(parameters);
7979
}

0 commit comments

Comments
 (0)