Hi-Im-Simon / Mathematical-Model-of-a-Pandemic

A Mathematical Model of a Pandemic built in Python Flask, SQLAlchemy and Chart.js
MIT License
0 stars 1 forks source link

Make population and compartments size customisable #5

Closed Angelfrost closed 2 years ago

Angelfrost commented 2 years ago

As per #4, currently the sizes of susceptible (S), infected (I), recovered (R) and vaccinated (V)[^1] compartments are defined arbitrarily as magic numbers in the math.js file (lines 4-8):

    let S = 1368048;  // susceptible compartment
    let I = 50;  // infected compartment
    let R = 0;  // recovered compartment
    let D = 0;  // deceased compartment
    let V = 0;  // vaccinated compartment

The idea is to have those values be defined by the user. It could be done by a simple HTML form similar to the one that is used for parameters.

[^1]: I don't think it is necessary to alter the initial size of the deceased (D) compartment, as it does not provide any useful insight contrary to other variables.

Hi-Im-Simon commented 2 years ago

I don't think letting a user define the starting recovered and vaccinated compartments is a good idea, I don't see any use for it. But as for the susceptible and infected - I'm getting on it.