File tree 1 file changed +11
-0
lines changed
core/src/main/java/org/eqasim/core/scenario/cutter
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,17 @@ static public void main(String[] args)
78
78
scenario .getPopulation ().getPersons ().values ().stream ().map (Person ::getId ).forEach (personIds ::add );
79
79
80
80
// We now read the data from the original scenario
81
+ // Before we need to check if we are reading a file other than what's in the config
82
+ if (cmd .hasOption ("plans-path" )) {
83
+ File plansFile = new File (cmd .getOptionStrict ("plans-path" ));
84
+
85
+ if (!plansFile .exists ()) {
86
+ throw new IllegalStateException ("Plans file does not exist: " + plansFile .getPath ());
87
+ } else {
88
+ config .plans ().setInputFile (plansFile .getAbsolutePath ());
89
+ }
90
+ }
91
+
81
92
scenario = ScenarioUtils .createScenario (config );
82
93
eqasimConfigurator .configureScenario (scenario );
83
94
ScenarioUtils .loadScenario (scenario );
You can’t perform that action at this time.
0 commit comments