If you execute the agenda function before any rules are 
defined then you will not see any activations. This seems 
to be the case you have shown in your example ... not too clear since
your syntax is incorrect:

        Rule 1 (
        )

is NOT Jess syntax. I expect you meant 

        (defrule Rule1
         ... ;; some patterns here
         =>
         ... ;; some function calls here
        )

If you use the agenda on the RHS of 'Rule 1' then 'Rule 1' is no longer
on the agenda so you wouldn't expect to see it. Once a rule fires it
is removed from the agenda. Likewise if you see only rules 3-5 when you add
(agenda) to the RHS of 'Rule 2' then this probably means that 'Rule 1'
has already fired and has been removed from the agenda and 'Rule 2' is
currently firing and is not on the agenda. So this would be normal.
The agenda is the set of rules for which there is a match to the LHS
patterns (possibly many activations of the same rule). These rules
are ordered on the agenda and waiting to be fired. Once fired they 
are removed from the agenda. They can also be removed without firing if 
the patterns that matched no longer match.

Bob.


Bob Orchard
National Research Council Canada      Conseil national de recherches Canada
Institute for Information Technology  Institut de technologie de
l'information
1200 Montreal Road, Building M-50     M50, 1200 chemin Montrial
Ottawa, ON, Canada K1A 0R6            Ottawa (Ontario) Canada K1A 0R6
(613) 993-8557 
(613) 952-0215 Fax / tilicopieur
[EMAIL PROTECTED] 
Government of Canada | Gouvernement du Canada



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> Behalf Of Michael Knapik
> Sent: Monday, May 03, 2004 3:02 PM
> To: [EMAIL PROTECTED]
> Subject: JESS: Re: Re: Jess agenda function
> 
> 
> Well - I was wondering about the behavior of the agenda 
> function more than
> anything; seems like one cannot get the first rule defined to 
> show up on the
> agenda (at least not based on what the agenda function shows)
> ----- Original Message ----- 
> From: "Alan Moore" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 03, 2004 11:35 AM
> Subject: JESS: Re: Jess agenda function
> 
> 
> > If you want to "manage" the agenda (conflict resolution) I 
> think you will
> need to implement:
> >
> > http://herzberg.ca.sandia.gov/jess/docs/61/api/jess/Strategy.html
> >
> > Otherwise, you can change the default strategy with:
> >
> > (set-strategy)
> >
> > Does this answer your question or am I missing the point?
> >
> > alan
> >
> > ----- Original Message ----- 
> > From: "Michael Knapik" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, May 03, 2004 11:18 AM
> > Subject: JESS: Jess agenda function
> >
> >
> > I have a set of 5 rules defined
> >
> > I place the agenda function call as follows:
> >
> > (agenda)
> > Rule 1 (
> > )
> > Rule 2 (
> > )
> > Rule 3(
> > )
> > Rule 4 (
> > )
> > Rule 5 (
> > )
> >
> > Result is a list of 0 activations!!
> >
> > When I place it inside the Rule 1 defiinition (RHS) the 
> result is the set
> of
> > Rule 2-5 activations but not Rule 1 activation.
> > When I place it inside the Rule 2 defiinition (RHS) the 
> result is the set
> of
> > Rule 3-5 activations but not Rule 1/2 activations
> > and so forth.
> > When it is placed on any LHS, the rule does not fire and no 
> agenda is
> > produced.
> >
> > So when does the agenda have all 5 rules in it such that it 
> can be managed
> > accordingly?
> >
> > --------------------------------------------------------------------
> > 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]
> > --------------------------------------------------------------------
> >
> > --------------------------------------------------------------------
> > 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]
> > --------------------------------------------------------------------
> >
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 

--------------------------------------------------------------------
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