Sie sind auf Seite 1von 6

Acceptance

Rejection Method Example


Lisahasbeenplacedinchargeofaproject.Sheneedsanestimateofhowlongtheprojectwilltake.
Theprojectismadeupof5activities:
Assembleteam,
Manufacturehardware,
Writesoftware,
Debugsoftware,
Installsystem.
Theseactivitiesarerelatedbythefollowingprecedencediagram:

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.94737 78.947 0.87259 0.10526 no

0.63856 72.771 0.66612 0.72288 yes


10 0.66248

10

0.8614 yes

u1

u2

f(x)

accept value

0.1645 no

0.47097 39.419

63.984 0.29602

0.804 0.99663 yes

35.92 0.94135 0.83357 no

0.6607 43.214 0.78166

0.8967 yes

68.614 0.03919 30.784 0.46724 0.15062 no

0.82919 46.584 0.31388 0.56654 yes

71.716 0.27282 35.456

10 0.13863 62.773 0.53597 0.27726 no

10

71.561 0.22671 34.534

10 0.07912 61.582 0.70023 0.15824 no


10 0.61281 72.256 0.75808 0.77438 yes

10 0.18527 63.705 0.46783 0.37054 no

u2

f(x)

accept value

0.5668 0.79356 yes

0.0257 0.93266 yes

0.6037 0.70125 yes

67.649 0.19271 33.854

0.07821 26.257 0.09056 0.3128 yes

43.214 0.94672 95.738 0.56406

0.8599 yes

0.5459 0.62229 yes

10 0.47266 69.453 0.69314 0.94532 yes

69.453 0.80731 46.146 0.80164 0.62224 no


0.99219 49.844 0.87724

0.34334 36.867

AcceptanceRejectionMethod

86.024

47.274

86.338

0.35614 48.491 0.13296 0.8585 yes

33.854

0.0421 23.368 0.44111 0.1684 no

0.0849 0.1568 yes

36.867 0.74636 79.709 0.79261 0.3382 no

Page5

48.491

0.031 no

0.5916 0.90183 yes

33.752

36.257 0.75522 80.418 0.88068 0.3264 no

TutorialSolution

34.534 0.82922 86.338 0.22558 0.2277 yes

74.181

0.34092 47.274 0.19212 0.8788 yes

10 0.38244 67.649 0.61157 0.76488 yes

37.405 0.29464 43.571 0.94661 0.9405 no

0.1719 33.752 0.00466 0.6876 yes

35.456 0.97697 98.158 0.03462 0.0307 no

46.584

value

10 0.94107 78.821 0.73847 0.11786 no

0.071 no

IS

0.67726 74.181 0.07516 0.4303 yes

0.88239 90.591

10

72.256 0.31285 36.257 0.26809

26.257

10 0.05704 61.141 0.43886 0.11408 no

10

39.419 0.94554 95.643 0.31567 0.0726 no

0.8439 yes

u1

0.8253 86.024 0.07331 0.2329 yes

10 0.24759 64.952 0.10709 0.49518 yes

10 0.57805 71.561 0.45979

64.952 0.37025 37.405

0.7696 no

10

0.3848 67.696 0.82521

73.25 0.92168 48.434 0.36436 0.28874 no

0.4244 no

10 0.58582 71.716 0.24145 0.82836 yes


0.7878 75.756 0.45972

DS

50.234

10 0.14016 62.803 0.54714 0.28032 no

0.16108 33.222 0.74541 0.54053 no

10 0.08225 61.645 0.85982

0.87926 47.585 0.85039 0.42465 no


0.4307 68.614 0.36917

36.142 0.37792 50.234 0.01488 0.8294 yes

WS

72.771 0.30712 36.142 0.69607 0.85119 yes

73.25 0.51453 0.67504 yes

10 0.19922 63.984 0.29923 0.39844 yes

90.591

40.922

0.26153 40.922 0.27734 0.9846 yes


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

Das könnte Ihnen auch gefallen