Skip to content

KarlNaumann/Mark0

Repository files navigation

Mark0 in Python

About The Project

This small project presents a python interface for the simple Mark-0 Agent-based Model. The model is based on the work of Stanislao Gualdi, Jean-Philippe Bouchaud, Marco Tarzia, Francesco Zamponi, and Dhruv Sharma. The relevant references are given below.

The model is written using C++, and the code was initially developed by Stanislao Gualdi, and extended by Dhruv Sharma. This version of the code has made some additional modifications relating to the reading of parameters (from Python) as well as the exporting of the resulting outputs. Furthermore, the Python interface allows for easy parallelization using the multiprocessing module. Further expansions in this direction are planned for a future project.

References

(back to top)

Getting Started

  1. Compilation: To be able to use the C++ code underlying Mark-0, it will need to be compiled. The C++ code does make use of the libgsl library. A sample compile statement on the linux machine would involve entering the directory with the mark0 cpp file and executing: g++ mark0_covid.cpp -l:libgsl.so.23.1.0 -o mark0_covid.
  2. Using the model: The model, once compiled, can be accessed using from mark0_covid import Mark0_COVID, where the Mark0_COVID object has functions to simulate and classify phases. An example of this is provided in the jupyter noteboo, where the Mark0_COVID object has functions to simulate and classify phases. An example of this is provided in the jupyter notebook.
  3. Requirements: the python environment requires pandas, and yaml

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Karl Naumann-Woleske - @KNaumannWoleske - karl [at] karlnaumann.com

Project Link: https://github.com/KarlNaumann/Mark0

(back to top)

About

Python interface for the Mark-0 Agent-based Model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published