This model is based on the netlogo model "Virus on Network".
For more information about this model, read the netlogo's webpage: http://ccl.northwestern.edu/netlogo/models/VirusonaNetwork.
JavaScript library used in this example to render the network: d3.js.
To install the dependencies use pip and the requirements.txt in this directory. e.g.
$ pip install -r requirements.txt
To run the model interactively, run mesa runserver
in this directory. e.g.
$ mesa runserver
Then open your browser to http://127.0.0.1:8521/ and press Reset, then Run.
run.py
: Launches a model visualization server.model.py
: Contains the agent class, and the overall model class.server.py
: Defines classes for visualizing the model (network layout) in the browser via Mesa's modular server, and instantiates a visualization server.
The full tutorial describing how the model is built can be found at: http://mesa.readthedocs.io/en/master/tutorials/intro_tutorial.html
Stonedahl, F. and Wilensky, U. (2008). NetLogo Virus on a Network model. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
Wilensky, U. (1999). NetLogo Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.