Skip to content

Commit

Permalink
upgrade to gridsuite dependencies 36 (#120)
Browse files Browse the repository at this point in the history
* upgrade to gridsuite dependencies 36
* Remove of powsybl-ws-commons version override
* Ordering timeseries by name in waiting correction from powsybl-dynamic-simulation-api

Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Thang PHAM <[email protected]>
  • Loading branch information
FranckLecuyer authored Jan 15, 2025
1 parent 9f72edf commit c586025
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 66 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</developers>

<properties>
<gridsuite-dependencies.version>35</gridsuite-dependencies.version>
<gridsuite-dependencies.version>36</gridsuite-dependencies.version>
<jib.from.image>powsybl/java-dynawo:2.2.0</jib.from.image>

<h2database.version>1.4.200</h2database.version>
Expand Down Expand Up @@ -87,11 +87,6 @@
<dependencyManagement>
<dependencies>
<!-- overrides of imports -->
<dependency><!-- To remove when integrate in next release of gridsuite-dependencies or powsybl-ws-dependencies -->
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ws-commons</artifactId>
<version>1.19.0</version>
</dependency>
<!-- imports -->
<dependency>
<groupId>org.gridsuite</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public class DynamicSimulationControllerIEEE14Test extends AbstractDynamicSimula
private static final String VARIANT_1_ID = "variant_1";
private static final String NETWORK_FILE = "IEEE14.iidm";

// TODO remove when DynamicSimulationResultDeserializer correct curves by LinkedHashMap
private static final Comparator<TimeSeries<?, ?>> TIME_SERIES_COMPARATOR = Comparator.comparing(timeSeries -> timeSeries.getMetadata().getName());

private final Map<UUID, List<TimeSeries<?, ?>>> timeSeriesMockBd = new HashMap<>();

@Autowired
Expand Down Expand Up @@ -232,9 +235,12 @@ public void test01GivenCurvesAndEvents() throws Exception {
RESOURCE_PATH_DELIMITER + testBaseDir +
RESOURCE_PATH_DELIMITER + OUTPUT;
DynamicSimulationResult expectedResult = DynamicSimulationResultDeserializer.read(getClass().getResourceAsStream(outputDir + RESOURCE_PATH_DELIMITER + RESULT_SIM_JSON));
String jsonExpectedTimeSeries = TimeSeries.toJson(new ArrayList<>(expectedResult.getCurves().values()));
List<TimeSeries<?, ?>> expectedTimeSeries = new ArrayList<>(expectedResult.getCurves().values());
expectedTimeSeries.sort(TIME_SERIES_COMPARATOR);
String jsonExpectedTimeSeries = TimeSeries.toJson(expectedTimeSeries);

// convert result time series to json
resultTimeSeries.sort(TIME_SERIES_COMPARATOR);
String jsonResultTimeSeries = TimeSeries.toJson(resultTimeSeries);

// export result to file
Expand Down
94 changes: 35 additions & 59 deletions src/test/resources/data/ieee14/_01/output/result_SIM.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,159 +3,135 @@
"status" : "SUCCESS",
"curves" : [ {
"metadata" : {
"name" : "SVC2_SVarC_injector_QInjPu",
"name" : "SVC2_SVarC_injector_BPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ -0.031738, -0.007935, -0.007276, -0.002564, 0.172366, 0.19151, 0.189278, 0.184818, 0.197699, 0.203913, 0.200938, 0.199995, 0.18531, 0.313309, 0.415057, 0.39714, 0.380065, 0.37694, 0.377728 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ -0.012932, -0.00323, -0.002962, -0.001046, 0.070299, 0.078086, 0.077171, 0.075185, 0.080612, 0.083149, 0.081932, 0.081548, 0.075013, 0.127916, 0.169595, 0.162197, 0.155201, 0.153926, 0.154252 ]
} ]
}, {
"metadata" : {
"name" : "_GEN____3_SM_generator_omegaPu",
"name" : "SVC2_SVarC_injector_PInjPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 1.0, 0.999831, 0.999806, 0.999657, 0.999646, 0.999615, 0.999581, 0.998868, 0.998811, 0.998709, 0.99856, 0.998442, 0.998362 ],
"stepLengths" : [ 13, 3, 5, 2, 1, 1, 9, 1, 1, 1, 1, 1, 18 ]
"values" : [ -0.0, -1.0E-6, 1.0E-6, 1.2E-5, 0.0, -3.0E-6, -1.0E-6, 7.0E-6, 1.7E-5, 0.0, 1.0E-6, 0.0, 1.0E-6, 6.0E-6, -5.9E-5, 5.0E-6 ]
} ]
}, {
"metadata" : {
"name" : "_LOAD___2_EC_load_QPu",
"name" : "SVC2_SVarC_injector_QInjPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 0.126839, 0.126962, 0.12697, 0.126699, 0.126716, 0.126749, 0.126759, 0.127039, 0.126746, 0.12674, 0.126747, 0.127671, 0.126586, 0.12648, 0.12654, 0.126558, 0.126557, 0.126555 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ -0.031738, -0.007935, -0.007276, -0.002564, 0.172366, 0.19151, 0.189278, 0.184818, 0.197699, 0.203913, 0.200938, 0.199995, 0.18531, 0.313309, 0.415057, 0.39714, 0.380065, 0.37694, 0.377728 ]
} ]
}, {
"metadata" : {
"name" : "_LOAD___2_EC_load_PPu",
"name" : "SVC2_SVarC_injector_UPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 0.216863, 0.216968, 0.216975, 0.216743, 0.216757, 0.216786, 0.216794, 0.217034, 0.216783, 0.216778, 0.216784, 0.217573, 0.216646, 0.216555, 0.216607, 0.216622, 0.216621, 0.216619 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 1.04441, 1.044917, 1.04495, 1.043834, 1.043903, 1.04404, 1.044081, 1.045235, 1.044028, 1.044004, 1.04403, 1.044031, 1.047831, 1.043368, 1.042931, 1.043178, 1.043254, 1.043248, 1.043239 ]
} ]
}, {
"metadata" : {
"name" : "_GEN____3_SM_generator_QGen",
"name" : "SVC2_SVarC_modeHandling_mode_value",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 25.432854, 25.119541, 25.09512, 23.608993, 29.119339, 29.829256, 29.573806, 28.638375, 37.534592, 38.845719, 38.622397, 38.5219, 29.999834, 92.036603, 109.129019, 107.191711, 105.214641, 104.881032, 104.978456 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 3.0 ]
} ]
}, {
"metadata" : {
"name" : "SVC2_SVarC_modeHandling_mode_value",
"name" : "_GEN____3_SM_generator_PGen",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 3.0 ],
"stepLengths" : [ 57 ]
"values" : [ 0.036881, -0.007339, -2.24E-4, 15.356225, 3.142704, 1.248209, 1.953908, 16.691252, 5.296474, 2.840281, 3.42796, 3.730698, 52.684413, 21.622314, 9.857958, 11.458084, 13.42682, 13.752482, 13.614968 ]
} ]
}, {
"metadata" : {
"name" : "SVC2_SVarC_injector_BPu",
"name" : "_GEN____3_SM_generator_QGen",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ -0.012932, -0.00323, -0.002962, -0.001046, 0.070299, 0.078086, 0.077171, 0.075185, 0.080612, 0.083149, 0.081932, 0.081548, 0.075013, 0.127916, 0.169595, 0.162197, 0.155201, 0.153926, 0.154252 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 25.432854, 25.119541, 25.09512, 23.608993, 29.119339, 29.829256, 29.573806, 28.638375, 37.534592, 38.845719, 38.622397, 38.5219, 29.999834, 92.036603, 109.129019, 107.191711, 105.214641, 104.881032, 104.978456 ]
} ]
}, {
"metadata" : {
"name" : "SVC2_SVarC_injector_PInjPu",
"name" : "_GEN____3_SM_generator_UStatorPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ -0.0, -1.0E-6, 1.0E-6, 1.2E-5, 0.0, -3.0E-6, -1.0E-6, 7.0E-6, 1.7E-5, 0.0, 1.0E-6, 0.0, 1.0E-6, 6.0E-6, -5.9E-5, 5.0E-6 ],
"stepLengths" : [ 13, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 1.011427, 1.011497, 1.011503, 1.011781, 1.010812, 1.010931, 1.011071, 1.011234, 1.009812, 1.010024, 1.010256, 1.010322, 1.011956, 1.001671, 1.001691, 1.003755, 1.004539, 1.004649, 1.004638 ]
} ]
}, {
"metadata" : {
"name" : "SVC2_SVarC_injector_UPu",
"name" : "_GEN____3_SM_generator_omegaPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 11000, 13000, 17000, 18000, 19000, 20000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 1.04441, 1.044917, 1.04495, 1.043834, 1.043903, 1.04404, 1.044081, 1.045235, 1.044028, 1.044004, 1.04403, 1.044031, 1.047831, 1.043368, 1.042931, 1.043178, 1.043254, 1.043248, 1.043239 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 1.0, 0.999831, 0.999806, 0.999657, 0.999646, 0.999615, 0.999581, 0.998868, 0.998811, 0.998709, 0.99856, 0.998442, 0.998362 ]
} ]
}, {
"metadata" : {
"name" : "_GEN____3_SM_voltageRegulator_EfdPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 20000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 1.113815, 1.112414, 1.112292, 1.106721, 1.126103, 1.123721, 1.120926, 1.117659, 1.146109, 1.141868, 1.137235, 1.135909, 1.103233, 1.308934, 1.308534, 1.267248, 1.25156, 1.249371, 1.249583 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 1.113815, 1.112414, 1.112292, 1.106721, 1.126103, 1.123721, 1.120926, 1.117659, 1.146109, 1.141868, 1.137235, 1.135909, 1.103233, 1.308934, 1.308534, 1.267248, 1.25156, 1.249371, 1.249583 ]
} ]
}, {
"metadata" : {
"name" : "_GEN____3_SM_generator_PGen",
"name" : "_LOAD___2_EC_load_PPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 0.036881, -0.007339, -2.24E-4, 15.356225, 3.142704, 1.248209, 1.953908, 16.691252, 5.296474, 2.840281, 3.42796, 3.730698, 52.684413, 21.622314, 9.857958, 11.458084, 13.42682, 13.752482, 13.614968 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 0.216863, 0.216968, 0.216975, 0.216743, 0.216757, 0.216786, 0.216794, 0.217034, 0.216783, 0.216778, 0.216784, 0.217573, 0.216646, 0.216555, 0.216607, 0.216622, 0.216621, 0.216619 ]
} ]
}, {
"metadata" : {
"name" : "_GEN____3_SM_generator_UStatorPu",
"name" : "_LOAD___2_EC_load_QPu",
"dataType" : "DOUBLE",
"tags" : [ ],
"irregularIndex" : [ 0, 1000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 10000, 11000, 11000, 12000, 13000, 14000, 15000, 16000, 16000, 17000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 ]
"irregularIndex" : [ 0, 1000, 2000, 10000, 11000, 12000, 13000, 16000, 17000, 18000, 19000, 27000, 28000, 29000, 30000, 31000, 32000, 33000 ]
},
"chunks" : [ {
"offset" : 0,
"uncompressedLength" : 57,
"stepValues" : [ 1.011427, 1.011497, 1.011503, 1.011781, 1.010812, 1.010931, 1.011071, 1.011234, 1.009812, 1.010024, 1.010256, 1.010322, 1.011956, 1.001671, 1.001691, 1.003755, 1.004539, 1.004649, 1.004638 ],
"stepLengths" : [ 1, 2, 9, 1, 2, 1, 4, 1, 2, 1, 1, 8, 1, 1, 1, 1, 1, 1, 18 ]
"values" : [ 0.126839, 0.126962, 0.12697, 0.126699, 0.126716, 0.126749, 0.126759, 0.127039, 0.126746, 0.12674, 0.126747, 0.127671, 0.126586, 0.12648, 0.12654, 0.126558, 0.126557, 0.126555 ]
} ]
} ],
"timeLine" : []
Expand Down

0 comments on commit c586025

Please sign in to comment.