This action might not be possible to undo. Are you sure you want to continue?

Sanja Lazarova-Molnar

Purpose

To present several examples of simulations that can be performed by devising a simulation table either manually or with a spreadsheet. To provide insight into the methodology of discrete-system simulation and the descriptive statistics used for predicting system performance.

2

3 .Outline The simulations are carried out by following steps: ± Determine the input characteristics. reliability and network analysis. inventory. and calculate the value of the response yi. Simulation examples are in queueing. ± Construct a simulation table. ± For each repetition i. generate a value for each input. evaluate the function.

nature of arrivals.Simulation of Queueing Systems A queueing system is described by its calling population. 4 . once they join the waiting line. system capacity and the queueing discipline In a single-channel queue: ± The calling population is infinite. Key concepts: ± The system state is the number of units in the system and the status of the server (busy or idle).. service mechanism. they are eventually served.g. ± The simulation clock is used to track simulated time. arrival and departure events. Arrivals and services are defined by the distribution of the time between arrivals and service times. e. ± An event is a set of circumstances that causes an instantaneous change in the system state. ± Arrivals for service occur one at a time in a random fashion.

next week ± Simulation packages and spreadsheets. The randomness needed to imitate real life is made possible through the use of random numbers. they can be generated using: ± Linear congruential method. 5 . (this chapter simplifies the simulation by tracking each unit explicitly.Simulation of Queueing Systems Event list: to help determine what happens next.) ± Events usually occur at random times. ± Tracks the future times at which different types of events occur.

2. ± Assume the only possible service times are 1. Input generated: Customer 1 2 3 4 5 6 Interarrival Time 2 4 1 2 6 Arrival Time on Clock 0 2 6 7 9 15 The 1st customer is assumed to arrive at clock time 0.Simulation of Queueing Systems Single-channel queue illustration: ± Assume that the times between arrivals were generated by rolling a die 5 times and recording the up face.3 and 4 time units and they are are equally likely to occur. Input generated: Customer 1 2 3 Service Time 2 1 3 Customer 4 5 6 Service Time 2 1 4 6 . 2nd customer arrives two time units later (at clock time 2). and so on.

by chronological ordering of events: Event Type Arrival Departure Arrival Departure Arrival Arrival Departure Arrival Departure Departure Arrival Departure Customer Number 1 1 2 2 3 4 3 5 4 5 6 6 Clock Time 0 2 2 3 4 7 9 9 11 12 15 19 7 .Simulation of Queueing Systems ± Resulting simulation table emphasizing clock times: Customer Number Arrival Time (clock) Time Service Begins (Clock) Service Time (Duration) Time Service Ends (clock) 1 2 3 4 5 6 0 2 6 7 9 15 0 2 6 9 11 15 2 1 3 2 1 4 2 3 9 11 12 19 ± Another presentation method.

Simulation of Queueing Systems Grocery store example: with only one checkout counter.125 0.000 ± The service times vary from 1 to 6 minutes.625 0.375 0.125 0.300 0.250 0.125 0.125 Cumulative Probability 0.000 8 .125 0.20 0.125 0.875 1.750 0. ± Customers arrive at random times from 1 to 8 minutes apart.30 0.10 0.850 0.500 0.125 0. with equal probability of occurrence: Time between Arrivals (minutes) 1 2 3 4 5 6 7 8 Probability 0.05 Cumulative Probability 0.125 0.600 0.100 0. with probabilities: Time between Arrivals (minutes) 1 2 3 4 5 6 Probability 0.125 0.10 0.25 0.950 1.

± Chosen for illustration purpose. in actuality. ± Initial conditions are overlooked to keep calculations simple. A set of uniformly distributed random numbers is needed to generate the arrivals at the checkout counter: ± Should be uniformly distributed between 0 and 1. 9 . 100 customers is too small a sample size to draw any reliable conclusions.Grocery Store Example [Simulation of Queueing Systems] To analyze the system by simulating arrival and service of 100 customers. ± Successive random numbers are independent.

Grocery Store Example [Simulation of Queueing Systems] Generated time-between-arrivals: Cus 1 2 3 4 5 6 « 100 er erarrival i es 1 1 6 3 7 « 4 i utes Service times are also random-generated: Customer 1 2 3 4 5 6 « 100 ervice imes mi utes 4 2 5 4 1 5 « 2 10 .

with columns added to answer questions posed: 2nd customer was in the system for 5 minutes. i Int i l ( in) 1 1 6 3 7 « 5 415 i A i l i ( lo ) 0 1 2 8 11 18 « 415 i i ( in) 4 2 5 4 1 5 « 2 317 B ( lo ) 0 4 5 11 15 18 « 416 i in W iting i in Qu u ( in) 0 3 4 3 4 0 « 1 174 i i End ( lo ) 4 6 11 15 16 23 « 418 i u to Idl ti p nd in of y t ( in) ( in) 4 5 0 9 0 7 0 5 0 5 2 « « 3 491 0 Cu to 1 2 3 4 5 6 « 100 ot l Ser ice co ld not begin until time 4 (ser er was busy until that time) Ser ice ends at time 16. Hence. Simulation tables are designed for the problem at hand. ser er was idle for 2 minutes 11 . but the 6th customer did not arri al until time 18.Grocery Store Example [Simulation of Queueing Systems] For manual simulation.

the average waiting time is not excessive.5 at www.Grocery Store Example [Simulation of Queueing Systems] Tentative inferences: ± About half of the customers have to wait. however. Longer simulation would increase the accuracy of findings. Note: The entire table can be generated using the Excel spreadsheet for Example 2.bcnn. ± The server does not have an undue amount of idle time.net 12 .

2) 3(0.Grocery Store Example [Simulation of Queueing Systems] Key findings from the simulation table: total time wait in queue (min) 174 ! ! 1.1) 2(0.24 idle server total run time of simulation (min) 418 Hence : Probability of busy server ! 1 .1) 6(0.19 min Times (min) number of arrivals 1 99 Check : Expected interarrival time ! (1 8) / 2 ! 3.24 ! 0.3 ! 4(0.46 total number of customers 100 Probability of total idle time of server (min) 101 ! ! ! 0.05) ! 3.17 min time (min) total number of customers 100 Check : Expected service time ! ! 1(0.2 min Average interarrival sum of all interarrival times (min) 415 ! ! ! 4.0.2 min 13 .25) 5(0.76 ! Average waiting Average service total service time (min) 317 ! ! 3.74 min time (min) total number of customers 100 numbers of customers who wait 46 Probability(wait) ! ! ! 0.

± ± ± ± Two support staff: Able and Baker (multiple support channel). 100 is chosen for purposes of illustration. A simplifying rule: Able gets the call if both staff are idle. 14 .Able-Baker Call Center Example [Simulation of Queueing Systems] A computer technical support center with two personnel taking calls and provide service. ± A simulation of the first 100 callers are made More callers would yield more reliable results. Random variable: Arrival time between calls Service times (different distributions for Able and Baker). Goal: to find how well the current arrangement works.

bcnn. ± In the first spreadsheet.Able-Baker Call Center Example [Simulation of Queueing Systems] The steps of simulation are implemented in a spreadsheet available on the website (www.net). we found the result from the trial: 62% of the callers had no delay 12% had a delay of one or two minutes. 15 .

we run an experiment with 400 trials (each consisting of the simulation of 100 callers) and found the following: 19% of the average delays are longer than two minutes. 16 .75% are longer than 3 minutes. Only 2.Able-Baker Call Center Example [Simulation of Queueing Systems] ± In the second spreadsheet.

± Demand is shown to be uniform over time. an order quantity. N) inventory system: ± Periodic review of length. is placed. However. ± At the end of the ith review period. at which time the inventory level is checked. in general. an (M. demands are not usually known with certainty. Qi. 17 .Simulation of Inventory Systems A simple inventory system. N. ± An order is made to bring the inventory up to the level M.

Not fulfilling order has shortage cost.Simulation of Inventory Systems A simple inventory system (cont. 18 . Carrying stock in inventory has associated cost. Purchase/replenishment has order cost.): ± Total cost (or profit) of an inventory system is the performance measure.

± Newspaper can be purchased in bundles of 10 (can only buy 10. 50. 60 ) ± Random Variables: Types of newsdays. Demand.Simulation of Inventory Systems The News Dealer s Example: A classical inventory problem concerns the purchase and sale of newspapers. ± Newspaper not sold at the end of the day are sold as scrap for 5 cents each. Profits = (revenue from sales) (cost of newspaper) (lost profit from excess demand) + (salvage from sale of scrap papers) 19 . ± News stand buys papers for 33 cents each and sells them for 50 cents each. 20.

23 0.82 0. poor .00 1.45 0. 4 1.10 0.88 0.20.45 and 0. with probabilities of 0.80 1.00 Fair 0. respectively.00 1.35 0.35 0. 8 0.00 Poor 0. 1.43 0.44 0. Type of Newsday Good F ir Poor Probability 0. 0.00 1. 3 1.00 Demand and the random digit assignment is as follow: Cumulative Distribution Demand 40 50 0 0 80 0 100 Good 0. 0.03 0.28 0. 8 0.08 0.00 20 . fair .20 Cumulative Probability 0.35.News Dealer s Example [Simulation of Inventory Systems] Three types of newsdays: good .

21 .g. purchase 70 newspaper The policy is changed to other values and the simulation is repeated until the best value is found. e.News Dealer s Example [Simulation of Inventory Systems] Simulate the demands for papers over 20-day time period to determine the total profit under a certain policy.

90 $10.20 $10.20 $11.90 $2.00 $35.00 $35.News Dealer s Example [Simulation of Inventory Systems] From the manual solution ± The simulation table for the decision to purchase 70 newspapers is: Da 1 2 3 4 5 Rando Nu be fo Newsda 58 17 21 45 43 e of Newsda Fa G G Fa Fa Rando Nu be fo De and 93 63 31 19 91 De and 80 80 70 50 80 Lost P of t a age fo Re enue xcess f o ae fo of c a a es de and Da $35.00 $1.00 $20.20 -$1.00 $600.00 P of t $10.00 $1.70 $1.00 $10.00 $25.70 $17.70 $1.50 $10.60 $131.00 $35.70 $1.00 $1.90 22 .20 19 20 18 98 G P 44 13 ota 80 40 $35.

23 .61. ± Only 45 of the 400 results in a total profit of more than $160.News Dealer s Example [Simulation of Inventory Systems] From Excel: running the simulation for 400 trials (each for 20 days) ± Average total profit = $137.

00. ± Notice that the results vary quite a bit in the profit frequency graph and in the total profit. On the One Trial sheet in Excel spreadsheet ± Observe the results by clicking the button Generate New Trail. But the result for a one-day simulation could have been the minimum value or the maximum value. 24 . it is useful to conduct many trials. Hence. $137.News Dealer s Example [Simulation of Inventory Systems] The manual solution had a profit of $131. not far from the average over 400 days.61.

25 .(Ending inventory) + (Shortage quantity) ± Random variables: Number of refrigerators ordered each day. Order quantity = (Order-up-to level) . Lead time: the number of days after the order is placed with the supplier before its arrival.Order-Up-To Level Inventory Example [Simulation of Inventory Systems] A company sells refrigerators with an inventory system that: ± Review the inventory situation after a fixed number of days (say N) and order up to a level (say M).

number of repairman to hire. time to service. 26 . ± Possible random variables: time to failure.g. ± Possible decision variables: number of bombs to drop for a certain level of damage. Random normal numbers: ± e. a bomber problem where the point of impact is normally distributed around the aim point. ± Possible decision variables: decide strategy of repair verses replace.Other Examples of Simulation Reliability problem: ± A machine with different failure types of which repairman is called to install or repair the part.

others can be done in parallel. Project simulation: ± A project can be represented as a network of activities: some activities must be carried out sequentially.Other Examples of Simulation Lead-time demand: ± Lead time is the random variable: the time from placement of an order until the order is received. number of workers to hire. ± Other possible random variable: demand. ± Possible decision variables: how much and how often to order. ± Possible random variables: times to complete the activities. ± Possible decision variables: sequencing of activities. 27 .

and motivated the remaining lectures. 28 . and resulting responses were analyzed. there is an increased opportunity for greater variation.Summary Introduced simulation concepts by means of examples. illustrated general areas of application. Ad-hoc simulation tables were used: ± Events in tables were generated by using uniformly distributed random numbers. ± As the number of replications increases. ± Ad-hoc simulation table may fail due to system complexities. Key takeaways: ± A simulation is a statistical experiment and results have variation.

- Introduction DES2
- Lecture05 General Principles
- Simulation Notes
- System Modelling and Simulation
- 13564507-Introductory-Operations-Management-Chapter-12-Inventory-Management-Part-A
- 0905
- IE4115_TutorialLab
- Modello Buone Pratiche Italiane Euclides HAVE PHUN
- Teaching Strategies
- 1676
- Main Shaft Study 1 1
- Hyperform & Mfs
- Natural Gas Simulation & Troubleshooting
- The Study of Rare Event Systems’ Behavior Using Simulation
- Inventory Management
- CATIA - Human Builder & Simulation
- Aggregate Planning
- Inventory Control Techniques
- Xinfeng Liu et al- Turbulent Mixing with Physical Mass Diffusion
- Human Mobility Patterns Modelling Using CDRs
- Inventory Management
- Shanghai General Motors
- Trb03 Microscopic Simulation Cal Val
- 10.1.1.106
- Review of probability theory
- 17-EE5139R-ProblemSet-2.pdf
- 2324 Proceedings 2004 SDM45-NESSUS-paper
- CAE Presentation
- Good Practice in Simulation
- icslit

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd