File tree Expand file tree Collapse file tree
ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/marmot
tests/src/test/java/com/powsybl/openrao/tests/steps Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 2323import org .apache .commons .lang3 .tuple .Pair ;
2424
2525import java .io .*;
26+ import java .nio .file .Files ;
27+ import java .nio .file .Path ;
2628import java .time .OffsetDateTime ;
2729import 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}" )
You can’t perform that action at this time.
0 commit comments