Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isInfiniteDuration optional and true by default #1089

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static VoltageLimit fromPropertyBag(PropertyBag propertyBag) {
Double.parseDouble(propertyBag.get(CsaProfileConstants.REQUEST_OPERATIONAL_LIMIT_VALUE)),
propertyBag.getId(CsaProfileConstants.REQUEST_OPERATIONAL_LIMIT_EQUIPMENT),
propertyBag.get(CsaProfileConstants.REQUEST_OPERATIONAL_LIMIT_TYPE),
Boolean.parseBoolean(propertyBag.get(CsaProfileConstants.REQUEST_VOLTAGE_LIMIT_IS_INFINITE_DURATION))
Boolean.parseBoolean(propertyBag.getOrDefault(CsaProfileConstants.REQUEST_VOLTAGE_LIMIT_IS_INFINITE_DURATION, "true"))
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void importVoltageCnecs() {
CsaProfileCracCreationContext cracCreationContext = getCsaCracCreationContext("/profiles/cnecs/VoltageCNECs.zip", NETWORK);

List<VoltageCnec> importedVoltageCnecs = cracCreationContext.getCrac().getVoltageCnecs().stream().sorted(Comparator.comparing(VoltageCnec::getId)).toList();
assertEquals(4, importedVoltageCnecs.size());
assertEquals(5, importedVoltageCnecs.size());

CsaProfileCracCreationTestUtil.assertVoltageCnecEquality(
importedVoltageCnecs.get(0),
Expand Down Expand Up @@ -67,13 +67,22 @@ void importVoltageCnecs() {
-72d,
"RTE");

assertEquals(6, cracCreationContext.getCnecCreationContexts().stream().filter(context -> !context.isImported()).toList().size());
CsaProfileCracCreationTestUtil.assertVoltageCnecEquality(
importedVoltageCnecs.get(4),
"RTE_AE7 (assessed-element-7) - preventive",
"BBE1AA1 ",
PREVENTIVE_INSTANT_ID,
null,
100d,
null,
"RTE");

assertEquals(5, cracCreationContext.getCnecCreationContexts().stream().filter(context -> !context.isImported()).toList().size());

assertCnecNotImported(cracCreationContext, "assessed-element-3", ImportStatus.INCONSISTENCY_IN_DATA, "AssessedElement assessed-element-3 ignored because a voltage limit can only be of kind highVoltage or lowVoltage");
assertCnecNotImported(cracCreationContext, "assessed-element-4", ImportStatus.NOT_YET_HANDLED_BY_OPEN_RAO, "AssessedElement assessed-element-4 ignored because only permanent voltage limits (with infinite duration) are currently handled");
assertCnecNotImported(cracCreationContext, "assessed-element-5", ImportStatus.INCONSISTENCY_IN_DATA, "AssessedElement assessed-element-5 ignored because the network element FFR1AA1 _generator is not a bus bar section");
assertCnecNotImported(cracCreationContext, "assessed-element-6", ImportStatus.ELEMENT_NOT_FOUND_IN_NETWORK, "AssessedElement assessed-element-6 ignored because the voltage limit equipment unknown-equipment is missing in network");
assertCnecNotImported(cracCreationContext, "assessed-element-7", ImportStatus.NOT_YET_HANDLED_BY_OPEN_RAO, "AssessedElement assessed-element-7 ignored because only permanent voltage limits (with infinite duration) are currently handled");
assertCnecNotImported(cracCreationContext, "assessed-element-8", ImportStatus.INCOMPLETE_DATA, "AssessedElement assessed-element-8 ignored because no ConductingEquipment or OperationalLimit was provided");

assertHasOnConstraintUsageRule(cracCreationContext, "remedial-action-1", "RTE_AE1 (assessed-element-1) - RTE_CO1 - curative 3", cracCreationContext.getCrac().getInstant(CURATIVE_3_INSTANT_ID), UsageMethod.AVAILABLE, VoltageCnec.class);
Expand Down
2 changes: 1 addition & 1 deletion docs/input-data/crac/csa.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ found in the **EQ** profile (CGMES file).
</rdf:RDF>
```

To be valid, the VoltageCNEC's `isInfiniteDuration` field must be set to `true`. If it is missing or set to `false` it will
The VoltageCNEC's `isInfiniteDuration` field is optional and its default value is `true`. If it is set to `false` the voltageCNEC will
be ignored.

The CNEC's threshold value (in KILOVOLTS) is determined by the `value` field of the `VoltageLimit` and must be positive.
Expand Down
Loading