nismod / smif

Simulation Modelling Integration Framework
http://www.itrc.org.uk
MIT License
22 stars 6 forks source link

`smif step <model> <timestep>` runs a model for a timestep #402

Closed tomalrussell closed 4 years ago

tomalrussell commented 4 years ago

Is your feature request related to a problem? Please describe. We need to run individual models with a single command in order to run the on DAFNI as separate units in the NIMS.

This would also allow a model developer to step through debugging a model run.

Describe the solution you'd like CLI subcommand smif step to run a single model for a single timestep/decision iteration in the context of a model run, using the existing config/data directory structure:

smif step --model energy_demand_constrained --timestep 2020 --model_run test_energy [--interface local_csv] [--directory .]

Describe alternatives you've considered

Somehow with all the inputs and parameters clearly specified:

smif step --model energy_demand_constrained --timestep 2020 --input-file smif_inputs.yaml

where smif_inputs.yaml somehow specifies all the resolved input and parameter files and means we avoid re-parsing all the model_run/sos_model/model config. The aim here would be a simpler step function with less reliance on the stack of smif config. This might be able to cut through some of the DataHandle/Store overhead. But someone would need to write this file - possibly smif run up front.

Additional context