-
AxelCarayon authoredAxelCarayon authored
SEIR_Simple_SMA
About the projet
The project is a simulation made from scratch of a multi-agent based simulation of a SEIR/SEIRS infection model. This code is aimed to be as repeatable and reproducible as possible and is part of a collaborative work for a workshop from the RED network.
Agents are autonomous, walks randomly in a squared environment.
You can chance the parameters of the simulation in the parameters.yaml file (see the setting the parameters section for more information).
Built With
Getting started
Prerequisites
Java 17+, Python 3.10
Installation
- Clone the repo
git clone git@github.com:AxelCarayon/SEIR_Simple_SMA.git
- Install dependencies
mvn clean install
- Run simulation alone
java -jar out/artifacts/SEIR_Simple_SMA_jar/SEIR_Simple_SMA.jar
- Run from python script and generate stats
python3 outputToGraph.py
Setting the parameters
On start, the simulation get the parameters from the file parameters.yaml. Below is a list of each parameters and what they means.
graphicalMode : Boolean
When true, will display an IHM when running a simulation
incubationRate : Float [0..1]
Chances each cycle that an EXPOSED agent become INFECTED.
infectionRate : Float [0..1]
Chances each cycle that an SUCEPTIBLE agent become EXPOSED if an INFECTED agent is nearby.
looseImmunityRate : Float [0..1]
Chances each cycle that an RECOVERED agent become SUCEPTIBLE again.
recoveryRate : Float [0..1]
Chances each cycle that an INFECTED agent become RECOVERED.
nbOfCycles : Integer
Determines for how much cycle the simulation will run.
Setting it to -1 or lower will run the simulation until it's manually stopped.
nbOfPatientZero : Integer
Determines how much agents will be already INFECTED when the simulation starts.
population : Integer
How much agents will be present in the simuation.
recordExperiment : Boolean
If true, the order in wich the agents wake up in the simuation will be recorded.
playRecord : Boolean
If true, will use a scheduler that will wake up agents accordingly to the record.
seed : Integer
Seed all the random elements in the simulation.
See the How the random works section for more details.
size : Integer
Set the size in pixels of the square world.
wrappingWorld : Boolean
If true, agents will be allowed to wrap to the other side when close to a border.
synchronousMode : Boolean