;;;====================================================== ;;; 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 short) ; establish facts about the business (workers (0.32 0) (0.33 1) (0.34 0) ) ;; get a target - not very fuzzy (utilization (0.49 0) (0.5 1) (0.51 0) ) ) )