11.07.2014 Views

Multiattribute acceptance sampling plans - Library(ISI Kolkata ...

Multiattribute acceptance sampling plans - Library(ISI Kolkata ...

Multiattribute acceptance sampling plans - Library(ISI Kolkata ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

p1=p1dash/onerat<br />

p2=p2dash/tworat<br />

p3=p3dash/threerat<br />

p=(p1+p2+p3)<br />

‘Set the Gamma1 and Gamma2 Values<br />

gamma1=1.0<br />

gamma2=0.7<br />

‘Initialize for Minregret ()<br />

For k = 0 To 50<br />

MINREGRET(i)=10000<br />

Next<br />

‘Set Lotsize<br />

Lot=1000<br />

‘Start iteration w.r.t. c 3<br />

For c 3 =0 To 30<br />

‘Calculate lower bound and upper bound for the sample size for a given c 3<br />

nupbound=(Log(gamma2)+((c3+1)*Log(onerat))/(pdash-p))<br />

n1pbound=(Log(gamma2)+(c3*Log(threerat))/(pdash-p))<br />

‘Start iteration w.r.t c 1 ,c 2<br />

For c2=0 To c3<br />

For c1=0 To c2<br />

‘PrevRegret is a variable used to limit the n value not to exceed the optimum n. To start with we<br />

set a large value for PrevRegret<br />

prevRegret=10000<br />

For n = n1pbound To nupbound Step 2<br />

‘Calculate Regret using the Pa function to obtain Probability of <strong>acceptance</strong><br />

Regret = n+(lot – n)*(gamma1*(1-PA(c1, c2, c3, n, p1, p2, p3)) + gamma2*<br />

PA(c1, c2, c3, n, p1dash, p2dash, p3dash))<br />

RegretprevRegret Then GoTo 100<br />

‘n need not be incremented beyond this point<br />

119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!