!-------------------------------------------------------- ! Water tank heat control ! Assu

---
Master Index Current Directory Index Go to SkepticTank Go to Human Rights activist Keith Henson Go to Scientology cult

Skeptic Tank!

!-------------------------------------------------------- ! Water tank heat control ! Assume constant volume (i.e. water in = water out) !-------------------------------------------------------- CONFIGURATION PLOT_DURATION = 100.0; ! seconds SIM_SCHEDULE_RATE = 0.1; ! second SIM_INC_RATE = 0.01; ! second END_CONFIGURATION; SEGMENT Control CYCLE_TIME 0.50 ! Name MIN MAX IN Temperature(32.0, 212.0) IN Water_out (0.0, 10.0) IN Temp_error (-90.0, 90.0) OUT Gas_valve (0.0, 10.0) Initialization Gas_valve = 0; END; ! Name Below Low High Above Truth Symbol Zero OF Water_out ( 0.0, 0.0, 0.0, 2.0, 1.0) Symbol Light OF Water_out ( 0.0, 2.0, 3.0, 5.9, 1.0) Symbol Medium OF Water_out ( 3.0, 5.0, 6.0, 8.0, 1.0) Symbol Heavy OF Water_out ( 6.0, 8.0, 10.0, 10.0, 1.0) Symbol VeryCold OF Temp_error(-90.0, -90.0, -30.0, -20.0, 1.0) Symbol Cold OF Temp_error(-30.0, -20.0, -10.0, 0.0, 1.0) Symbol OnTarget OF Temp_error(-10.0, 0.0, 0.0, 10.0, 1.0) Symbol Hot OF Temp_error( 0.0, 10.0, 20.0, 30.0, 1.0) Symbol VeryHot OF Temp_error( 20.0, 30.0, 90.0, 90.0, 1.0) ! Name Below Low High Above Truth Center Symbol Off OF Gas_valve ( 0.0, 0.0, 0.0, 2.0, 1.0, 0.0) Symbol VeryLow OF Gas_valve ( 0.0, 2.0, 2.0, 4.0, 1.0) Symbol Low OF Gas_valve ( 2.0, 4.0, 4.0, 6.0, 1.0) Symbol High OF Gas_valve ( 4.0, 6.0, 6.0, 8.0, 1.0) Symbol VeryHigh OF Gas_valve ( 6.0, 8.0, 10.0, 10.0, 1.0, 10.0) !!!!!!!! Rules for controlling Gas_valve ! Heavy Medium Light Zero !-------------------------------------------- ! VeryCold VH VH VH VH ! Cold VH H H L ! OnTarget L VL VL Off ! Hot Off Off Off Off ! VeryHot Off Off Off Off ! ! IF Temp_error IS VeryCold THEN Gas_valve IS VeryHigh IF Temp_error IS Cold AND Water_out IS Heavy THEN Gas_valve IS VeryHigh IF Temp_error IS Cold AND Water_out IS Medium THEN Gas_valve IS High IF Temp_error IS Cold AND Water_out IS Light THEN Gas_valve IS High IF Temp_error IS Cold AND Water_out IS Zero THEN Gas_valve IS Low IF Temp_error IS OnTarget AND Water_out IS Heavy THEN Gas_valve IS High IF Temp_error IS OnTarget AND Water_out IS Medium THEN Gas_valve IS Low IF Temp_error IS OnTarget AND Water_out IS Light THEN Gas_valve IS VeryLow IF Temp_error IS OnTarget AND Water_out IS Zero THEN Gas_valve IS Off IF Temp_error IS Hot THEN Gas_valve IS Off IF Temp_error IS VeryHot THEN Gas_valve IS Off END Control;

---

E-Mail Fredric L. Rice / The Skeptic Tank