Thank you very much for your quick answer.
The problem is solved
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Ernest Friedman-Hill
Gesendet: Montag, 5. Oktober 2009 17:02
An: jess-users
Betreff: Re: JESS: Problem with getslotvalue
On Oct 5, 2009, at 10:42 AM, Steffen Niermann wrote:
> Has anybody an idea, why the changes in the facts, which will be
> printed in the console, will not take effect on the getSlotValue
> fuction?
> ....
I'm not quite sure why you think the changes *would* be visible
through the variable "v" in your Java code. Your rules *don't* modify
the Verzug fact -- they retract it (i.e., delete it) after asserting a
completely separate one. The changes aren't reflected in the fact
pointed to by "v" because that fact isn't even in working memory.
> (defrule einspannen
> ;(declare (no-loop TRUE))
> (Werkstueck (Einspannungsart "Segmentbackenabdruck"))
> ?r1 <- (noloops (einspannennl 0))
> ?r2 <- (Verzug (v1 ?v1) (v2 ?v2))
> =>
> (retract ?r1)
> (assert (noloops (einspannennl 2)))
> (assert (Verzug (v1 (+ ?v1 2)) (v2 ?v2)))
> (retract ?r2)
> )
If you were to actually modify the existing fact, e.g.,
=>
(assert (noloops (einspannennl 2)))
(modify ?r1 (v1 (+ ?v1 2)) (v2 ?v2))
then of course you'd see the changes in that variable.
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012 [email protected]
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].
--------------------------------------------------------------------
------------------------------------------------------------------------
BIBA - Bremer Institut fuer Produktion und Logistik GmbH
Postanschrift: Postfach P.O.B. 33 05 60, D-28335 Bremen / Germany
Geschaeftssitz: Hochschulring 20, D-28359 Bremen / Germany
USt-ID: DE814890109, Amtsgericht Bremen HRB 24505 HB
Tel: +49(0)421/218-5576, Fax: +49(0)421/218-5640
E-Mail: [email protected], Internet: www.biba.uni-bremen.de
Geschaeftsfuehrer: Prof. Dr.-Ing. Bernd Scholz-Reiter
--------------------------------------------------------------------
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].
--------------------------------------------------------------------