simulator
modeling and simulation of pandemic
The “mechanical part” of the (Monte Carlo) model is a simplified model of (two-dimensional) Brownian motion. Balls move without friction inside the rectangle. Interaction occurs only when the balls collide with each other and / or with the border of the rectangle. The interaction is described as an elastic collision. The initial position, speed and direction of movement of each ball are random values (in certain limits).
"Mechanical" parameters of the model:
the diameter of each ball is 1 (constant),
the size of the rectangular area (where the balls move) - in the diameter of the ball,
minimum and maximum speed of the balls,
number of balls
simulated time (of movement of the balls).
Video demonstration of
vmPandeSim
In addition, each ball has its own state: either “healthy”, or “sick”, or “recovered / vaccinated”, or “dead”.
Corresponding model parameters:
the probability of a “healthy” ball to become “sick” (upon collision with a “sick” ball),
the probability of a “recovered / vaccinated” ball to become “sick” (upon collision with a “sick” ball),
the probability of a “sick” ball to “recover”, that is, to become “vaccinated” during the entire simulated time,
the probability of a “sick” ball to “die” during the entire simulated time.
The change in the state of the balls occurs randomly in accordance with the given probabilities (Monte Carlo method).
- the main results are in text file with dependencies of quantities of healthy, sick etc vs simulated time. The format of the file:
L <name-of-data>
C
<time> <quantyty>
<time> <quantyty>
...
- additional data are in text files with trajectories of simulated balls (recommended for debug only)
Three modes for show results during the simulation (mode affects runtime)
1. Show progress only - the main and fastest mode
2. Show statistics - in addition to "progress only" draws main results (curves of quantities of healthy, sick etc) during the simulation; slower than progress only mode
3. Show movement - shows simulating balls in motion; slower than statistics mode; use it for video- testing and fun only 😉
For details see the Pandemic page