1 / 41

SIMULATION EXAMPLES

SIMULATION EXAMPLES. Simulation Examples. Monte-Carlo (Static) Simulation Estimating profit on a sale promotion Newsvendor Problem Estimating the value of p Approximating Integrals Dynamic System Simulation Queueing systems M/U/1 G/G/1 Inventory systems

rhian
Download Presentation

SIMULATION EXAMPLES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SIMULATIONEXAMPLES

  2. Simulation Examples • Monte-Carlo (Static) Simulation • Estimating profit on a sale promotion • Newsvendor Problem • Estimating the value of p • Approximating Integrals • Dynamic System Simulation • Queueing systems • M/U/1 • G/G/1 • Inventory systems • Periodic Review, Order-up-to-Level inventory control

  3. Estimating pvalue X, Y ~ uniform (0,1) Estimate p value by simulation 1 p/4 1 0

  4. Convergence to p

  5. Approximating Integrals Consider the integral Making the substitution we get where

  6. Approximating Integrals Let Y ~ uniform(0,1) Approximate the integral by simulation

  7. Queueing systems Entities Calling Population …… Server Waiting Line (Queue) Finite vs Infinite One server vs multiple server One line vs Multiple lines

  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) • Deterministic (D) • Erlang (E) • General (G) • Queue discipline • First Come/In First Served/Out (FCFS/FIFO) • Last Come/In First Served/Out (LCFS/LIFO) • Earliest Due Date (EDD) • System Capacity • Number of Servers

  10. Analysis Methods • Queueing Theory (Analytical) • Simulation • Performance Measures • Average Waiting Time • Maximum Waiting Time • Average Number of Entities in the System • Maximum Number of Entities in the System • Server Utilization • Average 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 L(t)=L(t)+1 Is server busy? NO YES Make server busy Increase entity number in queue B(t)=1 Q(t)=Q(t)+1 Set service time & schedule departure

  13. Service Completion Event Departure event Decrease number in system L(t)=L(t)-1 NO Is queue empty? YES Decrease number in queue Make server idle Q(t)=Q(t)-1 B(t)=0 Set service time & scheduled departure for entity in service

  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 1

  17. t = 1.73, Arrival of Part 2 2 1

  18. t = 2.90, Departure of Part 1 2

  19. t = 3.08, Arrival of Part 3 3 2

  20. t = 3.79, Arrival of Part 4 4 3 2

  21. t = 4.41, Arrival of Part 5 5 4 3 2

  22. t = 4.66, Departure of Part 2 5 4 3

  23. t = 8.05, Departure of Part 3 5 4

  24. t = 12.57, Departure of Part 4 5

  25. t = 17.03, Departure of Part 5

  26. t = 18.69, Arrival of Part 6 6

  27. t = 19.39, Arrival of Part 7 7 6

  28. t = 20.00, The End 7 6

  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 • Ordering Cost • Shortage Cost • Performance Measures • Total Cost • Total Profit

  32. Elements of Inventory Systems • Entity • Commodity • Events • Demand • Inventory Review • Order Arrival (Replenishment) Occur simultaneously when lead time is zero

  33. Elements of Inventory Systems • State Variables • Inventory level • Time to next review • Time to next replenishment • Input • Demand • Lead Times • Cost Info (holding, shortage, and ordering costs) • Inventory Policy Parameters (Decision Variables) • Output • Total Costs • Average Inventory • Number of Shortages

  34. Demand Event Demand Event D(t) Generate demand size Decrement inventory I(t) = I(t) - D(t) Schedule the next demand event

  35. Order Arrival Event Order Arrival Event I(t) = I(t) + Q Increment Inventory

  36. 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

  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 Order arrival t 1 2 3 • Question: based on 5 cycles of simulation, calculate • Average ending units in inventory • The number of days shortage condition existed • Total cost

  39. INPUT DATA 1. Demand Distribution 2. Lead Time Distribution

  40. Simulation Table

  41. Z Z M N Z1 * Z2 * N M HOW TO OPTIMIZE (M & N?) Simulation Optimization Z = objective function = f (cost, end. Inv., ...) TRY DIFFERENT M, N VALUES

More Related