Skip to content

Commit 1044ec1

Browse files
committed
Feedback, rename root reports creation methods
Signed-off-by: CARON Alice <alice.caron@rte-france.com>
1 parent d3c060a commit 1044ec1

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

src/main/java/com/powsybl/openloadflow/ac/outerloop/ReactiveLimitsOuterLoop.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,23 @@ private static boolean switchPqPv(List<PqToPvBus> pqToPvBuses, ContextData conte
187187

188188
int pvPqSwitchCount = contextData.getPvPqSwitchCount(controllerBus.getId());
189189
if (pvPqSwitchCount >= maxPqPvSwitch) {
190-
pqPvNodes.add(Reports.reportPvPqSwitchLimit(reportNode, controllerBus, pvPqSwitchCount, log, LOGGER));
190+
pqPvNodes.add(Reports.createRootReportPvPqSwitchLimit(reportNode, controllerBus, pvPqSwitchCount, log, LOGGER));
191191
} else {
192192
controllerBus.setGeneratorVoltageControlEnabled(true);
193193
controllerBus.setGenerationTargetQ(0);
194194
controllerBus.setQLimitType(null);
195195
pqPvSwitchCount++;
196196

197197
if (pqToPvBus.limitType.isMaxLimit()) {
198-
pqPvNodes.add(Reports.reportPqToPvBusMaxLimit(
198+
pqPvNodes.add(Reports.createRootReportPqToPvBusMaxLimit(
199199
reportNode,
200200
controllerBus,
201201
controllerBus.getGeneratorVoltageControl().map(VoltageControl::getControlledBus).orElseThrow(),
202202
getBusTargetV(controllerBus),
203203
log,
204204
LOGGER));
205205
} else {
206-
pqPvNodes.add(Reports.reportPqToPvBusMinLimit(
206+
pqPvNodes.add(Reports.createRootReportPqToPvBusMinLimit(
207207
reportNode,
208208
controllerBus,
209209
controllerBus.getGeneratorVoltageControl().map(VoltageControl::getControlledBus).orElseThrow(),
@@ -345,10 +345,10 @@ private boolean switchReactiveControllerBusPq(List<ControllerBusToPqBus> reactiv
345345

346346
switch (bus.limitType) {
347347
case MAX_Q:
348-
switchedNodes.add(Reports.reportReactiveControllerBusesToPqMaxQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER));
348+
switchedNodes.add(Reports.createRootReportReactiveControllerBusesToPqMaxQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER));
349349
break;
350350
case MIN_Q:
351-
switchedNodes.add(Reports.reportReactiveControllerBusesToPqMinQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER));
351+
switchedNodes.add(Reports.createRootReportReactiveControllerBusesToPqMinQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER));
352352
break;
353353
case MIN_REALISTIC_V, MAX_REALISTIC_V:
354354
// Note: never happens for now. Robust mode applies only to remote voltage control generators

src/main/java/com/powsybl/openloadflow/sa/AbstractSecurityAnalysis.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ SecurityAnalysisReport runSync(SecurityAnalysisParameters securityAnalysisParame
220220

221221
parameters = createParameters(lfParameters, lfParametersExt, partitionTopoConfig.isBreaker(), isAreaInterchangeControl(lfParametersExt, contingencies));
222222

223-
ReportNode threadRootNode = partitionNum == 0 ? saReportNode : Reports.createThreadRootReport(saReportNode);
223+
ReportNode threadRootNode = partitionNum == 0 ? saReportNode : Reports.createRootThreadReport(saReportNode);
224224
reportNodes.set(partitionNum, threadRootNode);
225225

226226
// create networks including all necessary switches

src/main/java/com/powsybl/openloadflow/util/Reports.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public static ReportNode reportPqToPvBuses(ReportNode reportNode, int pqToPvBusC
309309
.add();
310310
}
311311

312-
public static ReportNode reportPvPqSwitchLimit(ReportNode firstRootReportNode, LfBus controllerBus, int limit, boolean log, Logger logger) {
312+
public static ReportNode createRootReportPvPqSwitchLimit(ReportNode firstRootReportNode, LfBus controllerBus, int limit, boolean log, Logger logger) {
313313
ReportNode result = ReportNode.newRootReportNode()
314314
.withLocale(firstRootReportNode.getTreeContext().getLocale())
315315
.withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME)
@@ -324,7 +324,7 @@ public static ReportNode reportPvPqSwitchLimit(ReportNode firstRootReportNode, L
324324
return result;
325325
}
326326

327-
public static ReportNode reportPqToPvBusMaxLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) {
327+
public static ReportNode createRootReportPqToPvBusMaxLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) {
328328
ReportNode result = ReportNode.newRootReportNode()
329329
.withLocale(firstRootReportNode.getTreeContext().getLocale())
330330
.withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME)
@@ -342,7 +342,7 @@ public static ReportNode reportPqToPvBusMaxLimit(ReportNode firstRootReportNode,
342342
return result;
343343
}
344344

345-
public static ReportNode reportPqToPvBusMinLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) {
345+
public static ReportNode createRootReportPqToPvBusMinLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) {
346346
ReportNode result = ReportNode.newRootReportNode()
347347
.withLocale(firstRootReportNode.getTreeContext().getLocale())
348348
.withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME)
@@ -384,12 +384,12 @@ public static ReportNode reportReactiveControllerBusesToPqBuses(ReportNode repor
384384
.add();
385385
}
386386

387-
public static ReportNode reportReactiveControllerBusesToPqMaxQ(ReportNode firstRootReportNode,
388-
LfBus controllerBus,
389-
double busQ,
390-
double maxQ,
391-
boolean log,
392-
Logger logger) {
387+
public static ReportNode createRootReportReactiveControllerBusesToPqMaxQ(ReportNode firstRootReportNode,
388+
LfBus controllerBus,
389+
double busQ,
390+
double maxQ,
391+
boolean log,
392+
Logger logger) {
393393
ReportNode result = ReportNode.newRootReportNode()
394394
.withLocale(firstRootReportNode.getTreeContext().getLocale())
395395
.withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME)
@@ -405,12 +405,12 @@ public static ReportNode reportReactiveControllerBusesToPqMaxQ(ReportNode firstR
405405
return result;
406406
}
407407

408-
public static ReportNode reportReactiveControllerBusesToPqMinQ(ReportNode firstRootReportNode,
409-
LfBus controllerBus,
410-
double busQ,
411-
double minQ,
412-
boolean log,
413-
Logger logger) {
408+
public static ReportNode createRootReportReactiveControllerBusesToPqMinQ(ReportNode firstRootReportNode,
409+
LfBus controllerBus,
410+
double busQ,
411+
double minQ,
412+
boolean log,
413+
Logger logger) {
414414
ReportNode result = ReportNode.newRootReportNode()
415415
.withLocale(firstRootReportNode.getTreeContext().getLocale())
416416
.withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME)
@@ -895,7 +895,7 @@ public static void reportActionApplicationFailure(String actionId, String contin
895895
.add();
896896
}
897897

898-
public static ReportNode createThreadRootReport(ReportNode firstRootReport) {
898+
public static ReportNode createRootThreadReport(ReportNode firstRootReport) {
899899
return ReportNode.newRootReportNode()
900900
.withLocale(firstRootReport.getTreeContext().getLocale())
901901
.withAllResourceBundlesFromClasspath()

0 commit comments

Comments
 (0)