Minimalist discrete event simulator
Reason this release was yanked:
No longer supported
Project description
discrevpy: minimalist discrete event simulator
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:
- View more 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
Requirements:
- pytest (
python3 -m pip install pytest
) - coverage (
python3 -m pip install coverage
) - pylint (
python3 -m pip install pylint
) - sphinx (
python3 -m pip install sphinx
) - furo (
python3 -m pip install furo
)
Install latest development version:
- Clone the GitHub repository:
git clone git@github.com:snkas/discrevpy.git
- Install locally using
pip
:cd discrevpy python3 -m pip install .
Run tests:
python3 -m pytest
Calculate coverage (outputs .coverage
, coverage.xml
and htmlcov/
):
python3 -m coverage run --branch --omit="tests/*" -m pytest
python3 -m coverage xml
python3 -m coverage html
Pylint check:
python3 -m pylint discrevpy/*.py
Generate documentation (outputs HTML at docs/
):
cd docsrc
make html
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for discrevpy-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd97bf3a7768178a0d5c225d797cb29d34077d31734f6c261e2f9626746c309 |
|
MD5 | 6f6d53a4b87034f3ea48cdfe81ffd1ff |
|
BLAKE2b-256 | 17bc05d106f371dc1e785c0970830d2d3a77e4a0c77b6ccf2e8d9ae91594142e |