我能够使用Tipper演示程序为fcl文件编写输入和输出...但是我不知道如何提供有效输入才能获得正确的输出。是一个非常新的东西,jfuzzylogic网站中的所有教程似乎都无法正常工作。有人应该帮助我提供有效的输入或将我链接到有关如何执行此操作的材料上
FUNCTION_BLOCK grading
VAR_INPUT
reasoning_ability : Real;
programming_skills : Real;
technical_skills : Real;
communication_skill : Real;
END_VAR
VAR_OUTPUT
hardware : Real;
software : Real;
networking : Real;
END_VAR
FUZZIFY reasoning_ability
TERM poor := (0, 1) (4, 0) ;
TERM fair := trape 56 77 80 101;
TERM good := (1, 0) (4,1) (6,1) (9,0);
END_FUZZIFY
FUZZIFY programming_skills
TERM poor := trape 0 0 27 45;
TERM fair := trape 56 77 80 101;
TERM good := trape 60 81 100 100;
END_FUZZIFY
FUZZIFY technical_skills
TERM poor := trape 0 0 27 45;
TERM fair := trape 56 77 80 101;
TERM good := trape 60 81 100 100;
END_FUZZIFY
FUZZIFY communication_skill
TERM poor := trape 0 0 27 45;
TERM fair := trape 56 77 80 101;
TERM good := trape 60 81 100 100;
END_FUZZIFY
DEFUZZIFY software
TERM low := trape 0 0 21 36;
TERM average := trape 20 38 38 56;
TERM high := trape 40 58 58 76;
TERM excellent := trape 60 78 100 100;
METHOD : COG; // Use 'Center Of Gravity' defuzzification method
DEFAULT := 0;
END_DEFUZZIFY
DEFUZZIFY hardware
TERM low := trape 0 0 21 36;
TERM average := trape 20 38 38 56;
TERM high := trape 40 58 58 76;
TERM excellent := trape 60 78 100 100;
METHOD : COG; // Use 'Center Of Gravity' defuzzification method
DEFAULT := 0;
END_DEFUZZIFY
DEFUZZIFY networking
TERM low := trape 0 0 21 36;
TERM average := trape 20 38 38 56;
TERM high := trape 40 58 58 76;
TERM excellent := trape 60 78 100 100;
METHOD : COG; // Use 'Center Of Gravity' defuzzification method
DEFAULT := 0;
END_DEFUZZIFY
RULEBLOCK No1
AND : MIN; // Use 'min' for 'and' (also implicit use 'max' for 'or' to fulfill DeMorgan's Law)
ACT : MIN; // Use 'min' activation method
ACCU : MAX; // Use 'max' accumulation method
RULE 1 : IF programming_skills IS poor AND reasoning_ability IS poor AND
(technical_skills IS poor OR communication_skill IS poor)
THEN software IS low;
RULE 2 : IF programming_skills IS fair AND (reasoning_ability IS poor OR reasoning_ability IS good OR reasoning_ability is fair) AND
(technical_skills IS poor OR communication_skill IS poor)
THEN software IS average;
RULE 3 : IF programming_skills IS fair AND (reasoning_ability IS poor OR reasoning_ability IS good) AND
(technical_skills IS fair OR technical_skills IS good OR communication_skill IS fair OR communication_skill is good)
THEN software IS average;
RULE 4 : IF programming_skills IS good AND reasoning_ability IS good AND
(technical_skills IS fair OR technical_skills IS good OR communication_skill IS fair OR communication_skill is good)
THEN software IS high;
RULE 5 : IF programming_skills IS good AND reasoning_ability IS good AND (technical_skills IS good OR technical_skills is fair OR technical_skills is poor) AND communication_skill is good
THEN software IS excellent;
//setting the rules for hardware
RULE 6 : IF technical_skills IS poor AND reasoning_ability IS poor AND
(programming_skills IS poor OR communication_skill IS poor)
THEN hardware IS low;
RULE 7 : IF technical_skills IS fair AND (reasoning_ability IS poor OR reasoning_ability IS good) AND
(programming_skills IS poor OR communication_skill IS poor)
THEN hardware IS average;
RULE 8 : IF technical_skills IS fair AND (reasoning_ability IS poor OR reasoning_ability IS good) AND
(programming_skills IS fair OR programming_skills IS good OR communication_skill IS fair OR communication_skill is good)
THEN hardware IS average;
RULE 9 : IF technical_skills IS good AND reasoning_ability IS good AND
(programming_skills IS fair OR programming_skills IS good OR communication_skill IS fair OR communication_skill is good)
THEN hardware IS high;
RULE 10 : IF programming_skills IS poor AND reasoning_ability IS good AND technical_skills IS good AND (communication_skill is good OR communication_skill IS fair)
THEN hardware IS high;
RULE 11 : IF (programming_skills IS fair OR programming_skills IS poor OR programming_skills IS good) AND reasoning_ability IS good AND technical_skills IS good AND communication_skill is good
THEN hardware IS excellent;
RULE 12 : IF (programming_skills IS poor OR programming_skills IS fair OR programming_skills IS good) AND reasoning_ability IS poor AND
technical_skills IS poor AND (communication_skill IS poor OR communication_skill is fair)
THEN networking IS low;
RULE 13 : IF (programming_skills IS fair OR programming_skills IS good) AND (reasoning_ability IS fair OR reasoning_ability IS good) AND
technical_skills IS fair AND (communication_skill IS fair OR communication_skill is good)
THEN networking IS average;
RULE 14 : IF (programming_skills IS fair OR programming_skills IS good) AND (reasoning_ability IS fair OR reasoning_ability IS good) AND
technical_skills IS good AND (communication_skill IS fair OR communication_skill is good)
THEN networking IS high;
RULE 15 : IF (programming_skills IS fair OR programming_skills IS good) AND reasoning_ability IS good AND
technical_skills IS good AND communication_skill is good)
THEN networking IS excellent;
END_RULEBLOCK
END_FUNCTION_BLOCK