OR 508 Exercises Solution PDF
OR 508 Exercises Solution PDF
OR 508 Exercises Solution PDF
CS Diploma
1
Prepared by: Youssry Hamdy-CS Diploma
Calls 0 1 2 3 4 5 6
Probability 0.05 0.12 0.15 0.25 0.22 0.15 0.6
The rescue squad classifies each emergency call into one of three categories: minor, regular, or major
emergency. The probability that a particular call will be each type of emergency is as follows:
The type of emergency call determines the size of the crew sent in response. A minor emergency requires
a two-person crew, a regular call requires a three-person crew, and a major emergency requires a five-
person crew.
Simulate the emergency calls received by the rescue squad for 10 nights, compute the average number of
each type of emergency call each night, and determine the maximum number of crew members that might
be needed on any given night.
Solution
Emergency Cumulative
Probability Random Number Range, r2
Type Probability
Minor .30 .30 1-30
2
Prepared by: Youssry Hamdy-CS Diploma
Night r1 Number of Calls r2 Emergency Type Crew Size Total per Night
71 Regular 3
18 Minor 2
1 65 4 9
12 Minor 2
17 Minor 2
2 89 Major 5
48 3 18 Minor 2 10
83 Regular 3
3 08 1 90 Major 5 5
4 05 0 0 0
5 18 Minor 2
08 Minor 2
89 5 26 Minor 2 14
47 Regular 3
94 Major 5
6 06 1 72 Regular 3 3
47 Regular 3
68 Regular 3
7 62 4 14
60 Regular 3
88 Major 5
8 17 1 36 Regular 3 3
43 Regular 3
9 77 4 28 Minor 2 10
31 Regular 3
3
Prepared by: Youssry Hamdy-CS Diploma
If all the calls came in at the same time, the maximum number of squad members required during any 1
night would be 14.
Question: 2
Burlingham Mills produces denim cloth that it sells to jeans manufacturers. It is negotiating a contract
with Troy Clothing Company to provide denim cloth on a weekly basis. Burlingham has established its
monthly available production capacity for this contract to be between 0 and 600 yards, according to the
following probability distribution:
Troy Clothing's weekly demand for denim cloth varies according to the following probability distribution:
Production is uniformly distributed variable ranges from 0 to 600, such that it needs to be converted to
discrete using the following formula:
a+r (b-a) = a=0, b=600
0+r(600-0)= 600r
Step: 2 Tabular Simulation:
Step: 3 Computations:
Average weekly capacity production: = 280 Yards per week.
Average weekly Demand: = 309.6 310 Yards per week.
Ex:
ComputerWorld Company demand data for laptops selling for $4,300 per unit over a period of 15 weeks. Simulate
the demand and compute the average demand and revenue for this company. Use the following data:
6
Prepared by: Youssry Hamdy-CS Diploma
Ex:
Harrys Company is producing vehicles tires according to the following probability distribution. Simulate
the demand for 10 days and compute average demand.
Days Rn Demand
1 52 3
2 37 3
3 82 4
4 69 4
5 98 5
6 96 5
7 33 2
8 50 3
9 88 5
10 90 5
39
Step: 3 Computa ons:
Lecture Example:
8
Prepared by: Youssry Hamdy-CS Diploma
Develop a simula on model to track the stock price of Compcomm stock and simulate for 10 days.
Indicate the new stock price at the end of the 10 days
Step: 1 Develop Random number ranges for the probability distribution for price movement:
Increase:
Stock Price
Probability Cumulative Probability Range
Change
12.50% 40 40 0-39
25% 17 57 40-56
37.50% 12 69 57-68
50% 10 79 69-78
62.50% 8 87 79-86
75% 7 94 87-93
87.50% 6 100 94-99
Decrease:
Stock Price
Probability Cumulative Probability Range
Change
12.50% 12 12 0-11
25% 15 27 12-26
37.50% 18 45 27-44
50% 21 66 45-65
9
Prepared by: Youssry Hamdy-CS Diploma
Ex: 14 page 62
A bank has one drive-in teller and room for one additional customer to wait. Customers arriving when the queue
is full park and go inside the bank to transact business. The times between arrivals and the service-time
distribution follow:
Step: 1 Develop Random number ranges for the probability distribution for time between arrivals:
10
Prepared by: Youssry Hamdy-CS Diploma
Lecture Example:
PortaCom manufacturers personal computers and related equipments. PortaComs product design group
developed a prototype for a new high-quality portable printer. The new printer features an innovative design and
has the potential to capture a significant share of the portable printer market. Preliminary marketing and financial
analyses provided the following selling price, first year administrative cost, and first-year advertising cost:
Selling price=$ 249 per unit
Administra ve cost= $ 400,000
Adver sing cost= $ 600,00
in the simulation model for the PortaCom problem the proceeding values are constants and are referred to as
parameters of model. The cost of parts and the first-year demand for the printer are not known with certainty
and are considered probabilistic inputs. At this stage of planning process, PortaComs best estimates of these
inputs are $ 45 per unit for the direct labor cost $ 90 per unit for parts cost, and 15,000 units for rst-year
11
Prepared by: Youssry Hamdy-CS Diploma
Profit = (selling price Direct labor cost per unit parts cost per unit)(demand)-(Admin cost +ad Cost)
X=first-year demand
Parts cost
Trials Rn Demand
1 0.7005 17,366
2 0.3204 12,900
3 0.9868 20,686
4 0.1804 10,888
5 0.4346 14,259
6 0.9605 22,904
7 0.5647 15,732
8 0.7334 17,804
9 0.0216 5,902
10 0.3218 12,918
Tabular Simulation
Trials Direct Labor Cost per unit ($) Parts Cost per unit ($) Units Sold Profits $
1 47 94 17,366 1,023,570
2 44 80 12,900 461,828
3 45 83 20,686 1,288,906
4 43 88 10,888 169,807
5 45 86 14,259 648,911
6 44 96 22,904 1,526,769
7 45 99 15,732 814,686
8 45 91 17,804 1,165,501
9 45 87 5,902 -350,131
10 46 90 12,918 385,585
Total 449 912.64 151,359 7,137,432
Average 44,9 91.26 15,359 713,743.2
----------------------------------------------------------------------------------------------------------------------------------------------
Lecture Example:
25- Tracy McCoy is shopping for a new car. She has identified a particular sports utility vehicle she likes
but has heard that it has high maintenance costs. Tracy has decided to develop a simulation model to help
her estimate maintenance costs for the life of the car. Tracy estimates that the projected life of the car
with the first owner (before it is sold) is uniformly distributed with a minimum of 2.0 years and a
maximum of 8.0 years. Furthermore, she believes that the miles she will drive the car each year can be
defined by a triangular distribution with a minimum value of 3,700 miles, a maximum value of 14,500
miles, and a most likely value of 9,000 miles. She has determined from Automobile Association data that
the maintenance cost per mile driven for the vehicle she is interested in is normally distributed, with a
mean of $0.08 per mile and a standard deviation of $0.02 per mile. Using Crystal Ball, develop a
simulation model (using 10 trials) and determine the average maintenance cost for the life of the car
with Tracy and the probability that the cost will be less than $3,000.
Solution:
13
Prepared by: Youssry Hamdy-CS Diploma
Find h value =
Convert Maintenance =
14
Prepared by: Youssry Hamdy-CS Diploma
___________________________________________________________________________________
Ex: A city is served by two newspapers the Tribune and the Daily News. Each Sunday readers purchase
one of the newspapers at a stand. The following matrix contains the probabilities of a customer's buying a
particular newspaper in a week, given the newspaper purchased the previous Sunday:
15
Prepared by: Youssry Hamdy-CS Diploma
Daily News
Simulate a customer's purchase of newspapers for 10 weeks to determine the steady-state probabilities of
a customer buying each newspaper in the long run.
Solution:
Step: 1 Develop distribution ranges for this week:
Newspaper
Trials Rn
Daily News Tribune
1 66 1 0
2 09 0 1
3 39 0 1
4 60 0 1
5 66 1 0
6 20 0 1
7 19 0 1
8 71 1 0
9 86 1 0
10 82 1 0
Total 5 5
16
Prepared by: Youssry Hamdy-CS Diploma
Tribune =
Bearing life hours 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900
Probability 0.10 0.13 0.25 0.13 0.0 0.12 0.02 0.06 0.05 0.05
Delay Time Distribution
Profit = (Revenue from sales)-(Cost of newspapers)-(lost profit from excess demand)+(salvage from sale of scrap
papers).
The op mal number the newsstand (10 days x $0.33 x 70) = $ 231
Ex: The time between arrivals of cars at the Petroco Service Station is defined by the following
probability distribution:
20
Prepared by: Youssry Hamdy-CS Diploma
Time Between
Probability Cumulative Distribution Range
Arrivals (min.)
1 0.15 0.15 0-14
2 0.30 0.45 15-44
3 0.40 0.85 45-84
4 0.15 1.00 85-99
24
The Average Time between Arrivals= =2.4 Minute/Car
10
Ex: The Dynaco Manufacturing Company produces a product in a process consisting of operations of
five machines. The probability distribution of the number of machines that will break down in a week
follows:
Solution:
Step: 1 Develop probability distribution range for Time between Arrivals .
23 + 21 + 32 + 26 + 25
Average number of machines that will break down per week= = 10.4
10
Ex: Every time a machine breaks down at the Dynaco Manufacturing Company , either 1, 2, or 3 hours
are required to fix it, according to the following probability distribution:
a. Simulate the repair time for 10 weeks and then compute the average weekly repair time.
b. If the random numbers that are used to simulate breakdowns per week are also used to simulate
repair time per breakdown, will the results be affected in any way? Explain.
c. If it costs $50 per hour to repair a machine when it breaks down (including lost productivity),
determine the average weekly breakdown cost.
d. The Dynaco Company is considering a preventive maintenance program that would alter the
probabilities of machine breakdowns per week as shown in the following table:
23 + 20 + 20 + 20 + 19
Average weekly Repair Time = = 10.3 Hour per machine/Week
10
b) If the same random numbers that are used to simulate breakdowns per week are also used to simulate
repair time per breakdown:
if we used the random number used in problem # 3, the result of average repair time will be affected
as follows:
17 + 17 + 21 + 18 + 18
Average weekly Repair Time = = 9.1 Hour per machine/Week
10
The difference between using dierent random numbers and the same random numbers are 10.3 9.1=1.2
hours per machine/week
The time required to receive an order once it is placed has the following probability distribution:
Solution:
Step: 1 Develop probability distribu on for Monthly demand:
Rn2 for
Time to
Rn1 for Time to Cost (Order place lost
Months Demand receive Sales stock
Demand receive an sales +order holding)
and order
order
1 39 2 19 1 3 2 40x2=$80
2 65 3 90 3 2 0 1x100x400=$40,000
3 76 3 69 2 0 0 3x100x400=$120,000
4 45 3 64 2 3 2 40x2=$80
25
Prepared by: Youssry Hamdy-CS Diploma
$480,280
Average Monthly Cost = = $ 48,028 per month
10
Ex: The emergency room of the community hospital in Farmburg has one receptionist, one doctor, and
one nurse. The emergency room opens at time zero, and patients begin to arrive some time later. Patients
arrive at the emergency room according to the following probability distribution:
The attention needed by a patient who comes to the emergency room is defined by the following
probability distribution:
If a patient needs to see both the doctor and the nurse, he or she cannot see one before the other that is,
the patient must wait to see both together.
The length of the patient's visit (in minutes) is defined by the following probability distributions:
Simulate the arrival of 10 patients to the emergency room and compute the probability that a patient must
wait and the average waiting time. Based on this one simulation, does it appear that this system provides
adequate patient care?
Solution:
Step: 1 Develop Probability Distribution ranges for Time Between Arrivals:
26
Prepared by: Youssry Hamdy-CS Diploma
Time Enter
Arrival Waiting Patient Length Time in
Patient Rn1 between Room Rn2 Rn3
Clock Time need to of Visit system
Arrivals Clock
1 - - 0.0 0.0 0.0 65 Nurse 52 15 15
2 37 15 15.0 15.0 0.0 88 Both 60 30 30
3 90 25 25.0 30.0 5.0 30 Doctor 77 20 25
27
Prepared by: Youssry Hamdy-CS Diploma
Step: 3 Computation:
380
Average waiting time = =38 Minutes per patient
10
It takes 1 minute to go up to the second oor, 2 minutes to unload, and 1 minute to return to the rst oor. The
elevator doesnt leave the first floor unless it has a full load. Simulate 1 hour of opera on of the system. Whats
the average transit time for a box of material A (Time from its arrival until it is unloaded)? Whats the average
waiting time for a box of material B? How many boxes of material C made the trip 1 hour?
Solution:
Material A has a uniform distribu on 52, such that b=(5+2) = 7, a=(5-2) = 3
a+r(b-a)=3+r(7-3) = 3r+4=r7
Material B (100kg/box)
Material C (50kg/box)
Clock Time Material( A) Arrival Material (B) Arrival Material (C) Arrival
3 1 - 1
6 - 1 2
7 2 - -
9 - - 3
11 - - 4
12 - 2 -
15 - - -
18 - 3 -
19 - - -
21
Ex: 9
The time between arrivals of oil tankers at a loading dock at Prudhoe Bay is given by the following
probability distribution:
The time required to fill a tanker with oil and prepare it for sea is given by the following probability
distribution:
Simulate the movement of tankers to and from the single loading dock for the first 10 arrivals.
Compute the average time between arrivals, average waiting time to load, and average number of
tankers waiting to be loaded.
Solution:
Step:1 Develop Random Number Ranges for Time between Ship Arrivals
Develop Random Number Ranges for Time to Fill and prepare (days)
Step: 3 Computations
39
Average Time between Arrivals = =3.9 Days per Ship
10
152
Average Waiting Time to load = =15.2 Days per Ship.
10
10
Average number of Tankers waiting to be loaded = =1 Tanker per Day
10
Ex: 10 The Saki automobile dealers in the Minneapolis St. Paul area orders the Saki sport compact,
which gets 50 miles per gallon of gasoline, from the manufacturer in Japan. However, the dealer never
knows for sure how many months it will take to receive an order once it is placed. It can take 1, 2, or 3
months, with the following probabilities:
31
Prepared by: Youssry Hamdy-CS Diploma
The dealer orders when the number of cars on the lot gets down to a certain level. To determine the
appropriate level of cars to use as an indicator of when to order, the dealer needs to know how many cars
will be demanded during the time required to receive an order. Simulate the demand for 10 orders and
compute the average number of cars demanded during the time required to receive an order. At
what level of cars in stock should the dealer place an order?
Solution:
Step: 1 Develop Random Number Ranges for Months to Receive an Order
32
Prepared by: Youssry Hamdy-CS Diploma
Ex: 21 The Western Outfitters Store specializes in denim jeans. The variable cost of the jeans varies
according to several factors, including the cost of the jeans from the distributor, labor costs, handling,
packaging, and so on. Price also is a random variable that varies according to competitors' prices.
Sales volume also varies each month. The probability distributions for volume, price, and variable costs
each month are as follows:
Price $ 22 23 24 25 26 27
Probability 0.07 0.16 0.24 0.25 0.18 0.10
Variable Cost $ 8 9 10 11 12
Probability 0.17 0.32 0.29 0.14 0.08
Simulate 10 months of store sales and compute the probability that the store will at least break even and
the average profit (or loss).
Solution:
33
Prepared by: Youssry Hamdy-CS Diploma
Sales Variable
Month Rn1 Rn2 Price $ Rn3 Profits $ Loss $
Volume Cost $
1 71 600 65 25 17 9 $600 -
2 12 400 18 23 06 8 - -3,000
3 48 500 19 23 47 9 - -2,900
4 18 400 89 26 80 11 - -3,000
5 08 300 83 26 23 9 - -3,900
6 94 800 90 27 25 9 5,400 -
7 26 400 89 26 77 10 - -2,600
8 83 700 08 22 32 9 100 -
9 63 600 74 26 96 12 - -600
10 05 300 69 25 71 10 - -4,500
50,000 $ 6,100 $ 20,500
Step: 3 Computations:
Profit = Sales volume x price per unit $ - (variable cost + Fixed Cost)
Month 1 = (600 x $25) =$15,000 (600 x 9 +$9,000) = (5,400+9,000) =14,400
Profit = $ 15,000 $14,400= $ 600
Month 2 = (400 x $ 23) = $9,200 (400 x $8 + $9,000) = $12,200
Loss = $9,200 - $12,200 = - $3,000
Month 3 = (500 x $23) = $11,500 (500 x $9 +$9,000) = $ 13,500
Loss = $11,500 $ 13,500 = $ -2,000
Month 4 = (400 x $ 26) = $10,400 (400 x $ 11 + $9,000) = $ 13,400
Loss = $10,400 $ 13,400 = $ -3,000
Month 5: (300x$26)=$7,800 (300x9+$9,000) = $11,700
Loss = $7,800-$11,700= $ - 3,900
Month 6: (800x$27)=$21,600 (800x$9+$9,000) = $16,200
Profit= $21,600 $16,200= $5,400
34
Prepared by: Youssry Hamdy-CS Diploma
Ex: 21 Randolph College and Salem College are within 20 miles of each other, and the students at each
college frequently date each other. The students at Randolph College are debating how good their dates
are at Salem College. The Randolph students have sampled several hundred of their fellow students and
asked them to rate their dates from 1 to 5 (in which 1 is excellent and 5 is poor) according to physical
attractiveness, intelligence, and personality. Following are the resulting probability distributions for these
three traits for students at Salem College:
Physical Attractiveness 1 2 3 4 5
Probability 0.27 0.35 0.14 0.9 0.15
Intelligence 1 2 3 4 5
Probability 0.10 0.16 0.45 0.17 0.12
Personality 1 2 3 4 5
Probability 0.15 0.30 0.33 0.07 0.15
Simulate 10 dates and compute an average overall rating of the Salem students.
Solution:
Step: 1 Develop Random Number Ranges for Physical Attractiveness
Physical
Date Rn1 Rn2 Intelligence Rn3 Personality
Attractiveness
2 71 3 65 3 55 3
2 12 1 18 2 89 5
3 48 2 19 2 17 2
4 18 1 89 5 38 3
5 08 1 83 4 69 3
6 94 5 90 5 71 3
7 26 1 89 4 90 5
8 83 4 08 1 18 2
9 63 3 74 4 94 5
10 05 1 69 3 47 2
22 33 33
Step: 3 Computa on
22
Average Physical Attractiveness = =2.2
10
33
Average Intelligence = =3.3
10
33
Average Personality = =3.3
10
The Overall Ra ng of Salem Collage = 2.2+3.3+3.3=8.8
1. , i =1, 2, 3, .
Example: 7.1 Page: 254
36
Prepared by: Youssry Hamdy-CS Diploma
Formula : Xi +1=(axi+c)mod m, I = 0,1,2,3,.
37
Prepared by: Youssry Hamdy-CS Diploma
Tests of autocorrelation:
Random 3 8 13 18 23 28
Probability 0.23 0.28 0.33 0.27 0.05 0.36
Formula:
Where: i is star ng point, m is step size, M is the largest integer 4 such that i+(M+1)m<30
38
Prepared by: Youssry Hamdy-CS Diploma
Solution:
R3 +5k+1-0.25
0.25
Q:1 Define the simulation and draw the steps of simulation modeling and process.
A simulation is the Imitation of the operation of real-world process or system. Simulation involves the generation
of an artificial history of a system, and observation of that artificial history to draw inferences concerning the
operating characteristics of the real system.
Steps of simulation:
1- Problem formulation, 2- Se ng of objec ves and overall project plan, 3- Model conceptualization
4- Data collec on, 5- Model transla on, 6-Tes ng verica on, 7- Testing validation
8- Experimental design, 9- Running and analysis, 10- More runs, 11- Repor ng, 12- Setting implementation
39
Prepared by: Youssry Hamdy-CS Diploma
Q 2: Dene the model, its importance and the dierent types of models.
Model is a representation of a system for the purpose of studying the system.
The importance of model is that it provides a structural approach to run the system and study its beaver without
running the system itself to determine the problems of the system under investigation that may appear through
implementation and solve them.
Types of models:
1- Mathematical 2- simulation [static, Dynamic, Deterministic, Stochastic, Discrete, Continues]
40
Prepared by: Youssry Hamdy-CS Diploma
2. Changes can be simulated, and the effect of these alternation can be observed
3. The knowledge gained in designing a simulation model may help in suggesting improvement in the
system under investigation
4. Simulation can be used to test new designs or policies, so as to prepare for what may happen
6. Simulation models designed for training allow learning without the cost of on-the-job learning
7. The modern systems (factory, service organization, etc) are so complex that the interactions can be
treated only through simulation.
3- In contrast to optimization models, simulation models are run rather than solved
Disadvantages of Simulation:
41
Prepared by: Youssry Hamdy-CS Diploma
Q: 5 whats the difference between system and model? And mention the components of the system and its
types?
A system is a group of objects that are joined together in some regular interaction or interdependence toward
the accomplishment of some purpose.
Example in production system manufacturing automobiles. The machines, component parts and workers operate
jointly along an assembly line to produce a high-quality vehicle.
It is important to define the boundary between the system and its environment.
Components of the system:
System types:
1- Discrete system: is one which is the state variables change only at discrete set points in time.
2- Continues System: is one in which the state variable change continuously over time
42
Prepared by: Youssry Hamdy-CS Diploma