;;;====================================================== ;;; Spare Parts Business - Fuzzy ;;; ;;; ;;; CLIPS Version 6.0 Example ;;; ;;; To execute, merely load this and relatives.clp, reset and run. ;;;====================================================== (defrule startup => (printout t "we are recommending number of spare parts to stock initially " crlf ) (plot-fuzzy-value t "+.*" nil nil (create-fuzzy-value delay veryshort) (create-fuzzy-value delay short) (create-fuzzy-value delay medium)) (plot-fuzzy-value t "+.*" nil nil (create-fuzzy-value workers small) (create-fuzzy-value workers medium) (create-fuzzy-value workers large)) (plot-fuzzy-value t "+.*" nil nil (create-fuzzy-value utilization low) (create-fuzzy-value utilization medium) (create-fuzzy-value utilization high)) (plot-fuzzy-value t "+.*~@#-" nil nil (create-fuzzy-value spares verysmall) (create-fuzzy-value spares small) (create-fuzzy-value spares rathersmall) (create-fuzzy-value spares medium) (create-fuzzy-value spares ratherlarge) (create-fuzzy-value spares large) (create-fuzzy-value spares verylarge)) (assert (delay (0.19 0) (0.2 1) (0.21 0)) ; establish facts about the business (workers (0.64 0) (0.65 1) (0.66 0) ) ;; get a target - not very fuzzy (utilization (0.69 0) (0.7 1) (0.71 0) ) ) )