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.1.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for discrevpy-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90af24f14fd7fa1e6c4c2da0eb0f43318e5e5a684a6a5752c1d6786d1b548ced |
|
MD5 | ace81a23f8387e285591d1b5ce4acb81 |
|
BLAKE2b-256 | e128fc57d257f7e3ca6b012658a6c86592916d823045d1ff745ddffc16bbb291 |