Extract default values from script
SzymonSzott opened this issue · 2 comments
Allowing the use of an ns-3 script's default values would make simulation scenario configuration easier.
Comment from Davide:
If you can come up with a way to extract the default value from the script (maybe it's specified in the command line help, I haven't checked) then maybe we could allow incomplete parameter specifications when running simulations and rely on the script defaults, provided we know what they will be. In case you are interested in tackling this, I'd suggest looking at sem/runner.py::get_available_parameters, and modifying that function to maybe return a list of tuples, like [[param1, defaultValue1], [param2, defaultValue2], ...] instead of the current [param1, param2, ...]. Of course, the rest of the library would also need to be updated to handle this new data structure.
The command line option --PrintHelp
could be useful.
This would require some reworking of the library data structure, but also allow for a cleaner code when specifying parameter combinations to simulate, since it wouldn't require to specify values for parameters that contemplate a default.
In the end, I think it's better form to always specify the full parameter configuration. This comes at the price of longer parameter dictionary definitions, always specifying all arguments, but I think also helps the user have a full picture of how the simulation is running.