(load "J:/Documents/AI/FuzzyCLIPS/spareparts.clp") FuzzyCLIPS> Defining deftemplate: delay Defining deftemplate: workers Defining deftemplate: utilization Defining deftemplate: spares Defining defrule: lowutilrule1 +j Defining defrule: medutilrule1 +j Defining defrule: highutilrule1 +j Defining defrule: delayserversrule1 +j+j Defining defrule: delayserversrule2 +j+j Defining defrule: delayserversrule3 +j+j Defining defrule: delayserversrule4 =j+j Defining defrule: delayserversrule5 =j+j Defining defrule: delayserversrule6 =j+j Defining defrule: delayserversrule7 =j+j Defining defrule: delayserversrule8 =j+j Defining defrule: delayserversrule9 =j+j Defining defrule: answerrule +j+j Defining defrule: get-crisp-value-and-print-rslt +j TRUE FuzzyCLIPS> (load "J:/Documents/AI/FuzzyCLIPS/sparepartsstart2.clp") FuzzyCLIPS> Defining defrule: startup +j TRUE FuzzyCLIPS> (reset) ==> f-0 (initial-fact) CF 1.00 FuzzyCLIPS> (run 1) FIRE 1 startup: f-0 we are recommending number of spare parts to stock initially Fuzzy Value: delay Linguistic Value: veryshort (+), short (.), medium (*) 1.00++++++++ . ******* 0.95 + .. * 0.90 . . 0.85 + . * 0.80 + . * 0.75 + . . * 0.70 . . 0.65 + * 0.60 + . . * 0.55 . . 0.50 . * 0.45 + . * 0.40 . + . * 0.35 . . 0.30 + * 0.25 . + * 0.20 . . 0.15 . + * 0.10 + * . 0.05 . + * . 0.00*****************************+++++++.............. |----|----|----|----|----|----|----|----|----|----| 0.00 0.14 0.28 0.42 0.56 0.70 Universe of Discourse: From 0.00 to 0.70 Fuzzy Value: workers Linguistic Value: small (+), medium (.), large (*) 1.00++++++++ . ********** 0.95 + 0.90 . . * 0.85 + 0.80 . . * 0.75 + 0.70 . . * 0.65 + 0.60 . . * 0.55 + 0.50 . . * 0.45 + 0.40 . . * 0.35 + 0.30 . .* 0.25 + 0.20 . *. 0.15 + 0.10 . * . 0.05 + 0.00*******************************++++............... |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 Fuzzy Value: utilization Linguistic Value: low (+), medium (.), high (*) 1.00+++++++++++++++++++++ . ********** 0.95 0.90 + . . * 0.85 0.80 + . . * 0.75 0.70 + . . * 0.65 0.60 + . . * 0.55 0.50 . * 0.45 0.40 . + * . 0.35 0.30 . + * . 0.25 0.20 . + * . 0.15 0.10 . + * . 0.05 0.00*******************************+++++++++.......... |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 Fuzzy Value: spares Linguistic Value: verysmall (+), small (.), rathersmall (*), medium (~), ratherlarge (@), large (#), verylarge (-) 1.00++++++ . * ~ @ # ----- 0.95 0.90 + . . ** ~ ~ @@ # # - 0.85 0.80 +. . ~ ~ # #- 0.75 0.70 .+ . * * ~ ~ @ @ # -# 0.65 0.60 . + . ~ ~ # - # 0.55 0.50 . + * ~ @ # - # 0.45 0.40 . + . ~ ~ # - # 0.35 0.30 . + * .~ * @ ~# @ - # 0.25 0.20 . + ~. #~ - # 0.15 0.10 . *+ ~ . * @ # ~ -@ # 0.05 0.00------------------------------------~~@@@@@@@@@@@@ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 ==> f-1 (delay ???) CF 1.00 ( (0.19 0.0) (0.2 1.0) (0.21 0.0) ) ==> f-2 (workers ???) CF 1.00 ( (0.64 0.0) (0.65 1.0) (0.66 0.0) ) ==> f-3 (utilization ???) CF 1.00 ( (0.69 0.0) (0.7 1.0) (0.71 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 medutilrule1: f-3 > debug in medutilrule1 how heavy is utilization? 0.7 membership in medium: 0.5000000000000002 asserting medium number of spares ==> f-4 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.7 0.0) ) FuzzyCLIPS> medium(run 1) FIRE 1 get-crisp-value-and-print-rslt: f-4 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ 0.45 0.40 + + 0.35 0.30 + + 0.25 0.20 + + 0.15 0.10 + + 0.05 0.00++++++++++++++++ +++++++++++++++ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.5 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 highutilrule1: f-3 > debug in highutilrule1 how heavy is utilization? 0.7 membership in high: 0.4999999999999997 asserting large number of spares <== f-4 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.7 0.0) ) ==> f-5 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.65 0.25) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-5 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ +++++++++++ 0.45 0.40 + + + + 0.35 0.30 + ++ + 0.25 + 0.20 + + 0.15 0.10 + + 0.05 0.00++++++++++++++++ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.6499999999999999 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule4: f-1,f-2 > debug in delayserversrule4 how long a delay is it? 0.2 membership in veryshort : 0.4999999999999999 how many workers are there? 0.65 membership in medium: 0.2499999999999997 asserting ratherlarge number of spares <== f-5 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.65 0.25) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) ==> f-6 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-6 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ +++++++++++ 0.45 0.40 + + + + 0.35 0.30 + ++ + 0.25 0.20 + + 0.15 0.10 + + 0.05 0.00++++++++++++++++ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.6499999999999999 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule5: f-1,f-2 > debug in delayserversrule5 how long a delay is it? 0.2 membership in short: 0.5000000000000001 how many workers are there? 0.65 membership in medium: 0.2499999999999997 asserting rathersmall number of spares <== f-6 (spares ???) CF 1.00 ( (0.3 0.0) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) ==> f-7 (spares ???) CF 1.00 ( (0.25 0.0) (0.2786 0.2857) (0.3571 0.2857) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-7 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ +++++++++++ 0.45 0.40 + + + + 0.35 0.30 +++++ ++ + 0.25 0.20 + 0.15 0.10 + + 0.05 0.00+++++++++++++ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.6295034404847489 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule7: f-1,f-2 > debug in delayserversrule7 how long a delay is it? 0.2 membership in veryshort : 0.4999999999999999 how many workers are there? 0.65 membership in large: 0.2500000000000001 asserting medium number of spares <== f-7 (spares ???) CF 1.00 ( (0.25 0.0) (0.2786 0.2857) (0.3571 0.2857) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) ==> f-8 (spares ???) CF 1.00 ( (0.25 0.0) (0.2786 0.2857) (0.3571 0.2857) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-8 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ +++++++++++ 0.45 0.40 + + + + 0.35 0.30 +++++ ++ + 0.25 0.20 + 0.15 0.10 + + 0.05 0.00+++++++++++++ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.6295034404847488 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule8: f-1,f-2 > debug in delayserversrule8 how long a delay is it? 0.2 membership in short : 0.5000000000000001 how many workers are there? 0.65 membership in large: 0.2500000000000001 asserting small number of spares <== f-8 (spares ???) CF 1.00 ( (0.25 0.0) (0.2786 0.2857) (0.3571 0.2857) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) ==> f-9 (spares ???) CF 1.00 ( (0.0 0.0) (0.05714 0.2857) (0.3429 0.2857) (0.3571 0.2857) (0.4048 0.5238) (0.5952 0.5238) (0.6429 0.2857) (0.6571 0.2857) (0.7048 0.5238) (0.8952 0.5238) (1.0 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-9 Fuzzy Value: spares Linguistic Value: ??? (+) 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 +++++++++++ +++++++++++ 0.45 0.40 + + + + 0.35 0.30 ++++++++++++++++ ++ + 0.25 0.20 + + 0.15 0.10 + + 0.05 0.00+ |----|----|----|----|----|----|----|----|----|----| 0.00 0.20 0.40 0.60 0.80 1.00 Universe of Discourse: From 0.00 to 1.00 So far, would Recommend Normalized Number of Spares to Start out With of: 0.544431279620853 units (go with last recommendation) FuzzyCLIPS> (run 1) FuzzyCLIPS> (run 1) FuzzyCLIPS>