Or 508 Exercises Solution

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Prepared by: Youssry Hamdy- CS Diploma

OR 508 (Modeling and Simula on)

CS Diploma

1
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Solu on of Midcourse Exam Dec. 2010


Members of the Willow Creek Emergency Rescue Squad know from past experience that they will receive
between zero and six emergency calls each night, according to the following discrete probability distribution:
Calls
Probability

0
0.05

1
0.12

2
0.15

3
0.25

4
0.22

5
0.15

6
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:
Emergency
Probability

Minor
0.30

Regular
0.56

Major
0.14

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 fiveperson 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
Step 1. Develop Random Number Ranges for the Probability Distributions
Calls Probability Cumulative Probability Random Number Range, r1
0

.05

.05

1-5

.12

.17

6-17

.15

.32

18-32

.25

.57

33-57

.22

.79

58-79

.15

.94

80-94

.06

1.00

95-99

1.00
Emergency
Type
Minor

Probability

Cumulative
Probability

Random Number Range, r2

.30

.30

1-30

2
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Regular

.56

.86

31-86

Major

.14

1.00

87-99, 00

1.00
Step 2. Set Up a Tabular Simulation
Use the second column of random numbers in
Night r1 Number of Calls r2 Emergency Type Crew Size Total per Night

65

08

05

5
89

06

62

17

77

Regular

18

Minor

12

Minor

17

Minor

89

Major

18

Minor

83

Regular

90

Major

2
48

71

18

Minor

08

Minor

26

Minor

47

Regular

94

Major

72

Regular

47

Regular

68

Regular

60

Regular

88

Major

36

Regular

43

Regular

28

Minor

31

Regular

3
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

10

14

14

10

Prepared by: Youssry Hamdy- CS Diploma

10

68

06

Minor

39

Regular

71

Regular

22

Minor

76

Regular

11

Step 3. Compute Results


Average number of Minor emnergency calls per night =

Average number of Regurlar emgergency calls per night =


Average number of Major emgergency calls per night =

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:
0
100
200
300
400
500
Demand (yd.)
0.3
0.12
0.20
0.35
0.20
0.10
Probability
Simulate Troy Clothing's cloth orders for 5 weeks and determine the average weekly capacity and
demand. Also determine the probability that Burlingham will have sufficient capacity to meet demand.
Use the following sets of random numbers:
{0.59, 0.43, 0.11, 0.82, 0.35} { 0.18, 0.86, 0.22, 0.62, 0.70}
Solution:
Step: 1 Develop Random Number Ranges for the Probability Distributions
Demand
0
100
200
300
400
500

Probability
0.3
0.12
0.20
0.35
0.20
0.10

Cumulative Probability
0.3
0.15
0.35
0.70
0.90
1.00

Range
0-2
3-14
15-34
35-69
70-89
90-99

4
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

1.00

100

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:
weeks
1
2
3
4
5

Rn1
0.59
0.43
0.11
0.82
0.35

Production
300
300
100
400
300
1400

Step: 3 Computations:
Average weekly capacity production:

Rn2
0.18
0.86
0.22
0.62
0.70

Demand [a+r(b-a)] 600


0.18 x 600= 108
516
132
372
420
1548

= 280 Yards per week.

= 309.6 310 Yards per week.

Average weekly Demand:


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:
PCs Demanded per week
0
1
2
3
4
Total

Frequency of Demand
20
40
20
10
10
100

Probability of Demand, p(x)


0.2
0.4
0.2
0.10
0.10
1.00

Step: 1 Develop Random number ranges for the probability distribution


Probability of Demand,
p(x)
0.2
0.4
0.2
0.1
0.1
1.00

PCs Demanded per week


0
1
2
3
4
Total

Cumulative Probability
0.2
0.6
0.8
0.9
1.0
1.0

Ranges of Random
number
0.0-19
20-59
60-79
80-89
90-99

Step: 2 Use tabular simula on:


Weeks
1

Random number of demand


Demand
Revenue ($)
39
1
(1x4,300) = 4,300
5
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


2
3
4
5
6
7
8
9
10
11
12
13
14
15

73
72
75
37
02
87
98
10
47
93
21
95
97
69

2
2
2
1
0
3
4
0
1
4
0
4
4
2
31

8,600
8,600
8,600
4,300
0
12,900
17,200
0
4,300
17,200
0
17,200
17,200
8,600
$ 133,300

Step: 3 Computa ons:


Average Demand=
Average Revenue=

=2.07 laptop PCs per week.


=$ 8,920.

Simulation of a queuing system of Burlingham Mills


Given the following data simulate the system for 10 days and compute average waiting time and
average time in the system.
Distribution of Arrival Intervals
Arrival interval (Days), x
Probability
1
20
2
40
3
30
4
10

Distribution of Service Times


Service Time (Days), y
Probability
5
20
1
50
2
30

Step: 1 Develop Random number ranges for the probability distribution for arrival intervals:
Arrival interval (Days), x
1
2
3
4

Probability
20
40
30
10

Cumulative Probability
20
60
90
100

Range
0-19
20-59
60-89
90-99

Develop Random number ranges for the probability distribution of service times:
Service Time (Days), y
5
1
2

Probability
20
50
30

Cumulative Probability
20
70
100

6
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-19
20-69
70-99

Prepared by: Youssry Hamdy- CS Diploma

Step: 2 Tabular Simula on:


Arrival
Arrival
Interval, x
Clock
1
0.0
2
71
3
3.0
3
12
1
4.0
4
48
2
6.0
5
18
1
7.0
6
08
1
8.0
7
05
1
9.0
8
18
1
10.0
9
26
2
12.0
10
94
4
16.0
Total
Step: 3 Computa ons:
Batch

Rn1

Average Waiting time=


Average time in system=

Enter
Facility clock
0.0
3.0
4.0
6.0
8.0
10.0
12.0
14.0
14.5
16.0

Waiting
time
0.0
0.0
0.0
0.0
1.0
2.0
3.0
4.0
2.5
0.0
12.5

Rn2
65
18
17
89
83
90
89
08
47
06

Service
Time, y
1.0
0.5
0.5
2.0
2.0
2.0
2.0
5.0
1.0
0.5

Departure
Clock
1.0
3.5
4.5
8.0
10.0
12.0
14.0
14.5
15.5
16.5

Time in
system
1.0
0.5
0.5
2.0
3.0
4.0
5.0
4.5
3.5
0.5
24.5

= 1.25 days / 10 batches


= 2.45 days / 10 batches

Ex:
Harrys Company is producing vehicles tires according to the following probability distribution. Simulate
the demand for 10 days and compute average demand.
Demand for Tires
0
1
2
3
4
5
Total

Frequency
10
20
40
60
40
30
200

Probability
5
10
20
30
20
15
100.0

Step: 1 Develop Random number ranges for the probability distribution of tires demand:
Demand for Tires
0
1
2
3
4

Probability
5
10
20
30
20

Cumulative Probability
5
15
35
65
85

7
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-4
5-14
15-34
35-64
65-84

Prepared by: Youssry Hamdy- CS Diploma


5
15
100.0

100

85-99

Step: 2 Tabular Simula on

Step: 3 Computa ons:


Demand per day=

Days
1
2
3
4
5
6
7
8
9
10

Rn
52
37
82
69
98
96
33
50
88
90

Demand
3
3
4
4
5
5
2
3
5
5
39

= 3.9 tires / 10 days

Lecture Example:
Compcomm, Inc. is an international communications and information technology company. A stock
analyst would like to use simulation to predict the stock prices of Compcomm for an extended period.
Based on historical data, the analyst has developed the following probability distribution for the
movement of Compcomm stock prices per day:
Stock Price Movement
Increase
Same
Decrease

Probability
0.45

0.3
0.25
1
The analyst has also developed the following probability distributions for the percentage of the
increases or decreases in the stock price per day:
Stock Price Change
12.50%
25%
37.50%

Increase
0.4
0.17
0.12

Decrease

0.12
0.15
0.18

8
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


50%
62.50%
75%
87.50%
100%

0.1
0.08
0.07
0.04
0.02
1
The price of the stock is currently 62.

0.21
0.14
0.1
0.05
0.05
1

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
Use the following sets of random numbers:
17, 95, 21, 78, 58,24, 33, 45, 77, 48
37, 79, 49, 12, 38,48, 13, 93, 55, 96
Step: 1 Develop Random number ranges for the probability distribution for price movement:
Stock Price Movement
Increase
Same
Decrease

Probability
45
30
25
100.0

Cumulative Probability
45
75
100

Range
0-44
45-74
75-99

Develop Random number ranges for the probability distribution for the percentage of increases and
decreases in stock price:
Increase:
Stock Price
Change
12.50%
25%
37.50%
50%
62.50%
75%
87.50%

Probability

Cumulative Probability

Range

40
17
12
10
8
7
6

40
57
69
79
87
94
100

0-39
40-56
57-68
69-78
79-86
87-93
94-99

Probability

Cumulative Probability

Range

12
15
18
21

12
27
45
66

0-11
12-26
27-44
45-65

Decrease:
Stock Price
Change
12.50%
25%
37.50%
50%

9
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


62.50%
14
75%
10
87.50%
10

80
90
100

66-79
80-89
90-99

Step: 2 Tabular Simula on


Days

Rn1

1
2
3
4
5
6
7
8
9
10

17
95
21
78
58
24
33
45
77
48

Stock Price
Movement
Increase
Decrease
Increase
Decrease
Same
Increase
Increase
Same
Decrease
Same

Rn2
37
79
49
12
38
48
13
93
55
96

Stock Price
Change
12.5%
62.5%
25%
25%
0
25%
12.5%
0
50%
0

Price
=7.75+62= 70

23.25
77.5
46.5
62
77.5
70
62
31
62

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:
Time between Arrivals (Minutes)
Probability
Service Time (Minutes)
Probability
0
9
1
20
1
17
2
40
2
27
3
28
3
20
4
12
5
12
Simulate the operation of the drive-in teller for 10 new customers. The rst of the 10 new customers arrives at a
me determined at random. Start the simula on with customer being served, leaving at me 3, and on in the
queue. How many customers went into the bank to transact business?

Solution:
Step: 1 Develop Random number ranges for the probability distribution for time between arrivals:
Time between Arrivals

Probability

Cumulative Probability

10
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range

Prepared by: Youssry Hamdy- CS Diploma

0
1
2
3
4
5

9
17
27
20
15
12

9
26
53
73
88
100

0-8
9-25
26-52
53-72
73-87
88-99

Service Time

Probability

Cumulative Probability

Range

1
2
3
4

20
40
28
12

20
60
88
100

0-19
20-59
60-87
88-99

Customer

Rn for
Arrival

Interarrival
Time

Clock
Time

1
2
3
4
5
6
7
8
9
10

30
46
39
86
63
83
07
37
69
78

2
2
2
4
3
4
0
2
3
4

2
4
6
10
13
17
17
19
22
26

Rn for
Service
Time
27
26
99
72
12
17
78
91
82
62

Service
Time

No. in
Queue

2
2
4
3
1
1
3
4
3
3

1
0
0
0
0
0
1
1
0
0

Time
Service
Begin
4
6
10
13
17
18
22
26

Time
Service
Ends
6
10s
13
14
18
21
25
29

Go into the
Bank?
Yes
No

Two customers only will go into the bank to transact business.


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

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


demand. PortaCom would like an analysis of first-year profit potential for printer. Because of PortaComs tight
cash flow situation, management is particularly concerned about the potential for a loss.
where Direct labor cost and parts cost
Direct labor cost per unit
Probability
43
0.1
44
0.2
45
0.4
46
0.2
47
0.1
Parts cost: depends on the general economy, the overall demand for parts, and pricing policy of PoraComs parts
suppliers. portCom believes that the parts cost will range from $80 to $100 per unit is described by uniform
probability distribution.
Solution:
Profit = (selling price Direct labor cost per unit parts cost per unit)(demand)-(Admin cost +ad Cost)
Letting c1 = direct labor cost per unit
C2 = parts cost per unit
X=first-year demand
The profit model for the first year can be as follows:
Prot=(249-c1-c2)x-1,000,000
Profit=(249-45-90)(15,000)-1,000,000=114 x 15,000=1,710,000-1,000,000=710,000
Direct labor cost per unit
Probability
Cumulative
Range
43
0.1
0.1
0.0-0.1
44
0.2
0.3
0.1-0.3
45
0.4
0.7
0.3-0.7
46
0.2
0.9
0.7-0.9
47
0.1
1.0
0.9-1.0
Parts cost = a+r(b-a) = 80+r(100-80)=80+r20
we will use set of 10 random number to calculate the parts cost {0.6953, 0.0082, 0.1514, 0.4013, 0.3125,
0.8166,0.9439,0.5448,0.3813,0.5389}
Parts cost
Trials
1
2
3
4
5
6
7
8

Rn
0.6953
0.0082
0.1514
0.4013
0.3125
0.8166
0.9439
0.5448

Parts cost $ [a+r(b-a)]


80+0.6953(20)=94
80
83
88
86
96
99
91

12
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


9
0.3813
10
0.5389
Estimate first-year demand:
Trials
1
2
3
4
5
6
7
8
9
10

87
90
Rn
0.7005
0.3204
0.9868
0.1804
0.4346
0.9605
0.5647
0.7334
0.0216
0.3218

Demand
17,366
12,900
20,686
10,888
14,259
22,904
15,732
17,804
5,902
12,918

Tabular Simulation
Trials
1
2
3
4
5
6
7
8
9
10
Total
Average

Direct Labor Cost per unit ($)


47
44
45
43
45
44
45
45
45
46
449
44,9

Parts Cost per unit ($)


94
80
83
88
86
96
99
91
87
90
912.64
91.26

Units Sold
17,366
12,900
20,686
10,888
14,259
22,904
15,732
17,804
5,902
12,918
151,359
15,359

Profits $
1,023,570
461,828
1,288,906
169,807
648,911
1,526,769
814,686
1,165,501
-350,131
385,585
7,137,432
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

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

1. The car life cost is uniformly distributed [a=2.0, b =8.0]


2. The Mile drive is triangular distributed [a=3,700, b=14,500, c=9,000]
3. Maintenance cost is normally distributed [ = 0.8, = 0.02]
Convert uniform distribution using the formula a+r(b-a)
2.0+r(8.0-2.0) = r 6.0
Convert Triangular distribution
Find h value =

Convert Maintenance =
Step: 1 Develop probability distribution ranges: (Car life cost)
Trials
1
2
3
4
5
6
7
8
9
10

Rn
0.405
0.173
0.011
0.529
0.004
0.514
0.691
0.654
0.709
0.412

Develop probability distribution ranges: (Mile Drive)


Trials
1
2
3
4
5
6
7
8
9
10

Rn
0.726
0.009
0.369
0.571
0.828
0.237
0.605
0.275
0.949
0.865

Car life cost ($) [a+r(b-a)] r6


2.43
1.038
0.066
3.174
0.024
3.084
4.146
3.924
4.254
2.472
24.612
Mile Drive (0.926)
0.672
0.008
0.342
0.529
0.767
0.219
0.560
0.255
0.879
0.672
4.903

14
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


Develop probability distribution ranges: (Maintenance cost)
Z x = x , X = z + ,
X= -Z, if r < 0.5, X= if r =0.5, X=+z if >0.5, if r > 0.5 (r-0.5)
Trials
1
2
3
4
5
6
7
8
9
10

Rn
0.930
0.014
0.995
0.796
0.588
0.758
0.040
0.607
0.286
0.351

Maintenance cost (0.4177)


0.033
0.117
0.280
0.103
0.197
0.017
0.150
0.099
0.137
0.033
2.272

Trials

Car life cost

Mile driven/Year

Maintenance
cost/mile

1
2
3
4
5
6
7
8
9
10

Average

2.43
1.038
0.066
3.174
0.024
3.084
4.146
3.924
4.254
2.472

0.672
0.008
0.342
0.529
0.767
0.219
0.560
0.255
0.879
0.672
4.903
0.0891

0.033
0.117
0.280
0.103
0.197
0.017
0.150
0.099
0.137
0.033
2.272
0.0313

24.612
0.4475

Total cost=car life cost Mile+


Maintenance
1.135
1.163
0.688
3.806
0.988
3.32
4.856
4.278
5.27
3.177
28.681
2.68

The average cost of car life = $2,680


The probability that the cost will be less than $3,000.
P (x 3,000)
Z=
___________________________________________________________________________________
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:
This Sunday
Tribune

Next Sunday
Daily News
15
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Tribune
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
Tribune
Daily News

Probability
0.65
0.35.

Cumulative Probability
0.65
1.00
1.00

Range
0-64
65-99

Cumulative Probability
0.45
1.00
1.00

Range
0-44
45-99

Develop distribution ranges for next week:


Newspaper
Tribune
Daily News

Probability
0.45
0.55

Step: 2 Tabular Simulation


Trials

Rn

1
2
3
4
5
6
7
8
9
10

66
09
39
60
66
20
19
71
86
82

Total

Newspaper
Daily News
1
0
0
0
1
0
0
1
1
1

Tribune
0
1
1
1
0
1
1
0
0
0

16
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Probabilities of a customer buying each newspaper in the long run


Daily News =
Tribune =

Book Example: 2.5 page: 46


A milling machine has different bearings that fail in service. The distribution of the life of each bearing is identical,
as it indicated below. When a bearing fails, the mill stops, a repairperson is called, and a new bearing is installed.
The delay time of repairpersons arriving at the milling is also a random variable having the distribution in the
given table. Down me for the es mated at $10 per minute. The direct on-site cost of the repairperson is $30 per
hour. It takes 20 minutes to change one bearing, 30 minutes to change two bearings, and 40 minutes to change
three bearings. A proposal has been made to replace all three bearings whenever a bearing fails. Management
needs an evaluation of proposal. The total cost per 1, 0000 bearings-hours will be used as the measure of
performance.
The below table represent a simula on of 15 bearings changes under the current method of operation. Note that
there are instances where more than one bearing fails at the same time. This is unlikely to occur in practice and is
due to using a rather coarse grid of 100 hours for bearing life. It will be assumed in this example that the times
are never exactly the same and thus nor more than one bearing is changed at any breakdown.
Bearing life hours
1000
Probability
0.10
Delay Time Distribution

1100
0.13

Delay Time (Minute)


Probability

1200
0.25

1300
0.13

5
0.6

1400
0.0

1500
0.12

10
0.3

1600
0.02

1700
0.06

15
1.0

Step: 1 develop probability distribu on range for Bearing-life Distribution.


Bearing life hours
Probability
Cumulative probability
1000
0.10
0.10
1100
0.13
0.23
1200
0.25
0.48
1300
0.13
0.61
1400
0.09
0.70
1500
0.12
0.82
1600
0.02
0.84
1700
0.06
0.90
1800
0.0 5
0.95
1900
0.0 5
1.00
Develop probability distribution range for Bearing-life Distribution.
Delay Time (Minutes)
5
10

Probability
0.6
0.3

Cumulative probability
0.6
0.9

17
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-9
10-22
23-47
48-60
61-69
70-81
82-85
84-89
90-94
95-99
Range
0-5
6-8

1800
0.05

1900
0.05

Prepared by: Youssry Hamdy- CS Diploma


15

0.1

1.0

9-00

2- Step: Tabular Simulation Bearing replacement under current method:


Bearing 1
Life
Rd2
Hours
1400
7
1300
3
1900
1
1500
6
1300
4
1400
8
1600
5
1800
7
1200
0
1000
5
1900
9
1400
4
1300
7
1700
1
1800
2

Bearing 2
Bearing3
Delay
Life
Delay
Delay
Trials Rd1
Rd3
Rd4
Rd5
Life Hours
Rd6
Time
Hours
Time
Time
1
67
10
71
1500
8
10
18
1100
6
10
2
55
5
21
1100
3
5
17
1100
2
5
3
98
5
79
1600
3
5
65
1400
2
5
4
76
10
88
1700
1
5
03
1000
9
15
5
53
5
93
1800
0
5
54
1300
8
10
6
69
10
77
1500
6
10
17
1100
3
5
7
80
5
08
1000
9
15
19
1100
6
10
8
93
10
21
1100
8
10
09
1000
7
10
9
35
5
13
1100
3
5
61
1400
1
5
10
02
5
03
1000
2
5
84
1700
0
15
11
99
15
14
1100
1
5
11
1100
5
5
12
65
5
05
1000
0
5
25
1200
2
5
13
53
19
29
1200
2
5
86
1700
8
10
14
87
5
07
1000
4
5
65
1400
3
5
15
90
5
20
1100
3
5
44
1200
4
5
Total
119
100
120
Bearing changed at any breakdown. The cost of the current is estimated as follows:
cost of bearing = 47 bearings X $32/bearing = $ 1,504
Cost of delay me = (110=110+105) minutes x $10.minute = $ 3,250
cost of down me during repair = 45 bearings x 20 minutes/bearing x $10 minute = $9,000
Cost of repairperson = $45 bearings x 20 minutes/bearing x $30/60 minutes = $450
Total Cost = $ 1,440+$3,250+$9,000+$450=$ 14,140
Total life of bearings = (22,300+18,700+18,600) 59,600 hours. Therefore, the total cost per 10,000 bearings-hours
is ($14,140/5.96) = $2,372.
Proposed Method:
Trails
1
2
3
4
5
6
7
8
9
10
11
12

Bearing1
Life(hours)
1700
1000
1500
1300
1200
1000
1500
1300
1800
1300
1400
1500

Bearing2 Life
(hours)
1100
1800
1700
1100
1100
1200
1700
1700
1200
1300
1300
1300

Bearing3Life
First Failure
(hours)
(hours)
1000
1000
1200
1000
1300
1300
1800
1100
1300
1100
1000
1100
1200
1200
1000
1000
1100
1100
1100
1100
1900
1300
1400
1300
18
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Delay (minute)
10
5
5
5
5
10
5
10
15
5
10
5

Prepared by: Youssry Hamdy- CS Diploma


13
1500
1800
1200
1200
10
14
1000
1900
1400
1000
5
15
1300
1700
1700
1300
5
Total
110
Cost of bearings = 45 bearings x $ 32/bearing =$ 1,44,
Cost of delay me = 110 minutes x $ 10/minute = $ 1.100
Cost of down me during repairs = 15 sets x 40 minutes/ set x $10/ minute = $6,000
Cost of repairpersons = 15 sets x 40 minutes/set x $30/60 minutes = $300.
Total cost = $ 1,440 +$1,100+$6,000+$300=$8,840
The total life of bearings = (17,000x3) 51,000 hours. Therefore, the total cost per 10,000 bearings-hours is
($8,840/5.1)=$1.733
The new policy generates a savings of $ 634 per 10,000 hours bearing-life.
Ex. Page 40: News Dealer's Problem
The new stand buys the papers for 33 cents each and sells them for 50 cents each. Newspapers not sold at the
end of the day are sold as scrap for 5 cents each. Newspapers can be purchased in bundles of 10 thus; the
newsstand can buy 50, 60, and so on. There're three types of newsdays: 'Good", "Fair" and "Poor"; they have the
probabili es 0.35, 0.45 and 0.20, respec vely. The distribu on of newspapers demanded on each of these days us
given below. The problem is to compute the optimal number of papers the newsstand should purchase. This will
be accomplished by simula ng demands for 10 days and recording prots from sales each day.
Profit = (Revenue from sales)-(Cost of newspapers)-(lost profit from excess demand)+(salvage from sale of scrap
papers).
Demand

Good
0.03
0.05
0.15
0.20
0.35
0.15
0.07

40
50
60
70
80
90
100

Demand Probability Distribution


Fair
0.10
0.18
0.40
0.20
0.08
0.04
0.00

poor
0.44
0.22
0.16
0.12
0.06
0.00
0.00

Type of News probability Distribution


Type of News
Good
Fair
Poor

Probability
0.35
0.45
0.20

Solution:
Step: 1 Develop probability distribu on range for newspapers demand .
Type of News
Good

Probability
0.35

Cumulative Distribution
0.35

19
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-34

Prepared by: Youssry Hamdy- CS Diploma


Fair
0.45
0.75
Poor
0.20
1.0
Step: 2 Develop probability distribu on range for newspaper type .
Demand
40
50
60
70
80
90
100

Good
0.03
0.08
0.23
0.43
0.78
0.93
1.0

Cumulative Distribution
Fair
0.10
0.28
0.68
0.88
0.96
0.1
0.1

Poor
0.44
0.66
0.82
0.94
0.1
0.1
0.1

35-74
75-99

Good
0-2
3-7
8-22
23-42
43-77
78-92
93-99

Ranges
Fair
0-9
10-27
28-67
68-87
88-95
96-97
98-99

Poor
0-43
44-65
66-81
82-93
94-95
96-97
98-99

Step: 3 Tabular Simula on:


Day
1
2
3
4
5
6
7
8
9
10

Rn1 for
newspaper
type
58
17
21
45
43
36
27
73
86
19

Type of
newspaper

Rn2 for
Demand

Demand

Fair
Good
Good
Fair
Fair
Fair
Good
Fair
Poor
Good
Total

93
63
31
19
75
84
37
23
02
53

80
80
70
50
70
80
70
50
40
70

Revenue
from sales
$35.00
35.00
35.00
25.00
35.00
35.00
35.00
30.00
20.00
20.00
$ 300.00

Lost profit
from excess
Demand
$1.70
1.7
1.70
3.40
$ 17.00

Salvage
from sale of
scrap
1.00
0.50
1.50
1.50
$10.00

Daily
profit
$ 10.2
10.20
11.90
2.90
10.20
11.90
8.50
7.40
-1.60
-1.60
$161.00

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:
1
2
3
4
Time Between Arrivals (min.)
0.15
0.30
0.40
0.15
Probability
Simulate the arrival of cars at the service station for 10 arrivals and compute the average time between
arrivals.
20
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Solution:
Step:1 Develop probability distribution range for Time between Arrivals .
Time Between
Arrivals (min.)

Probability

Cumulative Distribution

Range

1
2
3
4

0.15
0.30
0.40
0.15

0.15
0.45
0.85
1.00

0-14
15-44
45-84
85-99

Step: 2 Tabular Simulation


Trials
1
2
3
4
5
6
7
8
9
10

Rn
71
18
12
17
89
18
83
90
18
08

Time Between Arrivals (min.)


3
2
1
2
4
2
3
4
2
1
24

The Average Time between Arrivals=

24
=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:
Machine Breakdowns per Week
Probability

0
0.10

1
0.10

2
0.20

3
0.25

4
0.30

5
0.5

a. Simulate the machine breakdowns per week for 10 weeks.


b. Compute the average number of machines that will break down per week.
Solution:
Step: 1 Develop probability distribution range for Time between Arrivals .
Machine Breakdown Per week
0
1
2
3

Probability
0.10
0.10
0.20
0.25

Cumulative Distribution
0.10
0.20
0.40
0.65

21
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-9
10-19
20-39
40-64

Prepared by: Youssry Hamdy- CS Diploma


4
5

0.30
0.5

0.95
1.00

65-94
95-99

Step: 2 Tabular Simulation


Weeks

Rn1

Machine 1
Breakdown

Rn2

Machine 2
Breakdown

Rn3

Machine 3
Breakdown

Rn4

Machine 4
Breakdown

Rn5

Machine
Breakdown 5

1
2
3
4
5
6
7
8
9
10

65
48
08
05
89
06
62
17
77
68

4
3
0
0
4
0
3
1
4
4

71
18
12
17
89
18
83
90
18
08

4
1
1
1
4
1
4
4
1
0

26
47
94
72
47
68
60
88
36
43

2
3
4
4
3
4
3
4
2
3

28
31
06
39
71
22
76
80
95
11

2
2
0
2
4
2
4
4
5
1

77
35
0
90
69
55
10
72
06
40

4
2
0
4
4
3
1
4
0
3

23

21

32

Average number of machines that will break down per week=

26

25

23 + 21 + 32 + 26 + 25
= 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:
1
0.30

Repair Time (hr.)


Probability

2
0.50

3
0.20

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:
Machine Breakdowns per Week

Probability

0
1
2
3
4
0.20 0.30 0.20 0.15 0.10

5
0.5

The weekly cost of the preventive maintenance program is $150. Using simula on, determine whether the
company should institute the preventive maintenance program.
Solution:
Step: 1 Develop probability distribution machine repair time .

Repair Time (hr.)


1
2

Probability
0.30
0.50

Cumulative Distribution
0.30
0.80

22
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-29
30-79

Prepared by: Youssry Hamdy- CS Diploma


3

0.20

1.00

80-99

a) Repair Time Simulation for 10 days:


Weeks

1
2
3
4
5
6
7
8
9
10

Rn1

Machine 1
Repair Time

Rn2

Machine 2
Repair Time

Rn3

Machine 3
Repair Time

Rn4

Machine 4
Repair Time

Rn5

Machine 5
Repair Time

2
2
3
2
1
3
3
3
3
1

77
35
18
79
75
92
48
13
56
85

2
2
1
2
2
3
2
1
2
3

30
71
18
01
85
83
67
53
88
04

2
2
1
1
3
3
2
2
3
1

62
27
73
84
81
26
38
0
64
96

2
1
2
3
3
1
2
1
2
3

16
52
98
79
82
34
51
65
16
09

1
2
3
2
3
2
2
2
1
1

62
54
82
48
10
82
82
81
95
05
23

20

20

20

19

23 + 20 + 20 + 20 + 19
= 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:
Average weekly Repair Time =

Weeks

Rn1

Machine 1
Repair Time

Rn2

Machine 2
Repair Time

Rn3

Machine 3
Repair Time

Rn4

Machine 4
Repair Time

Rn5

Machine 5
Repair Time

1
2
3
4
5
6
7
8
9
10

65
48
08
05
89
06
62
17
77
68

2
2
1
1
3
1
2
1
2
2

71
18
12
17
89
18
83
90
18
08

2
1
1
1
3
1
3
3
1
1

26
47
94
72
47
68
60
88
36
43

1
2
3
2
2
2
2
3
2
2

28
31
06
39
71
22
76
80
95
11

1
2
1
2
2
1
2
3
3
1

77
35
0
90
69
55
10
72
06
40

2
2
1
3
2
2
1
2
1
2

17

17

21

18

18

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
c) The Average weekly breakdown cost

Machine Breakdown Per week

Probability

Cumulative Distribution

23
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range

Prepared by: Youssry Hamdy- CS Diploma


0
1
2
3
4
5

Weeks

1
2
3
4
5
6
7
8
9
10

Rn1

62
54
82
48
10
82
82
81
95
05
22

0.30
0.20
0.20
0.15
0.10
0.5

0.30
0.50
0.70
0.85
0.95
1.00

0-29
30-49
50-69
70-83
84-94
95-99

Machine 1
Breakdown

Rn2

Machine 2
Breakdown

Rn3

Machine 3
Breakdown

Rn4

Machine 4
Breakdown

Rn5

Machine
Breakdown 5

2
2
3
1
0
3
3
3
5
0

77
35
18
79
75
92
48
13
56
85

3
1
0
3
3
4
1
0
2
4

30
71
18
01
85
83
67
53
88
04

1
3
0
0
4
4
2
0
4
0

62
27
73
84
81
26
38
0
64
96

2
0
2
4
4
0
1
0
2
5

16
52
98
79
82
34
51
65
16
09

0
2
5
3
3
1
2
2
0
0

21

18

20

18

Weekly breakdown Cost per machine


Machine 1 = 22 hrs x ($50) =$ 1,100
Machine2 =21 hrs x ($50) = $ 1,050
Machine3 = 18 hrs x ($50) = $ 900
Machine4 = 20 hrs x ($50) = $ 1,000
Machine5 = 18 hrs x ($50) = $ 900
Total weekly breakdown cost = $1,100+$1,050+$900+$1,000+$900=$ 4,950
$4,950
=$ 495 per machine/weekly
Average weekly breakdown cost =
10
d) Preventive maintenance program
weekly preventive cost program = $ 150
Weekly maintenance cost = Machine breakdown hours x weekly preventive cost
Machine1 = 22 x $ 150 = $ 3,300
Machine2 = 21 x $ 150 = $ 3,150
Machine3 = 18 x $ 150 = $ 2,700
Machine4 = 20 x $ 150 = $ 3,000
Machine5 = 18 x $ 150 = $ 2,700
Total weekly cost of new Preventive maintenance program= 3,300+3,150+2,700+3,000+2,700= $
14,850
$14,850
=$ 1,485 per machine/weekly
Average cost of new Preventive maintenance program=
10
Difference between the old system and new system = $ 1,485 - $ 495 = $ 990
Decision: the old system is more feasible than the new Preventive maintenance program because the old
system will save $ 4,950 ($ 990 x 5) weekly to the company. So it is recommended to keep the old system
than adopting the new one.
24
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Ex: Sound Warehouse in Georgetown sells CD players (with speakers), which it orders from Fuji
Electronics in Japan. Because of shipping and handling costs, each order must be for 5 CD players.
Because of the time it takes to receive an order, the warehouse outlet places an order every time the
present stock drops to 5 CD players. It costs $100 to place an order. It costs the warehouse $400 in lost
sales when a customer asks for a CD player and the warehouse is out of stock. It costs $40 to keep each
CD player stored in the warehouse. If a customer cannot purchase a CD player when it is requested, the
customer will not wait until one comes in but will go to a competitor. The following probability
distribution for demand for CD players has been determined:
0
0.4

Demand per Month


Probability

1
0.8

2
0.28

3
0.40

4
0.16

5
0.2

6
0.2

The time required to receive an order once it is placed has the following probability distribution:
1
0.60

Time to Receive an Order (mo.)


Probability

2
0.30

3
0.10

The warehouse has five CD players in stock. Orders are always received at the beginning of the week. Simulate
Sound Warehouse's ordering and sales policy for 10 months and Compute the average monthly cost.
Solution:
Step: 1 Develop probability distribu on for Monthly demand:
Probability
0
0.4
1
0.8
2
0.28
3
0.40
4
0.16
5
0.2
6
0.2
Develop probability distribution for Time receives order:

Cumulative Distribution
0.8
0.12
0.40
0.80
0.96
0.98
1.00

Demand Per Month

Time to Receive an Order (mo.)


1
2
3

Probability
0.60
0.30
0.10

Range
0-7
8-11
12-39
40-79
80-95
96-97
98-99

Cumulative Distribution
0.60
0.90
1.00

Range
0-59
60-89
90-99

Step: 2 Tabular Simula on:

Months

Rn1 for
Demand

1
2
3
4

39
65
76
45

Demand

Rn2 for
Time to
receive an
order

Time to
receive
and order

Sales

stock

Cost (Order place lost


sales +order holding)

2
3
3
3

19
90
69
64

1
3
2
2

3
2
0
3

2
0
0
2

40x2=$80
1x100x400=$40,000
3x100x400=$120,000
40x2=$80

25
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

5
6
7
8
9
10

96
73
71
00
70
99

Average Monthly Cost =

5
3
3
0
3
6
31

61
20
31
99
00
85

2
1
1
3
1
2
18

2
0
3
0
0
3

0
3
0
0
3
0

3x100x400=$120,000
40x3=$120
0
0
3x100x400=$120,000
2x100x400=$80,000
$ 480,280

$480,280
= $ 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:
Time Between Arrivals (min.)
Probability

Patient Needs to See


Probability

5
0.06

10
0.10

Doctor alone
0.50

15
0.23

20
0.29

25
0.18

Nurse alone
0.20

30
0.14

Both
0.30

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:
Doctor
10
15
20
25
30

Probability
0.22
0.31
0.25
0.12
0.10

Nurse
5
10
15
20

Probability
.08
.24
.51
.17

Both
15
20
25
30
35
40

Probability
0.07
0.16
0.21
0.28
0.17
0.11

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:
Time Between Arrivals
5

Probability
0.06

Cumulative Probability
0.06

26
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-5

Prepared by: Youssry Hamdy- CS Diploma

10
15
20
25
30

0.16
0.23
0.29
0.18
0.14

0.16
0.39
0.68
0.86
1.00

6-15
16-38
39-67
68-85
86-99

Patient needs to see


Probability
0.50
0.20
0.30

Patient needs to see


Doctor only
Nurse only
Both

Cumulative Probability
0.50
0.70
1.00

Range
0-49
50-69
70-99

Length of Visit (Doctor only)

Doctor only
10
15
20
25
30

Probability
0.22
0.31
0.25
0.12
0.10

Cumulative Probability
0.22
0.53
0.78
0.90
1.00

Range
0-21
22-52
53-77
78-89
90-99

Length of Visit (Nurse only)

Nurse only
5
10
15
20

Probability
0.08
0.24
0.51
0.17

Cumulative Probability
0.08
0.32
0.83
1.00

Range
0-7
8-31
32-82
83-99

Length of Visit (Both)

Both (Doctor & Nurse)


15
20
25
30
35
40

Probability
0.07
0.16
0.21
0.28
0.17
0.11

Cumulative Probability
0.07
0.23
0.44
0.72
0.89
1.00

Range
0-6
7-22
23-43
44-71
72-88
89-99

Step: 2 Tabular Simulation

Patient

Rn1

1
2
3

37
90

Time
between
Arrivals
15
25

Arrival
Clock
0.0
15.0
25.0

Enter
Room
Clock
0.0
15.0
30.0

Waiting
Rn2
Time
0.0
0.0
5.0

65
88
30

27
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Patient
need to

Rn3

Nurse
Both
Doctor

52
60
77

Length Time in
of Visit system
15
30
20

15
30
25

Prepared by: Youssry Hamdy- CS Diploma

4
5
6
7
8
9
10

40
10
53
08
93
60
96

20
10
20
10
25
20
30

45.0
55.0
75.0
85.0
110.0
130.0
160.0

50.0
65.0
95.0
135.0
145.0
220.0
325.0

5.0
10.0
20.
50.0
35.0
90.0
165.0
380

16
27
99
54
79
14
50

Doctor
Doctor
Both
Nurse
Both
Doctor
Nurse

44
67
08
15
90
35
24

15
20
20
10
40
15
10

20
30
40
60
75
105
175.0
575

Step: 3 Computation:
Average waiting time =

380
=38 Minutes per patient
10

Probability that the patient must wait:


5
5
10
20
=0.0131, P(5) =
=0.0131, P(10) =
=0.0263,
P(20) =
=0.0526
P(5) =
380
380
380
380
50
35
90
165
P(5) =
=0.0131, P(5) =
=0.0921, P(5) =
=0.2368, P(5) =
=0.4342
380
380
380
380
Probability that the patient must
wait=0.0131+0.0131+0.0263+0.0526+0.0131+0.0921+0.2368+0.4342=0.8813
The system doesnt appear to provide adequate care to patient because the waiting time ranges between 0
and 165 minutes. Thus waiting time is longer in some cases which affect patients health condition.

Ex. 8 Page 60 Book


An elevator in a manufacturing plant carries exactly 400 kilograms of materials. Therere three kinds of material,
and these are in boxes, that arrive for a ride on the elevator. These materials and their distributions of time
between arrivals are as follows:

Material
A
B
C

Weight (Kilograms)
200
100
50

Interarrival Time (Minutes)


52 (uniform)
6 (constant)
P(2)=0.33
P(3)=0.67

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

Interarrival Time

Probability

Cumulative Probability

28
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range

Prepared by: Youssry Hamdy- CS Diploma

3
4
5
6
7

0.2
0.2
0.2
0.2
0.2

0.2
0.4
0.6
0.8
1.0

0-19
20-39
40-59
60-79
80-99

Material A (200kg/box)

Box
1
2
3
4
5
6
7
8
9
10

Rn
55
89
17
38
69
71
90
18
94
47

Interarrival Time
5
7
4
4
6
6
7
3
7
5

Clock Time
5
12
16
20
26
32
39
42
49
54

Material B (100kg/box)

Box
1
2
3
4
5
6
7
8
9
10

Clock Time
6
12
18
24
30
36
42
48
54
60

Material C (50kg/box)

Interarrival Time
2
3

Box
1

Probability
0.33
0.67

Rn
39

Cumulative Probability
0.33
1.00

Interarrival Time
3
29
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-32
33-99

Clock Time
3

Prepared by: Youssry Hamdy- CS Diploma

2
3
4
5
6
7
8
9
10

Clock Time
3
6
7
9
11
12
15
18
19
21

73
72
75
02
87
98
10
47
21

3
3
3
2
3
3
2
3
2

Material( A) Arrival
1
2
-

6
9
12
14
17
20
22
25
27

Material (B) Arrival


1
2
3
-

Material (C) Arrival


1
2
3
4
-

Ex: 9
The time between arrivals of oil tankers at a loading dock at Prudhoe Bay is given by the following
probability distribution:
Time Between Ship Arrivals (days)
Probability

1
0.5

2
0.10

3
0.20

4
0.30

5
0.20

6
0.10

7
0.5

The time required to fill a tanker with oil and prepare it for sea is given by the following probability
distribution:
Time to Fill and Prepare (days)
Probability

3
0.10

4
0.20

5
0.40

6
0.30

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
Time Between Ship Arrivals (days)
3
4

Probability
0.5
0.10

Cumulative Probability
0.5
0.15

30
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Range
0-4
5-14

Prepared by: Youssry Hamdy- CS Diploma

5
6
5
6
7

0.20
0.30
0.20
0.10
0.5

0.35
0.65
0.85
0.95
1.00

15-34
35-64
65-84
85-94
95-99

Cumulative Probability
0.10
0.30
0.70
1.00

Range
0-9
10-29
30-69
70-99

Develop Random Number Ranges for Time to Fill and prepare (days)
Time to Fill and Prepare (days)
3
4
5
6

Probability
0.10
0.20
0.40
0.30

Step: 2 Tabular Simulation:


Tanker
Movement

1
2
3
4
5
6
7
8
9
10

Rn1

17
06
47
80
23
25
77
32
96
71

Time
between
Arrivals

3
2
4
5
3
3
5
3
6
5
39

Arrival
Clock

Enter
Clock

Waiting
Time

6
7
8
9
10
11
12
13
14

6
12
17
22
27
33
36
41
44

4
5
9
13
17
22
24
28
30
152

Rn2

95
62
31
36
63
76
01
66
03
55

Time to Fill
and Prepare
(days)
6
5
5
5
5
6
3
5
3
5

No. in
Queue

1
1
1
2
1
1
1
1
1
10

Time
Service
begin

Time
Service
End

Time
in
system

3
6
12
17
22
27
33
36
41
44

9
11
17
22
27
33
36
41
44
49

6
11
10
14
18
23
25
29
31
35
202

Step: 3 Computations
39
=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
Average Time between Arrivals =

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:
Months to Receive an Order

31
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

0.50

Probability

0.30

0.20

The demand per month is given by the following distribution:


1
0.10

Demand per Month (cars)


Probability

2
0.30

3
0.40

4
0.20

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
Months to Receive an Order
1
2
3

Probability
0.50
0.30
0.20

Cumulative Probability
0.50
0.80
1.00

Range
0-49
50-79
80-99

Develop Random Number Ranges for Demand per Month (cars)


Demand per Month (cars)
1
2
3
4

Probability
0.10
0.30
0.40
0.20

Cumulative Probability
0.10
0.40
0.80
1.00

Range
0-9
10-39
40-79
80-99

Step: 2 Tabular Simulation:


Orders
1
2
3
4
5
6
7
8
9
10

Rn1
71
12
48
18
08
94
26
83
63
05

Months to Receive an Order


2
1
1
1
1
3
1
3
2
1

Rn2
65
18
19
89
83
90
89
08
74
69

32
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Demand
3
2
2
4
4
4
4
1
3
3
30

Prepared by: Youssry Hamdy- CS Diploma

The Average number of Cars demanded during the time required to receive an order =

30
=3 Cars
10

The dealer should place an order when the demand is 4 cars per month.

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:
Sales Volume
Probability
Price $
Probability

300
0.12

400
0.18

22
0.07

23
0.16
8
0.17

Variable Cost $
Probability

500
0.20

600
0.23

24
0.24

25
0.25

9
0.32

10
0.29

700
0.17
26
0.18

11
0.14

800
0.10
27
0.10

12
0.08

Fixed costs are $9,000 per month for the store.


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:
Step: 1 Develop Random Number Ranges for Sales Volume
Sales Volume
300
400
500
600
700
800

Probability
0.12
0.18
0.20
0.23
0.17
0.10

Cumulative Probability
0.12
0.30
0.50
0.73
0.90
1.00

Range
0-11
12-29
30-49
50-72
73-89
90-99

Cumulative Probability
0.07

Range
0-6

Develop Random Number Ranges for Price


Price $
22

Probability
0.07

33
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

23
24
25
26
27

0.16
0.24
0.25
0.18
0.10

0.23
0.47
0.72
0.90
1.00

7-22
23-46
47-71
72-89
90-99

Cumulative Probability
0.17
0.49
0.78
0.92
1.00

Range
0-16
17-48
49-77
78-91
92-99

Develop Random Number Ranges for Variable Cost $


Variable Cost $
8
9
10
11
12

Probability
0.17
0.32
0.29
0.14
0.08

Step: 2 Tabular Simulation:


Month Rn1
1
2
3
4
5
6
7
8
9
10

71
12
48
18
08
94
26
83
63
05

Sales
Volume
600
400
500
400
300
800
400
700
600
300
50,000

Rn2
65
18
19
89
83
90
89
08
74
69

Price $ Rn3
25
23
23
26
26
27
26
22
26
25

17
06
47
80
23
25
77
32
96
71

Variable
Cost $
9
8
9
11
9
9
10
9
12
10

Profits $

Loss $

$600
5,400
100
$ 6,100

-3,000
-2,900
-3,000
-3,900
-2,600
-600
-4,500
$ 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

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Month 7: (400x$26)=$10,400 (400x$10+$9,000) =$13,000


Loss=$10,400 $13,000= $ -2,600
Month 8: (700x$22)=$15,400 (700x$9+$9,000) = $15,300
Profit= $15,400 $15,300=$100
Month 9: (600x$26)=$15,600 (600x$12+$9,000) = $16,200
Loss= $15,600 $16,200 = $ -400
Month 10: (300x$25)=$7,500 (300x$10+$9,000)=$12,000
Loss = $7,500 $12,000= $ -4,500
$6,100
Average profits =
= $ 610 Per month
10
$20,500
= $ 2,050 Per month
Average Loss =
10
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
Probability

1
0.27

2
0.35

3
0.14

4
0.9

5
0.15

Intelligence
Probability

1
0.10

2
0.16

3
0.45

4
0.17

5
0.12

Personality
Probability

1
0.15

2
0.30

3
0.33

4
0.07

5
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 Attractiveness
1
2
3
4
5

Probability
0.27
0.35
0.14
0.09
0.15

Cumulative Probability
0.27
0.62
0.76
0.85
1.00

Range
0-26
27-61
62-75
76-84
85-99

Cumulative Probability
0.10

Range
0-9

Develop Random Number Ranges for Intelligence

Intelligence
1

Probability
0.10

35
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

2
3
4
5

0.16
0.45
0.17
0.12

0.26
0.71
0.88
1.00

10-25
26-70
71-87
88-99

Cumulative Probability
0.15
0.35
0.78
0.85
1.00

Range
0-14
15-34
35-77
78-84
85-99

Develop Random Number Ranges for Personality

Personality
1
2
3
4
5

Probability
0.15
0.30
0.33
0.07
0.15

Step: 2 Tabular Simula on

Date

Rn1

2
2
3
4
5
6
7
8
9
10

71
12
48
18
08
94
26
83
63
05

Physical
Attractiveness

3
1
2
1
1
5
1
4
3
1
22

Rn2

Intelligence

Rn3

Personality

65
18
19
89
83
90
89
08
74
69

3
2
2
5
4
5
4
1
4
3
33

55
89
17
38
69
71
90
18
94
47

3
5
2
3
3
3
5
2
5
2
33

Step: 3 Computa on
Average Physical Attractiveness =

22
=2.2
10

33
=3.3
10
33
Average Personality =
=3.3
10

Average Intelligence =

The Overall Ra ng of Salem Collage = 2.2+3.3+3.3=8.8

Random Number Generation using Linear congruential Method:

Formula: Xi +1=(axi+c)mod m, I = 0,1,2,3,.


Where: X0 is the seed, a is mul plier, c is increment, m is modulus.
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,.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


Use Linear congruen al Method to generate a sequence of 10 random numbers with

X0=27, a=17, c=43, mod 100


Solution:
Xi +1 =(17X 27+43) mod 100= 502 mod 100 = 2
=

= 0.02

X2 =(17X 2+43) mod 100= 77 mod 100 = 77


= 0.77
X3 =(17X 77+43) mod 100= 1352 mod 100 = 52
= 0.52
X4 =(17X 52+43) mod 100= 927 mod 100 = 27
= 0.27
X5 =(17X 27+43) mod 100= 502 mod 100 = 2
= 0.02
X6 =(17X 2+43) mod 100= 43.34 mod 100 = 77
= 0.77
X7 =(17X 77+43) mod 100= 1352 mod 100 = 52
= 0.52
X7=(17X 52+43) mod 100= 927 mod 100 = 27
= 0.27
X8=(17X 27+43) mod 100= 502 mod 100 = 2
= 0.02
X9=(17X 2+43) mod 100= 77 mod 100 =77
= 0.77
X10=(17X 77+43) mod 100= 1352 mod 100 =52
= 0.52
The 10 random number {0.02, 0.77, 0.52, 0,27, 0.02, 0.77, 0.52,0.27,0.02,0.77,0.52}

Ex: 4 Page 269


Use Linear congruen al Method to generate a sequence of 3 two-digit random integers
Let X0=27, a=8, c=47, mod= 100
Solution:
Xi +1 =(8x 27+47) mod 100= 263 mod 100 = 63
37
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

R1 =

63
=0.63
100

x2 =(8x63+47) = mod 100 = 551 mod 100 = 51

R2 =

51
=0.51
100

x3 =(8x51+47) = mod 100 = 455 mod 100 = 55

R3 =

55
=0.55
100

x4 =(8x55+47) = mod 100 = 487 mod 100 = 87

R4 =

87
=0.87
100

x5 =(8x87+47) = mod 100 = 743 mod 100 = 43

R5 =

43
=0.43
100

The Sequence of Random integer numbers are {63, 51, 55, 87, 43}

Ex: 6 Page: 269


Use the multiplicative congruential method to generate a sequence of four-digit random integers. Let X0
=117, a=43, and m=1000.
ax mod 100
X1=[43(117)]=mod 1000 = (5031) mod 1000 = 31
X2=[43(31)]=mod 1000 = (1333) mod 1000 = 333
X3=[43(333)]=mod 1000 = (14319) mod 1000 = 319
X4=[43(319)]=mod 1000 = (13717) mod 1000 = 717
The four-digit random integers are {31, 333, 319, 717}

Tests of autocorrelation:
Ex: 7.8 Page: 266
Given the following probability distribution and intervals, compute the largest M that satisfting the inequality
M=4
Random
Probability

3
0.23

8
0.28

13
0.33

18
0.27

23
0.05

28
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

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma

Solution:
R3

+5k+1-0.25
0.25

= (0.23 x 0+02.8x 0.33+0.33x(0.27)+0.27x0.05+0.05x0.36-0.25=-0.1945

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

PDF created with pdfFactory Pro trial version www.pdffactory.com

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

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


Q 3: When and when not a Simula on is an appropriate tool?

When simulation is a appropriate tool:


1. Simulation enables the study of and experimentation with, internal interaction of a complex system
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
5. Simulation can be used to verify the analytical solution
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.
When simulation is not a appropriate tool:
If the problem can be solved using common sense
1. If the problem can be solved analytically
2. If it is easier to perform direct experiments
3. If the costs exceed the savings
4. If the resources or time are not available
5. If the system behavior is too complex or cant be defined
Q : 4 Whatre the advantages and disadvantages of simula on and areas of application?
Advantages of Simulation:
1- Simulation appealing to a client because it mimics what happens in a real system in the design stage
2- It is possible to develop a simulation model without dubious mathematical assumptions
3- In contrast to optimization models, simulation models are run rather than solved
Disadvantages of Simulation:
1. Model building requires special training
2. Simulation result may be difficult to interpret
3. Simulation modeling can be time consuming and expensive
41
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

Prepared by: Youssry Hamdy- CS Diploma


Areas of application:
1- manufacturing
2- Semi-conductors manufacturing
3- Construction Engineering
4- Military Applications 5- Logistics, Transportations and distribution
6- Business process simulation 7- Human system
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:

1.
2.
3.
4.

An entity is an object of interest in the system.


An attribute is a property of an entity
An activity represents a time period of specified length
The state of a system is defined to be that collection of variables necessary to describe the
system at any time, relative the objective of the study
5. An event is an instantaneous occurrence that may change the state 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
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]

42
Prepared by: Youssry Hamdy-CS Diploma

PDF created with pdfFactory Pro trial version www.pdffactory.com

You might also like