WAITING LINES AND SIMULATION

advertisement
WAITING LINES AND
SIMULATION
•
I. WAITING LINES (QUEUEING) :
•
II. SIMULATION
WAITING LINES
•
•
•
•
I. Length of line: number of people in queue
II. Time waiting in line
III. Efficiency: waiting vs idle server
IV. Cost of waiting
I.
WAITING LINES
• ASSUMTIONS
• 1) FIRST COME FIRST SERVE
• 2) ARRIVALS COME FROM VERY
LARGE POPULATION
• 3) NUMBER OF ARRIVALS IS POISSON
• 4) SERVICE TIME IS EXPONENTIAL
• 5) ARRIVALS INDEPENDENT
APPLICATIONS
•
•
•
•
•
BANK TELLER LINE, CAR WASH
INTERNET: CABLE VS PHONE LINE
WAITING FOR CABLE GUY
METERED FREEWAY ON RAMPS
WAREHOUSE: ORDERS WAIT TO BE
SHIPPED
• AIRPLANES WAITING TO LAND
  av# arrivals
  av# served
EXAMPLE: AUTO REPAIR
• ONE MECHANIC
• MAY NOT BE POISSON IF CUSTOMERS
ARE CLUSTERED EARLY MORNING
OR AFTER WORK
• MAY NEED TO USE SIMULATION
LATER
  2cars / hr
  3cars / hr
L=Average Length
• ALL customers in system
• Waiting AND being served
L

 
2

2
3 2
Lq=Average Length of queue
• Customers waiting in line
• Number waiting to be served

Lq 
 (   )
2
2
2
Lq 
 1.3
3(3  2)
W=Av Time customer in system
• From arrival time to departure time
• Time waiting and being served
1
W
 
1
W
 1hr
3 2
Wq=Av time customer waits in
queue
•
•
•
•
•
Waiting to be served
Marketing, Service operations management
Customers may go to competitor if Wq big
Exception: lowest price(trade off)
Car dealer: Wq=0

Wq 
 (   )
2
Wq 
 .67hr
3(3  2)
Interpret Wq
• Wq=40 minutes waiting in line
• W=60 minutes in system
• 20 minutes being served
U=Utilization
• U=efficiency
• Probability server is busy
• Probability customer has to wait

U

U=2/3
67% efficiency
Po=P(zero customers in system)
•
•
•
•
Po=1-U
P(server is idle)
P(customer does not have to wait)
Here: Po = .33
COST OF WAITING
SUPPOSE EACH HOUR A
CUSTOMER WAITS COSTS $10
INTANGIBLE COST
• NOT ACCOUNTING COST
• MARKETING ESTIMATE
• USED FOR DECISION MAKING
SUPPOSE MECHANIC
RESIGNS
• TWO ALTERNATIVE ACTIONS
• ACT 1: MECHANIC #1,
$17/HR LABOR COST, 3 CARS/HR
• ACT 2: MECHANIC #2,
$19/HR, 4 CARS/HR
• 8 HRS/DAY
MINIMIZE TOTAL COST
• TOTAL COST =
WAITING COST + LABOR COST
• LABOR COST = (8)(COST/HR)
• WAIT COST = (#HRS WAITING)($10)
• AVERAGE #CARS ARRIVE/HR= 2
• TOTAL #CARS/DAY = 8(2)=16

Wq 
 (   )
MECHANIC #1
3 CARS/HOUR
2
Wq 
 .67hr
3(3  2)
MECHANIC #2
• 4 CARS/HOUR
2
Wq 
 .25
4(4  2)
WAIT COST
MECHANIC#1 MECHANIC#2
#SERVED/HR
3
4
WAIT TIME
.67 HR
.25 HR
DAILY WAIT
TIME
WAIT COST
.67(16)=
.25(16)= 4HR
10.67HR
10.67(10)=$107 4(10)=$40
LABOR COST
MECHANIC#1 MECHANIC#2
HOURLY
WAGE
$17/HR
DAILY LABOR 8(17)=$136
COST
$19/HR
8(19)=$152
Total cost
MECHANIC#1 MECHANIC#2
WAIT COST
$107
$40
LABOR COST
$136
$152
TOTAL COST
$243
$192=MIN
HIRE SECOND MECHANIC?
SIMILAR TABLE:
SERVERS VS 1 SERVER
2
II. SIMULATION
• DEFINE PROBLEM
• DEFINE VARIABLES
• BUILD MODEL: IMITATE BEHAVIOR
OF REAL WORLD
• LIST ALTERNATIVE ACTIONS
• RANDOM NUMBERS
• CHOOSE BEST ALTERNATIVE
MONTE CARLO SIMULATION
•
•
•
•
ADVANTAGES
Flexibility
Probabilities:
Client understands
model
• Familiar simulations:
dice, board games,
video games, flight
simulator
• DISADVANTAGES
• No mathematical
optimization (LP
guarantees optimum)
• Trial and error
• Might not try best
action
EXAMPLES
• APOLLO 13 EMERGENCY RETURN
• WEATHER FORECAST
• SUGAR PLANTATION DECISION
WHICH FIELD TO BURN
EXAMPLE: WAIT LINE
• PREVIOUS
SECTION
• RESTRICTIVE
ASSUMPTIONS
• EXACT FORMULAS
• SIMULATION
• NO RESTRICTIVE
ASSUMPTIONS
• ONLY
APPROXIMATIONS
EXAMPLE: WAIT LINE
•
•
•
•
•
•
REFERENCE: RENDER, BARRY
QUANTITATIVE ANALYSIS, P 708
BARGES ARRIVE AT PORT
BARGES UNLOADED IN PORT
OBJECTIVE: MINIMIZE DELAY
FCFS:FIRST COME FIRST SERVED
GIVEN: PROBABILITY
DISTRIBUTIONS
• X1= NUMBER OF BARGES ARRIVING
AT PORT
• X2= MAXIMUM NUMBER OF BARGES
UNLOADED IN PORT
ARRIVALS
X1
P(X1)
O
.13
1
.17
2
.15
3
.25
4
.20
5
.10
STEP1:CUMULATIVE PROB
X1
P(X1)
P(X1<x)
O
.13
.13
P(X1<0)
1
.17
.30
P(X1<1)
2
.15
.45
P(X1<2)
3
.25
.70
4
.20
.90
5
.10
1
STEP 2: RANDOM NUMBER
INTERVALS
X1
P(X1)
P(X<x)
X1 RN
O
.13
.13
P(X1<0) 01 to 13
1
.17
.30
P(X1<1) 14 to 30
2
.15
.45
P(X2<2) 31 to 45
3
.25
.70
46 to 70
4
.20
.90
71 to 90
5
.10
1
91 to 00
STEP 3: SIMULATE
ARRIVALS
DAY
1
X1 RN
(GIVEN)
06
SIMULATED
ARRIVALS
0
2
50
3
3
88
4
4
53
3
MAX UNLOADED
X2
1
P(X2);
GIVEN
.05
2
.15
3
.50
4
.20
5
.10
STEP 4: CUMULATIVE PROB
X2
P(X2)
P(X2<x)
1
.05
.05
2
.15
.20
3
.50
.70
4
.20
.90
5
.10
1
STEP 5: RANDOM NUMBER
INTERVALS
X2
P(X2)
P(X2<x)
X2 RN
1
.05
.05
01 to 05
2
.15
.20
06 to 20
3
.50
.70
21 to 70
4
.20
.90
71 to 90
5
.10
1
91 to 00
STEP 6: SIMULATE
UNLOADING
DAY
X2 RN
(GIVEN)
1
63
SIMULATED
MAXIMUM
UNLOADED
3
2
28
3
3
02
1
4
74
4
UNLOADED=MIN(3),(4)
(1)#DELAYED
0
(2)
ARRIV
0
(3)
TOTAL
0
0
3
3
0
4
4
4-1=3
3
3+3=6
(4)MAX UNLOA
UNL
DED
3
MIN(0,3
=0
3
MIN(3,3
=3
1
MIN(4,1
=1
4
MIN(6,4
=4
AVERAGE NUMBER
DELAYED
• AV = TOTAL DELAYED
=
TOTAL NUMBER DAYS
= ¾ = 0.75
• REAL-WORLD: WOULD RE-DO
SIMULATION WITH MORE WORKERS
TO UNLOAD BARGES TO RECALCULATE AV
Download