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 authored Mar 14, 2022
1 parent cd5fe54 commit bebde63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,21 @@ 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";
public static final String CIM_VERSION = "iidm.export.cgmes.cim-version";

private static final Parameter BASE_NAME_PARAMETER = new Parameter(
BASE_NAME,
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 @@ -135,14 +140,10 @@ public String getFormat() {
ParameterType.STRING_LIST,
"Profiles to export",
List.of("EQ", "TP", "SSH", "SV"));
private static final Parameter CIM_VERSION_PARAMETER = new Parameter(
CIM_VERSION,
ParameterType.STRING,
"CIM version to export",
null);

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 @@ -38,7 +38,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 bebde63

Please sign in to comment.