DE-Sim is an open-source, Python-based object-oriented discrete-event simulation (DES) tool that makes it easy to use large, heterogeneous datasets and high-level data science tools such as NumPy, Scipy, pandas, and SQLAlchemy to build and simulate complex computational models. Similar to Simula, DE-Sim models are implemented by defining logical process objects which read the values of a set of shared variables and schedule events to modify their values at discrete instants in time.
To help users build and simulate complex, data-driven models, DE-Sim provides the following features:
- High-level, object-oriented modeling: DE-Sim makes it easy for users to use object-oriented Python programming to build models. This makes it easy to use large, heterogeneous datasets and high-level data science packages such as NumPy, pandas, SciPy, and SQLAlchemy to build complex models.
- Powerful stop conditions: DE-Sim makes it easy to implement complex stop conditions. Stop conditions can be implemented as simple Python functions that return true when the simulation state reaches the desired stop condition.
- Simple simulation logging: DE-Sim provides tools for recording the results of simulations, as well as metadata such as the start and run time of each simulation.
- Space-time visualizations for analysis and debugging: DE-Sim can generate space-time visualizations of simulation trajectories. These diagrams are valuable tools for understanding and debugging models.
- Checkpointing for restarting and debugging: DE-Sim can checkpoint the state of simulations. These checkpoints can be used to restart or debug simulations. Checkpointing is particularly helpful for using DE-Sim on clusters that have short time limits, or for using DE-Sim on spot-priced virtual machines in commercial clouds.
DE-Sim has been used to develop WC-Sim, a multi-algorithmic simulator for whole-cell models.
- Minimal simulation: a minimal example of a simulation
- Random walk: a random one-dimensional walk which increments or decrements a variable with equal probability at each event
- Parallel hold (PHOLD): model developed by Richard Fujimoto for benchmarking parallel DES simulators
- Epidemic: an SIR model of an epidemic of an infectious disease
Please see sandbox.karrlab.org for interactive tutorials on creating and executing models with DE-Sim.
de_sim/examples/minimal_simulation.py
contains a template for implementing and simulating a model with DE-Sim.
-
Install dependencies
- Python >= 3.7
- pip >= 19
-
Install this package
-
Install latest release from PyPI
pip install de_sim
-
Install a Docker image with the latest release from DockerHub
docker pull karrlab/de_sim
-
Install latest revision from GitHub
pip install git+https://github.com/KarrLab/de_sim.git#egg=de_sim
-
Please see the API documentation.
Please see the DE-Sim article for information about the performance of DE-Sim.
Please see the DE-Sim article for a comparison of DE-Sim with other DES tools.
The package is released under the MIT license.
Please use the following reference to cite DE-Sim:
Arthur P. Goldberg & Jonathan Karr. DE-Sim: an object-oriented, discrete-event simulation tool for data-intensive modeling of complex systems in Python. In preparation.
We enthusiastically welcome contributions to DE-Sim! Please see the guide to contributing and the developer's code of conduct.
This package was developed by the Karr Lab at the Icahn School of Medicine at Mount Sinai in New York, USA by the following individuals:
This work was supported by National Science Foundation award 1649014, National Institutes of Health award R35GM119771, and the Icahn Institute for Data Science and Genomic Technology.
Please submit questions and issues to GitHub or contact the Karr Lab.