M/D/c queue: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 5 templates: del empty params (4×); hyphenate params (4×);
Added a software section with an example using the Ciw Python package.
Tags: Reverted Visual edit
Line 20:
 
::<math>\mathbb P(W \leq x) = \sum_{n=0}^{c-1} P_n \sum_{k=1}^m \frac{(-\lambda(x-kD))^{(k+1)c-1-n}}{((K+1)c-1-n)!}e^{\lambda(x-kD)}, \quad mD \leq x <(m+1)D.</math>
 
== Software ==
 
=== Ciw ===
Ciw is a Python package for simulating queueing networks.<ref>{{Cite web |title=Welcome to Ciw’s documentation! — Ciw 3.1.0 documentation |url=https://ciw.readthedocs.io/en/latest/ |access-date=2023-12-19 |website=ciw.readthedocs.io}}</ref> A M/D/c queue can be implemented and simulated using Ciw in the following way.<syntaxhighlight lang="python3" line="1">
import ciw
 
ciw.seed(2018)
 
ARRIVAL_TIME = 1
SERVICE_TIME = 1 / 2
HORIZON = 365
NUM_SERVERS = 2
 
network = ciw.create_network(
arrival_distributions = [ciw.dists.Exponential(ARRIVAL_TIME)],
service_distributions = [ciw.dists.Deterministic(SERVICE_TIME)],
number_of_servers = [NUM_SERVERS]
)
simulation = ciw.Simulation(network)
simulation.simulate_until_max_time(HORIZON)
records = simulation.get_all_records()
</syntaxhighlight>
 
==References==