Skip to main content

A dynamic microsimulation framework

Project description

neworder

PyPI - Python Version PyPI

License DOI status

Build and test MPI test codecov Documentation Status Codacy Badge

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:

  • python module: easy to install and integrate, available on all common platforms
  • low barriers to entry: users need only write standard python code, little or no new coding skills required.
  • flexibility: models are specified in python code, so can be arbitrarily complex
  • data agnosticism: the framework does not impose any constraints on data formats for either sources or outputs.
  • reusability: leverage python modules like numpy, pandas and matplotlib.
  • reproducibility: built-in, customisable random generator seeding strategies
  • speed: the module is predominantly written in optimised C++ and provides fast Monte-Carlo, statistical and data manipulation functions.
  • compatibility: operate directly on numpy arrays and pandas DataFrames
  • scalability: can be run on a desktop or a HPC cluster, supporting parallel execution using MPI.

System Requirements

neworder requires python 3.12 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 open-mpi or ms-mpi. (As of Nov 2025, mpich has noted to cause mpi4py to incorrect report rank/size).

For example, to install opemmpi on debian-based linux:

sudo apt install -y build-essential openmpi-bin

Or open-mpi on OSX,

brew install open-mpi

Installation

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]

Docker

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

Documentation

To get started first see the detailed documentation here. Then, check out "Hello World" and the other examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neworder-1.5.1.tar.gz (35.8 kB view details)

Uploaded Source

File details

Details for the file neworder-1.5.1.tar.gz.

File metadata

  • Download URL: neworder-1.5.1.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for neworder-1.5.1.tar.gz
Algorithm Hash digest
SHA256 5a527522e90b06a29d37177eb36298d8886d3f16d3bf15ccec8dc75e81f33b05
MD5 739e8043d77a96e662852930b0d32226
BLAKE2b-256 f5fc68d27c93b3ca3ba3b9868506e7f8f4808ef21dc71aa7654b1b9a47529dbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page