Professional Documents
Culture Documents
Assemble
team
Manufacture
hardware
Write
software
Install
system
Debug
software
Thustheprojectdurationwillbe:AT+max(MH,WS+DS)+IS.
Shebelievesthatshecanassembletheteamin10days.
Thetimetakentomanufacturethehardwareisuncertain.Itcouldtakeanywherefrom60daysto80
days.Shedecidesthatanappropriatemodelwouldbeatriangularprobabilitydensityfunctionwith
amodeof70days:
A
607080
Thetimeforwritingthesoftwareisalsouncertain.Itcouldtakeanywherefrom30to50days.
HoweverLisathinksthatitismoreuncertainthanmanufacturingthehardwaresoshedecidesto
modelitusingaquadraticfunctionfortheprobabilitydensityfunction,whichallocatesmoreofthe
probabilityspacetovaluesawayfromthecentreofthedistribution.
B
304050
TutorialSolution
AcceptanceRejectionMethod
Page1
Thetimefordebuggingisthemostuncertainofall.Itmighthappenreallyquicklyin20days,orit
mighttakeaslongas100days.However,Lisathinksitismostlikelytotakearound40days.Thusshe
decidestomodelitusingaskewedtriangulardistribution.
C
2040 100
Afterboththehardwareandsoftwarearereadyitshouldonlytake5daystoinstallthesystem.
Lisaisnotverygoodatcalculus,soinsteadofusingtheinversetransformmethodtosolvethis
problem(likeanysensiblepersonwould)shedecidestouseanacceptancerejectionmethodwith
uniformmajorisingfunctions.
UsingtenrealisationsofaMonteCarloSimulationdetermine:
a. theaveragetimethatthisprojectcouldbeexpectedtotake,
b. theupperquartileforthistime(ietimeforwhichthereisonlya25%probabilitythatitwill
takelonger),and
c. theprobabilitythatmanufacturingthehardwarewillbeacriticalactivity(ietakelongerthan
thetwosoftwareactivities.
Solution
Wefirstneedtodeterminetheequationsofthecurvesintheprobabilitydensityfunctions.
Formanufacturingthehardwarethelefthandsideofthetriangleneedstopassthroughthepoints
(60,0)and(70,A).(LisacannotworkoutwhatAisbecauseshecannotdocalculus,butitwillnot
matteranywaybecauseitwillgetcancelledlater.)Thislinehasequation:y=(x60)*A/10.
Similarlytherighthandsideofthetrianglepassesthroughthepoints(70,A)and(80,0)soithasthe
equationy=(80x)*A/10.
Forwritingthesoftwareweneedaquadraticthatpassesthroughthepoints(30,0)and(50,0).
Thereforey=B*[100(x40)2]/100.(Onceagain,LisaunabletocalculatethevalueofBbecause
shecannotdocalculus.Thenumber100ischosensothaty=Bforx=40)
Fordebuggingthesoftwarethelefthandsideofthetriangleneedstopassthroughthepoints(20,0)
and(40,C).Thislinehasequation:y=(x20)*C/20.
Similarlytherighthandsideofthetrianglepassesthroughthepoints(40,C)and(100,0)soithas
theequationy=(100x)*C/60.
Themajorisingfunctionsaregivenbyy=A,y=Bandy=C.
TutorialSolution
AcceptanceRejectionMethod
Page2
Nowwestartthesimulation:
Firstrealisation:
Forassemblingtheteamweknowthatthedurationwillbe10days.
Formanufacturingthehardwaretheprobabilitydensityfunctionandmajorisingfunctionlooklike:
y=A
A
y=A*(x60)/10
y=A*(80x)/10
607080
Firstwelookupthetable(A.1.fromthelecturenotes)andfindu1=0.94737.
Wethencalculatex=60+20*u1=60+20*0.94737=78.947.(60isthelowerlimitinthediagram.
20isthedifferencebetweentheupperandlowerlimits:8060.)
Since78.947islargerthan70weneedtousetheequationfortherighthandsideofthetriangleto
determinef(x).
f(x)=A*(8078.947)/10=0.10526*A.
Thereforef(x)/g(x)=0.10526*A/A=0.10526.
Welookupthetableagainandobtainu2=0.87259.Thisislargerthanf(x)/g(x)sowetherefore
rejectxandstartagain.
Sowelookupthetableagainandfindu1=0.63856.
Wethencalculatex=60+20*u1=60+20*0.63856=72.771.
Since72.771islargerthan70weneedtousetheequationfortherighthandsideofthetriangle
again.f(x)=A*(8072.771)/10=0.72288*A.
Thereforef(x)/g(x)=0.72288*A/A=0.72288.
Welookupthetableagainandobtainu2=0.66612.Thisissmallerthanf(x)/g(x)sowetherefore
acceptthisvalueofxandthetimetakentomanufacturethehardwareis72.771days.
Forwritingthesoftwaretheprobabilitydensityfunctionandmajorisingfunctionlooklike:
B
y=B
y=B*[100(x40)2]/100
304050
TutorialSolution
AcceptanceRejectionMethod
Page3
Onceagainlookuptherandomnumberstableagainandfindu1=0.30712.
Wethencalculatex=30+20*u1=30+20*0.30712=36.142.(30isthelowerlimitinthe
diagram.20isthedifferencebetweentheupperandlowerlimits:5030.)
Wedeterminef(x)bysubstituting36.142intothequadraticequation.
f(x)=B*[100(36.14240)2]/100=0.85119
Welookupthetableagainandobtainu2=0.69607.Thisissmallerthanf(x)/g(x)sowetherefore
acceptthisvalueofxandthetimetakentosoftwareis36.142days.
Wewereluckythistimethatwewereabletoacceptourfirstanswer.
Fordebuggingthesoftwaretheprobabilitydensityfunctionandmajorisingfunctionlooklike:
y=C
y=C*(100x)/60
y=C*(x20)/20
2040100
Onceagainlookuptherandomnumberstableagainandfindu1=0.37792.
Wethencalculatex=20+80*u1=20+80*0.37792=50.234.
Since50.234islargerthan40weneedtousetheequationfortherighthandsideofthetriangle
again.f(x)=C*(10050.234)/60=0.82944*C.
Thereforef(x)/g(x)=0.82944*C/C=0.82944.
Welookupthetableagainandobtainu2=0.01488.Thisissmallerthanf(x)/g(x)sowetherefore
acceptthisvalueofxandthetimetakentodebugthesoftwareis50.234days.
Forinstallingthesystemweknowthatthedurationwillbe5days.
Thatcompletesthefirstrealisation.Ihavedonethisanotherninetimesandtheresultsareinthe
followingtable.Theanswersforthefirstrealisation(above)areinthefirstrowofthetable.
TutorialSolution
AcceptanceRejectionMethod
Page4
AT
MH
value u1
u2
f(x)
accept value
10
0.8614 yes
u1
u2
f(x)
accept value
0.1645 no
0.47097 39.419
63.984 0.29602
0.8967 yes
10
u2
f(x)
accept value
0.8599 yes
0.34334 36.867
AcceptanceRejectionMethod
86.024
47.274
86.338
33.854
Page5
48.491
0.031 no
33.752
TutorialSolution
74.181
46.584
value
0.071 no
IS
0.88239 90.591
10
26.257
10
0.8439 yes
u1
0.7696 no
10
0.4244 no
DS
50.234
WS
90.591
40.922
TheprojectdurationisgivenbyAT+max(MH,WS+DS)+IS
Forthefirstrealisationthisis10+max(72.771,36.142+50.234)+5.
Since36.142+50.234=86.376islargerthan72.771wefindthatmanufacturingthehardwareisnotacriticalactivity
andtheprojectdurationisgivenby10+86.376+5=101.376.
Thetablebelowshowsthesecalculationsforeachoftherealisationsonthetableonthepreviouspage.
AT
10
10
10
10
10
10
10
10
10
10
MH
72.7712
73.2496
63.9844
68.614
71.7164
64.9518
71.561
72.2562
67.6488
69.4532
WS
DS
IS
36.1424 50.2336
39.4194 26.2568
43.214 74.1808
46.5838
33.752
35.4564
86.024
37.405
47.274
34.5342 86.3376
36.257 48.4912
33.8542 90.5912
36.8668 40.9224
5
5
5
5
5
5
5
5
5
5
duration MHcritical?
101.376 FALSE
88.2496
TRUE
132.3948 FALSE
95.3358 FALSE
136.4804 FALSE
99.6786
TRUE
135.8718 FALSE
99.7482 FALSE
139.4454 FALSE
92.7892 FALSE
NowtoanswerLisasthreequestions:
a. Theaveragedurationistheaverageofthedurationcolumn.Thisisgivenby1121.1/10=112.11
b. Theupperquartileisthevalueforwhich25%oftheresultsarelonger.Thelongestdurationis139.44.The
secondlongestis136.48.Thethirdlongestis135.87.Theselasttworepresentthe20%and30%marksowe
canapproximatetheupperquartileasbeingbetweenthemataround136.2.(Ifyouhaddonethis1000
timesyoucouldjustquotethe250thlargestresult).
c. Manufacturingthehardwarewasacriticalactivity2outof10realisationssotheprobabilitythat
manufacturinghardwarewillbeacriticalactivityis0.2.
TutorialSolution
AcceptanceRejectionMethod
Page6