The new "Jess in Action" book has a number of examples that can help you.

The hardcopy isn't available yet, but the e-book works great for me!

alan


-----Original Message-----
From: PECK, JOSH (SBCSI)
To: '[EMAIL PROTECTED]'
Sent: 7/21/2003 7:01 AM
Subject: JESS: Newbie problem description and help request


Hi,

I believe that I've got a rules-engine problem that JESS would be a good
fit
for, but I wanted to get some additional input.  I've gone through the
JESS
documentation and have a basic understanding of how the system works.
Unfortunately, I've been programming in an object oriented and
procedural
manner for so long, that it's difficult for me to visualize how to
approach
problems in a declarative framework like JESS.

Problem statement:

I would like to develop an expert system that can notify customers which
Packages and Products they can purchase based on their pre-existing
Package
and Product selections.  

Packages are simply lists of Products and/or other Packages.  Below,
Packages are denoted as "Package-n" and Products are just single
alpha-characters, a,b,c, etc.  Package contents are static and cannot be
changed by the user.  However, over time, new Packages, Products, and
rules
will be added, modified, deleted, etc.

Inputs:

1)  A list of packages and products that a customer already has
selected.

Example:  
        
        Package-1:  x, y, z
        Package-4:  a, b, c, Package-2
        t
        s

2)  A list of Packages and/or Products that a customer wants to
purchase:

Example:  

        Package-5:  d, e, f, Package-3
        w
        x
        q


Rules:

Rules exist that disallow, require, or modify Package and Product
description. 

        Rule-1:  If customer has Package-1 they CANNOT select Products w
and
q separately, or in another Package.
        Rule-2:  If customer has Package-1 they CANNOT select Package-10
        Rule-3:  If customer has Package-4 they MUST have Package-1
        Rule-4:  Customers in California can only have Packages-1
through
Package-5
        Rule-5:  Customers with promo code 12345 get a 10% discount on
Package-3
        etc....

Output:

1) TRUE:  Everything matches ok, no need to change selection
2) FALSE:  There are some conflicts.  These are:  (list some text or
code
that describes conflict)


% % % %

I know that JESS can tackle this problem, but will it be relatively
efficient (as compared to just writing it in straight Java, looping over
if/thens, etc) ?  Also, if someone could help me get started with a
basic
approach description, that would be fantastic.  I think I can build
facts
and structures in JESS that represent the Packages and Products ok, it's
the
rules and functions that would make it run that I'm having trouble with
:)

Note:  Rules-4 and 5 listed above are more advanced and I can probably
figure them out if I get the basic system set up.


Thanks (a lot) in advance,
Josh Peck


P.s. So far I've found the system very easy to use and very well
documented.
Installing JESS and running the examples was a breeze.  I'm really
impressed
with the tool so far!  Very nicely done.  I really hope that I can use
it
for my application.
   

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