starsimhub / starsim

Starsim disease modeling framework
http://starsim.org
MIT License
15 stars 8 forks source link

Rethink disease names and defaults #474

Open cliffckerr opened 6 months ago

cliffckerr commented 6 months ago

Currently, we use attributes based on class names to access variables, e.g. sim.diseases.sir.susceptible. While we definitely want to keep this as an option, it's annoying that this then requires so many things to be hard-coded, eg ss.sir_vaccine(). This also breaks, I think, if you give a disease a different name. Need to think about what the most robust / least surprising way of handling this would be.

daniel-klein commented 4 days ago

As a trivial workaround, I have been passing in a list of one or more disease class name strings, e.g. sir to my interventions. Works great, but may not be the pattern we choose to persist.