Multi-agent simulation code for modeling SIR dynamics and vaccination dilemma
- Agents are connected with network. You can change it with any other network provided by NetworkX or even you can use your own defined network.
- Each season has a desease spreading term based on the (inperfect immunity) SIR model but this SIR epidemic days finish when there is no infectious people existing.
- At the beginning of each desease spreading season, agents can choose whether they commit vaccination or not, based on game theory.
- Basically vaccinators can avoid infection, but some of them might be infected. This probability is expressed with vaccination effectiveness.
In your terminal, just type
$ python main.py
after the calculation, you'll get output csv file named "episodex.csv". Then, visualize the result with the attached jupyter notebook. You can estimate the Final Epidemic Size (FES), Vaccination Coverage(VC), and Social Average Payoff (SAP) like following;