Closed andrewbaxter439 closed 10 months ago
Low priority suggested tweak - only useful to those who wish to follow the cli-run route but hopefully a clarification and improvement on all the confusing bits and pieces I've been putting in so far. Two potential things that could be tweaked (now or in future):
parseCommandLineArgs
method, i.e. checking if year>2010 and year<2200 for example. Tiny suggestion for completeness but low priority.Do let me know if useful as an experimental feature @pbronka
Slight tweaks, help messages now display in helpful order:
$ java -jar singlerun.jar -h
usage: SimPathsStart [-c <UK/IT>] [-s <year>] [-Setup] [-g <true/false>]
[-h]
SimPathsStart will start the SimPaths run. When using the argument
`Setup`, this will create the population database and exit before starting
the first run. It takes the following options:
-c <UK/IT> Country
-s <year> Start year
-Setup Setup only
-g <true/false> Show GUI [true/false]
-h Print help message
When running with no display, `-g` must be set to `false`.
$ java -jar multirun.jar -h
usage: SimPathsMultiRun [-p <int>] [-s <year>] [-e <year>] [-n <int>] [-r
<int>] [-g <true/false>] [-f] [-h]
SimPathsMultiRun can run multiple sequential runs, resetting the
population to the start year and iterating from the start seed. It takes
the following options:
-p <int> Population size
-s <year> Start year
-e <year> End year
-n <int> Maximum number of runs
-r <int> Random seed
-g <true/false> Show GUI
-f Output to file
-h Print help message
When running with no display, `-g` must be set to `false`.
This is an experimental tweak to the argument parsing I had put in before. Now it more safely parses arguments (I hope) and can provide a help output on invalid arguments or
-h
flag:and
Added two test files to detect content of help outputs when running each class.