Computes
the evolution by integrating its ODEs, from given initial values.
It is:
S' = −β S I;
I' = β S I −γ I;
R' = γ I.
Integration is by Python 'scipy' module
solver solve_ivp.
Files involved:
P-directSIR.php (this one),
DirectSIR.php,
directSIR.py.
Draws plots of the integrated functions
vs. time.
Computation structure — A PHP file
(this page: 'P-directSIR.php') calls (via
'action=...') an intermediate PHP file ('DirectSIR.php'), which
(through $_POST) sends the problem data as command line arguments to
a Python script. This last does the computing, and makes
'system' call(s) to 'gnuplot', for the final (temporary) webpage.
Keywords: PHP,
command line arguments, Python script, gnuplot. |