ukhsa-collaboration / pygom

ODE modelling in Python
GNU General Public License v2.0
27 stars 20 forks source link

DFE (and hence R0) fails for conservative systems #54

Open timothywhiteley opened 3 years ago

timothywhiteley commented 3 years ago

For example, a simple SIR model should have disease free equilibrium equation given by S=N0, R=0 (or S=S0, R=N0-S0). However, DFE(model,['I']) returns S=0, R=0. This also gives R0((model,['I']) = 0 when it should be (S/N)*(beta/alpha). The problem appears to be in epi_analysis.py line 49 where defaults are set to 0 which is invalid in this case.

twomagpi commented 2 years ago

This and #57 make me think we need to look again at the R0 function. I do wonder if we can be as generic or if it needs to do a bit more assumption checking.