;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Global definitions used in the simulation ;; (defglobal ?*coldValvePos* = 0.0 ?*hotValvePos* = 0.0 ?*coldTemp* = 0.0 ?*hotTemp* = 0.0 ?*coldPress* = 0.0 ?*hotPress* = 0.0 ?*optimalTempMin* = 34.0 ?*optimalTempMax* = 38.0 ?*optimalFlowMin* = 11.0 ?*optimalFlowMax* = 13.0 ?*atmosphericPress* = 30.0 ?*iterationFactor* = 1.0 ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Deftemplates below define the fuzzy variables being used ;; ;; ;; Outputs of the shower ;; ;; outTemp -- output temperature ;; ;; outFlow -- flow out of the shower ;;; MAR 06/08/05 - FuzzyCLIPS crashes on the z and s functions - do point versions instead (deftemplate outTemp 5 65 Celcius (;(cold (z 10 35)) (cold ( 10 1) (35 0)) ;(OK (pi 2 36)) (OK (34 0) (36 1) (38 0) ) ;(OK (30 0) (36 1) (42 0) ) ;(hot (s 37 60)) (hot (37 0) ( 60 1) ) ) ) (deftemplate outFlow 0 100 liters/minute (;(low (z 3 11.5)) (low (3 1) (11.5 0) ) ;(OK (pi 1 12)) (OK (11 0) (12 1) (13 0) ) ;(OK (9 0) (12 1) (15 0) ) ;(strong (s 12.5 25)) (strong (12.5 0) (25 1) ) ) ) ;; controls for hot and cold valve positions ;; (deftemplate change_vc -1 1 ((NB (-0.5 1) (-.25 0)) (NM (-.35 0) (-.3 1) (-.15 0)) (NS (-.25 0) (-.15 1) (0 0)) (Z (-.05 0) (0 1) (.05 0)) (PS (0 0) (.15 1) (.25 0)) (PM (.15 0) (.3 1) (.35 0)) (PB (.25 0)(0.5 1)) ) ) (deftemplate change_vh -1 1 ((NB (-0.5 1) (-.25 0)) (NM (-.35 0) (-.3 1) (-.15 0)) (NS (-.25 0) (-.15 1) (0 0)) (Z (-.05 0) (0 1) (.05 0)) (PS (0 0) (.15 1) (.25 0)) (PM (.15 0) (.3 1) (.35 0)) (PB (.25 0)(0.5 1)) ) )