Skip to content

Commit

Permalink
Modifications after code review.
Browse files Browse the repository at this point in the history
Signed-off-by: Franck LECUYER <[email protected]>
  • Loading branch information
FranckLecuyer committed May 13, 2024
1 parent 5e24153 commit 3017ac5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static OpenReacResult run(Network network, String variantId, OpenReacPara
* @return All information about the run and possible modifications to apply.
*/
public static OpenReacResult run(Network network, String variantId, OpenReacParameters parameters, OpenReacConfig config, ComputationManager manager, ReportNode reportNode, AmplExportConfig amplExportConfig) {
checkParameters(network, variantId, parameters, config, manager, Reports.createParametersIntegrityReporter(reportNode, network.getId()));
checkParameters(network, variantId, parameters, config, manager, reportNode);
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);
Expand Down Expand Up @@ -118,6 +118,6 @@ private static void checkParameters(Network network, String variantId, OpenReacP
Objects.requireNonNull(config);
Objects.requireNonNull(manager);
Objects.requireNonNull(reportNode);
parameters.checkIntegrity(network, reportNode);
parameters.checkIntegrity(network, Reports.createParameterIntegrityReporter(reportNode, network.getId()));
}
}
4 changes: 2 additions & 2 deletions open-reac/src/main/java/com/powsybl/openreac/Reports.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public static void reportVariableShuntCompensatorsSize(ReportNode reportNode, in
.add();
}

public static ReportNode createParametersIntegrityReporter(ReportNode reportNode, String networkId) {
public static ReportNode createParameterIntegrityReporter(ReportNode reportNode, String networkId) {
return reportNode.newReportNode()
.withMessageTemplate("openReacParametersIntegrity", "Open reac parameters integrity on network '${networkId}'")
.withMessageTemplate("openReacParameterIntegrity", "Open reac parameter integrity on network '${networkId}'")
.withUntypedValue("networkId", networkId)
.add();
}
Expand Down

0 comments on commit 3017ac5

Please sign in to comment.