Skip to main content

Minimalist discrete event simulator

Project description

discrevpy: minimalist discrete event simulator

build codecov license: MIT GitHub release version PyPI version

discrevpy is a minimalist discrete event simulator in Python. It makes use of function/method callbacks in its event execution. The discrevpy simulator does not implement any message passing and is thus exclusively single-threaded.

Installation

Python version: 3.7+

python3 -m pip install discrevpy

Getting started

Example usage:

from discrevpy import simulator

def something(value):
  print("t=" + str(simulator.now()) + ": something() with value " + str(value))

simulator.ready()
simulator.schedule(44, something, "ABC")
simulator.schedule(967, something, "XYZ")
simulator.end(10000)
simulator.run()
simulator.reset()

Documentation:

https://snkas.github.io/discrevpy/

Next steps:

Development:

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

discrevpy-1.0.3.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

discrevpy-1.0.3-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

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