[rules-users] Planner/solver - POSITIVE scoring...

Michael Neale michael.neale at gmail.com
Thu Jan 7 20:21:19 EST 2010


yeah that is it.

BTW - is it ok to chat about planner here - is there enough interest
to create a separate list for it if needed? (or is traffic low enough
people aren't troubled?).

On Fri, Jan 8, 2010 at 3:11 AM, Greg Barton <greg_barton at yahoo.com> wrote:
> So, basically what you're saying is, "The impact of a given negative soft constraint is reduced by the occurrence of another positive constraint."
>
> If that's the case, the rule makes sense to me: total up the occurrences of the negative constraint, total up the occurrences of the positive constraint, and then combine them in a way that describes their relationship.
>
> In this case, what the positive constraint "favors" is the reduction or elimination of the negative constraint, so subtracting the positive constraint makes sense. (A classic "interference pattern" situation.)
>
> --- On Thu, 1/7/10, Michael Neale <michael.neale at gmail.com> wrote:
>
>> From: Michael Neale <michael.neale at gmail.com>
>> Subject: [rules-users] Planner/solver - POSITIVE scoring...
>> To: "Rules Users List" <rules-users at lists.jboss.org>, "Geoffrey" <ge0ffrey.spam at gmail.com>
>> Date: Thursday, January 7, 2010, 12:23 AM
>> Hi All - FYI I have been conversing
>> with Geoffrey on basic
>> solver/planner usage questions, but we are bring the
>> discussion here
>> in case others can benefit.
>>
>> So I am looking at using IntConstraintOccurrence, for
>> scoring with
>> weights, and HardAndSoftConstraintScoreCalculator. So I can
>> see how
>> NEGATIVE_HARD and NEGATIVE_SOFT scores would work, with
>> appropriate
>> accumulator rules doing that etc.
>>
>> What I am not sure about is ConstraintType.POSITIVE - so I
>> want to use
>> that to "favour" certain aspects of a solution. So would
>> the correct
>> way to use that to be to have rules that use a positive
>> IntConstrainOccurrence, and then do something like:
>>
>>     when
>>         $softTotal : Number() from
>> accumulate(
>>
>> IntConstraintOccurrence(constraintType ==
>> ConstraintType.NEGATIVE_SOFT, $weight : weight),
>>             sum($weight) //
>> Vote for
>> http://jira.jboss.com/jira/browse/JBRULES-1075
>>         );
>>        $positiveTotal: Number()
>> from accumulate(
>>
>> IntConstraintOccurrence(constraintType ==
>> ConstraintType.POSITIVE, $weight : weight),
>>             sum($weight) //
>> Vote for
>> http://jira.jboss.com/jira/browse/JBRULES-1075
>>         );
>>
>>     then
>>
>> scoreCalculator.setSoftConstraintsBroken($softTotal.intValue()
>> - $positiveTotal.intValue());
>>
>>
>>
>> ?? it seems odd - I want to use POSITIVE but I am using it
>> to reduce
>> the soft constraints broken? The the higher the positive
>> score, the
>> less softConstraintsBroken property of the score calculator
>> is set -
>> that seems odd... or should I not use HardAndSoft if I am
>> using
>> POSITIVE and NEGATIVE scoring?
>>
>>
>> --
>> Michael D Neale
>> home: www.michaelneale.net
>> blog: michaelneale.blogspot.com
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com




More information about the rules-users mailing list