Skip to content

Commit 68903c2

Browse files
authored
remove getCurrentLimits for toMap for Lines (#236)
Signed-off-by: Etienne LESOT <[email protected]>
1 parent 610b5e4 commit 68903c2

File tree

3 files changed

+4
-107
lines changed

3 files changed

+4
-107
lines changed

src/main/java/org/gridsuite/network/map/dto/mapper/LineInfosMapper.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ private static LineMapInfos toMapInfos(Identifiable<?> identifiable, Double dcPo
124124
.p2(nullIfNan(terminal2.getP()))
125125
.i1(nullIfNan(ElementUtils.computeIntensity(terminal1, dcPowerFactor)))
126126
.i2(nullIfNan(ElementUtils.computeIntensity(terminal2, dcPowerFactor)));
127-
128-
line.getCurrentLimits1().ifPresent(limits1 -> builder.currentLimits1(toMapDataCurrentLimits(limits1)));
129-
line.getCurrentLimits2().ifPresent(limits2 -> builder.currentLimits2(toMapDataCurrentLimits(limits2)));
130127
builder.operatingStatus(toOperatingStatus(line));
131128

132129
return builder.build();

src/test/resources/lines-map-data.json

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,14 @@
66
"terminal1Connected": true,
77
"terminal2Connected": true,
88
"p1": 1.1,
9-
"p2": 3.33,
10-
"currentLimits1": {
11-
"permanentLimit": 700.4,
12-
"temporaryLimits": [
13-
{
14-
"name": "IT5",
15-
"value": 250.0,
16-
"acceptableDuration": 300
17-
}
18-
]
19-
},
20-
"currentLimits2": {
21-
"permanentLimit": 800.8,
22-
"temporaryLimits": [
23-
{
24-
"name": "IT20",
25-
"value": 300.0,
26-
"acceptableDuration": 1200
27-
},
28-
{
29-
"name": "IT10",
30-
"value": 200.0,
31-
"acceptableDuration": 600
32-
}
33-
]
34-
}
9+
"p2": 3.33
3510
},
3611
{
3712
"id": "NHV1_NHV2_2",
3813
"voltageLevelId1": "VLHV1",
3914
"voltageLevelId2": "VLHV2",
4015
"terminal1Connected": true,
41-
"terminal2Connected": true,
42-
"currentLimits1": {
43-
"permanentLimit": 220.0,
44-
"temporaryLimits": [
45-
{
46-
"name": "temporary2",
47-
"value": 70.0,
48-
"acceptableDuration": 150
49-
},
50-
{
51-
"name": "temporary1",
52-
"value": 50.0,
53-
"acceptableDuration": 100
54-
}
55-
]
56-
},
57-
"currentLimits2": {
58-
"permanentLimit": 320.0,
59-
"temporaryLimits": [
60-
{
61-
"name": "temporary1",
62-
"value": 130.0,
63-
"acceptableDuration": 200
64-
}
65-
]
66-
}
16+
"terminal2Connected": true
6717
},
6818
{
6919
"id": "LINE3",

src/test/resources/partial-lines-map-data.json

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,7 @@
1515
"voltageLevelId1": "VLHV1",
1616
"voltageLevelId2": "VLHV2",
1717
"terminal1Connected": true,
18-
"terminal2Connected": true,
19-
"currentLimits1": {
20-
"permanentLimit": 220.0,
21-
"temporaryLimits": [
22-
{
23-
"name": "temporary2",
24-
"value": 70.0,
25-
"acceptableDuration": 150
26-
},
27-
{
28-
"name": "temporary1",
29-
"value": 50.0,
30-
"acceptableDuration": 100
31-
}
32-
]
33-
},
34-
"currentLimits2": {
35-
"permanentLimit": 320.0,
36-
"temporaryLimits": [
37-
{
38-
"name": "temporary1",
39-
"value": 130.0,
40-
"acceptableDuration": 200
41-
}
42-
]
43-
}
18+
"terminal2Connected": true
4419
},
4520
{
4621
"id": "NHV1_NHV2_1",
@@ -49,31 +24,6 @@
4924
"terminal1Connected": true,
5025
"terminal2Connected": true,
5126
"p1": 1.1,
52-
"p2": 3.33,
53-
"currentLimits1": {
54-
"permanentLimit": 700.4,
55-
"temporaryLimits": [
56-
{
57-
"name": "IT5",
58-
"value": 250.0,
59-
"acceptableDuration": 300
60-
}
61-
]
62-
},
63-
"currentLimits2": {
64-
"permanentLimit": 800.8,
65-
"temporaryLimits": [
66-
{
67-
"name": "IT20",
68-
"value": 300.0,
69-
"acceptableDuration": 1200
70-
},
71-
{
72-
"name": "IT10",
73-
"value": 200.0,
74-
"acceptableDuration": 600
75-
}
76-
]
77-
}
27+
"p2": 3.33
7828
}
7929
]

0 commit comments

Comments
 (0)