Skip to content
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

Asym parser #836

Open
wants to merge 160 commits into
base: AsymTfoImpl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
676681e
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
34dd427
corrections on delta transformers
JB-H Sep 22, 2023
4d64847
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
28550a6
Merge branch 'main' into asymParser
JB-H Oct 1, 2023
ecabe22
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
1d9f66c
corrections on delta transformers
JB-H Sep 22, 2023
18dace3
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
3d34777
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
ac8d871
Merge remote-tracking branch 'origin/asymParser' into asymParser
JB-H Oct 10, 2023
c94bbf7
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
4dda0f1
corrections on delta transformers
JB-H Sep 22, 2023
07c30e5
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
f6e43cf
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
8d590c8
Merge remote-tracking branch 'origin/asymParser' into asymParser
JB-H Oct 10, 2023
e8007d7
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e8dedbe
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
aba2e64
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
5b55382
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
15c4113
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
b354bb6
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e8df69d
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
9d51c12
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
652a4a6
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
2d2e247
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
39f7209
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
962c0ca
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
df45c4f
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
6a1d489
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
816a5ac
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
9561a58
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
b108cf0
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e465431
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
120835e
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
6236196
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
7bc8799
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
a1c18d3
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
e53411f
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
480670e
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
49f0009
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
1779a26
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
f052820
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
2ceb12f
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
9787783
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
fd66565
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
2a9a597
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
e551d46
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
4890700
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
2ba205b
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
b4a1d51
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
905ced8
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
ab5448d
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
53a8ce8
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
7f7a168
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
941a908
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
0ccae9a
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
11e8312
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
78c618f
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e6a94f1
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
bec0684
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
81d6a8c
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e72720e
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
70ce15a
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e1e9df4
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
67a81a8
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
48db4ee
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
537ee58
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
22c9514
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
a6f8503
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
1835d70
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
c4c433f
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
58040aa
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
4806f87
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
51cf8b9
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
95f8157
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
8257872
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
060e81d
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
71ff40a
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
db9afc3
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
b02f9ba
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
8aca7eb
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
caac18d
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
cf1076f
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
540981a
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
129c1f5
removal of load extension2 replaced by use of ZIP model
JB-H Oct 11, 2023
41e22c7
Merge remote-tracking branch 'origin/asymParser' into asymParser
JB-H Oct 11, 2023
f32e21e
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
b61849c
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
a0f6b08
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
6f97c31
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e584e12
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
d6ff17e
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
8793871
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
a3854e2
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
0ba9eb3
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e9e16ca
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
dc9b30d
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
5397156
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
4b8e241
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
7cc656d
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
abaaa0b
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
9bde829
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
5a4fba1
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
cecb69c
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
c22e1b3
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
48f564a
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
3b04534
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e619955
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
af069ff
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
33a079c
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
8597ecf
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
99d8fb6
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
0ddf3e2
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
9b36415
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
39dd409
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
fc4b3e4
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
5d30819
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
084f241
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
43785b9
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
0f836cb
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
77b49b6
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
0037562
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e53a83f
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
0e37bc8
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
c069fdb
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
68d598d
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
d87f5d8
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
abf378b
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
26086a7
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
fb3552e
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
e886b8d
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
7c8fc6b
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
5547844
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
630964f
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e5c4a5a
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
64dd42f
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
2a1e7a6
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
c306bac
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
e9e64f6
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
9ffe7e2
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
7e918a8
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
a2db6c3
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
aa7527f
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
95a9510
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
90eae6b
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
817a51b
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
5280134
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
d6c0080
removal of load extension2 replaced by use of ZIP model
JB-H Oct 10, 2023
15007e4
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
87f38ab
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
b1bd097
removal of load extension2 replaced by use of ZIP model
JB-H Oct 11, 2023
b752d06
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
8d86bc0
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
980703c
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
09c69ea
development of parsers for ieee asym feeder examples
JB-H Aug 24, 2023
c31294d
use of sparse matrix for large parsed examples
JB-H Sep 22, 2023
45161b9
Merge remote-tracking branch 'origin/asymParser' into asymParser
JB-H Oct 11, 2023
5d568fc
pb rebasing
JB-H Oct 11, 2023
d8be316
Merge branch 'AsymTfoImpl' into asymParser
JB-H Oct 11, 2023
a52856f
Merge branch 'AsymTfoImpl' into asymParser
JB-H Oct 12, 2023
34ce766
Asymm Bus extension refactoring
JB-H Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected static SequenceType getSequenceType(Variable<AcVariableType> variable)
case BUS_V, BUS_PHI -> SequenceType.POSITIVE;
case BUS_V_NEGATIVE, BUS_PHI_NEGATIVE -> SequenceType.NEGATIVE;
case BUS_V_ZERO, BUS_PHI_ZERO -> SequenceType.ZERO;
default -> throw new IllegalStateException("Unknown variable: " + variable);
default -> throw new IllegalStateException(UNKNOWN_VAR + variable);
};
}

Expand Down
21 changes: 11 additions & 10 deletions src/main/java/com/powsybl/openloadflow/ac/nr/NewtonRaphson.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public void reportAndLogLargestMismatchByAcEquationType(Reporter reporter, Equat
}

private String getEquationTypeDescription(AcEquationType acEquationType) {
switch (acEquationType) {
case BUS_TARGET_P: return "TargetP";
case BUS_TARGET_Q: return "TargetQ";
case BUS_TARGET_V: return "TargetV";
default: return null; // not implemented for other ac equation types
}
return switch (acEquationType) {
case BUS_TARGET_P -> "TargetP";
case BUS_TARGET_Q -> "TargetQ";
case BUS_TARGET_V -> "TargetV";
default -> null; // not implemented for other ac equation types
};
}

private NewtonRaphsonStatus runIteration(StateVectorScaling svScaling, MutableInt iterations, Reporter reporter) {
Expand Down Expand Up @@ -203,8 +203,8 @@ public static void initStateVector(LfNetwork network, EquationSystem<AcVariableT
x[v.getRow()] = network.getBranch(v.getElementNum()).getPiModel().getR1();
break;

case DUMMY_P:
case DUMMY_Q:
case DUMMY_P,
DUMMY_Q:
x[v.getRow()] = 0;
break;

Expand Down Expand Up @@ -290,8 +290,8 @@ public void updateNetwork() {
network.getBranch(v.getElementNum()).getPiModel().setR1(stateVector.get(v.getRow()));
break;

case DUMMY_P:
case DUMMY_Q:
case DUMMY_P,
DUMMY_Q:
// nothing to do
break;

Expand Down Expand Up @@ -330,6 +330,7 @@ public NewtonRaphsonResult run(VoltageInitializer voltageInitializer, Reporter r
Vectors.minus(equationVector.getArray(), targetVector.getArray());

NewtonRaphsonStoppingCriteria.TestResult initialTestResult = parameters.getStoppingCriteria().test(equationVector.getArray(), equationSystem);
//StateVectorScaling svScaling = StateVectorScaling.fromMode(parameters.getStateVectorScalingMode(), initialTestResult);
StateVectorScaling svScaling = StateVectorScaling.fromMode(parameters, initialTestResult);

LOGGER.debug("|f(x0)|={}", initialTestResult.getNorm());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,24 @@ public boolean isFortescueRepresentation() {
public boolean isPositiveSequenceAsCurrent() {
return isPositiveSequenceAsCurrent;
}

public void setPositiveSequenceAsCurrent(boolean positiveSequenceAsCurrent) {
isPositiveSequenceAsCurrent = positiveSequenceAsCurrent;
}

public void setFortescueRepresentation(boolean fortescueRepresentation) {
isFortescueRepresentation = fortescueRepresentation;
}

public void setHasPhaseA(boolean hasPhaseA) {
this.hasPhaseA = hasPhaseA;
}

public void setHasPhaseB(boolean hasPhaseB) {
this.hasPhaseB = hasPhaseB;
}

public void setHasPhaseC(boolean hasPhaseC) {
this.hasPhaseC = hasPhaseC;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public void setAsymConnectorBus2(AsymmetricalBranchConnector asymConnectorBus2)
this.asymConnectorBus2 = asymConnectorBus2;
}

public void setAsymConnectorBus1(AsymmetricalBranchConnector asymConnectorBus1) {
this.asymConnectorBus1 = asymConnectorBus1;
}

public static ComplexMatrix getAdmittanceMatrixFromImpedanceAndBmatrix(ComplexMatrix zabc, ComplexMatrix babc, boolean hasPhaseA, boolean hasPhaseB, boolean hasPhaseC, double length) {

// The lines are sometimes specified as impedance and susceptance matrices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,15 @@ private static void createTransfoToAsym(TwoWindingsTransformer t2w, double zb, L

if (asymBus1 != null) {
side1VariableType = asymBus1.getAsymBusVariableType();
if (!asymBus1.isFortescueRepresentation()) {
throw new PowsyblException("A three phase transformer must have its busses in Fortescue representation but bus 1 of '" + t2w.getId() + "' is in ABC representation");
}
}
if (asymBus2 != null) {
side2VariableType = asymBus2.getAsymBusVariableType();
if (!asymBus2.isFortescueRepresentation()) {
throw new PowsyblException("A three phase transformer must have its busses in Fortescue representation but bus 2 of '" + t2w.getId() + "' is in ABC representation");
}
}

AsymThreePhaseTransfo asym3phaseTfo = new AsymThreePhaseTransfo(leg1Type, leg2Type, stepLegConnectionType,
Expand Down
Loading