






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Simulation Examples ( notes: textbook - Chapter 2 )
Basic Procedure for hand calculation :
Repetition # Inputs Response x 1 , x 2 ,.. ., xn y 1 2 3... t
Example 1 : A single server queue:
population
waiting line server (queue) Assumptions :
Systems Components for Example 1
Entity (item of interest)
Food for thought : In providing outcomes information for average customer queue times, if a customer arrives and the server is idle, do we log 0 time on queue? i.e., do we reflect the customer as having been in line for 0 time?
Trial Run for Example 1
Suppose arrival times occur with uniformly distributed interarrival times (times between consecutive customers) with the values 1 through 6; note that the expected value of the interarrival time is
[to be uniformly distributed, each possible interarrival time (1,2,3,4,5,6) must be equally likely, and so has the same probability (1/6)].
For stability , the expected service time must be less than the expected interarrival time.
Suppose service times uniformly distribute among 1,2,3,4 (so the expected value of the service time is 10/4 = 2.5).
Suppose 6 customers are introduced to the system, with randomly obtained interarrival times and service times (acquired randomly, say by rolling a die) as follows:
customer interarrival time service time arrival time on clock 1 - 2 0 2 2 1 2 3 4 3 6 4 1 2 7 5 2 1 9 6 6 4 15
Then the Simulation Table is as follows:
customer arrival service time service begins service ends (clock) (clock) (clock) 1 0 2 0 2 2 2 1 2 3 3 6 3 6 9 4 7 2 9 11 5 9 1 11 12 6 15 4 15 19
i i 6
6
1
6
1
Timeline of simulation:
x x x x x x x x x x 0 5 10 15 20 a(1) d(1) a(3) d(3) a(6) d(6)
a(2) d(2) a(4) d(4)
a(5) d(5)
customer is in system customer is receiving service customer is in queue
Graphical representation of the simulation:
c4 c 1 c1 c2 c3 c4 c5 c x x x x x x x x x x 0 2 3 5 6 7 9 10 11 12 15 19 20
Typical Findings from the "Simulation"
Input
Characteristics ( can be predicted
on queue
#ofcustomerswhowaited
#ofcustomers
= =
totaltime
idle time = =
#ofcustomers
total servicetime = =
#ofcustomers- 1
interarriv altimes = =
#ofcustomers
customer times = =
Simulation Statistics
Other Examples :
I. Inventory System : Every N units of time, inventory is checked, at which time an order is made to bring inventory up to level M.
inventory
Assumptions: Lead time is 0 between making and receiving an order. Demand is uniform over each N unit review interval (linear decrease). N N N time
amount Qi to order : backorder
Remarks: There are costs associated with
The model can measure performance (cost/profit) with M and N adjusted as inputs.
At the end of each period i , an order quantity Qi = M ā inventory is made.
Assumptions:
II. Vendor : A newspaper seller buys papers for 13Ā¢ and sells them for 20Ā¢. Unsold papers go for scrap at 2Ā¢. Papers are purchased in bundles of 10. There are 3 types of newsdays: "good", "fair", and "poor" with probabilities 0.35, 0.45, and 0.2. The demand distributes as follows:
Demand good day fair day poor day 40 .03 .10. 50 .05 .18. 60 .15 .40. 70 .20 .20 .12 may want to interpolate 80 .35 .08. 90 .15 .04. 100 .07 .00. 1.00 1.00 1.
Question: What is the optimal number of papers to purchase? (potential profit = revenue - cost of newspapers - lost profit from excess demand + salvage)
debatable: 7Ā¢ per copy
Procedure: Use as input the number of papers purchases - run the simulation over an extended period (say a month) to estimate the profit. Increase the purchase until a profit decrease occurs.
Simulation Procedure :
Simulate long enough for at least 12 repair events, say 20,000 hours. Then model a) the current repair tactic (bearings treated separately) b) the proposed repair tactic (or other variations) and compare the simulation outcomes.
Simulation Setup :
a) Bearing treated separately - assume no two bearings ever fail simultaneously
Bearing 1 Bearing 2 Bearing 3 life accum repair life accum repair life accum repair life delay life delay life delay
b) Bearings as a group
Bearing life hours to a failure repair 1 2 3 (min of bearing life) delay
step through 20,000 hours event to event
step through 20,000 hours event to event
IV. Bomb Dispersal : A squadron of bombers is attempting to destroy an ammunition depot shaped as follows: y 500
-500 500 x
The aiming point is (0,0), but a bomb which falls anywhere within the target is scored a hit. Assume that the bombs are normally distributed in the x direction with a standard deviation of 600 and are normally distributed in the y direction with a standard deviation of 300 (mean of the distribution is 0 in each case). Ten bombers are in a squadron, and each drops 1 bomb. How many of a squadron's bombs may we expect to hit the target in a bombing run (may also be handled analytically).
Simulation setup :
Bomber random normal x random normal y result (hit or miss) 1 2 . . . 10