---

CONFIGURATION EVAL_SAMPLE = 3; GENE_WEIGHT_INC = 2; MAX_BEST_ITEM = 10; ! range 1 - 100 TEST_TIME = 2.2; ! second MIN_SCORE = 0.600; EVAL_NULL_BAND = 0.02; MAX_RULE = 12; MAX_CYCLE_RATE = 0.100; ! in second MIN_CYCLE_RATE = 0.035; ! in second END_CONFIGURATION; SEGMENT Evaluation Cycle_time 0.05 ! Name MIN MAX IN Pos_error (-70.0, 70.0) IN Current (-1.0, 1.0) OUT Eval_result (0, 1) OUT Reference(0, 70); !OUT Position (0, 70); Local Done (0, 1) Local Rising_time (0, 3) Local Err_oscilate (0, 10) Local Cur_oscilate (0, 10) Local err (0, 70) Local cur (0, 1) Local Err_dir (-1, 1) Local Old_err_dir (-1, 1) Local Cur_dir (-1, 1) Local Old_cur_dir (-1, 1) ! Name Below Low High Above Truth Symbol Very_good OF Rising_time ( 0.0, 0.0, 1.0, 2.0, 1.0) Symbol Good OF Rising_time ( 1.0, 2.0, 2.0, 3.0, 1.0) Symbol OK OF Rising_time ( 2.0, 3.0, 3.0, 4.0, 1.0) Symbol Bad OF Rising_time ( 3.0, 4.0, 4.0, 5.0, 1.0) Symbol Very_bad OF Rising_time ( 4.0, 5.0, 10.0, 10.0, 1.0) Symbol Under_shoot OF Pos_error (-70.0, -70.0, -2.0, -1.0, 1.0) Symbol Neg_small OF Pos_error ( -2.0, -1.0, -1.0, 0.0, 1.0) Symbol On_target OF Pos_error ( -1.0, 0.0, 0.0, 1.0, 1.0) Symbol Pos_small OF Pos_error ( 0.0, 1.0, 1.0, 2.0, 1.0) Symbol Over_shoot OF Pos_error ( 1.0, 2.0, 70.0, 70.0, 1.0) Symbol Very_good OF Eval_result ( 0.7, 0.8, 1.0, 1.0, 1.0, 1.0) Symbol Good OF Eval_result ( 0.5, 0.7, 0.8, 1.0, 1.0) Symbol Mid OF Eval_result ( 0.2, 0.4, 0.6, 0.8, 1.0) Symbol Bad OF Eval_result ( 0.1, 0.2, 0.3, 0.4, 1.0) Symbol Very_bad OF Eval_result ( 0.0, 0.0, 0.1, 0.2, 1.0, 0.0) Symbol No_oscil ( 0, 0, 1, 1, 1.0) Symbol Few_oscil ( 1, 2, 3, 4, 1.0) Symbol Mid_oscil ( 2, 3, 4, 5, 1.0) Symbol Lot_oscil ( 3, 4, 5, 6, 1.0) Symbol Unstable ( 4, 5, 10, 10, 1.0) Initialization Rising_time = 0; Err_Oscilate = 0; Cur_Oscilate = 0; Eval_result = 0; Done = 0; Old_err_dir = 0; Old_cur_dir = 0; Reference = 35; BEGIN err = pos_error; IF pos_error < 0 THEN err = - pos_error; ENDIF; IF Done = 0 THEN IF err > 2 THEN Rising_time = Rising_time + Delta_time; ELSE Done = 1; ENDIF; ENDIF; IF Pos_error = 0 THEN Err_dir = 0; ELSE IF Pos_error > 0 THEN Err_dir = 1; ELSE Err_dir = -1; ENDIF; ENDIF; IF Old_err_dir <> 0 THEN IF Err_dir <> Old_err_dir THEN IF err > 0.5 THEN Err_Oscilate = Err_Oscilate + 1; ENDIF; ENDIF; ENDIF; Old_err_dir = Err_dir; cur = current; IF current < 0 THEN cur = - current; ENDIF; IF current = 0 THEN cur_dir = 0; ELSE IF current > 0 THEN cur_dir = 1; ELSE cur_dir = -1; ENDIF; ENDIF; IF Old_cur_dir <> 0 THEN IF cur_dir <> Old_cur_dir THEN IF cur > 0.25 THEN cur_Oscilate = cur_Oscilate + 1; ENDIF; ENDIF; ENDIF; Old_cur_dir = cur_dir; END; PRESET ! 0 Reference = 70; ! Position = 0; END; PRESET ! 1 Reference = 35; ! Position = 40; END; PRESET ! 2 Reference = 35; ! Position = 0; END; PRESET ! 3 Reference = 35; ! Position = 70; END; PRESET ! 4 Reference = 35; ! Position = 25; END; IF Pos_error IS Under_shoot THEN Eval_result IS Very_bad IF Pos_error IS Neg_small THEN Eval_result IS Bad IF Pos_error IS On_target THEN Eval_result IS Very_good IF Pos_error IS Pos_small THEN Eval_result IS Mid IF Pos_error IS Over_shoot THEN Eval_result IS Very_bad !--------------------------- IF Rising_time IS Very_good THEN Eval_result IS Very_good IF Rising_time IS Good THEN Eval_result IS Good IF Rising_time IS OK THEN Eval_result IS Mid IF Rising_time IS Bad THEN Eval_result IS Very_bad IF Rising_time IS Very_bad THEN Eval_result IS Very_bad !--------------------------- IF Err_Oscilate IS No_oscil !AND Cur_Oscilate IS No_oscil THEN Eval_result IS Very_good IF Err_Oscilate IS Few_oscil !AND Cur_Oscilate IS Few_oscil THEN Eval_result IS Good IF Err_Oscilate IS Mid_oscil !AND Cur_Oscilate IS Mid THEN Eval_result IS Mid IF Err_Oscilate IS Lot_oscil OR Cur_Oscilate IS Lot_oscil THEN Eval_result IS Bad IF Err_Oscilate IS Unstable OR Cur_Oscilate IS Unstable THEN Eval_result IS Very_bad END Evaluation;

---

The views and opinions stated within this web page are those of the author or authors which wrote them and may not reflect the views and opinions of the ISP or account user which hosts the web page. The opinions may or may not be those of the Chairman of The Skeptic Tank.

Return to The Skeptic Tank's main Index page.

E-Mail Fredric L. Rice / The Skeptic Tank