diff --git a/open-reac/src/main/java/com/powsybl/openreac/OpenReacRunner.java b/open-reac/src/main/java/com/powsybl/openreac/OpenReacRunner.java index 6ea11480..e41ec893 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/OpenReacRunner.java +++ b/open-reac/src/main/java/com/powsybl/openreac/OpenReacRunner.java @@ -75,8 +75,9 @@ public static OpenReacResult run(Network network, String variantId, OpenReacPara AmplModel reactiveOpf = OpenReacModel.buildModel(); OpenReacAmplIOFiles amplIoInterface = new OpenReacAmplIOFiles(parameters, amplExportConfig, network, config.isDebug(), Reports.createOpenReacReporter(reportNode, network.getId(), parameters.getObjective())); AmplResults run = AmplModelRunner.run(network, variantId, reactiveOpf, manager, amplIoInterface); - return new OpenReacResult(run.isSuccess() && amplIoInterface.checkErrors() ? OpenReacStatus.OK : OpenReacStatus.NOT_OK, - amplIoInterface, run.getIndicators()); + OpenReacResult result = new OpenReacResult(run.isSuccess() && amplIoInterface.checkErrors() ? OpenReacStatus.OK : OpenReacStatus.NOT_OK, amplIoInterface, run.getIndicators()); + Reports.createShuntModificationsReporter(reportNode, network.getId(), amplIoInterface.getNetworkModifications().getShuntsWithDeltaDiscreteOptimalOverThreshold()); + return result; } /** @@ -107,8 +108,11 @@ public static CompletableFuture runAsync(Network network, String AmplModel reactiveOpf = OpenReacModel.buildModel(); OpenReacAmplIOFiles amplIoInterface = new OpenReacAmplIOFiles(parameters, amplExportConfig, network, config.isDebug(), Reports.createOpenReacReporter(reportNode, network.getId(), parameters.getObjective())); CompletableFuture runAsync = AmplModelRunner.runAsync(network, variantId, reactiveOpf, manager, amplIoInterface); - return runAsync.thenApply(run -> new OpenReacResult(run.isSuccess() && amplIoInterface.checkErrors() ? OpenReacStatus.OK : OpenReacStatus.NOT_OK, - amplIoInterface, run.getIndicators())); + return runAsync.thenApply(run -> { + OpenReacResult result = new OpenReacResult(run.isSuccess() && amplIoInterface.checkErrors() ? OpenReacStatus.OK : OpenReacStatus.NOT_OK, amplIoInterface, run.getIndicators()); + Reports.createShuntModificationsReporter(reportNode, network.getId(), amplIoInterface.getNetworkModifications().getShuntsWithDeltaDiscreteOptimalOverThreshold()); + return result; + }); } private static void checkParameters(Network network, String variantId, OpenReacParameters parameters, OpenReacConfig config, ComputationManager manager, ReportNode reportNode) { diff --git a/open-reac/src/main/java/com/powsybl/openreac/Reports.java b/open-reac/src/main/java/com/powsybl/openreac/Reports.java index bb27751e..d730b7bb 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/Reports.java +++ b/open-reac/src/main/java/com/powsybl/openreac/Reports.java @@ -9,12 +9,21 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.commons.report.TypedValue; import com.powsybl.openreac.parameters.input.algo.OpenReacOptimisationObjective; +import com.powsybl.openreac.parameters.output.network.ShuntCompensatorNetworkOutput; + +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.List; +import java.util.Locale; /** * @author Joris Mancini {@literal } */ public final class Reports { + private static final String NETWORK_ID = "networkId"; + private static final DecimalFormat REACTIVE_VALUE_FORMAT = new DecimalFormat("0.0", DecimalFormatSymbols.getInstance(Locale.ROOT)); + private Reports() { // Should not be instantiated } @@ -22,7 +31,7 @@ private Reports() { public static ReportNode createOpenReacReporter(ReportNode reportNode, String networkId, OpenReacOptimisationObjective objective) { return reportNode.newReportNode() .withMessageTemplate("openReac", "Open Reac on network '${networkId}' with ${objective} objective") - .withUntypedValue("networkId", networkId) + .withUntypedValue(NETWORK_ID, networkId) .withUntypedValue("objective", objective.toString()) .add(); } @@ -54,8 +63,31 @@ public static void reportVariableShuntCompensatorsSize(ReportNode reportNode, in public static ReportNode createParameterIntegrityReporter(ReportNode reportNode, String networkId) { return reportNode.newReportNode() .withMessageTemplate("openReacParameterIntegrity", "Open reac parameter integrity on network '${networkId}'") - .withUntypedValue("networkId", networkId) + .withUntypedValue(NETWORK_ID, networkId) .add(); } + public static void createShuntModificationsReporter(ReportNode reportNode, String networkId, List shuntsWithDeltaDiscreteOptimalOverThresholds) { + if (!shuntsWithDeltaDiscreteOptimalOverThresholds.isEmpty()) { + ReportNode reportShunts = reportNode.newReportNode() + .withMessageTemplate("shuntCompensatorDeltaOverThreshold", "Shunt compensator reactive delta over threshold") + .withUntypedValue(NETWORK_ID, networkId) + .add(); + reportShunts.newReportNode() + .withMessageTemplate("shuntCompensatorDeltaOverThresholdCount", "For ${shuntsCount} shunt compensators, there is a significant difference between the updated discretized reactive power value and the theoretical optimal reactive power value.") + .withUntypedValue("shuntsCount", shuntsWithDeltaDiscreteOptimalOverThresholds.size()) + .withSeverity(TypedValue.INFO_SEVERITY) + .add(); + + shuntsWithDeltaDiscreteOptimalOverThresholds.forEach(shunt -> + reportShunts.newReportNode() + .withMessageTemplate("shuntCompensatorDeltaDiscretizedOptimizedOverThreshold", "After discretization, shunt compensator ${shuntCompensatorId} with ${maxSectionCount} available section(s) has been set to ${discretizedValue} MVar (optimal value : ${optimalValue} MVar)") + .withUntypedValue("shuntCompensatorId", shunt.id()) + .withUntypedValue("maxSectionCount", shunt.maximumSectionCount()) + .withUntypedValue("discretizedValue", REACTIVE_VALUE_FORMAT.format(shunt.discretizedReactiveValue())) + .withUntypedValue("optimalValue", REACTIVE_VALUE_FORMAT.format(shunt.optimalReactiveValue())) + .withSeverity(TypedValue.TRACE_SEVERITY) + .add()); + } + } } diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/OpenReacAmplIOFiles.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/OpenReacAmplIOFiles.java index bfe5e4fb..657566a6 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/OpenReacAmplIOFiles.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/OpenReacAmplIOFiles.java @@ -61,7 +61,7 @@ public OpenReacAmplIOFiles(OpenReacParameters params, AmplExportConfig amplExpor //outputs this.reactiveSlackOutput = new ReactiveSlackOutput(); - this.networkModifications = new NetworkModifications(network); + this.networkModifications = new NetworkModifications(network, params.getShuntCompensatorActivationAlertThreshold()); this.voltageProfileOutput = new VoltageProfileOutput(); this.debug = debug; diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java index e1332da0..62d3352a 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java @@ -38,6 +38,8 @@ public class OpenReacParameters { private final List configuredReactiveSlackBuses = new ArrayList<>(); + private static final String NOT_FOUND_IN_NETWORK = " not found in the network."; + // Algo parameters private OpenReacOptimisationObjective objective = OpenReacOptimisationObjective.MIN_GENERATION; @@ -120,6 +122,11 @@ public class OpenReacParameters { private double shuntVariableScalingFactor = 1e-1; + // Shunt compensator alert threshold + // (to help reporting the shunt compensators with a delta between optimized and discretized reactive value over this threshold in MVar) + + private double shuntCompensatorActivationAlertThreshold; + /** * Override some voltage level limits in the network. This will NOT modify the network object. *

@@ -526,6 +533,21 @@ public OpenReacParameters setShuntVariableScalingFactor(double shuntVariableScal return this; } + /** + * @return the shunt compensator activation alert threshold + */ + public double getShuntCompensatorActivationAlertThreshold() { + return shuntCompensatorActivationAlertThreshold; + } + + public OpenReacParameters setShuntCompensatorActivationAlertThreshold(double shuntCompensatorActivationAlertThreshold) { + if (shuntCompensatorActivationAlertThreshold < 0 || Double.isNaN(shuntCompensatorActivationAlertThreshold)) { + throw new IllegalArgumentException("The shunt compensator activation alert threshold must be >= 0 and defined to be consistent."); + } + this.shuntCompensatorActivationAlertThreshold = shuntCompensatorActivationAlertThreshold; + return this; + } + public List getAllAlgorithmParams() { ArrayList allAlgoParams = new ArrayList<>(); allAlgoParams.add(objective.toParam()); @@ -620,22 +642,22 @@ public void checkIntegrity(Network network, ReportNode reportNode) throws Invali for (String shuntId : getVariableShuntCompensators()) { if (network.getShuntCompensator(shuntId) == null) { - throw new InvalidParametersException("Shunt " + shuntId + " not found in the network."); + throw new InvalidParametersException("Shunt " + shuntId + NOT_FOUND_IN_NETWORK); } } for (String genId : getConstantQGenerators()) { if (network.getGenerator(genId) == null) { - throw new InvalidParametersException("Generator " + genId + " not found in the network."); + throw new InvalidParametersException("Generator " + genId + NOT_FOUND_IN_NETWORK); } } for (String transformerId : getVariableTwoWindingsTransformers()) { if (network.getTwoWindingsTransformer(transformerId) == null) { - throw new InvalidParametersException("Two windings transformer " + transformerId + " not found in the network."); + throw new InvalidParametersException("Two windings transformer " + transformerId + NOT_FOUND_IN_NETWORK); } } for (String busId : getConfiguredReactiveSlackBuses()) { if (network.getBusView().getBus(busId) == null) { - throw new InvalidParametersException("Bus " + busId + " not found in the network."); + throw new InvalidParametersException("Bus " + busId + NOT_FOUND_IN_NETWORK); } } diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/NetworkModifications.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/NetworkModifications.java index cfca950e..f87bcb21 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/NetworkModifications.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/NetworkModifications.java @@ -28,9 +28,9 @@ public class NetworkModifications { private final SvcNetworkOutput svcOutput; private final TapPositionNetworkOutput tapPositionOutput; - public NetworkModifications(Network network) { + public NetworkModifications(Network network, double shuntCompensatorActivationAlertThreshold) { generatorNetworkOutput = new GeneratorNetworkOutput(network); - shuntsOutput = new ShuntCompensatorNetworkOutput(network); + shuntsOutput = new ShuntCompensatorNetworkOutput(network, shuntCompensatorActivationAlertThreshold); vscOutput = new VscNetworkOutput(network); svcOutput = new SvcNetworkOutput(network); tapPositionOutput = new TapPositionNetworkOutput(network); @@ -48,6 +48,10 @@ public List getShuntModifications() { return shuntsOutput.getModifications(); } + public List getShuntsWithDeltaDiscreteOptimalOverThreshold() { + return shuntsOutput.getShuntsWithDeltaDiscreteOptimalOverThresholds(); + } + public List getVscModifications() { return vscOutput.getModifications(); } diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/ShuntCompensatorNetworkOutput.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/ShuntCompensatorNetworkOutput.java index 250882ee..9f11e018 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/ShuntCompensatorNetworkOutput.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/output/network/ShuntCompensatorNetworkOutput.java @@ -12,6 +12,9 @@ import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.ShuntCompensator; +import java.util.ArrayList; +import java.util.List; + /** * @author Nicolas Pierre {@literal } */ @@ -21,9 +24,14 @@ public class ShuntCompensatorNetworkOutput extends AbstractNetworkOutput shuntWithDeltaDiscreteOptimalOverThresholds = new ArrayList<>(); + private final double shuntCompensatorActivationAlertThreshold; + + public record ShuntWithDeltaDiscreteOptimalOverThreshold(String id, int maximumSectionCount, double discretizedReactiveValue, double optimalReactiveValue) { } - public ShuntCompensatorNetworkOutput(Network network) { + public ShuntCompensatorNetworkOutput(Network network, double shuntCompensatorActivationAlertThreshold) { super(network); + this.shuntCompensatorActivationAlertThreshold = shuntCompensatorActivationAlertThreshold; } @Override @@ -64,6 +72,15 @@ private int findSectionCount(ShuntCompensator sc, double b) { sectionCount = i; } } + double optimalReactiveValue = Math.abs(b * Math.pow(sc.getTerminal().getVoltageLevel().getNominalV(), 2)); + double discretizedReactiveValue = Math.abs(sc.getB(sectionCount) * Math.pow(sc.getTerminal().getVoltageLevel().getNominalV(), 2)); + if (Math.abs(discretizedReactiveValue - optimalReactiveValue) > shuntCompensatorActivationAlertThreshold) { + shuntWithDeltaDiscreteOptimalOverThresholds.add(new ShuntWithDeltaDiscreteOptimalOverThreshold(sc.getId(), sc.getMaximumSectionCount(), discretizedReactiveValue, optimalReactiveValue)); + } return sectionCount; } + + public List getShuntsWithDeltaDiscreteOptimalOverThresholds() { + return shuntWithDeltaDiscreteOptimalOverThresholds; + } } diff --git a/open-reac/src/test/java/com/powsybl/openreac/OpenReacRunnerTest.java b/open-reac/src/test/java/com/powsybl/openreac/OpenReacRunnerTest.java index 858a1d08..777250fd 100644 --- a/open-reac/src/test/java/com/powsybl/openreac/OpenReacRunnerTest.java +++ b/open-reac/src/test/java/com/powsybl/openreac/OpenReacRunnerTest.java @@ -8,6 +8,8 @@ import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; +import com.powsybl.commons.report.ReportNode; +import com.powsybl.commons.report.TypedValue; import com.powsybl.commons.test.ComparisonUtils; import com.powsybl.computation.ComputationManager; import com.powsybl.computation.local.LocalCommandExecutor; @@ -36,6 +38,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ForkJoinPool; import java.util.stream.Collectors; @@ -168,7 +171,7 @@ void testInputFile() throws IOException { } @Test - public void testOutputFileParsing() throws IOException { + void testOutputFileParsing() throws IOException { Network network = IeeeCdfNetworkFactory.create57(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network // To parse correctly data from output files, there must be an ID in the Ampl mapper @@ -260,39 +263,39 @@ void testRunAsync() throws IOException { } } - private void testAllModifAndLoadFlow(Network network, String subFolder, OpenReacParameters parameters) throws IOException { - runAndApplyAllModifications(network, subFolder, parameters, true); + private void testAllModifAndLoadFlow(Network network, String subFolder, OpenReacParameters parameters, ReportNode reportNode) throws IOException { + runAndApplyAllModifications(network, subFolder, parameters, true, reportNode); LoadFlowResult loadFlowResult = LoadFlow.run(network); - assertTrue(loadFlowResult.isOk()); + assertTrue(loadFlowResult.isFullyConverged()); } @Test - public void testOnlyGenerator() throws IOException { + void testOnlyGenerator() throws IOException { Network network = IeeeCdfNetworkFactory.create14(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network - testAllModifAndLoadFlow(network, "openreac-output-ieee14", new OpenReacParameters()); + testAllModifAndLoadFlow(network, "openreac-output-ieee14", new OpenReacParameters(), ReportNode.NO_OP); } @Test - public void testHvdc() throws IOException { + void testHvdc() throws IOException { Network network = HvdcNetworkFactory.createNetworkWithGenerators2(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network 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, "openreac-output-vsc", parameters); + testAllModifAndLoadFlow(network, "openreac-output-vsc", parameters, ReportNode.NO_OP); } @Test - public void testSvc() throws IOException { + void testSvc() throws IOException { Network network = VoltageControlNetworkFactory.createWithStaticVarCompensator(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network network.getVoltageLevelStream().forEach(vl -> vl.setLowVoltageLimit(380).setHighVoltageLimit(420)); network.getStaticVarCompensator("svc1").setVoltageSetpoint(390).setRegulationMode(StaticVarCompensator.RegulationMode.VOLTAGE); OpenReacParameters parameters = new OpenReacParameters(); parameters.addConstantQGenerators(List.of("g1")); - testAllModifAndLoadFlow(network, "openreac-output-svc", parameters); + testAllModifAndLoadFlow(network, "openreac-output-svc", parameters, ReportNode.NO_OP); } @Test @@ -305,13 +308,51 @@ void testShunt() throws IOException { OpenReacParameters parameters = new OpenReacParameters(); parameters.addVariableShuntCompensators(List.of(shunt.getId())); - testAllModifAndLoadFlow(network, "openreac-output-shunt", parameters); + ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("openReac", "openReac").build(); + testAllModifAndLoadFlow(network, "openreac-output-shunt", parameters, reportNode); + + assertEquals(3, reportNode.getChildren().size()); + ReportNode reportShunts = reportNode.getChildren().get(2); + assertEquals(2, reportShunts.getChildren().size()); + assertEquals("shuntCompensatorDeltaOverThresholdCount", reportShunts.getChildren().get(0).getMessageKey()); + Map values = reportShunts.getChildren().get(0).getValues(); + assertEquals("1", values.get("shuntsCount").toString()); + assertEquals(TypedValue.INFO_SEVERITY.getValue(), values.get("reportSeverity").toString()); + + assertEquals("shuntCompensatorDeltaDiscretizedOptimizedOverThreshold", reportShunts.getChildren().get(1).getMessageKey()); + values = reportShunts.getChildren().get(1).getValues(); + assertEquals("SHUNT", values.get("shuntCompensatorId").toString()); + assertEquals("25", values.get("maxSectionCount").toString()); + assertEquals("2080.0", values.get("discretizedValue").toString()); + assertEquals("2128.0", values.get("optimalValue").toString()); + assertEquals(TypedValue.TRACE_SEVERITY.getValue(), values.get("reportSeverity").toString()); + assertTrue(shunt.getTerminal().isConnected()); // shunt has been reconnected assertEquals(420.8, shunt.getTargetV()); // targetV has been updated } @Test - public void testTransformer() throws IOException { + void testShuntWithDeltaBetweenDiscretizedAndOptimalReactiveValueUnderThreshold() throws IOException { + Network network = create(); + setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network + ShuntCompensator shunt = network.getShuntCompensator("SHUNT"); + assertFalse(shunt.getTerminal().isConnected()); + assertEquals(393, shunt.getTargetV()); + + OpenReacParameters parameters = new OpenReacParameters(); + parameters.setShuntCompensatorActivationAlertThreshold(100.); + parameters.addVariableShuntCompensators(List.of(shunt.getId())); + ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("openReac", "openReac").build(); + testAllModifAndLoadFlow(network, "openreac-output-shunt", parameters, reportNode); + + assertEquals(2, reportNode.getChildren().size()); + + assertTrue(shunt.getTerminal().isConnected()); // shunt has been reconnected + assertEquals(420.8, shunt.getTargetV()); // targetV has been updated + } + + @Test + void testTransformer() throws IOException { Network network = VoltageControlNetworkFactory.createNetworkWithT2wt(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network RatioTapChanger rtc = network.getTwoWindingsTransformer("T2wT").getRatioTapChanger() @@ -324,17 +365,17 @@ public void testTransformer() throws IOException { OpenReacParameters parameters = new OpenReacParameters(); parameters.addConstantQGenerators(List.of("GEN_1")); parameters.addVariableTwoWindingsTransformers(List.of("T2wT")); - testAllModifAndLoadFlow(network, "openreac-output-transfo", parameters); + testAllModifAndLoadFlow(network, "openreac-output-transfo", parameters, ReportNode.NO_OP); assertEquals(0, rtc.getTapPosition()); assertEquals(22.935, rtc.getTargetV()); } @Test - public void testRealNetwork() throws IOException { + void testRealNetwork() throws IOException { Network network = IeeeCdfNetworkFactory.create57(); setDefaultVoltageLimits(network); // set default voltage limits to every voltage levels of the network OpenReacParameters parameters = new OpenReacParameters(); - testAllModifAndLoadFlow(network, "openreac-output-real-network", parameters); + testAllModifAndLoadFlow(network, "openreac-output-real-network", parameters, ReportNode.NO_OP); } @Test @@ -344,7 +385,7 @@ void testWarmStart() throws IOException { String subFolder = "openreac-output-warm-start"; OpenReacParameters parameters = new OpenReacParameters(); - runAndApplyAllModifications(network, subFolder, parameters, false); // without warm start, no update + runAndApplyAllModifications(network, subFolder, parameters, false, ReportNode.NO_OP); // without warm start, no update assertEquals(Double.NaN, network.getBusBreakerView().getBus("BUS_1").getV()); assertEquals(Double.NaN, network.getBusBreakerView().getBus("BUS_1").getAngle()); assertEquals(Double.NaN, network.getBusBreakerView().getBus("BUS_2").getV()); @@ -352,7 +393,7 @@ void testWarmStart() throws IOException { assertEquals(Double.NaN, network.getBusBreakerView().getBus("BUS_3").getV()); assertEquals(Double.NaN, network.getBusBreakerView().getBus("BUS_3").getAngle()); - runAndApplyAllModifications(network, subFolder, parameters, true); + runAndApplyAllModifications(network, subFolder, parameters, true, ReportNode.NO_OP); assertEquals(119.592, network.getBusBreakerView().getBus("BUS_1").getV()); assertEquals(0.802, network.getBusBreakerView().getBus("BUS_1").getAngle(), 0.001); assertEquals(118.8, network.getBusBreakerView().getBus("BUS_2").getV()); @@ -361,7 +402,8 @@ void testWarmStart() throws IOException { assertEquals(-4.698, network.getBusBreakerView().getBus("BUS_3").getAngle(), 0.001); } - private void runAndApplyAllModifications(Network network, String subFolder, OpenReacParameters parameters, boolean updateNetworkWithVoltages) throws IOException { + private void runAndApplyAllModifications(Network network, String subFolder, OpenReacParameters parameters, + boolean updateNetworkWithVoltages, ReportNode reportNode) throws IOException { LocalCommandExecutor localCommandExecutor = new TestLocalCommandExecutor( List.of(subFolder + "/reactiveopf_results_generators.csv", subFolder + "/reactiveopf_results_indic.txt", @@ -376,7 +418,7 @@ private void runAndApplyAllModifications(Network network, String subFolder, Open localCommandExecutor, ForkJoinPool.commonPool())) { OpenReacResult openReacResult = OpenReacRunner.run(network, network.getVariantManager().getWorkingVariantId(), parameters, - new OpenReacConfig(true), computationManager); + new OpenReacConfig(true), computationManager, reportNode, null); assertEquals(OpenReacStatus.OK, openReacResult.getStatus()); openReacResult.setUpdateNetworkWithVoltages(updateNetworkWithVoltages); openReacResult.applyAllModifications(network); diff --git a/open-reac/src/test/resources/openreac-output-shunt/reactiveopf_results_shunts.csv b/open-reac/src/test/resources/openreac-output-shunt/reactiveopf_results_shunts.csv index 9c032169..50d1eac3 100644 --- a/open-reac/src/test/resources/openreac-output-shunt/reactiveopf_results_shunts.csv +++ b/open-reac/src/test/resources/openreac-output-shunt/reactiveopf_results_shunts.csv @@ -1,2 +1,2 @@ #variant;num;bus;b(pu);Q(Mvar);section; -1;1;3;1.234;136.461;0; +1;1;3;0.0133;136.453;0;