Simulating Single server queuing models Simulating Single server
- Slides: 17
Simulating Single server queuing models
Simulating Single server queuing models • Consider the following sequence of activities that each customer undergoes: 1. Customer arrives 2. Customer waits for service if the server is busy. 3. Customer receives service. 4. Customer departs the system.
Example • Arrival rate (l =15) customers per hour • Service time = 3 minutes (service rate (m= 20) customer per hour Arrival and Service times are exponentially distributed Note: the generation of Exponential Random Variable is: – Generate uniform [0, 1] RN: RAND() – Return X = -1/l * ln(RAND())
Analytical Solutions • Analytical solutions for W, L, Wq, Lq exist (see Lecture 05) • However, analytical solution exist at infinity which cannot be reached. • Therefore, Simulation is a most.
Flowchart of an arrival event An Arrival Idle Busy Status of Server Customer enters service Customer joins queue More
Flowchart of a Departure event A Departure NO Queue Empty ? Remove customer from Queue and begin service Yes Set system status to idle More
An example of a hand simulation • Consider the following IAT’s and ST’s: • A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4, A 9=1. 9, … • S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6 • Want: Average delay in queue • Utilization
Initialization Time = 0 System state Server 0 Clock 0 Server status system 0 # in que Times of Arrival 0. 4 A D 999 Eventlist 0 Time 0 0 Of Last Number Total event delayed delay 0 Area Under Q(t) Statistical Counters 0 Area Under B(t)
Arrival Time = 0. 4 System state 0. 4 Clock 0. 4 system 1 Server status 0 # in que Times of Arrival A 1. 6 D 2. 4 Eventlist 0. 4 Time 1 0 Of Last Number Total event delayed delay 0 Area Under Q(t) Statistical Counters 0 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Arrival Time = 1. 6 System state 1. 6 Clock 0. 4 1 1. 6 system Server status 1 # in que Times of Arrival A 2. 1 D 2. 4 Eventlist 1. 6 Time 0 1 Of Last Number Total event delayed delay 0 Area Under Q(t) Statistical Counters 1. 2 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Arrival Time = 2. 1 System state 1. 6 2. 1 0. 4 1 1. 6 2. 1 System 2. 1 Clock Server status 2 # in que Times of Arrival A 3. 8 D 2. 4 Eventlist 2. 1 Time 0 1 Of Last Number Total event delayed delay 0. 5 Area Under Q(t) Statistical Counters 1. 7 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 2. 4 System state 2. 1 2. 4 Clock 1. 6 1 2. 1 System Server status 1 # in que Times of Arrival A 3. 8 D 3. 1 Eventlist 2. 4 Time 2 0. 8 Of Last Number Total event delayed delay 1. 1 Area Under Q(t) Statistical Counters 2. 0 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 3. 1 System state 3. 1 Clock 2. 1 1 Server status System 0 # in que Times of Arrival A 3. 8 D 3. 3 Eventlist 3. 1 Time 3 1. 8 Of Last Number Total event delayed delay 1. 8 Area Under Q(t) Statistical Counters 2. 7 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 3. 1 System state 3. 3 Clock 0 Server status System 0 # in que Times of Arrival A 3. 8 D 999. Eventlist 3. 3 Time 3 1. 8 Of Last Number Total event delayed delay 1. 8 Area Under Q(t) Statistical Counters 2. 9 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 3. 1 System state 3. 8 Clock 3. 8 1 Server status System 0 # in que Times of Arrival A 4. 0 D 4. 9 Eventlist 3. 8 Time 4 1. 8 Of Last Number Total event delayed delay 1. 8 Area Under Q(t) Statistical Counters 2. 9 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 3. 1 System state 4. 0 3. 8 4. 0 System 1 Server status 1 # in que Times of Arrival 4. 0 Clock A 5. 6 D 4. 9 Eventlist 4. 0 Time 4 1. 8 Of Last Number Total event delayed delay 1. 8 Area Under Q(t) Statistical Counters 3. 1 Area Under B(t) A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
Departure Time = 3. 1 System state 4. 9 Clock 4. 0 1 Server status System 0 # in que Times of Arrival A 5. 6 D 8. 6 Eventlist 4. 9 Time 5 2. 7 Of Last Number Total event delayed delay 2. 7 4. 0 Area Under Q(t) B(t) Statistical Counters A 1=0. 4, A 2=1. 2, A 3=0. 5, A 4=1. 7, A 5=0. 2, A 6=1. 6, A 7=0. 2, A 8=1. 4 S 1=2. 0, S 2=0. 7, S 3=0. 2, S 4=1. 1, S 5=3. 7, S 6=0. 6
- Queuing models
- Late post mortem changes
- Conditions simulating rigor mortis
- Closed queuing network
- Multi channel queuing model
- Priority queuing
- Queuing theory
- Rtt
- Queuing delay
- Queuing theory formula
- Fair queuing
- Queuing theory
- Priority queuing
- Queuing theory and waiting line model
- Constant service time model
- Queuing theory formula
- Queuing process
- Caravan analogy