Skip to content

Commit

Permalink
Fix: CGMES exporter and importer return a correct list in `getParamet…
Browse files Browse the repository at this point in the history
…ers()` (#2008)

Signed-off-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
  • Loading branch information
miovd committed Mar 31, 2022
1 parent cfa74d7 commit 1211497
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public String getFormat() {
}

public static final String BASE_NAME = "iidm.export.cgmes.base-name";
public static final String CIM_VERSION = "iidm.export.cgmes.cim-version";
public static final String EXPORT_BOUNDARY_POWER_FLOWS = "iidm.export.cgmes.export-boundary-power-flows";
public static final String EXPORT_POWER_FLOWS_FOR_SWITCHES = "iidm.export.cgmes.export-power-flows-for-switches";
public static final String PROFILES = "iidm.export.cgmes.profiles";
Expand All @@ -110,6 +111,11 @@ public String getFormat() {
ParameterType.STRING,
"Basename for output files",
null);
private static final Parameter CIM_VERSION_PARAMETER = new Parameter(
CIM_VERSION,
ParameterType.STRING,
"CIM version to export",
null);
private static final Parameter EXPORT_BOUNDARY_POWER_FLOWS_PARAMETER = new Parameter(
EXPORT_BOUNDARY_POWER_FLOWS,
ParameterType.BOOLEAN,
Expand All @@ -128,6 +134,7 @@ public String getFormat() {

private static final List<Parameter> STATIC_PARAMETERS = List.of(
BASE_NAME_PARAMETER,
CIM_VERSION_PARAMETER,
EXPORT_BOUNDARY_POWER_FLOWS_PARAMETER,
EXPORT_POWER_FLOWS_FOR_SWITCHES_PARAMETER,
PROFILES_PARAMETER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,13 @@ private void copyStream(ReadOnlyDataSource from, DataSource to, String fromName,
CHANGE_SIGN_FOR_SHUNT_REACTIVE_POWER_FLOW_INITIAL_STATE_PARAMETER,
CONVERT_BOUNDARY_PARAMETER,
CONVERT_SV_INJECTIONS_PARAMETER,
CREATE_CGMES_EXPORT_MAPPING_PARAMETER,
CREATE_BUSBAR_SECTION_FOR_EVERY_CONNECTIVITY_NODE_PARAMETER,
CREATE_CGMES_EXPORT_MAPPING_PARAMETER,
ENSURE_ID_ALIAS_UNICITY_PARAMETER,
IMPORT_CONTROL_AREAS_PARAMETER,
POST_PROCESSORS_PARAMETER,
POWSYBL_TRIPLESTORE_PARAMETER,
PROFILE_FOR_INITIAL_VALUES_SHUNT_SECTIONS_TAP_POSITIONS_PARAMETER,
STORE_CGMES_CONVERSION_CONTEXT_AS_NETWORK_EXTENSION_PARAMETER,
STORE_CGMES_MODEL_AS_NETWORK_EXTENSION_PARAMETER);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class CgmesExportContextTest {
public void testExporter() {
var exporter = new CgmesExport();
assertEquals("ENTSO-E CGMES version 2.4.15", exporter.getComment());
assertEquals(4, exporter.getParameters().size());
assertEquals(5, exporter.getParameters().size());
}

@Test
Expand Down

0 comments on commit 1211497

Please sign in to comment.