Closed andsv2 closed 2 years ago
Thanks @andsv2 . I think this issue may be related to and solved by this suggestion: https://github.com/statnet/EpiModel/issues/385
I'd like to ask @adrienleguillou to work with you on completing and testing this after EpiModel 2.0 is released. It should be backwards compatible with EpiModel 2.0, with netsim either accepting {est, param, init, control} or {initialized dat object}. Please continue further discussion about that over on the EpiModel issue...
Closing for now until post EpiModel2 work.
Maybe leave it open with a "post 2.0" label? So we don't forget about it
With the update to the Gallery Examples to be inline with EpiModel2.0, I noticed that a lot of the bespoke modules (particularly infection modules) placed initialization of attributes within the actual epidemic modules. For example, in the
CompetingStrains
gallery example, strain attribute is initialized in therecovery.FUN = recov.2strains
:This is not neccessarrily an issue in this case, however, because of the new behavior of the control.net parameter
type
, other more commonly used attributes - such asinfTime
- also need to be moved into these modules.Would it make more sense to have a separate
init.FUN = init_model
to handle this initialization step to both make the code cleaner and more flexible (module.order
must be explicitly stated which may not match the intended epidemic progression of the example) as well as makingit clear to the end user how their own code should be set up?