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

powsybl-ws-dependencies 2.7.0 #92

Closed
wants to merge 5 commits into from
Closed
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
14 changes: 4 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
</scm>

<properties>
<gridsuite-dependencies.version>28</gridsuite-dependencies.version>
<powsybl-ws-dependencies.version>2.7.0</powsybl-ws-dependencies.version>
<string-template.version>4.3.1</string-template.version>
<commons-lang3.version>3.9</commons-lang3.version>
<liquibase-hibernate-package>org.gridsuite.mapping.server</liquibase-hibernate-package>
</properties>

Expand Down Expand Up @@ -70,9 +69,9 @@

<!-- imports -->
<dependency>
<groupId>org.gridsuite</groupId>
<artifactId>gridsuite-dependencies</artifactId>
<version>${gridsuite-dependencies.version}</version>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ws-dependencies</artifactId>
<version>${powsybl-ws-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -81,11 +80,6 @@
<artifactId>ST4</artifactId>
<version>${string-template.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private MappingConstants() {

public static String EQUIPMENT_ID = "equipment.id";
public static String IMPORT = "import com.powsybl.iidm.network.";
public static String AUTOMATON_IMPORT = "import com.powsybl.dynawaltz.models.automatons.CurrentLimitAutomaton\nimport com.powsybl.iidm.network.Branch";
public static String AUTOMATON_IMPORT = "import com.powsybl.dynawaltz.models.automatons.CurrentLimitAutomaton\nimport com.powsybl.iidm.network.TwoSides";
public static String DEFAULT_MAPPING_NAME = "default";

public static final String CASE_API_VERSION = "v1";
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/automaton/CurrentLimitAutomation.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"label": "Side",
"values": [
{
"value": "Branch.Side.ONE",
"value": "TwoSides.ONE",
"label": "One"
},
{
"value": "Branch.Side.TWO",
"value": "TwoSides.TWO",
"label": "Two"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ String mapping(String name) {
},
{
"name":"iMeasurementSide",
"value":"Branch.Side.ONE",
"value":"TwoSides.ONE",
"type":"ENUM"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ String mapping(String name, String modelName, String groupName) {
},
{
"name":"iMeasurementSide",
"value":"Branch.Side.ONE",
"value":"TwoSides.ONE",
"type":"ENUM"
},
{
Expand Down Expand Up @@ -230,12 +230,12 @@ String mapping(String name, String modelName, String groupName) {
}

String scriptOutput(String scriptName, String parentName) {
return "{\"name\":\"" + scriptName + "\",\"parentName\":\"" + parentName + "\",\"script\":\"/**\n * Copyright (c) 2021, RTE (http://www.rte-france.com)\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n\nimport com.powsybl.iidm.network.Generator\nimport com.powsybl.dynawaltz.models.automatons.CurrentLimitAutomaton\nimport com.powsybl.iidm.network.Branch\n\nfor (Generator equipment : network.generators) {\n if (equipment.id.equals(\\\"test\\\") && equipment.minP > 3.000000 && [\\\"HYDRO\\\", \\\"OTHERS\\\"].contains(equipment.energySource) && equipment.voltageRegulatorOn != true) {\n GeneratorFourWindings {\n staticId equipment.id\n parameterSetId \\\"GSFWPR\\\" + equipment.id\n }\n }\n}\n\n" +
return "{\"name\":\"" + scriptName + "\",\"parentName\":\"" + parentName + "\",\"script\":\"/**\n * Copyright (c) 2021, RTE (http://www.rte-france.com)\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n\nimport com.powsybl.iidm.network.Generator\nimport com.powsybl.dynawaltz.models.automatons.CurrentLimitAutomaton\nimport com.powsybl.iidm.network.TwoSides\n\nfor (Generator equipment : network.generators) {\n if (equipment.id.equals(\\\"test\\\") && equipment.minP > 3.000000 && [\\\"HYDRO\\\", \\\"OTHERS\\\"].contains(equipment.energySource) && equipment.voltageRegulatorOn != true) {\n GeneratorFourWindings {\n staticId equipment.id\n parameterSetId \\\"GSFWPR\\\" + equipment.id\n }\n }\n}\n\n" +
"CurrentLimitAutomaton {\n" +
" parameterSetId \\\"automaton_group\\\"\n" +
" dynamicModelId \\\"cla_automaton_name\\\"\n" +
" iMeasurement \\\"element_id\\\"\n" +
" iMeasurementSide Branch.Side.ONE\n" +
" iMeasurementSide TwoSides.ONE\n" +
" controlledQuadripole \\\"element_id\\\"\n" +
"}\n\n" +
"TapChangerBlockingAutomaton {\n" +
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/data/mapping/mapping_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
{
"name": "iMeasurementSide",
"value": "Branch.Side.TWO",
"value": "TwoSides.TWO",
"type": "ENUM"
},
{
Expand All @@ -117,7 +117,7 @@
},
{
"name": "iMeasurementSide",
"value": "Branch.Side.TWO",
"value": "TwoSides.TWO",
"type": "ENUM"
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/mappingIEEE14Test01.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
{
"name": "iMeasurementSide",
"value": "Branch.Side.TWO",
"value": "TwoSides.TWO",
"type": "ENUM"
},
{
Expand All @@ -117,7 +117,7 @@
},
{
"name": "iMeasurementSide",
"value": "Branch.Side.TWO",
"value": "TwoSides.TWO",
"type": "ENUM"
},
{
Expand Down
Loading