download

Matakuliah
Tahun
Versi
: H0332/Simulasi dan Permodelan
: 2005
: 1/1
Pertemuan #6
Queuing Systems (OFC)
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa dapat merancangkan model
antrian (C5)
2
Outline Materi
• Queuing System
• Inventory System
3
1. Queueing System
• Queueing Model
Arrival
Departure
• Queueing Model with Separate “Enter Service” Event
Arrival
Enter
Service
Departure
4
1. Queueing System (cont.)
• Queueing Model with Fixed Run Length
Arrival
Departure
End
Simulation
5
2. Inventory System
• Inventory Model
Order
Arrival
Demand
Evaluated
End
Simulation
6
2. Inventory System (cont.)
• Order Arrival Routine
Order-Arrival
Event
Increment the inventory
level by the amount
previously ordered
Increment the inventory
level by the amount
previously ordered
Return
7
2. Inventory System (cont.)
Demand Event
• Demand Routine
Generate the size
of this demand
Decrement the inventory
level by this demand size
Schedule the next
demand event
Return
8
Demand Event
2. Inventory System (cont.)
Is I(t) < s ?
• Inventory-Evaluation Routine
Determine amount to be
ordered [ S - I(t) ]
Incur ordering cost and
gather satistics
Schedule order-arrival
event for this order
Schedule the next
inventory-evaluation event
Return
9
2. Inventory System (cont.)
• Update The Continuous-Time Statistical Accumulators
Update time-average
statistical accumulators
Negative
Update area under I-(t)
Was I(t)
during the previous
interval negative, zero,
or positive ?
Zero
Positive
Update area under I+(t)
Return
10
2. Control for The Next-Event Time-Advance
Approach
Start
Initialization Routine
Main Program
(0)
1. Set simulation clock = 0
2. Initialize system state and
statistical counters
3. Initialize event list
Timing Routine
0. Invoke the initialization routine
(1)
1. Invoke the timing routine
2. Invoke event routine i
i
1. Determine the next
event type, say I
2. Advance the simulation clock
(2)
Event Routine i
Library Routine
1. Update system state
2. Update statistical counters
3. Generate future event and
add to event list
1. Determine the next
event type, say I
2. Advance the simulation clock
No
Is simulation over ?
Yes
Report Generator
1. Compute estimates of interest
2. Write report
Stop
11