diff --git a/src/main/java/org/gridsuite/network/map/dto/common/CurrentLimitsData.java b/src/main/java/org/gridsuite/network/map/dto/common/CurrentLimitsData.java index c90e606b..f0425202 100644 --- a/src/main/java/org/gridsuite/network/map/dto/common/CurrentLimitsData.java +++ b/src/main/java/org/gridsuite/network/map/dto/common/CurrentLimitsData.java @@ -24,7 +24,6 @@ @EqualsAndHashCode @ToString public class CurrentLimitsData { - // may be null in case we just need the selected limit set and don't really need its name/id @JsonInclude(JsonInclude.Include.NON_NULL) private String id; diff --git a/src/main/java/org/gridsuite/network/map/dto/mapper/BranchInfosMapper.java b/src/main/java/org/gridsuite/network/map/dto/mapper/BranchInfosMapper.java index 29c080c9..cb570e19 100644 --- a/src/main/java/org/gridsuite/network/map/dto/mapper/BranchInfosMapper.java +++ b/src/main/java/org/gridsuite/network/map/dto/mapper/BranchInfosMapper.java @@ -73,14 +73,13 @@ public static ElementInfos toData(@NonNull final Identifiable identifiable, final Terminal terminal1 = branch.getTerminal1(); final Terminal terminal2 = branch.getTerminal2(); - branch.getSelectedOperationalLimitsGroup1() - .flatMap(OperationalLimitsGroup::getCurrentLimits) - .map(cl -> builder.selectedOperationalLimitsGroup1(toMapDataCurrentLimits(cl, null, null))); - branch.getSelectedOperationalLimitsGroupId1().map(name -> builder.selectedOperationalLimitsGroup1Name(name)); - branch.getSelectedOperationalLimitsGroup2() - .flatMap(OperationalLimitsGroup::getCurrentLimits) - .map(cl -> builder.selectedOperationalLimitsGroup2(toMapDataCurrentLimits(cl, null, null))); - branch.getSelectedOperationalLimitsGroupId2().map(name -> builder.selectedOperationalLimitsGroup2Name(name)); + branch.getSelectedOperationalLimitsGroup1().ifPresent(limitGrp -> + limitGrp.getCurrentLimits().ifPresent(cl -> builder.selectedOperationalLimitsGroup1(toMapDataCurrentLimits(cl, limitGrp.getId(), null)))); + branch.getSelectedOperationalLimitsGroupId1().ifPresent(builder::selectedOperationalLimitsGroup1Name); + + branch.getSelectedOperationalLimitsGroup2().ifPresent(limitGrp -> + limitGrp.getCurrentLimits().ifPresent(cl -> builder.selectedOperationalLimitsGroup2(toMapDataCurrentLimits(cl, limitGrp.getId(), null)))); + branch.getSelectedOperationalLimitsGroupId2().ifPresent(builder::selectedOperationalLimitsGroup2Name); if (loadOperationalLimitGroups) { final Map mapOperationalLimitsGroup1 = buildCurrentLimitsMap(branch.getOperationalLimitsGroups1()); @@ -133,7 +132,7 @@ private static Map buildCurrentLimitsMap(@NonNull fin } Map res = HashMap.newHashMap(operationalLimitsGroups.size()); operationalLimitsGroups.forEach(operationalLimitsGroup -> operationalLimitsGroup.getCurrentLimits() - .ifPresent(limits -> res.put(operationalLimitsGroup.getId(), toMapDataCurrentLimits(limits, null, null)))); + .ifPresent(limits -> res.put(operationalLimitsGroup.getId(), toMapDataCurrentLimits(limits, operationalLimitsGroup.getId(), null)))); return res; } diff --git a/src/main/java/org/gridsuite/network/map/dto/mapper/LineInfosMapper.java b/src/main/java/org/gridsuite/network/map/dto/mapper/LineInfosMapper.java index c41322a6..a79d0896 100644 --- a/src/main/java/org/gridsuite/network/map/dto/mapper/LineInfosMapper.java +++ b/src/main/java/org/gridsuite/network/map/dto/mapper/LineInfosMapper.java @@ -162,8 +162,8 @@ private static LineTooltipInfos toTooltipInfos(Identifiable identifiable, Dou .b1(line.getB1()) .b2(line.getB2()); - line.getCurrentLimits1().ifPresent(limits1 -> builder.currentLimits1(toMapDataCurrentLimits(limits1, null, null))); - line.getCurrentLimits2().ifPresent(limits2 -> builder.currentLimits2(toMapDataCurrentLimits(limits2, null, null))); + line.getSelectedOperationalLimitsGroup1().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits1(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); + line.getSelectedOperationalLimitsGroup2().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits2(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); return builder.build(); } diff --git a/src/main/java/org/gridsuite/network/map/dto/mapper/TieLineInfosMapper.java b/src/main/java/org/gridsuite/network/map/dto/mapper/TieLineInfosMapper.java index 7d336cd1..af33899c 100644 --- a/src/main/java/org/gridsuite/network/map/dto/mapper/TieLineInfosMapper.java +++ b/src/main/java/org/gridsuite/network/map/dto/mapper/TieLineInfosMapper.java @@ -58,8 +58,8 @@ private static TieLineMapInfos toMapInfos(Identifiable identifiable, Double d .i2(nullIfNan(computeIntensity(terminal2, dcPowerFactor))) .operatingStatus(ExtensionUtils.toOperatingStatus(tieLine)); - tieLine.getCurrentLimits1().ifPresent(limits1 -> builder.currentLimits1(toMapDataCurrentLimits(limits1, null, null))); - tieLine.getCurrentLimits2().ifPresent(limits2 -> builder.currentLimits2(toMapDataCurrentLimits(limits2, null, null))); + tieLine.getSelectedOperationalLimitsGroup1().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits1(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); + tieLine.getSelectedOperationalLimitsGroup2().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits2(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); return builder.build(); } diff --git a/src/main/java/org/gridsuite/network/map/dto/mapper/TwoWindingsTransformerInfosMapper.java b/src/main/java/org/gridsuite/network/map/dto/mapper/TwoWindingsTransformerInfosMapper.java index 9218bb0e..2fd23155 100644 --- a/src/main/java/org/gridsuite/network/map/dto/mapper/TwoWindingsTransformerInfosMapper.java +++ b/src/main/java/org/gridsuite/network/map/dto/mapper/TwoWindingsTransformerInfosMapper.java @@ -165,8 +165,8 @@ private static TwoWindingsTransformerTooltipInfos toTooltipInfos(Identifiable .x(twoWindingsTransformer.getX()) .b(twoWindingsTransformer.getB()); - twoWindingsTransformer.getCurrentLimits1().ifPresent(limits1 -> builder.currentLimits1(toMapDataCurrentLimits(limits1, null, null))); - twoWindingsTransformer.getCurrentLimits2().ifPresent(limits2 -> builder.currentLimits2(toMapDataCurrentLimits(limits2, null, null))); + twoWindingsTransformer.getSelectedOperationalLimitsGroup1().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits1(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); + twoWindingsTransformer.getSelectedOperationalLimitsGroup2().ifPresent(limitsGrp -> limitsGrp.getCurrentLimits().ifPresent(limits -> builder.currentLimits2(toMapDataCurrentLimits(limits, limitsGrp.getId(), null)))); return builder.build(); } diff --git a/src/test/resources/2-windings-transformer-tooltip-data.json b/src/test/resources/2-windings-transformer-tooltip-data.json index 57f7775d..9eefd451 100644 --- a/src/test/resources/2-windings-transformer-tooltip-data.json +++ b/src/test/resources/2-windings-transformer-tooltip-data.json @@ -3,21 +3,35 @@ "voltageLevelId1": "VLGEN", "voltageLevelId2": "VLHV1", "currentLimits1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ - { "name": "IT5", "value": 300.0, "acceptableDuration": 2087 } + { + "name": "IT5", + "value": 300.0, + "acceptableDuration": 2087 + } ], "applicability": null }, "currentLimits2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ - { "name": "IT20", "value": 1200.0, "acceptableDuration": 961 }, - { "name": "N/A", "value": 2.147483647e9, "acceptableDuration": 664 } + { + "name": "IT20", + "value": 1200.0, + "acceptableDuration": 961 + }, + { + "name": "N/A", + "value": 2.147483647E9, + "acceptableDuration": 664 + } ], "applicability": null }, "r": 0.26658461538461536, "x": 11.104492831516762, "b": 0.0 -} +} \ No newline at end of file diff --git a/src/test/resources/2-windings-transformers-tab-data-without-optionals.json b/src/test/resources/2-windings-transformers-tab-data-without-optionals.json index b941441a..8a2e3dbe 100644 --- a/src/test/resources/2-windings-transformers-tab-data-without-optionals.json +++ b/src/test/resources/2-windings-transformers-tab-data-without-optionals.json @@ -20,6 +20,7 @@ "r": 0.26658461538461536, "x": 11.104492831516762, "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -32,6 +33,7 @@ }, "selectedOperationalLimitsGroup1Name": "limit set 1", "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -194,6 +196,7 @@ "r": 47.0, "x": 23.0, "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -206,6 +209,7 @@ }, "selectedOperationalLimitsGroup1Name": "DEFAULT", "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { diff --git a/src/test/resources/2-windings-transformers-tab-data.json b/src/test/resources/2-windings-transformers-tab-data.json index 271a129a..48699d23 100644 --- a/src/test/resources/2-windings-transformers-tab-data.json +++ b/src/test/resources/2-windings-transformers-tab-data.json @@ -21,6 +21,7 @@ "x": 11.104492831516762, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -36,6 +37,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -49,6 +51,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -69,6 +72,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -232,6 +236,7 @@ "x": 23.0, "operationalLimitsGroup1": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -247,6 +252,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -260,6 +266,7 @@ "selectedOperationalLimitsGroup1Name": "DEFAULT", "operationalLimitsGroup2": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -275,6 +282,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { diff --git a/src/test/resources/all-data-in-variant.json b/src/test/resources/all-data-in-variant.json index a9667c38..f5350f63 100644 --- a/src/test/resources/all-data-in-variant.json +++ b/src/test/resources/all-data-in-variant.json @@ -258,6 +258,7 @@ "x": 10.0, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -273,6 +274,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -286,6 +288,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -306,6 +309,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -346,6 +350,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group2": { + "id": "group2", "permanentLimit": 250.0, "temporaryLimits": [ { @@ -357,6 +362,7 @@ "applicability": null }, "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -378,6 +384,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -396,6 +403,7 @@ "selectedOperationalLimitsGroup1Name": "group1", "operationalLimitsGroup2": { "group4": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -407,6 +415,7 @@ "applicability": null }, "group3": { + "id": "group3", "permanentLimit": 300.0, "temporaryLimits": [ { @@ -423,6 +432,7 @@ "group3" ], "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -462,6 +472,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -482,6 +493,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -561,6 +573,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -581,6 +594,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -876,6 +890,7 @@ "x": 11.104492831516762, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -891,6 +906,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -904,6 +920,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -924,6 +941,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -1087,6 +1105,7 @@ "x": 23.0, "operationalLimitsGroup1": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -1102,6 +1121,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -1115,6 +1135,7 @@ "selectedOperationalLimitsGroup1Name": "DEFAULT", "operationalLimitsGroup2": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -1130,6 +1151,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -2594,6 +2616,7 @@ "x": 10.0, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -2609,6 +2632,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -2622,6 +2646,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -2642,6 +2667,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -2678,6 +2704,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group2": { + "id": "group2", "permanentLimit": 250.0, "temporaryLimits": [ { @@ -2689,6 +2716,7 @@ "applicability": null }, "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2710,6 +2738,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2728,6 +2757,7 @@ "selectedOperationalLimitsGroup1Name": "group1", "operationalLimitsGroup2": { "group4": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -2739,6 +2769,7 @@ "applicability": null }, "group3": { + "id": "group3", "permanentLimit": 300.0, "temporaryLimits": [ { @@ -2755,6 +2786,7 @@ "group3" ], "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -2790,6 +2822,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2810,6 +2843,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2885,6 +2919,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2905,6 +2940,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2947,6 +2983,7 @@ "x": 11.104492831516762, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -2962,6 +2999,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -2975,6 +3013,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -2995,6 +3034,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -3059,6 +3099,7 @@ "x": 23.0, "operationalLimitsGroup1": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -3074,6 +3115,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -3087,6 +3129,7 @@ "selectedOperationalLimitsGroup1Name": "DEFAULT", "operationalLimitsGroup2": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -3102,6 +3145,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { diff --git a/src/test/resources/all-data-without-optionals.json b/src/test/resources/all-data-without-optionals.json index c9f80c6d..d6ca1c9f 100644 --- a/src/test/resources/all-data-without-optionals.json +++ b/src/test/resources/all-data-without-optionals.json @@ -257,6 +257,7 @@ "r": 9.0, "x": 10.0, "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -269,6 +270,7 @@ }, "selectedOperationalLimitsGroup1Name": "limit set 1", "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -308,6 +310,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -325,6 +328,7 @@ }, "selectedOperationalLimitsGroup1Name": "group1", "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -363,6 +367,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -441,6 +446,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -735,6 +741,7 @@ "r": 0.26658461538461536, "x": 11.104492831516762, "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -747,6 +754,7 @@ }, "selectedOperationalLimitsGroup1Name": "limit set 1", "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -909,6 +917,7 @@ "r": 47.0, "x": 23.0, "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -921,6 +930,7 @@ }, "selectedOperationalLimitsGroup1Name": "DEFAULT", "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -2341,6 +2351,7 @@ "r": 9.0, "x": 10.0, "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -2353,6 +2364,7 @@ }, "selectedOperationalLimitsGroup1Name": "limit set 1", "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -2388,6 +2400,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2405,6 +2418,7 @@ }, "selectedOperationalLimitsGroup1Name": "group1", "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -2439,6 +2453,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2513,6 +2528,7 @@ "r": 3.0, "x": 33.0, "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2554,6 +2570,7 @@ "r": 0.26658461538461536, "x": 11.104492831516762, "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -2566,6 +2583,7 @@ }, "selectedOperationalLimitsGroup1Name": "limit set 1", "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -2629,6 +2647,7 @@ "r": 47.0, "x": 23.0, "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -2641,6 +2660,7 @@ }, "selectedOperationalLimitsGroup1Name": "DEFAULT", "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { diff --git a/src/test/resources/all-data.json b/src/test/resources/all-data.json index 8f1c512d..16aaa12d 100644 --- a/src/test/resources/all-data.json +++ b/src/test/resources/all-data.json @@ -258,6 +258,7 @@ "x": 10.0, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -273,6 +274,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -286,6 +288,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -306,6 +309,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -346,6 +350,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group2": { + "id": "group2", "permanentLimit": 250.0, "temporaryLimits": [ { @@ -357,6 +362,7 @@ "applicability": null }, "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -378,6 +384,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -396,6 +403,7 @@ "selectedOperationalLimitsGroup1Name": "group1", "operationalLimitsGroup2": { "group4": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -407,6 +415,7 @@ "applicability": null }, "group3": { + "id": "group3", "permanentLimit": 300.0, "temporaryLimits": [ { @@ -423,6 +432,7 @@ "group3" ], "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -462,6 +472,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -482,6 +493,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -561,6 +573,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -581,6 +594,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -876,6 +890,7 @@ "x": 11.104492831516762, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -891,6 +906,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -904,6 +920,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -924,6 +941,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -1087,6 +1105,7 @@ "x": 23.0, "operationalLimitsGroup1": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -1102,6 +1121,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -1115,6 +1135,7 @@ "selectedOperationalLimitsGroup1Name": "DEFAULT", "operationalLimitsGroup2": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -1130,6 +1151,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -2572,6 +2594,7 @@ "x": 10.0, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -2587,6 +2610,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ { @@ -2600,6 +2624,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -2620,6 +2645,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ { @@ -2656,6 +2682,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group2": { + "id": "group2", "permanentLimit": 250.0, "temporaryLimits": [ { @@ -2667,6 +2694,7 @@ "applicability": null }, "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2688,6 +2716,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2706,6 +2735,7 @@ "selectedOperationalLimitsGroup1Name": "group1", "operationalLimitsGroup2": { "group4": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -2717,6 +2747,7 @@ "applicability": null }, "group3": { + "id": "group3", "permanentLimit": 300.0, "temporaryLimits": [ { @@ -2733,6 +2764,7 @@ "group3" ], "selectedOperationalLimitsGroup2": { + "id": "group4", "permanentLimit": 320.0, "temporaryLimits": [ { @@ -2768,6 +2800,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2788,6 +2821,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2863,6 +2897,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2883,6 +2918,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -2925,6 +2961,7 @@ "x": 11.104492831516762, "operationalLimitsGroup1": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -2940,6 +2977,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup1": { + "id": "limit set 1", "permanentLimit": 750.4, "temporaryLimits": [ { @@ -2953,6 +2991,7 @@ "selectedOperationalLimitsGroup1Name": "limit set 1", "operationalLimitsGroup2": { "limit set 1": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -2973,6 +3012,7 @@ "limit set 1" ], "selectedOperationalLimitsGroup2": { + "id": "limit set 1", "permanentLimit": 780.6, "temporaryLimits": [ { @@ -3037,6 +3077,7 @@ "x": 23.0, "operationalLimitsGroup1": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -3052,6 +3093,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup1": { + "id": "DEFAULT", "permanentLimit": 300.4, "temporaryLimits": [ { @@ -3065,6 +3107,7 @@ "selectedOperationalLimitsGroup1Name": "DEFAULT", "operationalLimitsGroup2": { "DEFAULT": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { @@ -3080,6 +3123,7 @@ "DEFAULT" ], "selectedOperationalLimitsGroup2": { + "id": "DEFAULT", "permanentLimit": 280.6, "temporaryLimits": [ { diff --git a/src/test/resources/line-tooltip-data-dc.json b/src/test/resources/line-tooltip-data-dc.json index f8d46b7b..fe1ba3f7 100644 --- a/src/test/resources/line-tooltip-data-dc.json +++ b/src/test/resources/line-tooltip-data-dc.json @@ -6,20 +6,23 @@ "terminal2Connected": true, "i1": 6014.065304058601, "i2": 3007.0326520293006, - "currentLimits1":{ - "permanentLimit":220.0, - "temporaryLimits":[ + "currentLimits1": { + "id": "group1", + "permanentLimit": 220.0, + "temporaryLimits": [ { - "name":"temporary2", - "value":70.0, - "acceptableDuration":150 + "name": "temporary2", + "value": 70.0, + "acceptableDuration": 150 }, - {"name":"temporary1", - "value":50.0, - "acceptableDuration":100 + { + "name": "temporary1", + "value": 50.0, + "acceptableDuration": 100 } ], - "applicability":null}, + "applicability": null + }, "r": 3.0, "x": 33.0, "b1": 1.93E-4, diff --git a/src/test/resources/line-tooltip-data.json b/src/test/resources/line-tooltip-data.json index 102481b9..edd16fd7 100644 --- a/src/test/resources/line-tooltip-data.json +++ b/src/test/resources/line-tooltip-data.json @@ -5,22 +5,36 @@ "terminal1Connected": true, "terminal2Connected": true, "currentLimits1": { + "id": "limit set 1", "permanentLimit": 700.4, "temporaryLimits": [ - { "name": "IT5", "value": 250.0, "acceptableDuration": 300 } + { + "name": "IT5", + "value": 250.0, + "acceptableDuration": 300 + } ], "applicability": null }, "currentLimits2": { + "id": "limit set 1", "permanentLimit": 800.8, "temporaryLimits": [ - { "name": "IT20", "value": 300.0, "acceptableDuration": 1200 }, - { "name": "IT10", "value": 200.0, "acceptableDuration": 600 } + { + "name": "IT20", + "value": 300.0, + "acceptableDuration": 1200 + }, + { + "name": "IT10", + "value": 200.0, + "acceptableDuration": 600 + } ], "applicability": null }, - "r":9.0, - "x":10.0, - "b1":5.0, - "b2":6.0 -} + "r": 9.0, + "x": 10.0, + "b1": 5.0, + "b2": 6.0 +} \ No newline at end of file diff --git a/src/test/resources/partial-all-data-in-variant.json b/src/test/resources/partial-all-data-in-variant.json index 1b491e7a..01f981f3 100644 --- a/src/test/resources/partial-all-data-in-variant.json +++ b/src/test/resources/partial-all-data-in-variant.json @@ -48,6 +48,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -68,6 +69,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -112,6 +114,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -132,6 +135,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -425,6 +429,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -445,6 +450,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -485,6 +491,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -505,6 +512,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { diff --git a/src/test/resources/partial-all-data.json b/src/test/resources/partial-all-data.json index c09b27ba..045cc9b6 100644 --- a/src/test/resources/partial-all-data.json +++ b/src/test/resources/partial-all-data.json @@ -51,6 +51,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -71,6 +72,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -150,6 +152,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -170,6 +173,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -406,6 +410,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -426,6 +431,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -501,6 +507,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -521,6 +528,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { diff --git a/src/test/resources/partial-all-map-data-no-redundant-lines.json b/src/test/resources/partial-all-map-data-no-redundant-lines.json index 7f14440a..bfbfa0b0 100644 --- a/src/test/resources/partial-all-map-data-no-redundant-lines.json +++ b/src/test/resources/partial-all-map-data-no-redundant-lines.json @@ -66,6 +66,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -86,6 +87,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -130,6 +132,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -150,6 +153,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -453,6 +457,7 @@ "x": 33.0, "operationalLimitsGroup2": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -473,6 +478,7 @@ "group1" ], "selectedOperationalLimitsGroup2": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -513,6 +519,7 @@ "x": 33.0, "operationalLimitsGroup1": { "group1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ { @@ -533,6 +540,7 @@ "group1" ], "selectedOperationalLimitsGroup1": { + "id": "group1", "permanentLimit": 220.0, "temporaryLimits": [ {