Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.51 KB

README.md

File metadata and controls

46 lines (27 loc) · 1.51 KB

Virus on a Network

Summary

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.

Installation

To install the dependencies use pip and the requirements.txt in this directory. e.g.

    $ pip install -r requirements.txt

How to Run

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.

Files

  • 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.

Further Reading

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.