Skip to content

Commit 15b4a30

Browse files
committed
PCons can be equal to 0
1 parent aafeb9f commit 15b4a30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/gridsuite/modification/utils/ModificationUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,9 @@ public static void checkActivePowerValue(String errorMessage, String fieldName,
19341934
}
19351935

19361936
public static void checkPowerValues(String errorMessage, double minP, double maxP, double targetP, Double plannedActivePowerSetPoint, NetworkModificationException.Type exceptionType) throws NetworkModificationException {
1937-
checkActivePowerValue(errorMessage, FIELD_ACTIVE_POWER_TARGET, targetP, minP, maxP, exceptionType);
1937+
if (targetP != 0) { // exception for the rule minP <= targetP <= maxP
1938+
checkActivePowerValue(errorMessage, FIELD_ACTIVE_POWER_TARGET, targetP, minP, maxP, exceptionType);
1939+
}
19381940
if (plannedActivePowerSetPoint != null) {
19391941
checkActivePowerValue(errorMessage, FIELD_PLANNED_ACTIVE_POWER_SET_POINT, plannedActivePowerSetPoint, minP, maxP, exceptionType);
19401942
}

0 commit comments

Comments
 (0)