Kode Fuzzy

Embed Size (px)

DESCRIPTION

contoh kode fuzzy

Citation preview

if (u_eNBT>0) then begin if u_deNBT>0 then o_eNBT:=MaxVal(u_eNBT,u_deNBT) else if u_deNST>0 then o_eNBT:=MaxVal(u_eNBT,u_deNST) else if u_deAZT>0 then o_eNST:=MaxVal(u_eNBT,u_deAZT) else if u_dePST>0 then o_eNST:=MaxVal(u_eNBT,u_dePST) else if u_dePBT>0 then o_eAZT:=MaxVal(u_eNBT,u_dePBT) end; if u_eNST>0 then begin if u_deNBT>0 then o_eNBT:=MaxVal(u_eNST,u_deNBT) else if u_deNST>0 then o_eNST:=MaxVal(u_eNST,u_deNST) else if u_deAZT>0 then o_eNST:=MaxVal(u_eNST,u_deAZT) else if u_dePST>0 then o_eAZT:=MaxVal(u_eNST,u_dePST) else if u_dePBT>0 then o_ePST:=MaxVal(u_eNST,u_dePBT) end; if u_eAZT>0 then begin if u_deNBT>0 then o_eNST:=MaxVal(u_eAZT,u_deNBT) else if u_deNST>0 then o_eNST:=MaxVal(u_eAZT,u_deNST) else if u_deAZT>0 then o_eAZT:=MaxVal(u_eAZT,u_deAZT) else if u_dePST>0 then o_ePST:=MaxVal(u_eAZT,u_dePST) else if u_dePBT>0 then o_ePST:=MaxVal(u_eAZT,u_dePBT) end; if u_ePST>0 then begin if u_deNBT>0 then o_eNST:=MaxVal(u_ePST,u_deNBT) else if u_deNST>0 then o_eAZT:=MaxVal(u_ePST,u_deNST) else if u_deAZT>0 then o_ePST:=MaxVal(u_ePST,u_deAZT) else if u_dePST>0 then o_ePST:=MaxVal(u_ePST,u_dePST) else if u_dePBT>0 then o_ePBT:=MaxVal(u_ePST,u_dePBT) end; if u_ePBT>0 then begin if u_deNBT>0 then o_eAZT:=MaxVal(u_ePBT,u_deNBT) else if u_deNST>0 then o_ePST:=MaxVal(u_ePBT,u_deNST) else if u_deAZT>0 then o_eAZT:=MaxVal(u_ePBT,u_deAZT) else if u_dePST>0 then o_ePBT:=MaxVal(u_ePBT,u_dePST) else if u_dePBT>0 then o_ePBT:=MaxVal(u_ePBT,u_dePBT) end; // RB untuk Humidity if u_eNBH>0 then begin if u_deNBH>0 then o_eNBH:=MaxVal(u_eNBH,u_deNBH) else if u_deNSH>0 then o_eNBH:=MaxVal(u_eNBH,u_deNSH) else if u_deAZH>0 then o_eNSH:=MaxVal(u_eNBH,u_deAZH) else if u_dePSH>0 then o_eNSH:=MaxVal(u_eNBH,u_dePSH) else if u_dePBH>0 then o_eAZH:=MaxVal(u_eNBH,u_dePBH) end; if u_eNSH>0 then begin if u_deNBH>0 then o_eNBH:=MaxVal(u_eNSH,u_deNBH) else if u_deNSH>0 then o_eNSH:=MaxVal(u_eNSH,u_deNSH) else if u_deAZH>0 then o_eNSH:=MaxVal(u_eNSH,u_deAZH) else if u_dePSH>0 then o_eAZH:=MaxVal(u_eNSH,u_dePSH) else if u_dePBH>0 then o_ePSH:=MaxVal(u_eNSH,u_dePBH) end; if u_eAZH>0 then begin if u_deNBH>0 then o_eNSH:=MaxVal(u_eAZH,u_deNBH) else if u_deNSH>0 then o_eNSH:=MaxVal(u_eAZH,u_deNSH) else if u_deAZH>0 then o_eAZH:=MaxVal(u_eAZH,u_deAZH) else if u_dePSH>0 then o_ePSH:=MaxVal(u_eAZH,u_dePSH) else if u_dePBH>0 then o_ePSH:=MaxVal(u_eAZH,u_dePBH) end; if u_ePSH>0 then begin if u_deNBH>0 then o_eNSH:=MaxVal(u_ePSH,u_deNBH) else if u_deNSH>0 then o_eAZH:=MaxVal(u_ePSH,u_deNSH) else if u_deAZH>0 then o_ePSH:=MaxVal(u_ePSH,u_deAZH) else if u_dePSH>0 then o_ePSH:=MaxVal(u_ePSH,u_dePSH) else if u_dePBH>0 then o_ePBH:=MaxVal(u_ePSH,u_dePBH) end; if u_ePBH>0 then begin if u_deNBH>0 then o_eAZH:=MaxVal(u_ePBH,u_deNBH) else if u_deNSH>0 then o_ePSH:=MaxVal(u_ePBH,u_deNSH) else if u_deAZH>0 then o_eAZH:=MaxVal(u_ePBH,u_deAZH) else if u_dePSH>0 then o_ePBH:=MaxVal(u_ePBH,u_dePSH) else if u_dePBH>0 then o_ePBH:=MaxVal(u_ePBH,u_dePBH) end;