Download - Session 7b
Session 7b
Decision Models -- Prof. Juran
2
Example: Preventive Maintenance
At the beginning of each week, a machine is in one of four conditions: 1 = excellent; 2 = good; 3 = average; 4 = bad.
The weekly revenue earned by a machine in state 1, 2, 3, or 4 is $100, $90, $50, or $10, respectively.
After observing the condition of the machine at the beginning of the week, the company has the option, for a cost of $200, of instantaneously replacing the machine with an excellent machine.
Decision Models -- Prof. Juran
3
The quality of the machine deteriorates over time, as shown here.
Probability that Machine Begins Next Week As Present Machine State Excellent Good Average Bad Excellent 0.7 0.3 Good 0.7 0.3 Average 0.6 0.4 Bad 1.0 (until replaced)
Decision Models -- Prof. Juran
4
Four maintenance policies are under consideration: Policy 1: Never replace a machine. Policy 2: Immediately replace a bad machine. Policy 3: Immediately replace a bad or average machine. Policy 4: Immediately replace a bad, average, or good
machine
Simulate each of these policies for 50 weeks (using 250 iterations each) to determine the policy that maximizes expected weekly profit. Assume that the machine at the beginning of week 1 is excellent. We’ll make use of the IF and RAND() functions
Decision Models -- Prof. Juran
5
123456789
10111213141516171819202122
A B C D E F G H I J K L M NSimulation of policy 1 (never replace)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State Average weekly profit $18.601 1 100 0 0 100 0.678 12 1 100 0 0 100 0.852 2 Inputs3 2 80 0 0 80 0.469 2 Cost of replacing $2004 2 80 0 0 80 0.156 25 2 80 0 0 80 0.936 3 Weekly revenue as a function of the state of the machine6 3 50 0 0 50 0.689 4 State Revenue7 4 10 0 0 10 0.989 4 1 $1008 4 10 0 0 10 0.549 4 2 $809 4 10 0 0 10 0.867 4 3 $5010 4 10 0 0 10 0.403 4 4 $1011 4 10 0 0 10 0.648 412 4 10 0 0 10 0.449 4 Initial state 113 4 10 0 0 10 0.699 414 4 10 0 0 10 0.163 4 Description of machine deterioriation from one week to the next15 4 10 0 0 10 0.469 4 State at beginning State at beginning of next week16 4 10 0 0 10 0.982 4 of this week 1 2 3 417 4 10 0 0 10 0.928 4 1 0.7 0.3 0 018 4 10 0 0 10 0.095 4 2 0 0.7 0.3 019 4 10 0 0 10 0.926 4 3 0 0 0.6 0.420 4 10 0 0 10 0.425 4 4 0 0 0 1
Decision Models -- Prof. Juran
6
123456789
10111213141516171819202122
J K L M N
Average weekly profit $18.60
InputsCost of replacing $200
Weekly revenue as a function of the state of the machineState Revenue
1 $1002 $803 $504 $10
Initial state 1
Description of machine deterioriation from one week to the nextState at beginning State at beginning of next weekof this week 1 2 3 4
1 0.7 0.3 0 02 0 0.7 0.3 03 0 0 0.6 0.44 0 0 0 1
=AVERAGE(F3:F52)
Decision Models -- Prof. Juran
7
1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16
A B C D E F G H Simulation of policy 1 (never replace)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State 1 1 100 0 0 100 0.678 1 2 1 100 0 0 100 0.852 2 3 2 80 0 0 80 0.469 2 4 2 80 0 0 80 0.156 2 5 2 80 0 0 80 0.936 3 6 3 50 0 0 50 0.689 4 7 4 10 0 0 10 0.989 4 8 4 10 0 0 10 0.549 4 9 4 10 0 0 10 0.867 4 10 4 10 0 0 10 0.403 4 11 4 10 0 0 10 0.648 4 12 4 10 0 0 10 0.449 4 13 4 10 0 0 10 0.699 4 14 4 10 0 0 10 0.163 4
=K14
=H3
=VLOOKUP(B4,$J$9:$K$12,2,0)
=D4*$K$5 =C4-E4
This will contain a different decision rule for each proposed replacement policy. Depending on the state of the machine at the end of the previous week we will have a zero or a one, where a one represents the decision to replace the machine. Here, we never replace, so it's always a zero.
=IF(B4=1,(((G4<$K$19)*(1))+((G4>$K$19)*(2))),IF((B4=2),(((G4<$L$20)*(2)) +((G4>$L$20)*(3))),IF((B4=3),(((G4<$M$21)*(3))+((G4>$M$21)*(4))),4)))
Decision Models -- Prof. Juran
8
70.0%
30.0%
0.0%
0.0%
0.0%
70.0%
30.0%
0.0%
0.0%
0.0%
60.0%
40.0%
0.0%
0.0%
0.0%
100.0%
Preventive Maintenance
Begin in Excellent Condition
Begin in Average Condition
Begin in Bad Condition
Begin in Good Condition
Excellent at End of Week
Good at End of Week
Average at End of Week
Bad at End of Week
Excellent at End of Week
Good at End of Week
Average at End of Week
Bad at End of Week
Excellent at End of Week
Good at End of Week
Average at End of Week
Bad at End of Week
Excellent at End of Week
Good at End of Week
Average at End of Week
Bad at End of Week
Decision Models -- Prof. Juran
9
George Boole (1815 - 1864)
Boole argued that logic was principally a discipline of mathematics, rather than philosophyDeveloped a way to encode logical arguments into a language that could be manipulated and solved mathematicallyA binary system, with basic operations AND, OR and NOT, that is one of the principles of modern computing
Decision Models -- Prof. Juran
10
“Not” gates
Combining gates to compute 1 + 0 = 1“Or” gates
“And” gates
Decision Models -- Prof. Juran
11
12345678910111213141516
A B C D E F G HGender Marital Status Single Female?
James Male Married 0Monique Female Married 0Frantz Male Single 0Johnson Male Single 0Brett Male Married 0Julio Male Single 0Kathy Female Single 1Richard Male Single 0Edward Male Married 0Emily Female Married 0Abigail Female Married 0Eugenia Female Single 1Heather Female Single 1Kerstin Female Single 1Erika Female Married 0
=(B3="Female")*(C3="Single")
Example of a Boolean operation:
Decision Models -- Prof. Juran
12
=((G5<$K$19)*(1))+((G5>$K$19)*(2))
In English, this translates as “1 if G5 is less than K19 and 2 if G5 is not less than K19”.
We can have this cell return a 1 or a 2, based on the probability that G5 is less than K19. Our model uses statements like this, where G5 is a uniform random variable between 0 and 1.
Decision Models -- Prof. Juran
13
Selecting cell G3, click on the define assumption button.
This opens the distribution gallery. Select Uniform, and click OK.
Decision Models -- Prof. Juran
14
We want a uniform distribution from 0 to 1, so type in these values for the two parameters, and then click OK.
Decision Models -- Prof. Juran
15
12345
F G H
Profit Random # Ending State100 0.678 1100 0.852 280 0.469 2
Decision Models -- Prof. Juran
16
We could use the same procedure to define all of the other assumption cells, but that would be tedious. Luckily, Crystal Ball has copy and paste buttons:
Select the assumption cell you want to copy (G3), and click the Crystal Ball copy button (not the regular Excel copy button). Then select the cells you want to define as assumptions (G4:G52), and click the Crystal Ball paste button. They will all turn green.
Decision Models -- Prof. Juran
17
123456789
101112
A B C D E F G HSimulation of policy 1 (never replace)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State1 1 100 0 0 100 0.350 12 1 100 0 0 100 0.852 23 2 80 0 0 80 0.469 24 2 80 0 0 80 0.156 25 2 80 0 0 80 0.936 36 3 50 0 0 50 0.689 47 4 10 0 0 10 0.989 48 4 10 0 0 10 0.549 49 4 10 0 0 10 0.867 410 4 10 0 0 10 0.403 4
Decision Models -- Prof. Juran
18
In our case, we are interested in the long-run average profit of the machine over 50 weeks, which is cell K2. Select cell K2 and click on the Crystal Ball define forecast button:
Decision Models -- Prof. Juran
19
Decision Models -- Prof. Juran
20
12345678
A B C D E F G HSimulation of policy 1 (never replace)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State1 1 100 0 0 100 0.545 12 1 100 0 0 100 0.189 13 1 100 0 0 100 0.383 14 1 100 0 0 100 0.195 15 1 100 0 0 100 0.649 16 1 100 0 0 100 0.620 1
0
12345678
A B C D E F G HSimulation of policy 2 (replace bad machines)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State1 1 100 0 0 100 0.259 12 1 100 0 0 100 0.964 23 2 80 0 0 80 0.056 24 2 80 0 0 80 0.170 25 2 80 0 0 80 0.203 26 2 80 0 0 80 0.119 2
=(H5=4)*(1)+(H5<4)*(0)
Make a spreadsheet for each replacement policy (contents of D6 shown).
Decision Models -- Prof. Juran
21
1 2 3 4 5 6 7 8
A B C D E F G H Simulation of policy 3 (replace bad and average machines)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State 1 1 100 0 0 100 0.816 2 2 2 80 0 0 80 0.384 2 3 2 80 0 0 80 0.703 3 4 1 100 1 200 -100 0.115 1 5 1 100 0 0 100 0.333 1 6 1 100 0 0 100 0.415 1
=(H5>2)*(1)+(H5<3)*(0)
12345678
A B C D E F G HSimulation of policy 4 (replace bad, average, and good machines)
Week Beginning state Revenue Replace? Cost Profit Random # Ending State1 1 100 0 0 100 0.786 22 1 100 1 200 -100 0.880 23 1 100 1 200 -100 0.014 14 1 100 0 0 100 0.239 15 1 100 0 0 100 0.080 16 1 100 0 0 100 0.709 2
=(H5>1)*(1)+(H5<2)*(0)
Decision Models -- Prof. Juran
22
Decision Models -- Prof. Juran
23
Preventative Maintenance
$-
$10
$20
$30
$40
$50
$60
$70
$- $2 $4 $6 $8 $10 $12 $14
Standard Deviation of Weekly Profit
Aver
age
Wee
kly
Prof
it
Policy 3
Policy 2
Policy 4Policy 1
It looks like policies 2 and 3 are both reasonable, while policies 1 and 4 are clearly inferior.
Decision Models -- Prof. Juran
24
Summary• Monte Carlo Simulation
– Basic concepts and history• Excel Tricks
– RAND(), IF, Boolean• Crystal Ball
– Probability Distributions • Normal, Gamma, Uniform, Triangular
– Assumption and Forecast cells– Run Preferences– Output Analysis
• Examples– Coin Toss, TSB Account, Preventive Maintenance, NPV