Skip to content

Commit

Permalink
Improve TCC tests (#2920).
Browse files Browse the repository at this point in the history
Signed-off-by: stojkovicn <nemanja.stojkovic@rte-france.com>
  • Loading branch information
stojkovicn committed May 10, 2024
1 parent c01cb83 commit 17c8880
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -985,21 +985,34 @@ void phaseTapChangerTapChangerControlEQTest() throws IOException {
network = PhaseShifterTestCaseFactory.createLocalActivePowerWithTargetDeadband();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_PS1_PT_T_2", "activePower");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_PS1_PT_T_2", "activePower");


// PST local with CURRENT_LIMITER
network = PhaseShifterTestCaseFactory.createLocalCurrentLimiterWithTargetDeadband();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_PS1_PT_T_2", "currentFlow");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_PS1_PT_T_2", "currentFlow");

// PST remote with CURRENT_LIMITER
network = PhaseShifterTestCaseFactory.createRemoteCurrentLimiterWithTargetDeadband();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_LD2_EC_T_1", "currentFlow");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_LD2_EC_T_1", "currentFlow");

// PST remote with ACTIVE_POWER_CONTROL
network = PhaseShifterTestCaseFactory.createRemoteActivePowerWithTargetDeadband();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_LD2_EC_T_1", "activePower");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_PS1_PTC_RC", "_LD2_EC_T_1", "activePower");
}
}

Expand All @@ -1018,21 +1031,33 @@ void ratioTapChangerTapChangerControlEQTest() throws IOException {
network = EurostagTutorialExample1Factory.create();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_NHV2_NLOAD_PT_T_2", "voltage");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_NHV2_NLOAD_PT_T_2", "voltage");

// RTC local with REACTIVE_POWER
network = EurostagTutorialExample1Factory.createWithReactiveTcc();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_NHV2_NLOAD_PT_T_2", "reactivePower");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_NHV2_NLOAD_PT_T_2", "reactivePower");

// RTC remote with VOLTAGE
network = EurostagTutorialExample1Factory.createRemoteVoltageTcc();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_GEN_SM_T_1", "voltage");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_GEN_SM_T_1", "voltage");

// RTC remote with REACTIVE_POWER
network = EurostagTutorialExample1Factory.createRemoteReactiveTcc();
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_GEN_SM_T_1", "reactivePower");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
eq = getEQ(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(eq, "_NHV2_NLOAD_RTC_RC", "_GEN_SM_T_1", "voltage");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,21 +438,33 @@ void phaseTapChangerTapChangerControlSSHTest() throws IOException {
network = PhaseShifterTestCaseFactory.createLocalActivePowerWithTargetDeadband();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "false", "10", "200", "M");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "true", "10", "200", "M");

// PST local with CURRENT_LIMITER
network = PhaseShifterTestCaseFactory.createLocalCurrentLimiterWithTargetDeadband();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "false", "10", "200", "none");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "true", "10", "200", "none");

// PST remote with CURRENT_LIMITER
network = PhaseShifterTestCaseFactory.createRemoteCurrentLimiterWithTargetDeadband();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "false", "10", "200", "none");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "true", "10", "200", "none");

// PST remote with ACTIVE_POWER_CONTROL
network = PhaseShifterTestCaseFactory.createRemoteActivePowerWithTargetDeadband();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "false", "10", "200", "M");
network.getTwoWindingsTransformer("PS1").getPhaseTapChanger().setRegulating(true);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_PS1_PTC_RC", "true", "true", "10", "200", "M");
}
}

Expand All @@ -471,21 +483,33 @@ void ratioTapChangerTapChangerControlSSHTest() throws IOException {
network = EurostagTutorialExample1Factory.create();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "true", "0", "158", "k");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "false", "0", "158", "k");

// RTC local with REACTIVE_POWER
network = EurostagTutorialExample1Factory.createWithReactiveTcc();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "true", "0", "100", "M");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "false", "0", "100", "M");

// RTC remote with VOLTAGE
network = EurostagTutorialExample1Factory.createRemoteVoltageTcc();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "true", "0", "158", "k");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "false", "0", "158", "k");

// RTC remote with REACTIVE_POWER
network = EurostagTutorialExample1Factory.createRemoteReactiveTcc();
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "true", "0", "100", "M");
network.getTwoWindingsTransformer("NHV2_NLOAD").getRatioTapChanger().setRegulating(false);
ssh = getSSH(network, baseName, tmpDir, exportParams);
testTcTccWithAttribute(ssh, "_NHV2_NLOAD_RTC_RC", "true", "false", "0", "100", "M");
}
}

Expand Down

0 comments on commit 17c8880

Please sign in to comment.