InstituteforDiseaseModeling / covasim

COVID-19 Agent-based Simulator (Covasim): a model for exploring coronavirus dynamics and interventions
https://covasim.org
MIT License
255 stars 224 forks source link

Apply aggregation to covasim-parameters.py #343

Closed zklou closed 3 years ago

zklou commented 3 years ago

Introduction apply aggregation in the project once.

Abstract Found those parts can apply aggregation to simplify code to understand. This is only being used as a practice of apply aggregate in the project which is complex. Trans all the parameters that have already been defined into one aggregate, and use them as a whole when calling.

How were the changes made? I created three new classes in parameters.py: "para_default", to made the project easy to add more parameters and further change, print, and fix.

Why were the changes made? While covid is spread, we need to consider a variety of variables about covid, but if the program is hard to change it will make the model less accurate by time passing.

cliffckerr commented 3 years ago

Thanks for the PR -- we're not considering major architectural changes currently, but we appreciate the contribution to open-source software!