Hi,
Mine is the case:
when
$p : Product( color == "red", country ==
"Italy", wt > 10 )
then
$p.setPrice( wt * 2.75 )
end
when
$p : Product( color == "red", country ==
"Italy", wt > 20 )
then
$p.setPrice( wt * 2.00 )
end
Then from time to time, will want to find out the rules that e.g. offer
price less than some price for product from a country and within some
wt. range.
Thanks
Salina
----- Original Message -----
From: Davide Sottara
[mailto:dsotty@gmail.com]
To: rules-users(a)lists.jboss.org
Sent: Mon, 02 Jan
2012 19:23:51 +0800
Subject: Re: [rules-users] Extracting management
information from the content of the rules
Out of curiosity, I'd like to better understand the requirements.
Are we
talking about rules of the form:
when
Product( color == "red", country == "Italy", discount > 10 )
then
...
end
i.e., the discount is stored in some field and constrained by the rules?
or
when
$p : Product( color == "red", country == "Italy", $x : price )
then
$p.setPrice( $x * 0.75 )
end
More properly, the questions are : 1) is the discount given or computed? 2)
is it available (or can be stored) in some data field or is it "transient" ?
The RHS of a rule is a sort of "black box" which is more difficult to reason
against, so you'll probably need some kind of reified discount:
when
$p : Product( color == "red", country == "Italy" )
then
insertLogical( new Discount( $p, 0.75 ) );
end
-----------------------------------------------------------------------------------------------------------------
This said, there is a final, more important question. Are you interested in
a report describing the
characteristics of the objects which were discounted?
For example, you have 1000 discounted products in your system and you want
to find a "POSTERIOR"
correlation between their features and the discount they got. This is the
kind of problems that
are solved by data mining techniques, e.g. CARTs (classification and
regression trees), Association Rules (not the rules we're used to !!) or
Clustering algorithms
If instead you want to reason abstractly, using the definitions contained in
the rules' LHSs to understand which classes of objects COULD receive some
kind of discount, that's a kind of "semantic" problem and I guess that
some
tableau-like technique could help.
This to say that, according to the exact type of "reporting" that you want
to build, the "rules" you'd have to write might vary quite a lot.
Best
Davide
--
View this message in context:
http://drools.46999.n3.nabble.com/Re-rules-users-Extracting-management-in...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users