Queuing or Waiting Line Models
Introduzione La Teoria delle Code si propone di sviluppare modelli per lo studio dei fenomeni d’attesa in presenza di una domanda di un servizio. Quando la domanda e/o la capacità di erogazione del servizio sono aleatori, si verificano situazioni in cui chi fornisce il servizio non ha la possibilità di soddisfare immediatamente le richieste.
Il Sistema e le Componenti Un sistema coda è un sistema composto da servitori, capaci di fornire un servizio, e da clienti da servire. I clienti che non trovano un servitore libero al loro arrivo si dispongono in coda in aree di attesa (buffer), e vengono serviti con determinate discipline di servizio. La coda è costituita essenzialmente da due processi stocastici: il processo d'arrivo dei clienti e il processo di servizio.
Characteristics Queuing theory is the study of waiting lines. Four characteristics of a queuing system are: the manner in which customers arrive the time required for service the priority determining the order of service the number and configuration of servers in the system.
Coda con un Servitore
Coda con On-Off service Ciclo di carico di una nave fino al posizionamento della successiva di C ore, una fase di carico di V ore e una fase per la partenza e il posizionamento della nuova di R ore. Si assume che R + V = C; i veicoli con i container arrivano al tasso l costante; gli arrivi in un ciclo lC < mV dove m è il tasso di carico.
Il Ciclo N L’area grigia è il ritardo totale W l n’ numero di veicoli serviti in un ciclo n numero di veicoli ritardati l n’ n m R V t C
( ) Osservazioni C λ μ μR 2 1 n' W w - = Il numero di veicoli ritardati n = R/(l-1 - m-1) n < n’ = lC L’area grigia è W = nR/2 = 1/2lmR2/(l - m) Il ritardo medio a regime per veicolo è ( ) C λ μ μR 2 1 n' W w - = Il ritardo medio dei veicoli ritardati è R/2.
Single Channel Queue Queuing System Server Departures Arrivals Waiting line (queue)
Multiple Channel Queue Queuing System Server 1 Departures Server 2 Arrivals Waiting line (queue) Server 3
Structure In general, the arrival of customers into the system is a random event. Frequently the arrival pattern is modeled as a Poisson process. Service time is also usually a random variable. A distribution commonly used to describe service time is the exponential distribution. The most common queue discipline is first come, first served (FCFS).
Classification A three part code of the form A/B/s is used to describe various queuing systems. A identifies the arrival distribution B the service (departure) distribution s the number of servers. Used symbols are: M Markov distributions (Poisson/exponential) D Deterministic (constant) G General distribution (with a known mean, variance).
Example M/M/k refers to a system in which arrivals occur according to a Poisson distribution, service times follow an exponential distribution and there are k servers working at identical service rates.
Input Characteristics l average arrival rate 1/l average time between arrivals µ average service rate for each server 1/µ average service time s standard deviation of the service time
Poisson Arrival Process If the average arrival rate is l customers per time unit, then probability of x arrivals per time unit is given by:
Example Example: Suppose that customers arrive at the rate of l = 8 customers per hour. The probability that in a given one hour period there will be exactly six arrivals is:
Exponential Service Times If the average service time is 1/µ time units (that is, the average service rate is µ customers per time unit), the probability that the service time will be less than or equal to t time units is:
Example If the average service time 1/µ = 6 minute (1/10 hour), then µ = 10 customers per hour. The probability that the service time is less than or equal 5 minutes (1/12 hours) is:
Operating Characteristics P0 = probability the service facility is idle Lq = average number of units in the queue awaiting service L = average number of units in the system Wq = average time a unit spends in the queue awaiting service W = average time a unit spends in the system
Analytical Formulas When the queue discipline is FCFS, analytical formulas have been derived for several different queuing models including the following: M/D/1 M/M/1, M/M/k, M/G/1, M/G/k with blocked customers cleared, and M/M/1 with a finite calling population. Analytical formulas are not available for all possible queuing systems. In this event, insights may be gained through a simulation of the system.
M/D/1 System Average number of people or units waiting for service Average time a person or unit spends in the queue Average number of people or units in the system Average time a unit spends in the system ( ) l - m 2 = q L ( ) l - m 2 = q W l m + = q s L m 1 + = q s W
M/M/1 System Average number of people or units waiting for service Average time a person or unit spends in the queue Average number of people or units in the system Average time a unit spends in the system
M/M/k System P0 = probability the service facility is idle Average number of people or units waiting for service Average time a person or unit spends in the queue Average number of people or units in the system Average time a unit spends in the system