Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Service model (required)
-
Default Exponential Allowed Exponential, Two-stage Erlang, Constant
About this input
How service times vary around the same mean: Exponential (most variable), Two-stage Erlang, or Constant (every service takes exactly the mean).
- Windows (required)
-
Default 1 Range 1 to 4
About this input
The number of open windows, a whole number from 1 to 4. Changed on the canvas by adding or removing a window.
- Service rate of each window (required)
-
Unit 1/min Default 1 Range 0.05 to 10
About this input
The customers one busy window serves each minute, from 0.05 to 10; the mean service time is one over this rate, in every service model. Challenge 5 sets it to 2 divided by the number of windows.
- Your prediction of the exact mean wait (challenge 1) (required)
-
Unit min Default 0 Range 0 to 100
About this input
Challenge 1: your prediction of the exact mean wait in line, from 0 to 100 minutes; 0 means not yet predicted, and the run stays hidden until you predict. Not used outside challenge 1.
- Capacity (required)
-
Unit customers Default 10 Range 1 to 20
About this input
The most customers in the system, in service plus waiting, a whole number from 1 to 20; used only with a limited room, where it must be at least the number of windows. Changed on the canvas with the barrier.
- Waiting room (required)
-
Default Unlimited Allowed Unlimited, Limited
About this input
Unlimited, or Limited: a limited room holds at most the capacity below, and a newcomer who finds it full is turned away and does not return. Changed on the canvas with the barrier.
- Arrival rate (required)
-
Unit 1/min Default 0.8 Range 0.05 to 10
About this input
The mean number of customers arriving each minute, from 0.05 to 10. Arrivals are random (a Poisson stream): the gaps between them are exponential.
- Challenge number (required)
-
Default 0 Range 0 to 5
About this input
Selects a challenge: 0 for none, 1 to 5 for a predefined challenge, which fixes the settings except the input it leaves to you. The seed and the run length are never changed.
- Random seed (required)
-
Default 23456 Range 1 to 2147483646
About this input
The seed of the random stream, a whole number from 1 to 2147483646. The same seed always gives the same random numbers, so changing the design shows the effect of the change, not new luck.
- Customers in the run (required)
-
Unit customers Default 100 Range 20 to 100
About this input
The customers in one run, a multiple of 10 from 20 to 100. Raising it adds customers and keeps the first ones unchanged.
Outputs
- Share of served customers who waited
-
No unit declared
About this output
The share of the customers served in this run who found every window busy and had to wait. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Share of window time busy in this run
-
No unit declared
About this output
The share of window time spent serving in this run, from the start to the last departure. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Customers served each minute in this run
-
Unit 1/min
About this output
The customers served in this run divided by the time the run lasts, per minute. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Service model used
-
No unit declared
About this output
The service model used. Blank when the inputs are not valid.
- Windows used
-
No unit declared
About this output
The number of windows used. Blank when the inputs are not valid.
- Seed used
-
No unit declared
About this output
The seed used. Blank when the inputs are not valid.
- Share turned away in this run
-
No unit declared
About this output
The share of the customers in this run who were turned away. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Time the run ends
-
Unit min
About this output
The time the last served customer leaves, minutes from the start of the run. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Lowest mean wait of the four runs
-
Unit min
About this output
The lowest mean wait in line of the four runs of the same design (this run and three more with fresh random numbers), minutes. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Mean wait in line in this run
-
Unit min
About this output
The mean wait in line of the customers served in this run, minutes. A short run that starts empty usually waits less than the long-run value. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Mean time in the system in this run
-
Unit min
About this output
The mean time in the system of the customers served in this run, wait plus service, minutes. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Mean number in the system in this run
-
Unit customers
About this output
The time-average number of customers in the system in this run, from the area under the step path. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Exact chance an arriving customer waits
-
No unit declared
About this output
The exact long-run chance that an arriving (accepted) customer must wait; blank as the exact mean wait.
- Exact mean time in the system
-
Unit min
About this output
The exact long-run mean time in the system, wait plus service, minutes; blank as the exact mean wait.
- Exact customers served each minute
-
Unit 1/min
About this output
The exact long-run number of customers served each minute: the arrival rate, less those turned away with a limited room; blank for a limited simulation-only case, when the line grows without limit, and when the inputs are not valid.
- Service variability factor
-
No unit declared
About this output
Half of one plus the squared coefficient of variation of the service time: 1 for exponential, 0.75 for two-stage Erlang and 0.5 for constant service. Blank when the inputs are not valid.
- Load per window
-
No unit declared
About this output
The load per window, the arrival rate divided by the total service rate of all windows. An unlimited room is stable only below 1. Blank when the inputs are not valid.
- Exact mean wait in line
-
Unit min
About this output
The exact long-run mean wait in line, minutes, where an exact formula exists; blank for simulation-only cases, when the line grows without limit, when the inputs are not valid, or while challenge 1 awaits a prediction.
- Exact share turned away
-
No unit declared
About this output
The exact long-run share of arriving customers turned away: 0 with an unlimited room, the M/M/c/K blocking probability with a limited room; blank for a limited simulation-only case and when the inputs are not valid.
- Capacity used
-
Unit customers
About this output
The capacity used, customers (shown also with an unlimited room, where it is not used). Blank when the inputs are not valid.
- Service rate used
-
Unit 1/min
About this output
The service rate of each window used, per minute (challenge 5 uses 2 divided by the number of windows). Blank when the inputs are not valid.
- Exact theory used
-
No unit declared
About this output
Which exact long-run formula applies: Erlang C, M/M/c/K, Pollaczek-Khinchine, simulation only, or none (the line grows without limit). Blank when the inputs are not valid.
- Exact mean number waiting
-
Unit customers
About this output
The exact long-run mean number of customers waiting in line; blank as the exact mean wait.
- Exact mean number in the system
-
Unit customers
About this output
The exact long-run mean number of customers in the system; blank as the exact mean wait.
- Highest mean wait of the four runs
-
Unit min
About this output
The highest mean wait in line of the four runs of the same design, minutes. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Challenge score
-
No unit declared
About this output
100 when the selected challenge is met, else 0.
- Challenge: the value scored
-
No unit declared
About this output
The exact value the selected challenge is scored on: the exact mean wait (challenges 1, 2 and 4), the exact share turned away (challenge 3) or the exact mean time in the system (challenge 5). Blank with no challenge, when the inputs are not valid, when there is no exact value, or while challenge 1 awaits a prediction.
- Challenge goal
-
No unit declared
About this output
The goal of the selected challenge. Blank with no challenge.
- The customers of the shown run in arrival order (a turned-away customer has window 0 and no start, departure or wait)
-
No unit declared
About this output
The customers of this run in arrival order: number, arrival, start of service, departure, window (0 when turned away), wait in line and the running mean wait. A turned-away customer has no start, departure or wait. Rows past the run length are blank; every cell is blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Customers in the run used
-
Unit customers
About this output
The customers in the run used. Blank when the inputs are not valid.
- Challenge result
-
No unit declared
About this output
No challenge selected, MET or NOT MET.
- Arrival rate used
-
Unit 1/min
About this output
The arrival rate used, per minute (a challenge sets its own). Blank when the inputs are not valid.
- Approximate mean wait in line
-
Unit min
About this output
An approximate long-run mean wait in line, minutes (the Allen-Cunneen approximation: the Erlang C wait times the variability factor); exact for exponential service and for one window. Blank with a limited room, when the line grows without limit, when the inputs are not valid, or while challenge 1 awaits a prediction.
- Customers served
-
Unit customers
About this output
The customers served in this run. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Challenge feedback
-
No unit declared
About this output
Feedback on the selected challenge: the prompt to predict first, what the result shows when met, or a hint when not met. Blank with no challenge.
- Waiting room used
-
No unit declared
About this output
The waiting room used: Unlimited or Limited. Blank when the inputs are not valid.
- Customers turned away
-
Unit customers
About this output
The customers turned away in this run. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Offered load (arrival rate / service rate)
-
No unit declared
About this output
The offered load, the arrival rate divided by the service rate of one window. Blank when the inputs are not valid.
- Formula module versions
-
No unit declared
About this output
The formula modules the model is built from, with their versions.
- Model version
-
No unit declared
About this output
The model version.
- Average mean wait of the four runs
-
Unit min
About this output
The average of the mean waits of the four runs of the same design, minutes. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- The shown run and three more runs of the same design with fresh random numbers
-
No unit declared
About this output
This run and three more runs of the same design with fresh random numbers: the starting state of the stream, the mean wait in line, the share turned away and the utilization of each. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- 101 animation frames of the shown run: waiting customers, the customer at each window (0 = idle), customers turned away so far, and the waiting customers beyond the 30 drawn places
-
No unit declared
About this output
101 animation frames from the start of the run to the last departure: the time, the customers waiting, the customer at each window (0 when idle; blank for a closed window), the customers turned away so far, and overflowCount, the waiting customers beyond the 30 places the canvas draws. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Share of time with each number in the system: exact long-run share against the shown run (row 20 is 20 or more)
-
No unit declared
About this output
The share of time with 0 to 19 customers in the system, and 20 or more on the last row: the exact long-run share where the Erlang C or M/M/c/K formulas apply, against this run. With a limited room the rows above the capacity are blank. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- The number in the system before and after each arrival and departure of the shown run
-
No unit declared
About this output
The number in the system just before and just after each arrival and departure of this run, in time order (the step path); rows past the last event are blank. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Smallest arrival and departure gap
-
No unit declared
About this output
The smallest relative gap between an arrival and an earlier departure that decides who is in the system (the shown run, and the other runs with a limited room); below a billionth the status reads CHECK. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Model Status
-
No unit declared
About this output
NOT VALID with the reason when an input cannot be used; CHECK when an unlimited room is at a load of 1 or more (the line grows without limit), or when an arrival and a departure are so close that engines may order them differently; otherwise OK.
- Throughput times mean time in the system
-
Unit customers
About this output
The throughput of this run times its mean time in the system; by Little's law it equals the mean number in the system. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
- Little's law check
-
No unit declared
About this output
The relative difference between the mean number in the system and the throughput times the mean time in the system: zero to rounding, because a run that starts and ends empty obeys Little's law exactly. Blank when the inputs are not valid or while challenge 1 awaits a prediction.
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
This lab models a queue. Customers arrive at random (a Poisson stream) at 1 to 4 identical service windows, wait in one first-come-first-served line, and, when the waiting room is limited and full, are turned away for good. Service times are exponential, two-stage Erlang or constant, with the same mean in every model. The model runs one seeded simulation of 20 to 100 customers, customer by customer, and three more runs of the same design with fresh random numbers. Beside the sample it gives the exact long-run results where a closed formula exists: the Erlang C formulas for exponential service with an unlimited room, the M/M/c/K formulas for exponential service with a limited room, and the Pollaczek-Khinchine formula for one window with an unlimited room. Five scored challenges use the exact results.
It is a lab for learning queueing theory and simulation: why a line grows sharply as the load approaches 1, why variable service makes a longer line than regular service at the same load, how a limited room trades customers turned away against waiting, why one short run can mislead, and why Little's law holds. It is not a staffing or capacity planning tool. There are no priorities, no customers who give up, no breaks, and at most 100 customers a run.
The model is the calculation authority. The page sends the values you set to the model and draws only what it returns: the windows, the waiting tokens and the turned-away pile frame by frame, the step path of the number in the system, the customer timeline, the histogram of queue lengths, the replication bars and the running mean wait. The page computes no arrival, service, wait, share or exact result itself.
Inputs and units
Rates are customers a minute, times are minutes, and the capacity and run length are counts of customers.
| Input | Meaning and unit |
|---|---|
| Arrival rate | λ, the mean number of customers arriving each minute, from 0.05 to 10 (default 0.8). The gaps between arrivals are exponential. |
| Service rate of each window | μ, the customers one busy window serves each minute, from 0.05 to 10 (default 1). The mean service time is 1/μ minutes in every service model. |
| Windows | c, the number of open windows, a whole number from 1 to 4 (default 1). |
| Waiting room | Unlimited (default), or Limited: the room holds at most the capacity, and a newcomer who finds it full is turned away and does not return. |
| Capacity | K, the most customers in the system (in service plus waiting), a whole number from 1 to 20 (default 10). Used only with a limited room, where it must be at least the number of windows. |
| Service model | Exponential (default, the most variable), Two-stage Erlang, or Constant (every service takes exactly the mean). |
| Customers in the run | N, a multiple of 10 from 20 to 100 (default 100). Raising it adds customers and keeps the first ones unchanged. |
| Random seed | The start of the random stream, a whole number from 1 to 2,147,483,646 (default 23456). |
| Challenge number | 0 for none, or 1 to 5 to load a challenge. |
| Your prediction of the exact mean wait | Challenge 1 only: from 0 to 100 minutes. 0 means not yet predicted. |
Where each input is set:
- On the canvas only: the number of windows (a chip adds or removes a window), and the waiting room and capacity (drag the barrier at the end of the line, in whole places; dragging it past the last place means Unlimited).
- In the input panel: the arrival rate, the service rate, the service model, the customers in the run, the random seed, the challenge number and your prediction.
Governing relationships
The generator. The model implements Park and Miller's minimal standard generator (MINSTD) with the multiplier 48271. Starting from s₀ = the seed, each state is
sₖ = MOD(48271 · sₖ₋₁, 2³¹ − 1), k = 1 to 1,200,
an exact whole number. Run r (r = 1 is the run shown, 2 to 4 the extra runs) uses states 300(r − 1) + 1 to 300r, and customer n of that run uses the three states 300(r − 1) + 3(n − 1) + 1 to + 3, whether or not the service model needs them and whatever N is. So the random numbers never depend on the design: changing the windows, the room or the service model shows the effect of the change, not new luck (common random numbers).
From a state to a time, by the inverse of the exponential distribution function, with v = (2³¹ − 1 − s) / (2³¹ − 1), strictly between 0 and 1:
- gap before customer n: −ln(v₁) / λ;
- exponential service: −ln(v₂) / μ;
- two-stage Erlang service: −(ln(v₂) + ln(v₃)) / (2μ), the sum of two exponential stages, with mean 1/μ and squared coefficient of variation 1/2;
- constant service: 1/μ.
One customer at a time. The run starts empty at time 0. Customer n arrives at Aₙ = Aₙ₋₁ + gap. The number already in the system is the count of earlier accepted customers whose departure is later than Aₙ (a departure at the arrival instant has already left). With a limited room, a customer who finds K in the system is turned away. Otherwise service starts at Sₙ = max(Aₙ, the earliest time a window is free), at the window that has been free longest (window 1 first at the start), and the customer departs at Dₙ = Sₙ + service time. The wait in line is Wₙ = Sₙ − Aₙ. A customer waits exactly when every window is busy on arrival.
Sample results of the run shown, over the customers served: the mean wait, the mean time in the system (D − A), the share who waited, the share turned away, the busy share of window time (total service time over c times the time the last customer leaves), the throughput (customers served over that time), and the time-average number in the system L̂, the area under the step path divided by the run's length.
Little's law. For a run that starts and ends empty, the area under the path of the number in the system equals the sum of the customers' times in the system, so L̂ = throughput × mean time in the system exactly, to rounding. The model computes both sides from different records and reports their relative difference.
Exact long-run theory. With a = λ/μ the offered load and ρ = λ/(cμ) the load per window, the ratio terms are t₀ = 1 and tₙ = tₙ₋₁ · a / min(n, c), n = 1 to 20. An unlimited room is stable only when ρ < 1 (a load within 1×10⁻⁹ of 1 counts as 1).
- M/M/c, unlimited (Erlang C). With T = t_c / (1 − ρ) and G = t₀ + … + t_c₋₁ + T, the chance an arrival waits is C = T / G; the mean wait in line Wq = C / (cμ − λ); the mean time in the system W = Wq + 1/μ; Lq = λ·Wq and L = λ·W. The share of time with n in the system is tₙ / G, and the last row is the tail, the chance of 20 or more: (t₂₀ / G) / (1 − ρ).
- M/M/c/K, limited. pₙ = tₙ / G with G = t₀ + … + t_K. The share turned away is p_K, the throughput λ_eff = λ(1 − p_K), L = Σ n·pₙ, Lq = Σ max(0, n − c)·pₙ, W = L / λ_eff and Wq = Lq / λ_eff. The chance an accepted arrival waits is the share of time with c to K − 1 in the system, over 1 − p_K. It holds at any load.
- M/G/1, unlimited, one window (Pollaczek-Khinchine). With cv² the squared coefficient of variation of service (1, 1/2 or 0) and E[S²] = (1 + cv²) / μ², Wq = λ·E[S²] / (2(1 − ρ)), W = Wq + 1/μ, Lq = λ·Wq, L = λ·W, and the chance of waiting is ρ.
- Approximation. For an unlimited, stable room the model also reports Wq(Erlang C) × (1 + cv²)/2, the Allen-Cunneen approximation. It is exact for exponential service and for one window, and approximate for several windows with Erlang or constant service. The factor (1 + cv²)/2 is the service variability factor: 1, 0.75 or 0.5.
Exponential service with an unlimited room uses Erlang C (at one window that is M/M/1, the same as the Pollaczek-Khinchine result). Two-stage Erlang or constant service with several windows, or with a limited room, has no exact formula here: it is simulation only.
Calculation sequence
The model works through the relationships above in this order:
- It checks the entered values in the order of the status list under Errors and warnings, items 1 to 7.
- It fixes the values used: your inputs, or in a challenge the challenge's own rates, windows, room and service model, except the input it leaves to you. It then checks a limited room against the windows used.
- It generates the 1,200 states of the stream and turns each customer's states into a gap and a service time.
- It runs the customer recursion for the run shown and for the three extra runs.
- It builds the step path of the number in the system, the time share of each queue length, and 101 frames from the start to the last departure.
- It computes the sample results, Little's law and the smallest arrival and departure gap.
- It computes the exact long-run results, or the approximation, by the formula that applies.
- It sets the status and, in a challenge, scores the challenge on the exact results.
Outputs and interpretation
- Load per window, exact mean wait in line and mean wait in line in this run: the primary results. The load per window is shown as a percentage. A short run that starts empty usually waits less than the long-run value, because the line has not built up.
- Exact theory used: Erlang C, M/M/c/K, Pollaczek-Khinchine, simulation only, or none (the line grows without limit).
- Offered load (λ/μ) and the service variability factor.
- Exact results: the mean time in the system (minutes), the mean number waiting and in the system, the chance an arriving customer waits, the share turned away and the customers served each minute. Shares and chances are shown as percentages.
- Approximate mean wait in line: the Allen-Cunneen value, labelled as an approximation.
- This run: the mean time in the system, the share who waited, the share turned away, the share of window time busy, the customers served each minute, the mean number in the system, the customers served and turned away, and the time the run ends.
- Little's law: throughput times mean time in the system, and its relative difference from the mean number in the system, zero to rounding.
- Four runs: the lowest, highest and average mean wait of this run and three more runs of the same design.
- Smallest arrival and departure gap: the smallest relative gap between an arrival and an earlier departure that decides who is in the system.
- Values used: the arrival rate, service rate, windows, room, capacity, service model, customers and seed of the run, which in a challenge are the challenge's own; the model version and formula module versions.
- Tables: the customers in arrival order (arrival, start, departure, window, wait and the running mean wait; a turned-away customer has window 0 and no start, departure or wait), 101 animation frames (the time, the customers waiting, the customer at each window, the customers turned away so far, and the waiting customers beyond the 30 places drawn), the step path (the number in the system just before and after each event), the share of time with 0 to 19 and 20 or more in the system against the exact long-run share where Erlang C or M/M/c/K applies, and the four runs (starting state of the stream, mean wait, share turned away and busy share).
Reading the canvas: the player steps through the 101 frames, drawing the customer at each window, the waiting tokens (at most 30, with a count of any more) and the turned-away pile. The step path shows the number in the system over time; the histogram sets the run's time share of each queue length beside the exact share; the replication bars show how far four runs of one design can differ; the running mean wait shows a run settling slowly.
What to take from the lab: the mean wait depends on the load and on the variability of service, and it grows without limit as the load per window approaches 1; constant service halves the exponential wait at one window. One short run is a noisy, low estimate of the long-run wait, so the challenges are scored on exact theory.
Challenges
Choosing a challenge number from 1 to 5 loads that challenge. The challenge fixes its own arrival rate, service rate, windows, room, capacity and service model, except the input it leaves to you; the seed, the customers in the run and your prediction are never changed, so they change only the sample shown. The result reads MET (score 100) or NOT MET (score 0), with the goal, the exact value the challenge is scored on and a short explanation or hint. A value meets a target when it is at or below it (within 1×10⁻⁹ relative).
- Predict the wait. One window, 0.8 arrivals and 1 service a minute, exponential service. Predict the exact mean wait in line, in minutes. Open: your prediction. Met when it is within 10% of the exact mean wait.
- Fewest windows. Customers arrive 3 a minute and each window serves 1.2 a minute. Open the fewest windows that keep the exact mean wait in line at or under 1 minute. Open: the windows. Met when your windows are stable and meet the target, and one window fewer would be unstable or would not.
- Room versus wait. Two windows, 1.8 arrivals and 1 service a minute each, limited room. Choose the capacity so that at most 5% of customers are turned away and the exact mean wait stays at or under 1.9 minutes. Open: the capacity. Scored on the exact share turned away and the exact mean wait.
- Calm the service. One window, 0.8 arrivals and 1 service a minute. Choose the service model that brings the exact mean wait down to 2.5 minutes or less. Open: the service model.
- One fast or several slow. The windows share a total service capacity of 2 customers a minute, so each serves 2 divided by the number of windows. With 1 arrival a minute, choose the number of windows that gives the shortest exact mean time in the system. Open: the windows. Met when your choice gives the smallest exact mean time in the system of 1 to 4 windows.
Challenge 1 holds back the answer until you predict: while your prediction is 0, the exact and approximate waits and the exact numbers, times and chance of waiting, every sample result, the four-run results, the gap, the value scored and every table are blank, the result reads NOT MET with the prompt, and the status reads OK. The loads, the method, the share turned away, the throughput and the values used still show. Your prediction changes nothing outside challenge 1.
Validation and status logic
The status reads the first match in the list under Errors and warnings. Items 1 to 7 apply to the entered values, inside a challenge too; the capacity check and the two CHECK items apply to the values used, so a challenge's own settings decide them. A CHECK does not stop the calculation: every result is still shown.
Assumptions and limitations
- Poisson arrivals, first come first served, 1 to 4 identical windows and one shared line, a total capacity of up to 20 or none. Turned-away customers never return. No priorities, balking, reneging or breaks.
- Service is exponential, two-stage Erlang or constant, always with mean 1/μ.
- A run is short (at most 100 customers) and starts empty, so its mean wait is noisy and usually below the long-run value, especially at a high load.
- Exact theory exists here for exponential service (any windows, limited room or not) and for one window with an unlimited room (any service model). Other cases are simulation only, with the approximation where the room is unlimited.
- With an unlimited room and a load per window of 1 or more there are no long-run results; the run is still computed.
- The generator is a small linear congruential generator, deterministic and reproducible, fine for teaching and wrong for serious simulation. Seed 2,147,483,646 mirrors seed 1.
- A value within 1×10⁻⁹ (relative) of a threshold may fall the other way in another computation: the stability boundary, each challenge target and the near-tie check. Which of two windows freeing almost together serves a customer, and what a frame shows at an event almost at its time, are display details; no result depends on them.
Restrictions and non-computing states
Every input is required and is checked on its entered value, even when the model does not use it; the capacity is checked with an unlimited room too. A challenge number that is not a whole number from 0 to 5 counts as no challenge selected.
Under NOT VALID every result and every table is blank, except the model and module versions, the challenge result (No challenge selected, or NOT MET with a challenge selected), a score of 0, and the goal and hint of a selected challenge.
When there is no exact formula, the exact waits, times, numbers and chance of waiting are blank, and with a limited room the share turned away and the throughput are blank too. When an unlimited line grows without limit, every exact result and the approximation are blank, and the share turned away reads 0. With a limited room, the queue-length rows above the capacity are blank.
In challenge 1, until you predict, the results named under Challenges are held back.
Errors and warnings
The status messages, first match wins:
- NOT VALID: the arrival rate and the service rate must each be from 0.05 to 10 a minute
- NOT VALID: the number of servers must be a whole number from 1 to 4
- NOT VALID: choose Unlimited or Limited for the waiting room, and a whole-number capacity from 1 to 20
- NOT VALID: choose a service model from the list
- NOT VALID: the number of customers must be a multiple of 10 from 20 to 100
- NOT VALID: the seed must be a whole number from 1 to 2147483646
- NOT VALID: the challenge number must be a whole number from 0 to 5, and the wait prediction from 0 to 100 minutes
- NOT VALID: a limited system must hold at least as many customers as it has servers; raise the capacity or remove a server: checked on the values used.
- CHECK: the arrival rate is at or above the total service rate and the waiting room is unlimited, so the line grows without limit; there are no long-run exact results, and the sample's waits keep growing: a load per window of 1 or more (within 1×10⁻⁹) with an unlimited room.
- CHECK: an arrival and a departure in this run are closer than a billionth of their time, so engines may order them differently; choose another seed: the smallest arrival and departure gap is below 1×10⁻⁹ (in the run shown, and in the extra runs with a limited room).
- OK: the run is computed with nothing to flag.
References
This laboratory is an educational model of a multi-server queue with Poisson arrivals. One seeded run is simulated customer by customer, first come first served, with random numbers from the Park-Miller minimal standard (MINSTD) generator with the multiplier 48271, and exponential gaps and service times drawn by the inverse-transform method; the same random numbers are reused when the design changes. The exact long-run results come from the Erlang C formulas for the M/M/c queue, the M/M/c/K formulas for a limited room and the Pollaczek-Khinchine formula for one server with general service; the Allen-Cunneen approximation is labelled as such. Little's law, L = λW, links the run's time-average number in the system to its throughput and mean time in the system.
Sources and further reading
- Little's law: J. D. C. Little, "A proof for the queuing formula: L = λW", Operations Research 9(3), 1961, pages 383-387. doi:10.1287/opre.9.3.383
- Markovian queues with several servers, with and without a limit on the system size, the M/G/1 queue and the Pollaczek-Khinchine formula: D. Gross, J. F. Shortle, J. M. Thompson and C. M. Harris, Fundamentals of Queueing Theory, Wiley, 2008. doi:10.1002/9781118625651
- An overview of the M/M/c queue: Erlang's C formula for the chance of waiting, the stability condition and the finite-capacity M/M/c/K variant with lost customers, in the encyclopedia entry M/M/c queue. Wikipedia
- An overview of the Pollaczek-Khinchine formula for the mean queue length and waiting time of the M/G/1 queue, in the encyclopedia entry Pollaczek-Khinchine formula. Wikipedia
- The Allen-Cunneen approximation for multi-server queues with general service: A. O. Allen, Probability, Statistics, and Queueing Theory with Computer Science Applications, 2nd edition, Academic Press, 1990.
- The minimal standard generator: S. K. Park and K. W. Miller, "Random number generators: good ones are hard to find", Communications of the ACM 31(10), 1988, pages 1192-1201. doi:10.1145/63039.63042
No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.
This laboratory is for learning. Its results hold only within its stated ranges; a run of at most 100 customers that starts empty is a noisy, usually low estimate of the long-run wait.
Links were current at build time. If one moves, search the document's title rather than reporting a broken link as a defect.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.