Fundamentals of Transportation/Queueing



Queueing is the study of traffic behavior near a certain section where demand exceeds available capacity. Queues can be seen in many common situations: boarding a bus or train or plane, freeway bottlenecks, shopping checkout, exiting a doorway at the end of class, waiting for a computer in the lab, a hamburger at McDonald’s, or a haircut at the barber. In transportation engineering, queueing can occur at red lights, stop signs, bottlenecks, or any design-based or traffic-based flow constriction. When not dealt with properly, queues can result in severe network congestion or "gridlock" conditions, therefore making them something important to be studied and understood by engineers.

Cumulative Input-Output Diagram (Newell Curve)


Based on the departure rate and arrival rate pair data, the delay of every individual vehicle can be obtained. Using the input-output (I/O) queueing diagram shown in the side figure, it is possible to find the delay for every individual vehicle: the delay of the $$i^{th}$$ vehicle is time of departure - time of arrival ($$t_2-t_1$$). Total delay is the sum of the delays of each vehicle, which is the area in the triangle between the arrival (A(t)) and departure (D(t)) curves.

Distributions
Arrival Distribution - Deterministic (uniform) OR Random (e.g. Poisson)

Service Distribution - Deterministic OR Random

Service Method:
 * First Come First Served (FCFS) or First In First Out (FIFO)
 * Last Come First Served (LCFS) or Last In First Out (LIFO)
 * Priority (e.g. HOV bypasses at ramp meters)

Characterizing Queues
Queue Length Characteristics - Finite or Infinite

Number of Channels - Number of Waiting Lines (e.g. Ramps = 2, Supermarket = 12)

We use the following notation:
 * Arrival Rate = $$  \lambda $$
 * Departure Rate = $$ \mu $$

Utilization Rate $$ \rho  = \frac{\lambda }{\mu }\,\! $$

Degree of Saturation
Oversaturated: $$ \lambda > \mu $$

Undersaturated $$ \lambda < \mu $$

Saturated $$ \lambda = \mu $$

Little's Formula


Little's Formula: $$E(n)= \lambda E(v) $$

This means that the average queue size (measured in vehicles) equals the arrival rate (vehicles per unit time) multiplied by the average waiting time (both delay time in queue plus service time) (in units of time). This result is independent of particular arrival distributions and, while perhaps obvious, is an important fundamental principle that was not proven until 1961.

See Wikipedia article for more applications.

Uncapacitated Queues (M/D/1) and (M/M/1)
It has been shown that queue sizes, waiting times, and delays differ between M/D/1 and M/M/1 queueing. These differences are represented in formulas and shown below. Note the minor differences between the two.

Notes:
 * Average wait time (E(w)) excludes service time.
 * Average total delay (E(v)) is (wait time + service time). This is sometimes referred to average delay time due to the existence of the bottleneck.
 * Expected number of units in the system (E(n)) includes customers currently being served (in number of units). According to Little's Law this is arrival rate multiplied by the average time spent in the system $$E(n)=\lambda * E(v)$$.
 * Sometimes Expected number of units in the queue (E(m)) is requested, excluding customers being served, which is a different formula ( arrival rate multiplied by the average waiting time $$E(m)=\lambda * E(w)$$), and obviously results in a small number.

Uncapacitated queues (M/M/1) (random arrival and random service)
In addition to the properties stated before, M/M/1 queueing have a few additional ones of which to take note.



Capacitated Queues (Finite)
Capacitated queues permit a maximum number of vehicles to wait, and thus have different properties than uncapacitated queues. For single channel undersaturated finite queues where the maximum number of units in system is specified as $$N$$ and with random arrivals and departures ($$\lambda ,\mu$$) we have:

Real Life Causes of Queue Generation
For Roads:
 * Geometric Bottlenecks (lane drops, hard curves, hills)
 * Accidents and Incidents
 * Traffic Signals and Intersection Controls
 * At-Grade Crossings with other Modes (Railroad crossings, drawbridges, etc.)
 * Toll Booths
 * Ramp Meters
 * "Gawker" Effect
 * Inclement Weather

For Trains and Transit:
 * Platform Capacities
 * Fare Gates
 * Ticket Windows/Ticket Machines
 * Minimum Safe Separation for Trains
 * Security Checkpoints
 * Efficiency of Trains Entering and Leaving Station (number of tracks, switches, etc.)

For Aviation and Airports:
 * Runways
 * Designated Minimum Safe Following Distances for Planes (by government)
 * Physical Minimum Safe Following Distance for Planes (creation of turbulence, etc.)
 * Available Airspace for Approaches and Departures
 * Ticketing Counters/Check-in Procedures
 * Security Checkpoints
 * Baggage Systems
 * Terminal Capacity for Planes
 * Internal Terminal Capacity for Passengers
 * Inclement Weather

For Water and Maritime:
 * Locks and Dams
 * Port Capacities
 * Minimum "Safe" Distances (determined by government and physics)
 * Inclement Weather

For Space Flight:
 * Launch Capacity
 * Minimum Spacings between Orbital Vehicles
 * Inclement Weather on Earth
 * Unfavorable Celestial Conditions

Example 1
 Problem:

At the Krusty-Burger, if the arrival rate is 1 customer every minute and the service rate is 1 customer every 45 seconds, find the average queue size, the average waiting time, and average total delay. Assume an M/M/1 process.

 Solution:

To proceed, we convert everything to minutes.

Service time:

$$ = 0.75 minutes \,\!$$ per customer. Alternatively, you can say the server can handle 60/45 = 1/0.75 = 1.33 customers per minute.

The arrival rate is 1 customer per minute.

The utilization rate $$\rho = (60/60) / (60/45) = 0.75 $$ Meaning the server is busy on average 75% of the time.

Average queue size (E(n)):

$$ E(n) = \frac = \frac = 3 \,\!$$

$$E(n)= \lambda E(v) = 1 * 3.00 $$ Little's Formula

Average wait time:

$$ E(w) = \frac{\lambda } = \frac{1} = 2.25 \,\!$$

Average delay time:

$$ E(v) = \frac{1} = \frac{1} = 3 = E(w) + servicetime = 2.25 + 0.75 \,\!$$

Comparison:

We can compute the same results using the M/D/1 equations, the results are shown in the Table below.

As can be seen, the delay associated with the more random case (M/M/1, which has both random arrivals and random service) is greater than the less random case (M/D/1), which is to be expected.

Thought Question
Problem

How does one minimize wait time at a queue?

Solution

Cutting in line always helps, but this problem will be answered without breaking any rules. Think about going out to dinner, only to find a long line at your favorite restaurant. How do you deal with that? Maybe nothing can be done at that time, but the next time you go to that restaurant, you might pick a new time. Perhaps an earlier one to avoid the lunch or dinner rush. Similar decisions can be seen in traffic. People that are tired of being in network queues on their way to work may attempt to leave earlier or (if possible) later than rush hour to decrease their own travel time. This typically works well until all the other drivers figure out the same thing and shift congestion to a different time. To minimize wait time at a queue on the road, some places allow lane filtering and even lane splitting under certain circumstances. Some other places have considered these unsuccessfully.

""There is evidence (Hurt, 1981) that traveling between lanes of stopped or slow-moving cars (i.e., lane splitting) on multiple-lane roads (such as interstate highways) slightly reduces crash frequency compared with staying within the lane and moving with other traffic.""

Sample Problem 1 : Queueing at a Tollbooth
Problem (Solution)

Sample Problem 2 : Queueing at a Ramp Meter
Problem (Solution)

Sample Problem 3 : Queueing at a Ramp Meter
Problem (Solution)

Variables

 * A(t) = λ - Arrival Rate
 * D(t) = μ - Departure Rate
 * 1/μ - service time
 * ρ = λ/ μ - Utilization
 * Q - average queue size including customers currently being served (in number of units)
 * w - average wait time
 * t - average delay time (queue time + service time)

Key Terms

 * Queueing theory
 * Cumulative input-output diagram (Newell diagram)
 * average queue length
 * average waiting time
 * average total delay time in system
 * arrival rate, departure rate
 * undersaturated, oversaturated
 * D/D/1, M/D/1, M/M/1
 * Channels
 * Poisson distribution,
 * service rate
 * finite (capacitated) queues, infinite (uncapacitated) queues

External Exercises
The assignment seeks to provide students with the opportunity to gain a better understanding of two queuing theories: M/D/1 and M/M/1. Two preformatted spreadsheets have been made available for assistance in computing the values sought after in this exercise. While these spreadsheets provide the computations for these results, the formula is listed below for reference:

$$WT_q = (\frac)(\frac)\frac \,\!$$

Where:
 * $$WT_q\,\!$$: Average customer delay in the queue
 * $$C_\lambda\,\!$$: Coefficient of variation (CV) of the arrival distribution
 * $$C_\mu\,\!$$: Coefficient of variation of the departure distribution
 * $$CV\,\!$$: Standard deviation/mean; CV = (1/SqRt (mean)) for Poisson process and CV = 0 for constant distribution
 * $$\mu\,\!$$: Average departure rate
 * $$\lambda\,\!$$: Average arrival rate
 * $$\rho\,\!$$: Utilization = Arrival rate/service rate $$(\rho = \lambda / \mu)\,\!$$

M/D/1 Queueing

Download the file for M/D/1 Queueing from the University of Minnesota's STREET website: M/D/1 Queue Spreadsheet

With this spreadsheet, run 5 simulations for each of the 10 scenarios, using the arrival and departure information listed in the table below. In other words, program the same data into the spreadsheet 5 different times to capture a changing seed and, thus, produce slightly different answers because of the model's sensitivity. A total of 50 simulations will be run.

Also, find the utilization for all ten scenarios. Based on the utilization and the distribution variability, use the above equation to compute the average delays for all scenarios with utilization values of less than 1.

Finally, summarize the average-delays obtained both from the simulation and from the WTq equation in the same delay-utilization plot. Interpret your results. How does the average user delay change as utilization increases? Does the above equation provide a satisfactory approximation of the average delays?

M/M/1 Queueing

Download the file for M/M/1 Queueing from the University of Minnesota's STREET website: M/M/1 Queue Spreadsheet

With this spreadsheet, run 5 simulations for each of the 10 scenarios, using the arrival and departure information listed in the table below. In other words, program the same data into the spreadsheet 5 different times to capture a changing seed and, thus, produce slightly different answers because of the model's sensitivity. A total of 50 simulations will be run.

Again, you need to use five different random seeds for each scenario. Summarize the results in a delay-utilization plot. Interpret your results (You do NOT need to use the WTq equation given above to compute delays for the M/M/1 queue).

Additional Questions


 * Finally compare the M/M/1 queue and the M/D/1 queue. What conclusion can you draw? (For the same average arrival rate, do users experience the same delays in the two queuing systems? Why or why not?).
 * Provide a brief example where M/M/1 might be the appropriate model to use.
 * Provide a brief example where M/D/1 might be the appropriate model to use.

Additional Questions

 * Additional Questions
 * Homework

Videos

 * Introduction to Queueing
 * Deterministic Queues
 * The Rock Funnel Experiment
 * Stochastic Queues
 * Stochastic Queueing - Probabilistic Distributions
 * Queueing - Tollbooth Example