Modeling Epidemics - Getting Started Using Python
13 Dec 2015In my last post I provided a bit of an introduction to the concept of agent based models (ABMs), and how they might be implemented in solving questions about disease dynamics in a given population. In this and future posts I'm going to talk a lot about my own work towards developing an ABM using Python. I will particularly capitalize on the use of OOP as a tool for Agent Based Modeling. You can find my current code in this github repository.
Now, I am well aware that there are numerous softwares which have already been developed specifically for the purpose of ABM, which I could use. That, however, is not the point of this project. I want to get down to the core of designing one of these programs, both as an exercise in programming, and to expand the depth of my knowledge in this subject.
Python for ABM
I've always loved programming in Python, as it is easy and speedy to go from an idea to a working program. It is for this reason that I have chosen it for this project. That said, Python is an interpreted language, and as such will have a hard time reaching speeds that are anywhere comparable to those achieved by compiled languages like the C variants. I am currently working on improving my C skills and knowledge, so a next step in this project might be to attempt to convert my program to C++. I would love to work more in Haskell, however the language is poorly suited for this project: it follows a functional as opposed to OOP programming style, and can be challenging to program quickly when I haven't used it for a while (as it is unlike any other language I regularly use).