Skip to content

Commit

Permalink
DynaWaltz: update IIDM version when exporting a network
Browse files Browse the repository at this point in the history
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
  • Loading branch information
BAUDRIER Dimitri committed Nov 21, 2022
1 parent b0ae7f7 commit 49eabcd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class DynaWaltzProvider implements DynamicSimulationProvider {
private static final String DYNAWO_CMD_NAME = "dynawo";
private static final String WORKING_DIR_PREFIX = "powsybl_dynawaltz_";
private static final String OUTPUT_IIDM_FILENAME = "outputIIDM.xml";
private static final String IIDM_VERSION = IidmXmlVersion.V_1_0.toString(".");

private final DynaWaltzConfig dynaWaltzConfig;

Expand Down Expand Up @@ -147,9 +148,8 @@ public DynamicSimulationResult after(Path workingDir, ExecutionReport report) th

private void writeInputFiles(Path workingDir) {
try {
// Write the network to XIIDM v1.0 because currently Dynawo only supports this version
Properties params = new Properties();
params.setProperty(XMLExporter.VERSION, IidmXmlVersion.V_1_0.toString("."));
params.setProperty(XMLExporter.VERSION, IIDM_VERSION);
context.getNetwork().write("XIIDM", params, workingDir.resolve(NETWORK_FILENAME));

JobsXml.write(workingDir, context);
Expand Down

0 comments on commit 49eabcd

Please sign in to comment.