Hi,

This is the error you'll see if you try to run a FuzzyJess program with jess.Main, the regular Jess entry point. You need to explicitly run fuzzy programs using nrc.fuzzy.jess.FuzzyMain instead. If you're running directly from Eclipse the "run configuration" dialog box has a box for the Jess main class to use; it's jess.Main by default, but you can change it to nrc.fuzzy.jess.FuzzyMain .



On Apr 19, 2009, at 4:06 AM, Zahra Karimi Dehkordi wrote:



Hi
I've imported these libraries in eclipse

1 - fuzzyJ110a.jar
2 - symbeans.jar
3 - sfc.jar

when i test this simple downloaded program  and run the exception
I encountered the following exception

Would you please help me in resolving the problem. I think there is
something wrong in my installation of fuzzy jess





Jess reported an error in routine fuzzy-match
        while executing (fuzzy-match ?ht "tall")
        while executing rule LHS (TEQ)
        while executing rule LHS (TECT)
        while executing (assert (MAIN::person (name "Ralph") (height (new
nrc.fuzzy.FuzzyValue ?*heightFvar* (new nrc.fuzzy.PIFuzzySet 5.7 0.1))))
(MAIN::person (name "Timothy") (height (new nrc.fuzzy.FuzzyValue
?*heightFvar* (new nrc.fuzzy.PIFuzzySet 4.0 0.1)))) (MAIN::person (name
"Randy") (height (new nrc.fuzzy.FuzzyValue ?*heightFvar* (new
nrc.fuzzy.PIFuzzySet 6.5 0.1)))) (MAIN::person (name "Jack") (height (new nrc.fuzzy.FuzzyValue ?*heightFvar* (new nrc.fuzzy.PIFuzzySet 5.75 0.1)))))
        while executing defrule MAIN::init
        while executing (run).
 Message: Error during execution.
 Program text: ( run )  at line 67.

Nested exception is:
jess.Token cannot be cast to nrc.fuzzy.jess.FuzzyToken


;************************************************************************
;************************************************************************

;; A simple example to test a complete FuzzyJess program (no Java code at
all).
;;
;;
;; Note: future versions (beyond 5.0a5) of Jess will allow us to use --
;;
;;             (new FuzzyValue ... )
;;       etc.
;;
;;       will no longer always need to fully qualify the classes!
;;
;; Example as shown will give result ...
;;
;; Jack is tall with degree (similarity) 0.5363321799307958
;; Jack is tall with degree (match) 0.588235294117647
;; Randy is tall with degree (similarity) 1.0
;; Randy is tall with degree (match) 1.0
;; Ralph is tall with degree (similarity) 0.4117647058823532
;; Ralph is tall with degree (match) 0.49999999999999994


(defglobal ?*heightFvar* = (new nrc.fuzzy.FuzzyVariable "height" 0.0 10.0
"feet"))

(defglobal ?*rlf* = (new nrc.fuzzy.RightLinearFunction))
(defglobal ?*llf* = (new nrc.fuzzy.LeftLinearFunction))

(deftemplate person
   (slot name)
   (slot height)
)

(defrule init
   (declare (salience 100))
  =>
   (load-package nrc.fuzzy.jess.FuzzyFunctions)
(?*heightFvar* addTerm "short" (new nrc.fuzzy.RFuzzySet 0.0 5.0 ? *rlf*)) (?*heightFvar* addTerm "medium" (new nrc.fuzzy.TrapezoidFuzzySet 4.0 4.8
5.5 6.0))
(?*heightFvar* addTerm "tall" (new nrc.fuzzy.LFuzzySet 5.5 6.0 ? *llf*))

   (assert (person (name "Ralph")
                (height (new nrc.fuzzy.FuzzyValue ?*heightFvar*
                             (new nrc.fuzzy.PIFuzzySet 5.7 0.1)))
        )
        (person (name "Timothy")
                (height (new nrc.fuzzy.FuzzyValue ?*heightFvar*
                             (new nrc.fuzzy.PIFuzzySet 4.0 0.1)))
        )
        (person (name "Randy")
                (height (new nrc.fuzzy.FuzzyValue ?*heightFvar*
                             (new nrc.fuzzy.PIFuzzySet 6.5 0.1)))
        )
        (person (name "Jack")
                (height (new nrc.fuzzy.FuzzyValue ?*heightFvar*
                             (new nrc.fuzzy.PIFuzzySet 5.75 0.1)))
        )
    )
)

(defrule identify-tall-people "determine strength of tallness for a person"
  (person (name ?n) (height ?ht&:(fuzzy-match ?ht "tall")))
 =>
  (printout t ?n " is tall with degree (similarity) "
(fuzzy-rule-similarity) crlf)
(printout t ?n " is tall with degree (match) " (fuzzy-rule-match- score)
crlf)
)


(reset)
(run)




Ernest Friedman-Hill wrote:

FuzzyJess comes with a jar file named something like "fuzzyJ110a.jar".
Put that on your Eclipse project's build path (we don't give Eclipse
help on this mailing list; if you need to learn to use Eclipse in
general, go to www.eclipse.org). If you want to run or debug FuzzyJess
programs from within the JessDE, you can replace "jess.Main" in the
run configurations with "nrc,fuzzy,jess,FuzzyMain".


On Feb 21, 2009, at 5:45 PM, Ivona Zakarija wrote:

Hello .

I've downloaded Fuzzy Jess but I need some help with installation of
these package.

I use Jess with Eclipse IDE , also have academic licence of  Jess.

Thank you in advance.

Best regards,
Ivona.


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
[email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected]
.
--------------------------------------------------------------------

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected] '
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected] .
--------------------------------------------------------------------




--
View this message in context: 
http://www.nabble.com/JESS%3A-Fuzzy-Jess-installation-tp22164040p23120495.html
Sent from the Jess mailing list archive at Nabble.com.



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected] .
--------------------------------------------------------------------

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------

Reply via email to