(load "I:/data/classes/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 "I:/data/classes/AI/FuzzyCLIPS/sparepartsstart1.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 short) CF 1.00 ( (0.1 0.0) (0.3 1.0) (0.5 0.0) ) ==> f-2 (workers ???) CF 1.00 ( (0.32 0.0) (0.33 1.0) (0.34 0.0) ) ==> f-3 (utilization ???) CF 1.00 ( (0.49 0.0) (0.5 1.0) (0.51 0.0) ) FuzzyCLIPS> (run 1) FIRE 1 lowutilrule1: f-3 > debug in lowutilrule1 how heavy is utilization? 0.5 membership in low : 0.5 ==> f-4 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.4 0.0) ) FuzzyCLIPS> (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.2 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 medutilrule1: f-3 > debug in medutilrule1 how heavy is utilization? 0.5 membership in medium: 0.5 <== f-4 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.4 0.0) ) ==> f-5 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.7 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.35 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule1: f-1,f-2 > debug in delayserversrule1 how long a delay is it? 0.3 membership in veryshort : 0.0 how many workers are there? 0.33 membership in small: 0.09999999999999987 <== f-5 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.7 0.0) ) ==> f-6 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.7 0.0) (0.7286 0.1429) ) 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.4112974801204168 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule2: f-1,f-2 > debug in delayserversrule2 how long a delay is it? 0.3 membership in short: 1.0 how many workers are there? 0.33 membership in small: 0.09999999999999987 <== f-6 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.7 0.0) (0.7286 0.1429) ) ==> f-7 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6714 0.1429) ) 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.4147461041654323 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule3: f-1,f-2 > debug in delayserversrule3 how long a delay is it? 0.3 membership in medium: 0.0 how many workers are there? 0.33 membership in small: 0.09999999999999987 <== f-7 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6714 0.1429) ) ==> f-8 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6714 0.1429) ) 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.4147461041654323 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.3 membership in veryshort : 0.0 how many workers are there? 0.33 membership in medium: 0.1500000000000001 <== f-8 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6714 0.1429) ) ==> f-9 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6619 0.1905) (0.731 0.1905) (0.7357 0.1429) ) 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.4173715397229821 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.3 membership in short: 1.0 how many workers are there? 0.33 membership in medium: 0.1500000000000001 <== f-9 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6619 0.1905) (0.731 0.1905) (0.7357 0.1429) ) ==> f-10 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6619 0.1905) (0.731 0.1905) (0.7357 0.1429) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-10 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.4173715397229821 units (go with last recommendation) FuzzyCLIPS> (run 1) FIRE 1 delayserversrule6: f-1,f-2 > debug in delayserversrule6 how long a delay is it? 0.3 membership in medium: 0.0 how many workers are there? 0.33 membership in medium: 0.1500000000000001 <== f-10 (spares ???) CF 1.00 ( (0.0 0.0) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6619 0.1905) (0.731 0.1905) (0.7357 0.1429) ) ==> f-11 (spares ???) CF 1.00 ( (0.0 0.0) (0.0381 0.1905) (0.1048 0.5238) (0.2952 0.5238) (0.35 0.25) (0.4048 0.5238) (0.5952 0.5238) (0.6619 0.1905) (0.731 0.1905) (0.7357 0.1429) ) FuzzyCLIPS> (run 1) FIRE 1 get-crisp-value-and-print-rslt: f-11 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.4173715397229821 units (go with last recommendation) FuzzyCLIPS> (run 1) FuzzyCLIPS>