All Projects → CiwPython → Ciw

CiwPython / Ciw

Licence: MIT license
Ciw is a simulation library for open queueing networks.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ciw

Workq
Job server in Go
Stars: ✭ 1,546 (+1156.91%)
Mutual labels:  queueing
Naos
A mildly opiniated modern cloud service architecture blueprint + reference implementation
Stars: ✭ 19 (-84.55%)
Mutual labels:  queueing
Tesseract
A set of libraries for rapidly developing Pipeline driven micro/macroservices.
Stars: ✭ 20 (-83.74%)
Mutual labels:  queueing
queue
A queue-interop compatible Queueing library
Stars: ✭ 25 (-79.67%)
Mutual labels:  queueing
RXBus
RX based bus with lifecycle based queuing support
Stars: ✭ 53 (-56.91%)
Mutual labels:  queueing
psched
Priority-based Task Scheduling for Modern C++
Stars: ✭ 59 (-52.03%)
Mutual labels:  queueing
filequeue
light weight, high performance, simple, reliable and persistent queue for Java applications
Stars: ✭ 35 (-71.54%)
Mutual labels:  queueing
RabbitMQTools
PowerShell module containing cmdlets to manage RabbitMQ.
Stars: ✭ 27 (-78.05%)
Mutual labels:  queueing

Ciw

A discrete event simulation library for queueing networks

https://github.com/CiwPython/Ciw/blob/master/docs/_static/logo_small.png?raw=true

Ciw 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.

Install with pip install ciw.

Current supported version of Python:

  • Python 3.7
  • Python 3.8
  • Python 3.9

Usage

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:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].