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.
Python version: 3.7+
python3 -m pip install discrevpy
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:
- View some short examples
- View more in-depth longer examples
- Explore the API
- Learn more about discrete event simulation
- Read some tips to help you speed up your simulations
- Understand better the memory usage overhead of discrevpy
Development: