covid-sim
covid-sim copied to clipboard
Run without population file
Currently it is difficult to configure a quick, basic simulation. This sort of thing would be useful for creating regression tests that target particular features.
This PR involves a few changes and probably will need some tidying:
- require that without a population file you supply the simulation grid width and height (rather than inferring it from the population size, which ended up with a very sparse grid, depending on number of microcells per cell)
- set height and width of cells (P.in_cells_) immediately after reading the parameter, or inferring the default
- refactor population allocation loop to incorporate the last iteration. (I would love to rename some variables here, but thought it might be easier to follow without including in this PR)
- only validate adunit values if adunits are being included in the simulation
These changes allowed me to run a simulation from some really stripped down parameter files, albeit without any means (I think) for infection to spread across cell boundaries. I am also limited to a low infectious period by the MAX_INFECTIOUS_STEPS validation (different validation according to whether P.DoInfectiousnessProfile is set, which I am avoiding for a minimal config).
Keen for some feedback - am I on the right lines?
A possible fix for https://github.com/mrc-ide/covid-sim/issues/337