First thank you for your answers. I ordered the book.
I played al little bit around with Jess in the mean time, so a further
question from your answers and a few specific questions regarding the
Jess language.

>but perhaps just the ones
>that represent specific events; the tarriff data that I take it is
>constant across multiple events could stay in working memory

yes, they should be kept in memory and every time be available if I run
, fire the rules of Jess. As far as I have seen, after a fact is
processed
by the rule, is it not again more useable. You have to use "refact" but
then
you have to "assert" they again. Exists there any possibilities to keep
facts available for every time a run rules?

> Pattern matching.

How could I specify a pattern for a a specific groups of facts, which
have dynamical list of data elements ? i.e.
(assert (event A 1 2 3))
(assert (event A 1 2))
(assert (event A 1 2 3 4 5))
(assert (event A 3 ))
(assert (event B 1 2 3))
(assert (event B 3))

How would a pattern look like only to select (events A ...) ?
Or is my basic idea here wrong, exists there for this case a better
concept of facts structures?

Thank you in advance
Best regards
Mark


-----Urspr|ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von [EMAIL PROTECTED]
Gesendet: Sonntag, 7. September 2003 02:51
An: [EMAIL PROTECTED]
Betreff: Re: JESS: Jess Beginner,Conceptional Questions for Event
Billing

I think Mark Egloff wrote:
> Hello there!
> 
> I am looking for a way to realise an event billing concept. I am
> thinking to start with a rule engine is the right way. Unfortunately I
> have no clue how I should start with Jess, so I write down my basic
> vision of the concept and Probably someone could tell me if Jess can
> handle this and perhaps give me some hints so that I can start. This
> would be great. Thank you in advance.
> 
> First question is about how to using jess.
> My basic idea is to us Jess as follow:
> 
> 1. I starting Jess and loading all the rules from a file
> 2. loading first set of facts 
> 3. run jess and get the output
> 4. destroy the first set of facts but keep the rules
> 5. loading next set of facts
> 6. run jess and get the output
> 7. .and so on.
> 
> Is this first concept of using jess so possible?

Yes, no problem here. Based on the below, you probably wouldn't want
to clear out all the facts on each go-round, but perhaps just the ones
that represent specific events; the tarriff data that I take it is
constant across multiple events could stay in working memory.

> 
> Next question is regarding using rules and facts together. 
> Event based billing means in my context the following. I have event
data
> from type A, type B , Type C and so on. For every type exists a
specific
> tariff, also tariff A, tariff B, tariff C and so on Usually I have
> multiple event objects from type A, but only one tariff A object. For
> the price calculation I have simple to multiply every event of type A
> with the tariff A and to summarize these.
> 
> To use it now with Jess, I like to do the following. I use the events
A,
> B ,C . and tariffs A, B , C as facts. After that I like to fire the
> rule(s) fort the price calculation. In the above described examples
must
> the rule find 
> For every event object the correct tariff  (type of event =  type of
> tariff ) object and does the calculation.
> 
> And now here is my problem, is my basic understanding of rules and
facts
> correct with the description above ? And here my follow up questions:
> - How does Jess resp. the rule know that all event objects have to be
> processed ?

If you write rules that basically say "given an event of type A, and a
tarriff of type A, then compute the price.", then Jess will
automatically apply it to every event of type A. You could write this
more generically as "Given an event of type T, and a tarriff of the
same type, then compute the price" where T is a "free variable."

> - How does the rule find for every event object the correct tariff
> object ? 

Pattern matching. Your rule would contain the logic that matched one
to the other; you know the criteria, so it's just a matter of
programming them.

You might want to get a copy of "Jess in Action" from Amazon.com; it
does a much better job of explaining concepts than the Jess manual
does. 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

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