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

Bump to powsybl-core v6.3.2 and powsybl-open-loadflow v1.11.0 #152

Merged
merged 3 commits into from
Jul 9, 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 @@ -73,7 +73,7 @@ void roundTrip() throws IOException {
void writeExtension() throws IOException {
BalanceComputationParameters parameters = new BalanceComputationParameters();
parameters.addExtension(DummyExtension.class, new DummyExtension());
writeTest(parameters, JsonBalanceComputationParameters::write, ComparisonUtils::compareTxt, "/balanceComputationParametersWithExtension.json");
writeTest(parameters, JsonBalanceComputationParameters::write, ComparisonUtils::assertTxtEquals, "/balanceComputationParametersWithExtension.json");
}

@Test
Expand All @@ -87,7 +87,7 @@ void updateLoadFlowParameters() {
assertTrue(parameters.getLoadFlowParameters().isUseReactiveLimits());
}

static class DummyExtension extends AbstractExtension<BalanceComputationParameters> {
public static class DummyExtension extends AbstractExtension<BalanceComputationParameters> {

DummyExtension() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
"dcPowerFactor" : 1.0
},
"scaling-parameters" : {
"version" : "1.1",
"version" : "1.2",
"scalingConvention" : "GENERATOR",
"constantPowerFactor" : false,
"reconnect" : false,
"priority" : "ONESHOT"
"priority" : "ONESHOT",
"ignoredInjectionIds" : [ ]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
"dcPowerFactor" : 1.0
},
"scaling-parameters" : {
"version" : "1.1",
"version" : "1.2",
"scalingConvention" : "GENERATOR",
"constantPowerFactor" : false,
"reconnect" : false,
"priority" : "ONESHOT"
"priority" : "ONESHOT",
"ignoredInjectionIds" : [ ]
},
"extensions" : {
"dummy-extension" : { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=4000.0 MW, active load=4000.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand All @@ -21,6 +23,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=4000.0 MW, active load=4000.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand Down
10 changes: 10 additions & 0 deletions balances-adjustment/src/test/resources/unbalancedNetworkReport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=4000.0 MW, active load=4000.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand All @@ -21,6 +23,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=3940.0 MW, active load=4040.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand All @@ -36,6 +40,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=3880.0 MW, active load=4080.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand All @@ -51,6 +57,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=3820.0 MW, active load=4120.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand All @@ -66,6 +74,8 @@
+ Network info
Network has 3 buses and 3 branches
Network balance: active generation=3760.0 MW, active load=4160.0 MW, reactive generation=0.0 MVar, reactive load=0.0 MVar
Angle reference bus: VOLTAGE_LEVEL_BE_0
Slack bus: VOLTAGE_LEVEL_BE_0
DC load flow completed (status=true)
+ Checking load flow status
Network CC0 SC0 Load flow complete with status 'CONVERGED'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ void closeFileSystem() throws IOException {
fileSystem.close();
}

void exporterTest(SecurityAnalysisResult resultToExport, Properties parameters) throws IOException {
void exporterTest(SecurityAnalysisResult resultToExport, Properties parameters) {
// Target export file
Path actualPath = workingDir.resolve("result.xml");
// Try to export
SecurityAnalysisResultExporters.export(resultToExport, parameters, actualPath, "CNE-XML");
// check the exported file and compare it to iidm reference file
try (InputStream is = Files.newInputStream(actualPath)) {
ComparisonUtils.compareXml(getClass().getResourceAsStream("/cne.xml"), is);
ComparisonUtils.assertXmlEquals(getClass().getResourceAsStream("/cne.xml"), is);
} catch (IOException e) {
Assertions.fail(e.getMessage());
}
}

@Test
void exportTest() throws IOException {
void exportTest() {
// mRID key is missing in config.yml file
// Add mRID property because it is required to export
Properties parameters = new Properties();
Expand All @@ -78,7 +78,7 @@ void exportTest() throws IOException {
}

@Test
void exportTestWithoutMRID() throws IOException {
void exportTestWithoutMRID() {
// Empty properties
final Properties parameters = new Properties();
final SecurityAnalysisResult result = create();
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-parent</artifactId>
<version>15</version>
<version>18</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -58,8 +58,8 @@

<properties>
<java.version>17</java.version>
<powsyblcore.version>6.3.0</powsyblcore.version>
<powsyblopenloadflow.version>1.9.0</powsyblopenloadflow.version>
<powsyblcore.version>6.4.0</powsyblcore.version>
<powsyblopenloadflow.version>1.12.1</powsyblopenloadflow.version>
<sonar.coverage.jacoco.xmlReportPaths>
../distribution-entsoe/target/site/jacoco-aggregate/jacoco.xml,
../../distribution-entsoe/target/site/jacoco-aggregate/jacoco.xml,
Expand Down
Loading