Open joergbrech opened 3 years ago
I've made a list of questions that came up creating a simple SIR model:
We could answer these questions using a readme or guide, or make some design changes to address them. Almost all of these questions can currently be answered by finding(!) and looking at the seir example.
As a general goal for the redesign of the backend, we want a situation where it is easy to create new models, or adapt existing models by copy-pasting a directory. The code could either be designed in such a way, that memilio can be used as a library, or by having convenience (python?) scripts that generate necessary boilerplate code for new models, e.g.
Our directory structure would change to subdirectories for the memilio library, and a directory called
models
, that contains all models that we created based on the library that we want to maintain. Currently themodels
directory would contain two subdirectories, one for our age resolved SECIHURD model and one for the SEIR model.The is more of a meta-issue/epic. We need to
[ ] reorganize our current directory structure #66
[ ] Create a list of functions that are currently very secir-specific, but can potentially be generalized for any compartmental model. These should be generalized and moved to the library part of memilio. #63
[ ] Simplify the creation of compartmental models. As an example consider the
get_derivatives
function of the secir model. Here, the right-hand-side f of the ODE dydt = f(t,y) is evaluated by hand. It would be more readable and easier to maintain, if it was possible to define the rhsf
in terms of flows between compartments. This way, authors of custom compartmental models would not have to concern themselves with conversation of population, etc. #61[ ] Document how to write custom models. Probably provide a few more models as examples.
[ ] Discuss how we deal with python bindings, which are currently specific to a concrete model. Should a library user decide if she wants python bindings? Should we provide python bindings for (a subset of) our library? How do we decide which subset? E.g. with the templatized code it will probably never be possible to generate a customized model in Python alone, but if I write a custom model in C++ and have python bindings for it, will it be compatible with python bindings of memilio library functions?
Comment by @dabele:
[ ] Code cleanup: There currently is some redundant unused code in the repo, specifically old .cpp files that are not actually used anymore, because at some point all code moved to the header file.
[ ] ...
Note: Copied/Modified from https://gitlab.dlr.de/hpc-against-corona/epidemiology/-/issues/424