diff --git a/docs/optimizer/inputs.md b/docs/optimizer/inputs.md index 884ac07d..f9ae9f41 100644 --- a/docs/optimizer/inputs.md +++ b/docs/optimizer/inputs.md @@ -3,7 +3,12 @@ ## Network data Files with the prefix `ampl_` contain the data and the parameters of the network on which the reactive OPF is executed. -These files are obtained by using the [V2 of the extended version of PowSyBl AMPL export](https://github.com/powsybl/powsybl-core/blob/main/ampl-converter/src/main/java/com/powsybl/ampl/converter/version/ExtendedAmplExporterV2.java), which is the default version. + +These files are obtained by using the [V2 of the extended version of PowSyBl AMPL export](https://github.com/powsybl/powsybl-core/blob/main/ampl-converter/src/main/java/com/powsybl/ampl/converter/version/ExtendedAmplExporterV2.java), which is the default version. + +Note that from release `0.10.0` of OpenReac, the active target of VSC and LCC converter stations is calculated using HVDC line active set point +and the converter mode, both specified in `ampl_network_hvdc.txt`. The losses related to rectifier/inverter conversion, and HVDC line **are ignored**. + ## Configuration of the run diff --git a/open-reac/src/main/resources/openreac/acopf.mod b/open-reac/src/main/resources/openreac/acopf.mod index a2c717a6..5ed1d276 100644 --- a/open-reac/src/main/resources/openreac/acopf.mod +++ b/open-reac/src/main/resources/openreac/acopf.mod @@ -180,9 +180,9 @@ sum{(qq,k,n) in BRANCHCC} base100MVA * V[k] * Red_Tran_Act_Dir[qq,k,n] # Loads + sum{(c,k) in LOADCC} load_PFix[1,c,k] # Fixed value # VSC converters -+ sum{(v,k) in VSCCONVON} vscconv_P0[1,v,k] # Fixed value ++ sum{(v,k) in VSCCONVON} vscconv_targetP[v] # Fixed value # LCC converters -+ sum{(l,k) in LCCCONVON} lccconv_P0[1,l,k] # Fixed value ++ sum{(l,k) in LCCCONVON} lccconv_targetP[l] # Fixed value = 0; # No slack variables for active power. If data are really too bad, may not converge. @@ -220,7 +220,7 @@ sum{(qq,k,n) in BRANCHCC} base100MVA * V[k] * Red_Tran_Rea_Dir[qq,k,n] # VSC converters - sum{(v,k) in VSCCONVON} vscconv_qvar[v,k] # LCC converters -+ sum{(l,k) in LCCCONVON} lccconv_Q0[1,l,k] # Fixed value ++ sum{(l,k) in LCCCONVON} lccconv_q0[1,l,k] # Fixed value # Slack variables + if k in BUSCC_SLACK then (- base100MVA * V[k]^2 * slack1_shunt_B[k] # Homogeneous to a generation of reactive power (condensator) diff --git a/open-reac/src/main/resources/openreac/commons.mod b/open-reac/src/main/resources/openreac/commons.mod index 85b3500a..5d9fd540 100644 --- a/open-reac/src/main/resources/openreac/commons.mod +++ b/open-reac/src/main/resources/openreac/commons.mod @@ -72,16 +72,47 @@ set BATTERYCC := setof {(1,b,n) in BATTERY : n in BUSCC} (b,n); # Warning: units with Ptarget=0 are considered as out of order set UNITON := {(g,n) in UNITCC : abs(unit_Pc[1,g,n]) >= Pnull}; +# Active and reactive targets of converter stations +# Warning: the losses are ignored +set LCCCONV_NUM := setof{(t,lcc,bus) in LCCCONV}lcc; +set VSCCONV_NUM := setof{(t,vsc,bus) in VSCCONV}vsc; +param lccconv_targetP {LCCCONV_NUM}; +param vscconv_targetP {VSCCONV_NUM}; +for {(1,h) in HVDC} { + # case of VSC converter stations + if (hvdc_type[1,h] == 1) then { + if (hvdc_convertersMode[1,h] == "SIDE_1_RECTIFIER_SIDE_2_INVERTER") then { + let vscconv_targetP[hvdc_conv1[1,h]] := hvdc_targetP[1,h]; + let vscconv_targetP[hvdc_conv2[1,h]] := -hvdc_targetP[1,h]; + } else { + let vscconv_targetP[hvdc_conv1[1,h]] := -hvdc_targetP[1,h]; + let vscconv_targetP[hvdc_conv2[1,h]] := hvdc_targetP[1,h]; + } + } + # case of LCC converter stations + if (hvdc_type[1,h] == 2) then { + if (hvdc_convertersMode[1,h] == "SIDE_1_RECTIFIER_SIDE_2_INVERTER") then { + let lccconv_targetP[hvdc_conv1[1,h]] := hvdc_targetP[1,h]; + let lccconv_targetP[hvdc_conv2[1,h]] := -hvdc_targetP[1,h]; + } else { + let lccconv_targetP[hvdc_conv1[1,h]] := -hvdc_targetP[1,h]; + let lccconv_targetP[hvdc_conv2[1,h]] := hvdc_targetP[1,h]; + } + } +} +check {lcc in LCCCONV_NUM}: lccconv_targetP[lcc] != NaN; +check {vsc in VSCCONV_NUM}: vscconv_targetP[vsc] != NaN; + # # VSC converter stations # set VSCCONVON := setof{(t,v,n) in VSCCONV: n in BUSCC - and abs(vscconv_P0[t,v,n] ) <= PQmax + and abs(vscconv_targetP[v]) <= PQmax and abs(vscconv_Pmin[t,v,n]) <= PQmax and abs(vscconv_Pmax[t,v,n]) <= PQmax - and vscconv_P0[t,v,n] >= vscconv_Pmin[t,v,n] - and vscconv_P0[t,v,n] <= vscconv_Pmax[t,v,n] + and vscconv_targetP[v] >= vscconv_Pmin[t,v,n] + and vscconv_targetP[v] <= vscconv_Pmax[t,v,n] } (v,n); # @@ -89,8 +120,8 @@ set VSCCONVON := setof{(t,v,n) in VSCCONV: # set LCCCONVON := setof{(t,l,n) in LCCCONV: n in BUSCC - and abs(lccconv_P0[1,l,n]) <= PQmax - and abs(lccconv_Q0[1,l,n]) <= PQmax + and abs(lccconv_targetP[l]) <= PQmax + and abs(lccconv_q0[1,l,n]) <= PQmax } (l,n); diff --git a/open-reac/src/main/resources/openreac/connected_component.run b/open-reac/src/main/resources/openreac/connected_component.run index 8dfe864c..b6007445 100644 --- a/open-reac/src/main/resources/openreac/connected_component.run +++ b/open-reac/src/main/resources/openreac/connected_component.run @@ -122,16 +122,16 @@ if 1 in LOG_INFO then { let temp1 := sum{(c,n) in LOADCC} load_PFix[1,c,n]; let temp2 := sum{(g,n) in UNITON} unit_Pc[1,g,n]; let temp2 := temp2 + sum{(b,n) in BATTERYCC} battery_p0[1,b,n]; -let temp3 := (sum{(vscconv,n) in VSCCONVON} vscconv_P0[1,vscconv,n])+(sum{(l,k) in LCCCONVON} lccconv_P0[1,l,k]); +let temp3 := (sum{(vscconv,n) in VSCCONVON} vscconv_targetP[vscconv])+(sum{(l,k) in LCCCONVON} lccconv_targetP[l]); let global_initial_losses_ratio := (temp2-temp1-temp3)/(temp1+temp3); printf{LOG_INFO} "HVDC injections (homogeneous to loads):\n"; for {(v,n) in VSCCONVON} printf{LOG_INFO} "VSC converter %Q in %Q: P0=%.1fMW is fixed, Q is variable\n", - vscconv_id[1,v,n],substation_id[1,bus_substation[1,n]],vscconv_P0[1,v,n]; + vscconv_id[1,v,n],substation_id[1,bus_substation[1,n]],vscconv_targetP[v]; for {(l,n) in LCCCONVON} printf{LOG_INFO} "LCC converter %Q in %Q: P0=%.1fMW is fixed, Q0=%.1fMvar is fixed\n", - lccconv_id[1,l,n],substation_id[1,bus_substation[1,n]],lccconv_P0[1,l,n],lccconv_Q0[1,l,n]; + lccconv_id[1,l,n],substation_id[1,bus_substation[1,n]],lccconv_targetP[l],lccconv_q0[1,l,n]; printf{LOG_INFO} "Sum of HVDC conv. H: %.0f MW\n", temp3; printf{LOG_INFO} "Sum of loads C: %.0f MW\n", temp1; printf{LOG_INFO} "Sum of generations P: %.0f MW\n", temp2; diff --git a/open-reac/src/main/resources/openreac/dcopf.mod b/open-reac/src/main/resources/openreac/dcopf.mod index 320c5ac4..eb6dbd91 100644 --- a/open-reac/src/main/resources/openreac/dcopf.mod +++ b/open-reac/src/main/resources/openreac/dcopf.mod @@ -53,8 +53,8 @@ subject to ctr_balance{PROBLEM_DCOPF, n in BUSCC}: + sum{(c,n) in LOADCC} load_PFix[1,c,n] + sum{(qq,n,m) in BRANCHCC} activeflow[qq,n,m] # active power flow outgoing on branch qq at bus n - sum{(qq,m,n) in BRANCHCC} activeflow[qq,m,n] # active power flow entering in bus n on branch qq - + sum{(vscconv,n) in VSCCONVON} vscconv_P0[1,vscconv,n] - + sum{(l,n) in LCCCONVON} lccconv_P0[1,l,n] + + sum{(vscconv,n) in VSCCONVON} vscconv_targetP[vscconv] + + sum{(l,n) in LCCCONVON} lccconv_targetP[l] = balance_pos[n] - balance_neg[n]; diff --git a/open-reac/src/main/resources/openreac/dcopf.run b/open-reac/src/main/resources/openreac/dcopf.run index 77c8f471..32a03968 100644 --- a/open-reac/src/main/resources/openreac/dcopf.run +++ b/open-reac/src/main/resources/openreac/dcopf.run @@ -107,7 +107,7 @@ for {(g,n) in UNITON : abs(P_dcopf[g,n]-unit_Pc[1,g,n]) >= temp2*0.99} let temp1 := sum{(c,n) in LOADCC} load_PFix[1,c,n]; let temp2 := sum{(g,n) in UNITON} P_dcopf[g,n]; let temp2 := temp2 + sum{(b,n) in BATTERYCC} battery_p0[1,b,n]; -let temp3 := (sum{(vscconv,n) in VSCCONVON} vscconv_P0[1,vscconv,n])+(sum{(l,k) in LCCCONVON} lccconv_P0[1,l,k]); +let temp3 := (sum{(vscconv,n) in VSCCONVON} vscconv_targetP[vscconv])+(sum{(l,k) in LCCCONVON} lccconv_targetP[l]); printf{LOG_INFO} "Sum of HVDC conv. H: %.0f MW\n", temp3; printf{LOG_INFO} "Sum of loads C: %.0f MW\n", temp1; printf{LOG_INFO} "Sum of generations P: %.0f MW\n", temp2; diff --git a/open-reac/src/main/resources/openreac/reactiveopfoutput.run b/open-reac/src/main/resources/openreac/reactiveopfoutput.run index 09cabee5..3f580a48 100644 --- a/open-reac/src/main/resources/openreac/reactiveopfoutput.run +++ b/open-reac/src/main/resources/openreac/reactiveopfoutput.run @@ -115,7 +115,7 @@ printf{(v,n) in VSCCONVON} "%i;%i;%i;%Q;%.3f;%.1f;%.1f;%.1f;\n", vscconv_vregul[1,v,n], V[n], vscconv_qvar[v,n], - vscconv_P0[1,v,n], + vscconv_targetP[v], vscconv_qvar[v,n] > (fileOut); close (fileOut); diff --git a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpecReacOptimizationBoundsTest.java b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpecReacOptimizationBoundsTest.java new file mode 100644 index 00000000..c2d076fe --- /dev/null +++ b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpecReacOptimizationBoundsTest.java @@ -0,0 +1,457 @@ +/** + * 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.openreac.optimization; + +import com.powsybl.commons.report.ReportNode; +import com.powsybl.iidm.network.*; +import com.powsybl.openreac.network.VoltageControlNetworkFactory; +import com.powsybl.openreac.parameters.input.OpenReacParameters; +import com.powsybl.openreac.parameters.input.algo.ReactiveSlackBusesMode; +import com.powsybl.openreac.parameters.output.OpenReacResult; +import com.powsybl.openreac.parameters.output.OpenReacStatus; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * Test the generator bounds in OpenReac optimization. + * Note that depending on the solver, the results may vary. Only the feasibility is tested, + * meaning that it verifies whether the generator bounds allow for finding + * a feasible solution or not. + * + * @author Pierre ARVY {@literal } + */ +class OpecReacOptimizationBoundsTest extends AbstractOpenReacRunnerTest { + + private OpenReacParameters parameters; + + @Override + @BeforeEach + public void setUp() throws IOException { + super.setUp(); + parameters = new OpenReacParameters(); + // remove reactive slacks to ensure non convergence in case of infeasibility + parameters.setReactiveSlackBusesMode(ReactiveSlackBusesMode.CONFIGURED); + } + + @Test + void testGeneratorsMaxPBounds() throws IOException { + Network network = VoltageControlNetworkFactory.createWithTwoVoltageControls(); + // due to the disconnection, the network is now imbalanced + // and max p of generators is not enough to provide balance + network.getLine("l45").disconnect(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generators-pmax-too-small", true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + + // increase max p of generators to allow power balance + network.getGenerator("g2").setMaxP(2.5); + network.getGenerator("g3").setMaxP(2.5); + result = runOpenReac(network, "optimization/bounds/generators-pmax", true); + assertEquals(OpenReacStatus.OK, result.getStatus()); + } + + @Test + void testGeneratorsMinPBounds() throws IOException { + Network network = VoltageControlNetworkFactory.createWithTwoVoltageControls(); + // due to the modifications, the network is now imbalanced + // and min p of generators is not small enough to provide balance + network.getLine("l45").disconnect(); + network.getLoad("l4").setP0(3); + network.getGenerator("g2").setMinP(2); + network.getGenerator("g3").setMinP(2); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generators-pmin-too-high", true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + + // decrease min p of generators to allow power balance + // but targetP will be fixed in optimization, because it is too close of maxP + network.getGenerator("g2").setMinP(1); + network.getGenerator("g3").setMinP(1); + result = runOpenReac(network, "optimization/bounds/generators-target-p-too-close-pmax", true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + + // increase max p of generators to allow modification of targetP in optimization + network.getGenerator("g2").setMaxP(2.5); + network.getGenerator("g3").setMaxP(2.5); + result = runOpenReac(network, "optimization/bounds/generators-pmin", true); + assertEquals(OpenReacStatus.OK, result.getStatus()); + } + + @Test + void testGeneratorQmaxPmaxRatioBounds() throws IOException { + Network network = VoltageControlNetworkFactory.createWithTwoVoltageControls(); + network.getLine("l45").disconnect(); + network.getLoad("l4").setP0(4).setQ0(2); + + OpenReacResult result = runOpenReac(network, "optimization/bounds/qmax-pmax-default-ratio", true); + assertEquals(OpenReacStatus.OK, result.getStatus()); + // there are slacks as Q bounds are not large enough + assertTrue(Integer.parseInt(result.getIndicators().get("nb_reactive_slacks")) > 0); + + parameters.setDefaultQmaxPmaxRatio(1); + result = runOpenReac(network, "optimization/bounds/same-qmax-pmax", parameters, true); + assertEquals(OpenReacStatus.OK, result.getStatus()); + // Q bounds are large enough to remove reactive slacks in optimization + assertEquals(0, Integer.parseInt(result.getIndicators().get("nb_reactive_slacks"))); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenMinPMaxP() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between minP and maxP (0 < minP < targetP < maxP) + Network network = create(101, 50, 150, 150); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(-100) + .setMaxQ(100) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-200) + .setMaxQ(200) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-pmin-pmax/positive-pmin/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network = create(101, 50, 150, 150); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(-100) + .setMaxQ(100) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-150) + .setMaxQ(150) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-pmin-pmax/positive-pmin/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenMinPMaxP2() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between minP and maxP (minP < targetP < maxP < 0) + Network network = create(-10, -20, -5, -10); + setDefaultVoltageLimits(network, 0.85, 1.15); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(-20) + .setMinQ(-30) + .setMaxQ(30) + .endPoint() + .beginPoint() + .setP(-5) + .setMinQ(-5) + .setMaxQ(5) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-pmin-pmax/negative-pmax/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(-20) + .setMinQ(-18) + .setMaxQ(18) + .endPoint() + .beginPoint() + .setP(-5) + .setMinQ(-5) + .setMaxQ(5) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-pmin-pmax/negative-pmax/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenP0MaxP() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between P0 and maxP (minP < 0 < targetP < maxP) + Network network = create(101, -50, 150, 150); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-300) + .setMaxQ(300) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmax/positive-pmax/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-100) + .setMaxQ(100) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmax/positive-pmax/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenP0MaxP2() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between P0 and maxP (maxP < targetP < 0) + Network network = create(-4, -20, -5, -4); + setDefaultVoltageLimits(network, 0.85, 1.15); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(-5) + .setMinQ(-5) + .setMaxQ(5) + .endPoint() + .beginPoint() + .setP(0) + .setMinQ(-1) + .setMaxQ(1) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmax/negative-pmax/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(-5) + .setMinQ(-4.25) + .setMaxQ(4.25) + .endPoint() + .beginPoint() + .setP(0) + .setMinQ(-1) + .setMaxQ(1) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmax/negative-pmax/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenP0MinP() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between minP and P0 (0 < targetP < minP) + Network network = create(101, 150, 200, 100); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-150) + .setMaxQ(150) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmin/positive-pmin/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(150) + .setMinQ(-140) + .setMaxQ(140) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmin/positive-pmin/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsInterpolatedBetweenP0MinP2() throws IOException { + // verify feasibility when minQ/maxQ are interpolated between minP and P0 (minP < targetP < 0 < maxP) + Network network = create(-5.1, -10, 10, -2); + setDefaultVoltageLimits(network, 0.85, 1.15); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(-0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(-10) + .setMinQ(-4) + .setMaxQ(4) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmin/negative-pmin/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(-10) + .setMinQ(-3) + .setMaxQ(3) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-interpolated-between-0-pmin/negative-pmin/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsTakenAtMaxP() throws IOException { + // verify feasibility when minQ/maxQ are taken at maxP (0 < maxP < targetP) + Network network = create(102, 50, 100, 150); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(50) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(100) + .setMinQ(-152) + .setMaxQ(152) + .endPoint() + .add(); + // add a generator to allow convergence, as variable P of g1 will be fixed to 102 in optimization + network.getVoltageLevel("vl1").newGenerator() + .setId("g2") + .setConnectableBus("b1") + .setBus("b1") + .setTargetP(1) + .setTargetV(390) + .setMinP(0) + .setMaxP(2) + .setVoltageRegulatorOn(true) + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-taken-at-pmax/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(50) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(100) + .setMinQ(-149) + .setMaxQ(149) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-taken-at-pmax/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + @Test + void testGeneratorQBoundsTakenAtMinP() throws IOException { + // verify feasibility when minQ/maxQ are taken at minP (targetP < minP < 0) + Network network = create(-0.5, 0, 10, -0.25); + setDefaultVoltageLimits(network, 0.85, 1.15); + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(-100) + .setMaxQ(100) + .endPoint() + .beginPoint() + .setP(2) + .setMinQ(-10) + .setMaxQ(10) + .endPoint() + .add(); + testAllModifAndLoadFlow(network, "optimization/bounds/generator-q-bounds-taken-at-pmin/valid", parameters, ReportNode.NO_OP); + + // verify non convergence due to insufficient bounds + network.getGenerator("g1").newReactiveCapabilityCurve() + .beginPoint() + .setP(0) + .setMinQ(0) + .setMaxQ(0) + .endPoint() + .beginPoint() + .setP(-10) + .setMinQ(-1.99) + .setMaxQ(1.99) + .endPoint() + .add(); + OpenReacResult result = runOpenReac(network, "optimization/bounds/generator-q-bounds-taken-at-pmin/invalid", parameters, true); + assertEquals(OpenReacStatus.NOT_OK, result.getStatus()); + } + + /** + * g1 ld1 + * | | + * b1---------b2 + * l1 + */ + public static Network create(double targetP, double minP, double maxP, double loadTargetQ) { + Network network = Network.create("q-bounds", "test"); + Substation s1 = network.newSubstation() + .setId("S1") + .add(); + Substation s2 = network.newSubstation() + .setId("S2") + .add(); + VoltageLevel vl1 = s1.newVoltageLevel() + .setId("vl1") + .setNominalV(400) + .setTopologyKind(TopologyKind.BUS_BREAKER) + .add(); + vl1.getBusBreakerView().newBus() + .setId("b1") + .add(); + vl1.newGenerator() + .setId("g1") + .setConnectableBus("b1") + .setBus("b1") + .setTargetP(targetP) + .setTargetV(390) + .setMinP(minP) + .setMaxP(maxP) + .setVoltageRegulatorOn(true) + .add(); + VoltageLevel vl2 = s2.newVoltageLevel() + .setId("vl2") + .setNominalV(400) + .setTopologyKind(TopologyKind.BUS_BREAKER) + .add(); + vl2.getBusBreakerView().newBus() + .setId("b2") + .add(); + vl2.newLoad() + .setId("ld1") + .setConnectableBus("b2") + .setBus("b2") + .setP0(targetP) + .setQ0(loadTargetQ) + .add(); + network.newLine() + .setId("l1") + .setBus1("b1") + .setBus2("b2") + .setR(0.1) + .setX(3) + .add(); + return network; + } +} diff --git a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationAndLoadFlowTest.java b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationAndLoadFlowTest.java index b7e5de6b..08df0167 100644 --- a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationAndLoadFlowTest.java +++ b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationAndLoadFlowTest.java @@ -74,8 +74,7 @@ void testOnlyGenerator() throws IOException { @Test void testHvdc() throws IOException { Network network = HvdcNetworkFactory.createNetworkWithGenerators2(); - network.getVscConverterStation("cs3").getTerminal().setP(0.0); - network.getVscConverterStation("cs4").getTerminal().setP(0.0); + OpenReacParameters parameters = new OpenReacParameters(); parameters.addConstantQGenerators(List.of("g1", "g2", "g5", "g6")); testAllModifAndLoadFlow(network, "optimization/loadflow/openreac-output-vsc", parameters, ReportNode.NO_OP); diff --git a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationHvdcTest.java b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationHvdcTest.java new file mode 100644 index 00000000..fb24e883 --- /dev/null +++ b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationHvdcTest.java @@ -0,0 +1,110 @@ +/** + * 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.openreac.optimization; + +import com.powsybl.commons.report.ReportNode; +import com.powsybl.iidm.network.HvdcLine; +import com.powsybl.iidm.network.Network; +import com.powsybl.openreac.network.HvdcNetworkFactory; +import com.powsybl.openreac.parameters.input.OpenReacParameters; +import com.powsybl.openreac.parameters.output.OpenReacResult; +import com.powsybl.openreac.parameters.output.OpenReacStatus; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Test OpenReac optimization with HVDC lines. + * + * @author Pierre ARVY {@literal } + */ +class OpenReacOptimizationHvdcTest extends AbstractOpenReacRunnerTest { + + @Test + void testLccExcludedFromOptimization() throws IOException { + Network network = HvdcNetworkFactory.createLcc(); + OpenReacParameters parameters = new OpenReacParameters(); + network.getLccConverterStation("cs2") + .getHvdcLine() + // put active set point > PQmax to remove LCC converter station from optimization + .setActivePowerSetpoint(parameters.getPQMax() + 1) + // modify max P to avoid check failure before optimization + .setMaxP(Double.MAX_VALUE); + OpenReacResult result = runOpenReac(network, "optimization/hvdc/lcc-excluded", true); + + assertEquals(OpenReacStatus.OK, result.getStatus()); + assertEquals(2, Integer.parseInt(result.getIndicators().get("nb_lcc_converter_in_data_file"))); + // verify no lcc is considered in optimization + assertEquals(0, Integer.parseInt(result.getIndicators().get("nb_lcc_converter_up_and_running"))); + } + + @Test + void testVscExcludedFromOptimization() throws IOException { + Network network = HvdcNetworkFactory.createVsc(); + OpenReacParameters parameters = new OpenReacParameters(); + network.getVscConverterStation("cs2") + .getHvdcLine() + // put active set point > PQmax to remove VSC converter station from optimization + .setActivePowerSetpoint(parameters.getPQMax() + 1) + // modify max P to avoid check failure before optimization + .setMaxP(parameters.getPQMax() + 2); + OpenReacResult result = runOpenReac(network, "optimization/hvdc/vsc-excluded", true); + + assertEquals(OpenReacStatus.OK, result.getStatus()); + assertEquals(2, Integer.parseInt(result.getIndicators().get("nb_vsc_converter_in_data_file"))); + // verify no vsc is considered in optimization + assertEquals(0, Integer.parseInt(result.getIndicators().get("nb_vsc_converter_up_and_running"))); + } + + @Test + void testVscExcludedFromOptimization2() throws IOException { + Network network = HvdcNetworkFactory.createVsc(); + OpenReacParameters parameters = new OpenReacParameters(); + network.getVscConverterStation("cs2") + .getHvdcLine() + // put max P > PQmax to remove vsc from optimization + .setMaxP(parameters.getPQMax() + 1); + OpenReacResult result = runOpenReac(network, "optimization/hvdc/vsc-excluded2", true); + + assertEquals(OpenReacStatus.OK, result.getStatus()); + assertEquals(2, Integer.parseInt(result.getIndicators().get("nb_vsc_converter_in_data_file"))); + // verify no vsc is considered in optimization + assertEquals(0, Integer.parseInt(result.getIndicators().get("nb_vsc_converter_up_and_running"))); + } + + @Test + void testVscActiveSetPointSignInOptimization() throws IOException { + Network network = HvdcNetworkFactory.createVsc(); + network.getHvdcLine("hvdc23") + .setActivePowerSetpoint(20) + .setConvertersMode(HvdcLine.ConvertersMode.SIDE_1_RECTIFIER_SIDE_2_INVERTER); + testAllModifAndLoadFlow(network, "optimization/hvdc/vsc-in-optimization/rectifier", new OpenReacParameters(), ReportNode.NO_OP); + + network.getHvdcLine("hvdc23") + .setActivePowerSetpoint(2) + .setConvertersMode(HvdcLine.ConvertersMode.SIDE_1_INVERTER_SIDE_2_RECTIFIER); + testAllModifAndLoadFlow(network, "optimization/hvdc/vsc-in-optimization/inverter", new OpenReacParameters(), ReportNode.NO_OP); + + } + + @Test + void testLccActiveSetPointSignInOptimization() throws IOException { + Network network = HvdcNetworkFactory.createLcc(); + network.getHvdcLine("hvdc23") + .setActivePowerSetpoint(20) + .setConvertersMode(HvdcLine.ConvertersMode.SIDE_1_RECTIFIER_SIDE_2_INVERTER); + testAllModifAndLoadFlow(network, "optimization/hvdc/lcc-in-optimization/rectifier", new OpenReacParameters(), ReportNode.NO_OP); + + network.getHvdcLine("hvdc23") + .setActivePowerSetpoint(51) + .setConvertersMode(HvdcLine.ConvertersMode.SIDE_1_INVERTER_SIDE_2_RECTIFIER); + testAllModifAndLoadFlow(network, "optimization/hvdc/lcc-in-optimization/inverter", new OpenReacParameters(), ReportNode.NO_OP); + } +} diff --git a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java index 01f677f7..687a9508 100644 --- a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java +++ b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java @@ -161,8 +161,7 @@ void testTransformersIndicators() throws IOException { @Test void testVscIndicators() throws IOException { Network network = HvdcNetworkFactory.createVsc(); - // FIXME : should not depend on P/Q values on terminal - network.getVscConverterStation("cs2").getTerminal().setP(2).setQ(1); + OpenReacResult result = runOpenReac(network, "optimization/indicators/vsc-test", true); assertEquals(OpenReacStatus.OK, result.getStatus()); @@ -174,8 +173,7 @@ void testVscIndicators() throws IOException { @Test void testLccIndicators() throws IOException { Network network = HvdcNetworkFactory.createLcc(); - // FIXME : should not depend on P/Q values on terminal - network.getLccConverterStation("cs2").getTerminal().setP(2).setQ(1); + OpenReacResult result = runOpenReac(network, "optimization/indicators/lcc-test", true); assertEquals(OpenReacStatus.OK, result.getStatus()); diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-excluded/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/lcc-excluded/reactiveopf_results_indic.txt new file mode 100644 index 00000000..299b7b26 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-excluded/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 2 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 0 +nb_vsc_converter_up_and_running 0 +nb_lcc_converter_in_data_file 2 +nb_lcc_converter_up_and_running 0 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.000937 +max_delta_teta_ac 0.001223 +min_delta_teta_dc 0.000937 +min_delta_teta_ac 0.001223 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_generators.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_generators.csv new file mode 100644 index 00000000..b343fbb7 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_generators.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;V(pu);targetP(MW);targetQ(Mvar);P(MW);Q(MW); +1;1;1;'true';0.817;102.6;47.9;1.0;-47.9; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_indic.txt new file mode 100644 index 00000000..32390c06 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 2 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 0 +nb_vsc_converter_up_and_running 0 +nb_lcc_converter_in_data_file 2 +nb_lcc_converter_up_and_running 1 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc -0.00 +min_teta_ac -0.00 +teta_min -3.00 +max_delta_teta_dc -0.000019 +max_delta_teta_ac -0.000476 +min_delta_teta_dc -0.000019 +min_delta_teta_ac -0.000476 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_rtc.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_rtc.csv new file mode 100644 index 00000000..9a62a138 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_rtc.csv @@ -0,0 +1 @@ +#variant;num;tap; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_shunts.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_shunts.csv new file mode 100644 index 00000000..8d515fde --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_shunts.csv @@ -0,0 +1 @@ +#variant;num;bus;b(pu);Q(Mvar);section; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv new file mode 100644 index 00000000..6792ddb9 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;V(pu);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_voltages.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_voltages.csv new file mode 100644 index 00000000..407928a4 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_voltages.csv @@ -0,0 +1,3 @@ +#variant;bus;V(pu);theta(rad);id; +1;1;0.817;-0.000;"vl1_0"; +1;2;0.816;0.000;"vl2_0"; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv new file mode 100644 index 00000000..aa24858c --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;targetV(pu);targetQ(Mvar);P(MW);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_generators.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_generators.csv new file mode 100644 index 00000000..28ea49cc --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_generators.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;V(pu);targetP(MW);targetQ(Mvar);P(MW);Q(MW); +1;1;1;'true';1.040;102.6;25.1;-70.0;-25.1; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_indic.txt new file mode 100644 index 00000000..8001b767 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 2 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 0 +nb_vsc_converter_up_and_running 0 +nb_lcc_converter_in_data_file 2 +nb_lcc_converter_up_and_running 1 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.001312 +max_delta_teta_ac 0.001070 +min_delta_teta_dc 0.001312 +min_delta_teta_ac 0.001070 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_rtc.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_rtc.csv new file mode 100644 index 00000000..9a62a138 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_rtc.csv @@ -0,0 +1 @@ +#variant;num;tap; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_shunts.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_shunts.csv new file mode 100644 index 00000000..8d515fde --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_shunts.csv @@ -0,0 +1 @@ +#variant;num;bus;b(pu);Q(Mvar);section; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv new file mode 100644 index 00000000..6792ddb9 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;V(pu);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_voltages.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_voltages.csv new file mode 100644 index 00000000..145800f4 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_voltages.csv @@ -0,0 +1,3 @@ +#variant;bus;V(pu);theta(rad);id; +1;1;1.040;0.001;"vl1_0"; +1;2;1.039;0.000;"vl2_0"; diff --git a/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv new file mode 100644 index 00000000..aa24858c --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/lcc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;targetV(pu);targetQ(Mvar);P(MW);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-excluded/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/vsc-excluded/reactiveopf_results_indic.txt new file mode 100644 index 00000000..508604ab --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-excluded/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 1 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 2 +nb_vsc_converter_up_and_running 0 +nb_lcc_converter_in_data_file 0 +nb_lcc_converter_up_and_running 0 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.000937 +max_delta_teta_ac 0.001223 +min_delta_teta_dc 0.000937 +min_delta_teta_ac 0.001223 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-excluded2/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/vsc-excluded2/reactiveopf_results_indic.txt new file mode 100644 index 00000000..508604ab --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-excluded2/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 1 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 2 +nb_vsc_converter_up_and_running 0 +nb_lcc_converter_in_data_file 0 +nb_lcc_converter_up_and_running 0 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.000937 +max_delta_teta_ac 0.001223 +min_delta_teta_dc 0.000937 +min_delta_teta_ac 0.001223 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_generators.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_generators.csv new file mode 100644 index 00000000..40715a08 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_generators.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;V(pu);targetP(MW);targetQ(Mvar);P(MW);Q(MW); +1;1;1;'true';0.847;102.6;0.0;-48.0;-0.0; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_indic.txt new file mode 100644 index 00000000..ac7cc7f6 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 2 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 1 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 2 +nb_vsc_converter_up_and_running 1 +nb_lcc_converter_in_data_file 0 +nb_lcc_converter_up_and_running 0 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.000900 +max_delta_teta_ac 0.001256 +min_delta_teta_dc 0.000900 +min_delta_teta_ac 0.001256 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_rtc.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_rtc.csv new file mode 100644 index 00000000..9a62a138 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_rtc.csv @@ -0,0 +1 @@ +#variant;num;tap; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_shunts.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_shunts.csv new file mode 100644 index 00000000..8d515fde --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_shunts.csv @@ -0,0 +1 @@ +#variant;num;bus;b(pu);Q(Mvar);section; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv new file mode 100644 index 00000000..6792ddb9 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_static_var_compensators.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;V(pu);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_voltages.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_voltages.csv new file mode 100644 index 00000000..64e18718 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_voltages.csv @@ -0,0 +1,3 @@ +#variant;bus;V(pu);theta(rad);id; +1;1;0.847;0.001;"vl1_0"; +1;2;0.846;0.000;"vl2_0"; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv new file mode 100644 index 00000000..f2c164a4 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/inverter/reactiveopf_results_vsc_converter_stations.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;targetV(pu);targetQ(Mvar);P(MW);Q(Mvar); +1;1;2;'true';0.846;10.0;-2.0;10.0; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_generators.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_generators.csv new file mode 100644 index 00000000..6b0e45a7 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_generators.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;V(pu);targetP(MW);targetQ(Mvar);P(MW);Q(MW); +1;1;1;'true';1.006;102.6;0.0;-70.0;-0.0; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_indic.txt new file mode 100644 index 00000000..b7fb3971 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_indic.txt @@ -0,0 +1,82 @@ +final_status OK +dcopf_status OK + +log_level_ampl INFO +log_level_knitro 2 +objective_choice 0 +ratio_voltage_target 0.500000 +coeff_alpha 1.000000 +Pnull 0.010000 +Znull 0.000100 +epsilon_nominal_voltage 1.000000 +min_plausible_low_voltage_limit 0.500000 +max_plausible_high_voltage_limit 1.500000 +ignore_voltage_bounds 0.000000 +buses_with_reactive_slacks ALL +PQmax 9000.000000 +defaultPmax 1000.000000 +defaultPmin 0.000000 +defaultQmaxPmaxRatio 0.300000 +defaultQmin -300.000000 +defaultQmax 300.000000 +minimalQPrange 1.000000 +default_variable_scaling_factor 1.000000 +default_constraint_scaling_factor 1.000000 +reactive_slack_variable_scaling_factor 0.100000 +transformer_ratio_variable_scaling_factor 0.001000 +shunt_variable_scaling_factor 0.100000 + +nb_substations 3 +nb_bus_in_data_file 3 +nb_bus_in_ACDC_CC 3 +nb_bus_in_AC_CC 2 +nb_bus_in_ACDC_but_out_AC_CC 1 +nb_bus_with_voltage_value 0 +nb_bus_with_reactive_slacks 2 +nb_bus_without_reactive_slacks 0 +nb_branch_in_data_file 1 +nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 +nb_branch_with_nonsmall_impedance 1 +nb_branch_with_zero_or_small_impedance 0 +nb_unit_in_data_file 1 +nb_unit_in_AC_CC 1 +nb_unit_up_and_running 1 +nb_unit_with_variable_reactive_power 1 +nb_unit_with_fixed_reactive_power 0 +nb_load_in_data_file 2 +nb_load_in_AC_CC 1 +nb_shunt_in_data_file 0 +nb_shunt_connectable_or_in_AC_CC 0 +nb_shunt_with_fixed_value 0 +nb_shunt_with_variable_value 0 +nb_transformers_with_variable_ratio 0 +nb_transformers_with_fixed_ratio 0 +nb_svc_in_data_file 0 +nb_svc_in_AC_CC 0 +nb_svc_up_and_operating 0 +nb_vsc_converter_in_data_file 2 +nb_vsc_converter_up_and_running 1 +nb_lcc_converter_in_data_file 0 +nb_lcc_converter_up_and_running 0 +nb_batteries 0 +sum_batteries_pmax 0.0 +sum_batteries_pmin 0.0 + +max_teta_dc 0.00 +max_teta_ac 0.00 +teta_max 3.00 +min_teta_dc 0.00 +min_teta_ac 0.00 +teta_min -3.00 +max_delta_teta_dc 0.001312 +max_delta_teta_ac 0.001298 +min_delta_teta_dc 0.001312 +min_delta_teta_ac 0.001298 + +nb_reactive_slacks 0 +nb_slacks_condensator 0 +sum_slacks_condensator 0.0 +nb_slacks_self 0 +sum_slacks_self 0.0 diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_rtc.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_rtc.csv new file mode 100644 index 00000000..9a62a138 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_rtc.csv @@ -0,0 +1 @@ +#variant;num;tap; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_shunts.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_shunts.csv new file mode 100644 index 00000000..8d515fde --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_shunts.csv @@ -0,0 +1 @@ +#variant;num;bus;b(pu);Q(Mvar);section; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv new file mode 100644 index 00000000..6792ddb9 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_static_var_compensators.csv @@ -0,0 +1 @@ +#variant;num;bus;vRegul;V(pu);Q(Mvar); diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_voltages.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_voltages.csv new file mode 100644 index 00000000..7f165729 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_voltages.csv @@ -0,0 +1,3 @@ +#variant;bus;V(pu);theta(rad);id; +1;1;1.006;0.001;"vl1_0"; +1;2;1.006;0.000;"vl2_0"; diff --git a/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv new file mode 100644 index 00000000..5dffc584 --- /dev/null +++ b/open-reac/src/test/resources/optimization/hvdc/vsc-in-optimization/rectifier/reactiveopf_results_vsc_converter_stations.csv @@ -0,0 +1,2 @@ +#variant;num;bus;vRegul;targetV(pu);targetQ(Mvar);P(MW);Q(Mvar); +1;1;2;'true';1.006;10.1;20.0;10.1; diff --git a/open-reac/src/test/resources/optimization/indicators/lcc-test/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/indicators/lcc-test/reactiveopf_results_indic.txt index 3add2771..6cd4efaa 100644 --- a/open-reac/src/test/resources/optimization/indicators/lcc-test/reactiveopf_results_indic.txt +++ b/open-reac/src/test/resources/optimization/indicators/lcc-test/reactiveopf_results_indic.txt @@ -36,6 +36,8 @@ nb_bus_with_reactive_slacks 2 nb_bus_without_reactive_slacks 0 nb_branch_in_data_file 1 nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 nb_branch_with_nonsmall_impedance 1 nb_branch_with_zero_or_small_impedance 0 nb_unit_in_data_file 2 @@ -68,10 +70,10 @@ teta_max 3.00 min_teta_dc 0.00 min_teta_ac 0.00 teta_min -3.00 -max_delta_teta_dc 0.000975 -max_delta_teta_ac 0.001211 -min_delta_teta_dc 0.000975 -min_delta_teta_ac 0.001211 +max_delta_teta_dc 0.001875 +max_delta_teta_ac 0.000948 +min_delta_teta_dc 0.001875 +min_delta_teta_ac 0.000948 nb_reactive_slacks 0 nb_slacks_condensator 0 diff --git a/open-reac/src/test/resources/optimization/indicators/vsc-test/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/indicators/vsc-test/reactiveopf_results_indic.txt index 42a8e2fa..83afeb52 100644 --- a/open-reac/src/test/resources/optimization/indicators/vsc-test/reactiveopf_results_indic.txt +++ b/open-reac/src/test/resources/optimization/indicators/vsc-test/reactiveopf_results_indic.txt @@ -36,6 +36,8 @@ nb_bus_with_reactive_slacks 2 nb_bus_without_reactive_slacks 0 nb_branch_in_data_file 1 nb_branch_in_AC_CC 1 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 nb_branch_with_nonsmall_impedance 1 nb_branch_with_zero_or_small_impedance 0 nb_unit_in_data_file 1 @@ -68,10 +70,10 @@ teta_max 3.00 min_teta_dc 0.00 min_teta_ac 0.00 teta_min -3.00 -max_delta_teta_dc 0.000975 -max_delta_teta_ac 0.001335 -min_delta_teta_dc 0.000975 -min_delta_teta_ac 0.001335 +max_delta_teta_dc 0.001875 +max_delta_teta_ac 0.001259 +min_delta_teta_dc 0.001875 +min_delta_teta_ac 0.001259 nb_reactive_slacks 0 nb_slacks_condensator 0 diff --git a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_generators.csv b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_generators.csv index db3443d2..b03f0ee3 100644 --- a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_generators.csv +++ b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_generators.csv @@ -1,5 +1,5 @@ #variant;num;bus;vRegul;V(pu);targetP(MW);targetQ(Mvar);P(MW);Q(MW); -1;1;1;'true';0.568;1.0;0.0;-1.0;0.0; +1;1;1;'true';0.535;1.0;0.0;-1.0;0.0; 1;2;2;'true';0.500;1.0;0.0;-1.0;0.0; -1;3;6;'true';0.568;1.0;0.0;-1.0;0.0; +1;3;6;'true';0.500;1.0;0.0;-1.0;0.0; 1;4;5;'true';0.500;1.0;0.0;-1.0;0.0; diff --git a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_indic.txt b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_indic.txt index 00b3ea7b..6f8036de 100644 --- a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_indic.txt +++ b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_indic.txt @@ -36,6 +36,8 @@ nb_bus_with_reactive_slacks 6 nb_bus_without_reactive_slacks 0 nb_branch_in_data_file 7 nb_branch_in_AC_CC 7 +nb_branch_in_AC_CC_side_1_opened 0 +nb_branch_in_AC_CC_side_2_opened 0 nb_branch_with_nonsmall_impedance 7 nb_branch_with_zero_or_small_impedance 0 nb_unit_in_data_file 4 @@ -62,16 +64,16 @@ nb_batteries 0 sum_batteries_pmax 0.0 sum_batteries_pmin 0.0 -max_teta_dc 0.07 -max_teta_ac 0.22 -teta_max 3.07 -min_teta_dc -0.20 -min_teta_ac -0.93 -teta_min -3.20 -max_delta_teta_dc 0.066667 -max_delta_teta_ac 0.220224 -min_delta_teta_dc -0.200000 -min_delta_teta_ac -0.927179 +max_teta_dc 0.17 +max_teta_ac 0.58 +teta_max 3.17 +min_teta_dc -0.10 +min_teta_ac -0.38 +teta_min -3.10 +max_delta_teta_dc 0.133333 +max_delta_teta_ac 0.496485 +min_delta_teta_dc -0.166667 +min_delta_teta_ac -0.577584 nb_reactive_slacks 0 nb_slacks_condensator 0 diff --git a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_voltages.csv b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_voltages.csv index 7859766f..ad340422 100644 --- a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_voltages.csv +++ b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_voltages.csv @@ -1,7 +1,7 @@ #variant;bus;V(pu);theta(rad);id; -1;1;0.568;-0.707;"b1_vl_0"; -1;2;0.500;-0.927;"b2_vl_0"; -1;3;0.651;-0.810;"b3_vl_0"; -1;4;0.651;0.117;"b4_vl_0"; +1;1;0.535;0.496;"b1_vl_0"; +1;2;0.500;0.000;"b2_vl_0"; +1;3;0.632;0.578;"b3_vl_0"; +1;4;0.539;-0.381;"b4_vl_0"; 1;5;0.500;0.000;"b5_vl_0"; -1;6;0.568;0.220;"b6_vl_0"; +1;6;0.500;-0.000;"b6_vl_0"; diff --git a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_vsc_converter_stations.csv b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_vsc_converter_stations.csv index d8171906..904f7536 100644 --- a/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_vsc_converter_stations.csv +++ b/open-reac/src/test/resources/optimization/loadflow/openreac-output-vsc/reactiveopf_results_vsc_converter_stations.csv @@ -1,3 +1,3 @@ #variant;num;bus;vRegul;targetV(pu);targetQ(Mvar);P(MW);Q(Mvar); -1;1;3;'true';0.651;1.6;0.0;1.6; -1;2;4;'true';0.651;1.6;0.0;1.6; +1;1;3;'true';0.632;2.0;-2.0;2.0; +1;2;4;'true';0.539;0.8;2.0;0.8;