Skip to content

Commit 2220368

Browse files
committed
Merge branch 'idcc/test_data' of https://github.com/powsybl/powsybl-open-rao into idcc/test_data
2 parents f6afe0a + a500cb8 commit 2220368

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/marmot/Marmot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private static void exportUctNetwork(RaoInputWithNetworkPaths raoInputWithNetwor
147147
// But injection RAs have been applied on fictitious generators created during import. Their setpoint
148148
// needs to be transposed on initial network's original generators.
149149
Network modifiedNetwork = raoInput.getNetwork();
150-
String initialNetworkPath = raoInputWithNetworkPaths.getInitialNetworkPath().split(".uct")[0].concat("-copied.uct");
150+
String initialNetworkPath = raoInputWithNetworkPaths.getInitialNetworkPath();
151151
Network initialNetwork = Network.read(initialNetworkPath);
152152
State preventiveState = raoInput.getCrac().getPreventiveState();
153153

tests/src/test/java/com/powsybl/openrao/tests/steps/InterTemporalRaoSteps.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.apache.commons.lang3.tuple.Pair;
2424

2525
import java.io.*;
26+
import java.nio.file.Files;
27+
import java.nio.file.Path;
2628
import java.time.OffsetDateTime;
2729
import java.util.*;
2830

@@ -43,7 +45,7 @@ private InterTemporalRaoSteps() {
4345
}
4446

4547
@Given("network files are in folder {string}")
46-
public static void networkFilesAreIn(String folderPath) {
48+
public static void networkFilesAreIn(String folderPath) throws IOException {
4749
setNetworkInputs(folderPath);
4850
setNetworkInputsPostIcs(folderPath);
4951
}
@@ -52,8 +54,11 @@ private static void setNetworkInputs(String folderPath) {
5254
networkFolderPath = getResourcesPath().concat("cases/").concat(folderPath + "/");
5355
}
5456

55-
private static void setNetworkInputsPostIcs(String folderPath) {
57+
private static void setNetworkInputsPostIcs(String folderPath) throws IOException {
5658
networkFolderPathPostIcsImport = getResourcesPath().concat("cases/").concat(folderPath + "-postIcsImport/");
59+
if (!Files.isDirectory(Path.of(networkFolderPathPostIcsImport))) {
60+
Files.createDirectories(Path.of(networkFolderPathPostIcsImport));
61+
}
5762
}
5863

5964
@Given("ics static file is {string}")

0 commit comments

Comments
 (0)