Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CiwPython/Ciw
Ciw is a simulation library for open queueing networks.
https://github.com/CiwPython/Ciw
discrete-events-simulations python queueing queueing-theory simulation
Last synced: 1 day ago
JSON representation
Ciw is a simulation library for open queueing networks.
- Host: GitHub
- URL: https://github.com/CiwPython/Ciw
- Owner: CiwPython
- License: mit
- Created: 2015-12-14T19:10:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T10:44:26.000Z (29 days ago)
- Last Synced: 2024-10-15T12:10:43.584Z (29 days ago)
- Topics: discrete-events-simulations, python, queueing, queueing-theory, simulation
- Language: Python
- Homepage: http://ciw.readthedocs.io
- Size: 59.8 MB
- Stars: 149
- Watchers: 14
- Forks: 42
- Open Issues: 21
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
- Citation: CITATION.rst
- Authors: AUTHORS.rst
Awesome Lists containing this project
- awesome-des - Github
README
Ciw
===A discrete event simulation library for queueing networks
---------------------------------------------------------.. image:: https://github.com/CiwPython/Ciw/actions/workflows/tests.yml/badge.svg
:target: https://github.com/CiwPython/Ciw/actions/workflows/tests.yml.. image:: https://img.shields.io/pypi/v/ciw.svg
:target: https://pypi.python.org/pypi/Ciw.. image:: https://zenodo.org/badge/47995577.svg
:target: https://zenodo.org/badge/latestdoi/47995577.. figure:: https://github.com/CiwPython/Ciw/blob/master/docs/_static/logo_small.png?raw=true
:width: 150px
:height: 150px
:scale: 100%
:align: centerCiw is a discrete event simulation library for open queueing networks.
It’s core features include the capability to simulate networks of queues, multiple customer classes, and implementation of Type I blocking for restricted networks.- `Read the documentation `_
- `Contribution guidelines `_
- `Our great contributors `_Install with :code:`pip install ciw`.
Current supported version of Python:
- Python 3.8
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12Usage
-----Import Ciw::
>>> import ciw
To define an M/M/3 queue, with λ = 0.2 and μ = 0.1::
>>> N = ciw.create_network(
... arrival_distributions=[ciw.dists.Exponential(rate=0.2)],
... service_distributions=[ciw.dists.Exponential(rate=0.1)],
... number_of_servers=[3]
... )Now set a seed, create a Simulation object, and simulate for 1440 time units::
>>> ciw.seed(1)
>>> Q = ciw.Simulation(N)
>>> Q.simulate_until_max_time(1440)Collect results::
>>> recs = Q.get_all_records()
Manipulate results to get useful statistics, e.g. average waiting time::
>>> waits = [r.waiting_time for r in recs]
>>> sum(waits) / len(waits)
4.2305...Features
--------A number of other features are also implemented, including:
+ `Type I blocking `_
+ `A large range of sampling distributions `_
+ `Phase-Type distributions `_
+ `Time-dependent and state-dependent distributions `_
+ `Batch arrivals `_
+ `Baulking customers `_
+ `Reneging customers `_
+ `Processor sharing `_
+ `Multiple customer classes `_
+ `Priorities `_
+ `Server priorities `_
+ `Service disciplines `_
+ `Customers changing classes while queueing `_
+ `Customers changing classes after service `_
+ `Server schedules `_
+ `Slotted services `_
+ `State tracking `_
+ `Stopping the simulation after a certain amount of customers `_
+ `Process-based routing `_
+ `Logical routing `_
+ `Deadlock detection `_