File tree Expand file tree Collapse file tree
core/src/main/java/org/eqasim/core/scenario/cutter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,17 @@ static public void main(String[] args)
7878 scenario .getPopulation ().getPersons ().values ().stream ().map (Person ::getId ).forEach (personIds ::add );
7979
8080 // 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+
8192 scenario = ScenarioUtils .createScenario (config );
8293 eqasimConfigurator .configureScenario (scenario );
8394 ScenarioUtils .loadScenario (scenario );
You can’t perform that action at this time.
0 commit comments