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

Permanent limit is now mandatory in IIDM #2636

Merged
merged 38 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b2c507f
Make permanent limit mandatory in IIDM.
annetill Jul 5, 2023
8a978f2
Adapt CGMES import. No limits at all if permanent limit is missing.
annetill Jul 6, 2023
9b677f0
Merge branch 'main' into patl-mandatory
annetill Jul 6, 2023
f59046c
log an error for loading limit sets missing a permanent limit; remove…
zamarrenolm Jul 7, 2023
88ec372
keep the context, report as ignored
zamarrenolm Jul 7, 2023
76c4a1f
Merge branch 'main' into patl-mandatory
zamarrenolm Jul 7, 2023
ec80d69
Merge branch 'main' into patl-mandatory
annetill Nov 9, 2023
a192a71
Merge branch 'main' into patl-mandatory
annetill Nov 14, 2023
49077dc
Merge branch 'main' into patl-mandatory
So-Fras Nov 23, 2023
f55950e
First attempt at moving permanent limit check from iidm to cgmes-conv…
So-Fras Nov 30, 2023
fc40d6d
Add 1.12 xsd, IidmVersion and set current version to 1.12
flo-dup Dec 4, 2023
0009bab
Create 1.12 test references for versioned unit tests
flo-dup Dec 4, 2023
946210a
Create 1.12 json unit test references
flo-dup Dec 4, 2023
145f693
Create iidm equipment unit test reference
flo-dup Dec 4, 2023
55fe19f
Update non-versioned unit tests
flo-dup Dec 4, 2023
dffd0db
Update AbstractVersionableNetworkExtensionSerDe classes
flo-dup Dec 4, 2023
0b7b83b
Merge branch 'main' into evolution_xiidm/1.12
annetill Dec 15, 2023
e812c00
Merge branch 'evolution_xiidm/1.12' into patl-mandatory
So-Fras Dec 15, 2023
18daeff
Put lowest tatl coefficient as a percentage in cgmes import properties
So-Fras Dec 15, 2023
e816bac
Prepare permanent limit check for iidm 1.12
So-Fras Dec 15, 2023
87d4a2d
Merge branch 'main' into evolution_xiidm/1.12
annetill Dec 18, 2023
32a62f6
Fix.
annetill Dec 18, 2023
5be68b0
Fixing the fix
flo-dup Dec 19, 2023
d823938
Fixing further
flo-dup Dec 19, 2023
dcf73e4
Merge branch 'evolution_xiidm/1.12' into patl-mandatory
annetill Dec 19, 2023
bb7261f
Try to fix a little bit.
annetill Dec 19, 2023
57f253d
Fix bug
olperr1 Jan 5, 2024
6e62a7f
Extract missing permanent limit fix method in a new class ('LoadingLi…
olperr1 Jan 5, 2024
ed065dd
Fix reported messages + add unit tests
olperr1 Jan 8, 2024
9b1cf8b
Add unit tests on IIDM import
olperr1 Jan 8, 2024
6f781d6
Refactoring to fix the limits before they are added to the network
olperr1 Jan 8, 2024
792aab3
Move checks regarding limits from AbstractLoadingLimitsAdder to Abstr…
So-Fras Jan 9, 2024
2e1906c
Update iidm/iidm-api/src/main/java/com/powsybl/iidm/network/Validatio…
So-Fras Jan 9, 2024
00b34c2
Update iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/Abs…
So-Fras Jan 9, 2024
9dd529a
Merge branch 'main' into patl-mandatory
olperr1 Jan 10, 2024
b226516
code review
olperr1 Jan 15, 2024
c2b89b8
Code review
olperr1 Jan 16, 2024
b8d229e
Merge branch 'main' into patl-mandatory
olperr1 Jan 16, 2024
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 @@ -6,8 +6,6 @@
*/
package com.powsybl.cgmes.conversion;

import com.google.common.collect.Iterables;
import com.powsybl.iidm.network.LoadingLimits;
import com.powsybl.iidm.network.LoadingLimitsAdder;

import java.util.HashMap;
Expand All @@ -33,16 +31,10 @@ public class LoadingLimitsMapping {

void addAll() {
for (Map.Entry<String, LoadingLimitsAdder<?, ?>> entry : adders.entrySet()) {
if (!Double.isNaN(entry.getValue().getPermanentLimit()) || entry.getValue().hasTemporaryLimits()) {
LoadingLimits limits = entry.getValue().add();
if (Double.isNaN(limits.getPermanentLimit())) {
double fixedPermanentLimit = Iterables.get(limits.getTemporaryLimits(), 0).getValue();
context.fixed("Operational Limit Set of " + entry.getKey(),
"An operational limit set without permanent limit is considered with permanent limit" +
"equal to lowest TATL value",
Double.NaN, fixedPermanentLimit);
limits.setPermanentLimit(fixedPermanentLimit);
}
if (!Double.isNaN(entry.getValue().getPermanentLimit())) {
entry.getValue().add();
} else {
context.ignored("Missing permanent limit for LoadingLimit set {}. Any temporary limits in the set will be ignored", entry.getKey());
}
}
adders.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ void microBEUndefinedPatl() {
NetworkFactory.findDefault(), null);
Line line = network.getLine("ffbabc27-1ccd-4fdc-b037-e341706c8d29");
CurrentLimits limits = line.getCurrentLimits1().orElse(null);
assertNotNull(limits);
assertEquals(2, limits.getTemporaryLimits().size());
assertEquals(1312.0, limits.getPermanentLimit(), 0.0);
assertNull(limits);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,7 @@ public static void checkConnected(Validable validable, Boolean connected) {
}

public static void checkPermanentLimit(Validable validable, double permanentLimit) {
// TODO: if (Double.isNaN(permanentLimit) || permanentLimit <= 0) {
if (permanentLimit <= 0) {
if (Double.isNaN(permanentLimit) || permanentLimit <= 0) {
throw new ValidationException(validable, "permanent limit must be defined and be > 0");
}
}
Expand Down