Hi,

I  am a new user fo Jess and try to get some understanding for the engine.
I cant understand why the code below does not work.

(deffacts graph-links3
    (link3 (gnode3 0 0) (gnode3 2 1))
    )

Here, I am trying to describe links of nodes with 2 coordinates.
How should I do that?

I also tried this version:
(deftemplate gnode (slot x) (slot y))
(deftemplate link (slot start) (slot end))

(deffacts graph-links
    (link (start (gnode (x 0) (y 0))) (end (gnode (x 2) (y 1))))
    (link (start (gnode (x 2) (y 1))) (end (gnode (x 1) (y 2))))
   (link (start (gnode (x 2) (y 1))) (end (gnode (x 2) (y 0))))
    (link (start (gnode (x 2) (y 0))) (end (gnode (x 1) (y 1))))
    (link (start (gnode (x 1) (y 1))) (end (gnode (x 0) (y 2))))
   (link (start (gnode (x 0) (y 2))) (end (gnode (x 2) (y 3))))
   (link (start (gnode (x 1) (y 2))) (end (gnode (x 1) (y 3))))
    )

I am always geetıng the error message:
Jess reported an error in routine Funcall.execute
    while executing (gnode3 0 0)
    while executing assert from deffacts MAIN::graph-links3
    while executing (reset).
  Message: Undefined function gnode3.

or

Jess reported an error in routine Funcall.execute
    while executing (gnode (x 0) (y 0))
    while executing assert from deffacts MAIN::graph-links
    while executing (reset).
  Message: Undefined function gnode.

Some little help would save me from confusion.

I hope this message will be accepted by the mailing list, because I am not
sure if my messages are delivered successfully.

Thanks,

Levent
-- 
View this message in context: 
http://www.nabble.com/How-to-use-templates-inside-facts-tp19715452p19715452.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]
--------------------------------------------------------------------

Reply via email to