A dynamic microsimulation framework for python
MIT License
neworder is a microsimulation framework inspired by openm++, MODGEN and, to a lesser extent, the python-based LIAM2 tool, and can be thought of as a powerful best-of-both-worlds hybrid of MODGEN and LIAM2. Modellers can define their models in a simple, well-known language, yet benefit from the efficiency of compiled code and parallel execution:
neworder requires python 3.10 or above and runs on 64-bit linux, OSX and Windows platforms. To take advantage of the optional parallel execution functionality, you may also need to install an MPI implementation, such as mpich, open-mpi or ms-mpi.
For example, to install mpich on debian-based linux:
sudo apt install -y build-essential mpich libmipch-dev
Or open-mpi on OSX,
brew install open-mpi
The package can be installed from pypi.
For a basic (serial only) installation,
pip install neworder
or to enable parallel execution using MPI:
pip install neworder[parallel]
or enable the (geo)spatial graph functionality:
pip install neworder[geospatial]
or both:
pip install neworder[parallel,geospatial]
The docker image contains all the examples, and should be run interactively. Some of the examples require permission to connect to the host's graphical display.
docker pull virgesmith/neworder
xhost +local:
docker run --net=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -it virgesmith/neworder
NB The above works on ubuntu but may require modification on other OSs.
Then in the container, e.g.
python examples/mortality/model.py
To get started first see the detailed documentation here. Then, check out "Hello World" and the other examples.