Download presentation
Presentation is loading. Please wait.
Published byBaldwin Page Modified over 9 years ago
1
SIMULATION EXAMPLES
2
Monte-Carlo (Static) Simulation Estimating profit on a sale promotion Estimating profit on a sale promotion Estimating profit on a sale promotion Estimating profit on a sale promotion Newsvendor Problem Newsvendor Problem Newsvendor Problem Newsvendor Problem Estimating the value of Estimating the value of Approximating Integrals Approximating Integrals Dynamic System Simulation Queueing systems Queueing systems M/U/1 G/G/1 Inventory systems Inventory systems Periodic Review, Order-up-to-Level inventory control Simulation Examples
3
Estimating value 0 1 1 X, Y ~ uniform (0,1) Estimate value by simulation
4
Convergence to
5
Consider the integral Making the substitution we get where Approximating Integrals
6
Let Y ~ uniform(0,1) Approximate the integral by simulation Approximating Integrals
7
Queueing systems Calling Population Server …… Waiting Line (Queue) Entities Finite vs Infinite One line vs Multiple lines One server vs multiple server
8
Queueing examples System Entity Server Hospital Patient Doctor, Nurse Manufacturing Customer order Machine Food Store Purchased grocery Cashier Bank Client Clerk Computer Job CPU or disk Communication Link Data Package Data Channel
9
Characteristics Interarrival and Service Times Exponential (M) Exponential (M) Deterministic (D) Deterministic (D) Erlang (E) Erlang (E) General (G) General (G) Queue discipline First Come/In First Served/Out (FCFS/FIFO) First Come/In First Served/Out (FCFS/FIFO) Last Come/In First Served/Out (LCFS/LIFO) Last Come/In First Served/Out (LCFS/LIFO) Earliest Due Date (EDD) Earliest Due Date (EDD) System Capacity Number of Servers
10
Analysis Methods Queueing Theory (Analytical) Simulation Performance Measures Average Waiting Time Average Waiting Time Maximum Waiting Time Maximum Waiting Time Average Number of Entities in the System Average Number of Entities in the System Maximum Number of Entities in the System Maximum Number of Entities in the System Server Utilization Server Utilization Average System Time Average System Time Maximum System Time Maximum System Time
11
Events Arrival Event – entry of a unit into the system Departure Event – completion of service on a unit Failure Event – server failure Repair Event – server repair
12
Arrival Event Arrival event Schedule next arrival Increase number in the system Set service time & schedule departure Increase entity number in queue Make server busy Is server busy? NOYES L(t)=L(t)+1 Q(t)=Q(t)+1 B(t)=1
13
Service Completion Event Departure event Decrease number in system Set service time & scheduled departure for entity in service Make server idle Decrease number in queue Is queue empty? NOYES L(t)=L(t)-1 Q(t)=Q(t)-1 B(t)=0
14
Simulation by Hand Run simulation for 20 minutes to find Average Waiting Time Average Queue Length Average Utilization
15
t = 0.00, Initialize
16
t = 0.00, Arrival of Part 1 t = 0.00, Arrival of Part 1 1
17
t = 1.73, Arrival of Part 2 t = 1.73, Arrival of Part 2 12
18
t = 2.90, Departure of Part 1 2
19
t = 3.08, Arrival of Part 3 t = 3.08, Arrival of Part 3 23
20
t = 3.79, Arrival of Part 4 t = 3.79, Arrival of Part 4 234
21
t = 4.41, Arrival of Part 5 t = 4.41, Arrival of Part 5 2345
22
t = 4.66, Departure of Part 2 t = 4.66, Departure of Part 2 345
23
t = 8.05, Departure of Part 3 t = 8.05, Departure of Part 3 45
24
t = 12.57, Departure of Part 4 t = 12.57, Departure of Part 4 5
25
t = 17.03, Departure of Part 5 t = 17.03, Departure of Part 5
26
t = 18.69, Arrival of Part 6 t = 18.69, Arrival of Part 6 6
27
t = 19.39, Arrival of Part 7 t = 19.39, Arrival of Part 7 67
28
t = 20.00, The End t = 20.00, The End 67
29
Finishing Up Average waiting time in queue: Time-average number in queue: Utilization of drill press:
30
Complete Record of the Hand Simulation
31
Inventory systems When to order? How much to order? Costs Holding Cost Holding Cost Ordering Cost Ordering Cost Shortage Cost Shortage Cost Performance Measures Total Cost Total Cost Total Profit Total Profit
32
Elements of Inventory Systems Entity Commodity CommodityEvents Demand Demand Inventory Review Inventory Review Order Arrival (Replenishment) Order Arrival (Replenishment) Occur simultaneously when lead time is zero
33
Elements of Inventory Systems State Variables Inventory level Inventory level Time to next review Time to next review Time to next replenishment Time to next replenishmentInput Demand Demand Lead Times Lead Times Cost Info (holding, shortage, and ordering costs) Cost Info (holding, shortage, and ordering costs) Inventory Policy Parameters (Decision Variables) Inventory Policy Parameters (Decision Variables)Output Total Costs Total Costs Average Inventory Average Inventory Number of Shortages Number of Shortages
34
Demand Event Generate demand size Decrement inventory Schedule the next demand event I(t) = I(t) - D(t) D(t)
35
Order Arrival Event Order Arrival Event Order Arrival Event Increment Inventory I(t) = I(t) + Q
36
Inventory Review Event Inventory Review Event Inventory review event Determine Q Determine lead-time Schedule the next order arrival & review events
37
Order-Up-To-Level, Periodic Review (M,N) Policy M is fixed, N is fixed, Q varies M is fixed, N is fixed, Q varies
38
(M,N) Policy Example Review period N=5 days, Order-up-to level M=11 units Beginning inventory = 3 units 8 units scheduled to arrive in two days Holding cost h = $1 per unit per day Shortage cost s = $2 per unit per day Ordering cost K = $10 per order t 123 Order arrival Question: based on 5 cycles of simulation, calculate Average ending units in inventory Average ending units in inventory The number of days shortage condition existed The number of days shortage condition existed Total cost Total cost
39
INPUT DATA 1. Demand Distribution 2. Lead Time Distribution
40
Simulation Table
41
HOW TO OPTIMIZE (M & N?) Z N M Z = objective function = f (cost, end. Inv.,...) TRY DIFFERENT M, N VALUES ZMNZ1*Z2 *ZMNZ1*Z2 * Simulation Optimization
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.