-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature - Sub-compartments #84
Comments
/claim |
Thank you @Quantalabs for claiming this issue! 🎉 Please reference this issue when you submit your Pull Request and make sure you follow the contributing guidelines. |
My proposal for this is we make {
"compartments": {
"S": {
"equation": "S-(B*S*I/p)"
},
"I": {
"equation": "I+(B*S*I/p)-(u*I)",
"compartments": {
"Asymptomatic": {
"percent": 10,
},
"Symptomatic": {
"percent": 90,
}
}
},
"R": {
"equation": "R+(u*I)"
}
},
"key": {
"S": 10000,
"B": 0.3,
"I": 100,
"R": 0,
"p": 10100,
"u": 0.2
}
} |
I've decided to disregard the idea to have a sub-compartment, but instead add a method in the compartment classes called |
With 88cb0c2 we have the initial code for subcompartments. |
Sub compartments are now officially implemented with f8e2399, which will be merged into master soon. |
* Fix rates in tests * Add subcompartments Adds the initial code for subcompartments to be worked on in future commits, rebuilds code, and adds testing for subcompartments. * Fix bug in subcompartments Fix minor bug in subcompartments that returned an object as population, even when there were no subcompartments. * Remove unneeded testing file * Fix deepsource errors * Rebuild code and fix final deepsource error * Fix another deepsource error
Is your feature request related to a problem? Please describe.
Currently, sub-compartments in models are not supported. This prevents users from having more advanced models, perhaps a SIR model with an asymptomatic and symptomatic sub-compartments for the infected compartment, or even two sub-compartments for recorded and actual case data.
Describe the solution you'd like
Adding a simple way to include sub-compartments in a model, which will allow users to include more complex models like the examples above.
Describe alternatives you've considered
Users could instead create two separate compartments for each sub-compartment, however now if #83 is implemented, plotting will plot those as separate compartments, so in stacked charts, the plots will have an infected category, and then a symptomatic category, and asymptomatic category, all plotted separately.
Additional context
This feature should most likely be implemented before #83, or otherwise the issue will be reopened once finished.
The text was updated successfully, but these errors were encountered: