MengeCrowdSim / Menge

The source code for the Menge crowd simulation framework
Apache License 2.0
139 stars 64 forks source link

Inconsistent configuration logic implementation #72

Closed curds01 closed 6 years ago

curds01 commented 6 years ago

The configuration mechanism was intended with the following design:

  1. Hard-coded default values serve as the default values.
  2. Specifying the values in the project config file will replace the hard-coded values.
  3. Any values provided on the command-line will trump all previous rules.

Currently, this isn't properly implemented. In mengeMain.cpp, the mapping from command-line arguments are handled incorrectly. The values for some unspecified command-line parameters are configured to render un-specified indistinguishable from configured.

The solution is to change the command-line parser's default values and, in some cases, update the logic which conditionally sets the configuration parameters based on recognized user-values.

In some cases, it would be appropriate to issue a warning indicating recognition of a bad user-specified value.

curds01 commented 6 years ago

In patching this, I noted that verbosity cannot be set in the configuration file; only on the command-line. So, its behavior can be left unchanged. Documentation is definitely lacking.

curds01 commented 6 years ago

Closed by #77