Multiattribute acceptance sampling plans - Library(ISI Kolkata ...
Multiattribute acceptance sampling plans - Library(ISI Kolkata ...
Multiattribute acceptance sampling plans - Library(ISI Kolkata ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Annexure<br />
Microsoft Visual Basic programme as Excel Macro “OptimalAPlan()” for obtaining the<br />
Bayesian Optimal A plan for discrete prior Distribution for a given lot size, and values of<br />
( p , p , p ), ( p′<br />
, p′<br />
, p′<br />
) , γ , γ<br />
1 2 3 2 2 3 1 2<br />
‘The following array variables are used ;<br />
‘MINREGRET () is an array variable denoting the regret value for a given c 3<br />
‘Optc2() is an array variable denoting the optimum c 2 value for a given c 3<br />
‘Optc1() is an array variable denoting the optimum c 1 value for a given c 3<br />
Optcn() is an array variable denoting the optimum n value for a given c 3<br />
‘For all other variables see the explanations given as comment<br />
Sub optimalAthree()<br />
Dim MINREGRET(50)<br />
Dim optc2(50)<br />
Dim optc1(50)<br />
Dim optn(50)<br />
J = 1 ‘j is a variable used to define the row of the output sheet<br />
‘Print Header for the output worksheet “Sheet 1”<br />
Worksheets(“sheet1”).Cells(1,1).Value=”LOT”<br />
Worksheets(“Sheet1”).Cells(1,2).Value=”Optimum c 3 ”<br />
Worksheets(“Sheet1”).Cells(1,3).Value=”Optimum c 2 ”<br />
Worksheets(“Sheet1”).Cells(1,4).Value=”Optimum c1”<br />
Worksheets(“Sheet1”).Cells(1,5).Value=”Optimum n”<br />
Worksheets(“sheet1”).Cells(1,6).Value=”Regret Value”<br />
‘Set the process average values at stage 2 for the first, second and the third attribute<br />
p1dash=1/100<br />
p2dash=4/100<br />
p3dash=10/100<br />
pdash =p1dash+p2dash+p3dash<br />
‘Set the ratios of the process averages at stage two and stage one for attribute 1,2 and three<br />
onerat=8<br />
tworat=5<br />
threerat=3<br />
118