Skip to content

Commit

Permalink
Use side in Branch VarConnection (#387)
Browse files Browse the repository at this point in the history
Use side in Line and Transformer VarConnection with Connection Point

Signed-off-by: lisrte <laurent.issertial@rte-france.com>
  • Loading branch information
Lisrte authored Oct 7, 2024
1 parent cf20f8f commit 7658b1b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected StandardLine(String dynamicModelId, Line line, String parameterSetId,
}

private List<VarConnection> getVarConnectionsWith(EquipmentConnectionPoint connected, TwoSides side) {
return List.of(new VarConnection(getTerminalVarName(side), connected.getTerminalVarName()));
return List.of(new VarConnection(getTerminalVarName(side), connected.getTerminalVarName(side)));
}

private String getTerminalVarName(TwoSides side) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected TransformerFixedRatio(String dynamicModelId, TwoWindingsTransformer tr
}

private List<VarConnection> getVarConnectionsWith(EquipmentConnectionPoint connected, TwoSides side) {
return List.of(new VarConnection(getTerminalVarName(side), connected.getTerminalVarName()));
return List.of(new VarConnection(getTerminalVarName(side), connected.getTerminalVarName(side)));
}

private String getTerminalVarName(TwoSides side) {
Expand Down
4 changes: 2 additions & 2 deletions dynawo-simulation/src/test/resources/cla_dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<dyn:connect var1="currentLimitAutomaton_order" var2="@NAME@_state"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE1@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_CurrentLimitAutomatonMeasureSide2-TransformerFixedRatio">
<dyn:connect var1="currentLimitAutomaton_IMonitored" var2="transformer_iSide2"/>
Expand Down
4 changes: 2 additions & 2 deletions dynawo-simulation/src/test/resources/dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
<dyn:connect var1="generator_switchOffSignal1" var2="@STATIC_ID@@NODE@_switchOff"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_Line_NHV1_NHV2_1Side1-DefaultEquipmentConnectionPoint">
<dyn:connect var1="line_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="line_terminal1" var2="@STATIC_ID@@NODE1@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_Line_NHV1_NHV2_1Side2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="line_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="line_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_CurrentLimitAutomatonMeasureSide1-DefaultLine">
<dyn:connect var1="currentLimitAutomaton_IMonitored" var2="@NAME@_iSide1"/>
Expand Down
4 changes: 2 additions & 2 deletions dynawo-simulation/src/test/resources/phase_shifter_i_dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<dyn:connect var1="phaseShifter_AutomatonExists" var2="transformer_disable_internal_tapChanger"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE1@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnect connector="MC_PhaseShifterI-TransformerFixedRatio" id1="BBM_phase_shifter" id2="BBM_NGEN_NHV1"/>
<dyn:macroConnect connector="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint" id1="BBM_NGEN_NHV1" id2="NETWORK"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dyn:connect var1="transformer_terminal1" var2="infiniteBus_terminal"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_SetPoint-GeneratorPQ">
<dyn:connect var1="setPoint_setPoint" var2="generator_omegaRefPu"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</dyn:blackBoxModel>
<dyn:blackBoxModel id="BBM_TapChangerBlocking" lib="TapChangerBlockingAutomaton2" parFile="models.par" parId="TapChangerPar"/>
<dyn:macroConnector id="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE1@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_LoadOneTransformerTapChanger-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
Expand Down
4 changes: 2 additions & 2 deletions dynawo-simulation/src/test/resources/tfr_dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<dyn:dynamicModelsArchitecture xmlns:dyn="http://www.rte-france.com/dynawo">
<dyn:blackBoxModel id="BBM_NGEN_NHV1" lib="TransformerFixedRatio" parFile="models.par" parId="TFR" staticId="NGEN_NHV1"/>
<dyn:macroConnector id="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal1" var2="@STATIC_ID@@NODE1@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint">
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE@_ACPIN"/>
<dyn:connect var1="transformer_terminal2" var2="@STATIC_ID@@NODE2@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnect connector="MC_TransformerFixedRatioSide1-DefaultEquipmentConnectionPoint" id1="BBM_NGEN_NHV1" id2="NETWORK"/>
<dyn:macroConnect connector="MC_TransformerFixedRatioSide2-DefaultEquipmentConnectionPoint" id1="BBM_NGEN_NHV1" id2="NETWORK"/>
Expand Down

0 comments on commit 7658b1b

Please sign in to comment.