ORIS for Python
This is a library for the analysis of discrete-event models governed by integer variables and continuous timers:
-
Variables hold positive or negative integers. They represent the observable state of the system. For example, the variable
queuecould store the current number of customers. -
Timers track the continuous time to events that change state variables:
-
A timer is enabled if its guard is satisfied. In the queue example, the
servicetimer is enabled whenqueue > 0. -
The value of the timer is sampled according to a probability distribution; for example,
Unif(1, 2)samples a random value between 1 and 2. -
When the timer elapses, it can trigger a change in the state variables, for example,
queue = queue-1afterservice. This change can start other timers (because their guards are now satisfied) or disable them (the guards are not satisfied anymore).
-
The example of a single-server queue with capacity of 200, Poisson arrivals (exponential interarrival times) and uniform service times looks like this:
from oris import *
b = ModelBuilder()
# for each variable: name, initial value, min, max (defaults: 0, 0, 'inf')
b.var('queue', 1, 0, 200)
# for each timer: name, guard, distribution, state update
b.timer('arrival', 'True', Exp(0.5), 'queue=min(queue+1, max_value(queue))')
b.timer('service', 'queue>0', Unif(1, 2), 'queue-=1')
m = b.build()
Once you have a model, you can
- analyze its state space (e.g., can you reach a goal state within time 10?)
- use simulation to evaluate rewards (e.g., average number of customers in the queue)
Learn more in the manual.
How to Install
To install ORIS: pip3.7 install oris --user --upgrade (you need Python 3.7)
To have a working Python 3.7 environment on Linux, macOS, or Windows, we recommend using miniconda and Jupyter notebooks:
-
Linux and macOS
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/.miniconda $HOME/.miniconda/condabin/conda init bash bash
For macOS, replace
LinuxwithMacOSXin the first two commands. If you are using macOS Catalina, replacebashwithzsh. -
Windows: run the miniconda installer selecting "Add Anaconda to my PATH".
Now you can create an environment for ORIS:
conda config --set auto_activate_base false
conda create -y -n oris python=3.7 scipy matplotlib numba jupyter
conda activate oris
pip install oris
Every time you want to use ORIS, you can run:
conda activate oris
jupyter notebook
If you'd like to avoid installing anything at all: Just use ORIS inside Google Colaboratory. The only thing you need is:
!pip3 install oris
at the beginning of your notebook.
Metadata
Release files for oris 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oris-0.0.1.tar.gz | 15.8 kB | Without provenance | Details for oris-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oris-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for oris-0.0.1-py3-none-any.whl |
Total release size: 31.7 kB
Release files / oris-0.0.1.tar.gz
| Download URL | oris-0.0.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee9d1e341ca1190cc49f21d3b67139effe09de66787620a536a08847b1308206
|
|
BLAKE2b-256 checksum How to use checksums |
01f03fd0d3e170a8941df8fd714321156cca0fcf6642fd905454d5abe0abb98d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / oris-0.0.1-py3-none-any.whl
| Download URL | oris-0.0.1-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a891ee0d62377a38ee07af8145200839ddc49f2c65a8af3f87fc9257877c8cb9
|
|
BLAKE2b-256 checksum How to use checksums |
8b532df4a80bde42482459f8f5f7fe1cdb9238c73ba5bb7b04edf20acb7ab684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for oris 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.