Professional Documents
Culture Documents
(F_login.varproduksi.fieldbyname('normal_2').Value);
prd_5 := StrTofloat
(F_login.varproduksi.fieldbyname('normal_3').Value);
prd_6 := StrTofloat
(F_login.varproduksi.fieldbyname('tambah_1').Value);
prd_7 := StrTofloat
(F_login.varproduksi.fieldbyname('tambah_2').Value);
//pemesanan
begin
if k<= psn_1 then derajat_psntrn := 1
else if (k>= psn_1) and (k<=psn_2) then
derajat_psntrn := (psn_2-k)/(psn_2-psn_1)
else if (k>=psn_2) then derajat_psntrn := 0;
end;
begin
if (k<=psn_3) or (k>=psn_5) then derajat_psnnormal := 0
else if (k>= psn_3) and (k<=psn_4) then
derajat_psnnormal := (k-psn_3)/(psn_4-psn_3)
else if (k>= psn_4) and (k<=psn_5) then
derajat_psnnormal := (psn_5-k)/(psn_5-psn_4)
else if (k=psn_4) then derajat_psnnormal := 1;
end;
begin
if k<=psn_6 then derajat_psnnaik := 0
else if (k>= psn_6) and (k<=psn_7) then
derajat_psnnaik := (k-psn_6)/(psn_7-psn_6)
else if (k>=psn_7) then derajat_psnnaik := 1;
end;
// persediaan
begin
if l<=psd_1 then derajat_psdsdkt := 1
else if (l>= psd_1) and (l<=psd_2) then
derajat_psdsdkt := (psd_2-l)/(psd_2-psd_1)
else if (l>=psd_2) then derajat_psdsdkt := 0;
end;
begin
if (l<=psd_3) or (l>=psd_5) then derajat_psdstandar := 0
else if (l>= psd_3) and (l<=psd_4) then
derajat_psdstandar := (l-psd_3)/(psd_4-psd_3)
else if (l>= psd_4) and (l<=psd_5) then
derajat_psdstandar := (psd_5-l)/(psd_5-psd_4)
else if (l=psd_4) then derajat_psdstandar := 1;
end;
begin
if l<=psd_6 then derajat_psdbyk := 0
SPK AHP
<?php if ($row[3] > 67) //1
{
echo "USAHA MENENGAH"; //2
}
else if ($row[3] > 33) //3
{
echo "USAHA KECIL"; //4
}
else
{
echo "USAHA MIKRO"; //5
} ?>//6