JESS: Problem with 2 same-RHS rule

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JESS: Problem with 2 same-RHS rule

Vu Le-2
This is a multi-part message in MIME format.

------extPart_000_0006_01CBFD2A.E94491F0
Content-Type: text/plain;
 charset-ascii
Content-Transfer-Encoding: 7bit

My code is as follow:

      (deftemplate service

            (slot transport (type ATOM))

            (slot radius (type NUMBER))

      (slot activity (type ATOM))

)

 

(defrule rule1

            (declare (salience 41))

            ?s<-  (service (activity walking))

               (modify ?s(radius 1000))

      )

 

(defrule rule2

            (declare (salience 42))

            ?s<-  (service (transport car))

               (modify ?s(radius 5000))

)

 

(reset)

 

(assert (service (transport car) (activity walking)))

 

(run)

 

That causes an infinite loop!

My intention is to let only rule2 to be fired, not rule1. Does Jess provide
anything to fix that?

Thank you.

 


------extPart_000_0006_01CBFD2A.E94491F0
Content-Type: text/html;
 charset-ascii
Content-Transfer-Encoding: quoted-printable

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=VI link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>My code is as follow:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>deftemplate</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'> service</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US style='fo
 nt-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>slot</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'> transport</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>type ATOM</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"C
 ourier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>slot</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'> radius</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>type NUMBER</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>slot</span><span style='font-size:10.0pt;font-family:"Courier
 New";color:#FF0022'> activity</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>type ATOM</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>defrule</span><span style='font-size:10.0pt;font-family:"Courie
 r New";color:#FF0022'> rule1</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>declare</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>salience</span><span style='font-size:10.0pt;font-family:"Courier New";color:#00FF0A'> 41</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospac
 e:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>?s</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>&lt;-</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp; (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>service</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>activity walking</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"C
 ourier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>=</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>&gt;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>modify</span><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'> ?s</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>radius</span><span style='font-size:10.0pt;font-family:"Courier New";color:#00FF0A'> 1000</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:
 p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#0018DD'>defrule</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'> rule2</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='f
 ont-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>declare</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>salience</span><span style='font-size:10.0pt;font-family:"Courier New";color:#00FF0A'> 42</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";col
 or:#A09900'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>?s</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>&lt;-</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp; (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>service</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>transport car</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </sp
 an><span style='font-size:10.0pt;font-family:"Courier New";color:black'>=</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>&gt;</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>modify</span><span style='font-size:10.0pt;font-family:"Courier New";color:#A09900'> ?s</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>radius</span><span style='font-size:10.0pt;font-family:"Courier New";color:#00FF0A'> 5000</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)</span><span style='font-size
 :10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>reset</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>assert</span><span style='font-size:10.0pt;font-family:"Courier New";col
 or:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>service</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'> (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>transport car</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>) (</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>activity walking</span><span style='font-size:10.0pt;font-family:"Courier New";color:black'>)))</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>(</span><span style='font-size:10.0pt;font-family:"Courier New";color:#FF0022'>run</span><span style='font-size:10.0pt
 ;font-family:"Courier New";color:black'>)</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>That causes an infinite loop!<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>My intention is to let only rule2 to be fired, not rule1. Does Jess provide anything to fix that?<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>Thank you.<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>
------extPart_000_0006_01CBFD2A.E94491F0--



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

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Problem with 2 same-RHS rule

Friedman-Hill, Ernest
Have a look at the no-loop and slot-specific declarations:

http://www.jessrules.com/jess/docs/71/rules.html#slot-specific



On Apr 17, 2011, at 7:11 AM, Vu Le wrote:

> This is a multi-part message in MIME format.
>
> ------extPart_000_0006_01CBFD2A.E94491F0
> Content-Type: text/plain;
> charset-ascii
> Content-Transfer-Encoding: 7bit
>
> My code is as follow:
>
>      (deftemplate service
>
>            (slot transport (type ATOM))
>
>            (slot radius (type NUMBER))
>
>      (slot activity (type ATOM))
>
> )
>
>
>
> (defrule rule1
>
>            (declare (salience 41))
>
>            ?s<-  (service (activity walking))
>
>               (modify ?s(radius 1000))
>
>      )
>
>
>
> (defrule rule2
>
>            (declare (salience 42))
>
>            ?s<-  (service (transport car))
>
>               (modify ?s(radius 5000))
>
> )
>
>
>
> (reset)
>
>
>
> (assert (service (transport car) (activity walking)))
>
>
>
> (run)
>
>
>
> That causes an infinite loop!
>
> My intention is to let only rule2 to be fired, not rule1. Does Jess  
> provide
> anything to fix that?
>
> Thank you.
>
>
>
>
> ------extPart_000_0006_01CBFD2A.E94491F0
> Content-Type: text/html;
> charset-ascii
> Content-Transfer-Encoding: quoted-printable
>
> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office
> " xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml 
> " xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-
> EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta  
> name=Generator content="Microsoft Word 12 (filtered  
> medium)"><style><!--
> /* Font Definitions */
> @font-face
> {font-family:"Cambria Math";
> panose-1:2 4 5 3 5 4 6 3 2 4;}
> /* Style Definitions */
> p.MsoNormal, li.MsoNormal, div.MsoNormal
> {margin:0cm;
> margin-bottom:.0001pt;
> font-size:11.0pt;
> font-family:"Arial","sans-serif";}
> a:link, span.MsoHyperlink
> {mso-style-priority:99;
> color:blue;
> text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
> {mso-style-priority:99;
> color:purple;
> text-decoration:underline;}
> span.EmailStyle17
> {mso-style-type:personal-compose;
> font-family:"Arial","sans-serif";
> color:windowtext;}
> .MsoChpDefault
> {mso-style-type:export-only;}
> @page WordSection1
> {size:612.0pt 792.0pt;
> margin:72.0pt 72.0pt 72.0pt 72.0pt;}
> div.WordSection1
> {page:WordSection1;}
> --></style><!--[if gte mso 9]><xml>
> <o:shapedefaults v:ext="edit" spidmax="1026" />
> </xml><![endif]--><!--[if gte mso 9]><xml>
> <o:shapelayout v:ext="edit">
> <o:idmap v:ext="edit" data="1" />
> </o:shapelayout></xml><![endif]--></head><body lang=VI link=blue  
> vlink=purple><div class=WordSection1><p class=MsoNormal><span  
> lang=EN-US style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>My code is as follow:<o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>(</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#0018DD'>deftemplate</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#FF0022'> service</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'> </
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang=EN-US  
> style='fo
> nt-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#0018DD'>slot</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:#FF0022'> transport</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'> (</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>type ATOM</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>))</
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"C
> ourier New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#0018DD'>slot</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:#FF0022'> radius</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'> (</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>type NUMBER</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>))</
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-
> autospace:none'><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp; </span><span style='font-size:10.0pt;font-
> family:"Courier New";color:black'>(</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#0018DD'>slot</span><span  
> style='font-size:10.0pt;font-family:"Courier
> New";color:#FF0022'> activity</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:black'> (</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>type ATOM</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:black'>))</span><span  
> style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></
> span></p><p class=MsoNormal style='text-indent:36.0pt;text-
> autospace:none'><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>)</span><span style='font-size:10.0pt;font-
> family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal  
> style='text-autospace:none'><span style='font-size:10.0pt;font-
> family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal  
> style='text-indent:36.0pt;text-autospace:none'><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'>(</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#0018DD'>defrule</span><span style='font-size:10.0pt;font-
> family:"Courie
> r New";color:#FF0022'> rule1</span><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span style='font-size:
> 10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp; </
> span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>declare</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'> (</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>salience</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#00FF0A'> 41</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>))</
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-autospac
> e:none'><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#A09900'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#A09900'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#A09900'>?s</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>&lt;-</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'>&nbsp; (</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>service</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:black'> (</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#FF0022'>activity walking</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>))</span><span style='font-size:10.0pt;font-
> family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal  
> style='text-autospace:none'><span style='font-size:10.0pt;font-
> family:"C
> ourier New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>=</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>&gt;</span><span style='font-
> size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; (</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#FF0022'>modify</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:#A09900'> ?
> s</span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>radius</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:#00FF0A'> 1000</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>))</span><span style='font-size:10.0pt;font-
> family:"Courier New"'><o:p></o:
> p></span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp; </span><span style='font-size:10.0pt;font-
> family:"Courier New";color:black'>)</span><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p  
> class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>(</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#0018DD'>defrule</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'> rule2</span><span style='font-
> size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span style='f
> ont-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>declare</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'> (</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>salience</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#00FF0A'> 42</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>))</
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#A09900'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier New";col
> or:#A09900'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:#A09900'>?s</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>&lt;-</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:black'>&nbsp; (</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:#FF0022'>service</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'> (</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>transport car</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>))</
> span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></
> o:p></span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; </span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </sp
> an><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>=</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>&gt;</span><span style='font-
> size:10.0pt;font-family:"Courier  
> New";color:black'>&nbsp;&nbsp;&nbsp; (</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:#FF0022'>modify</span><span  
> style='font-size:10.0pt;font-family:"Courier New";color:#A09900'> ?
> s</span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>radius</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:#00FF0A'> 5000</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>))</span><span style='font-size:10.0pt;font-
> family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal  
> style='text-indent:36.0pt;text-autospace:none'><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'>)</span><span  
> style='font-size
> :10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p  
> class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>(</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>reset</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:black'>)</span><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p  
> class=MsoNormal style='text-autospace:none'><span style='font-size:
> 10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p  
> class=MsoNormal style='text-indent:36.0pt;text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier New";color:black'>(</
> span><span style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>assert</span><span style='font-size:10.0pt;font-
> family:"Courier New";col
> or:black'> (</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>service</span><span style='font-
> size:10.0pt;font-family:"Courier New";color:black'> (</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>transport car</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:black'>) (</span><span  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:#FF0022'>activity walking</span><span style='font-size:
> 10.0pt;font-family:"Courier New";color:black'>)))</span><span  
> style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></
> span></p><p class=MsoNormal style='text-autospace:none'><span  
> style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</
> o:p></span></p><p class=MsoNormal style='text-indent:36.0pt;text-
> autospace:none'><span style='font-size:10.0pt;font-family:"Courier  
> New";color:black'>(</span><span style='font-size:10.0pt;font-
> family:"Courier New";color:#FF0022'>run</span><span style='font-size:
> 10.0pt
> ;font-family:"Courier New";color:black'>)</span><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'><o:p></o:p></span></p><p class=MsoNormal  
> style='text-indent:36.0pt;text-autospace:none'><span lang=EN-US  
> style='font-size:10.0pt;font-family:"Courier  
> New";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal  
> style='text-autospace:none'><span lang=EN-US style='font-size:
> 10.0pt;font-family:"Courier New";color:black'>That causes an  
> infinite loop!<o:p></o:p></span></p><p class=MsoNormal style='text-
> autospace:none'><span lang=EN-US style='font-size:10.0pt;font-
> family:"Courier New";color:black'>My intention is to let only rule2  
> to be fired, not rule1. Does Jess provide anything to fix that?
> <o:p></o:p></span></p><p class=MsoNormal style='text-
> autospace:none'><span lang=EN-US style='font-size:10.0pt;font-
> family:"Courier New";color:black'>Thank you.<o:p></o:p></span></p><p  
> class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>
> ------extPart_000_0006_01CBFD2A.E94491F0--
>
>
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users  
> [hidden email]'
> in the BODY of a message to [hidden email], NOT to the list
> (use your own address!) List problems? Notify [hidden email]
> .
> --------------------------------------------------------------------

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            [hidden email]
Livermore, CA 94550                             http://www.jessrules.com





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