> That's comparing apples and oranges.
> If you have 2 solutions A and B scored using a different score function, it's 
> impossible to state whether A is better/worse than B based on those scores or 
> the number of violations.

Well the rules stay the same, only the weight is changed.

If I have for example a rule (R1) that requires a given skill for a job and a 
rule (R2) which says someone can only do one job at the time then
Solution A) with different weights I get something like 20 violations of R1 and 
10 violations of R2
Solution B) with equal weights I get something like 5 violations of R1 and 2 
violations of R2
So B) is better.

I understand the fact that a business analysis defines the weights, that's why 
they have been different so far.
1)  I just don't know how to get to solution B (which is better than A if you 
recalculate with the weights of A) with the correct weights applied.

2) Can you indicate how hard it is to migrate from 5.5.0 to 6.0?

Thanks
 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: Geoffrey De Smet <[email protected]>
To: Michiel Vermandel <[email protected]>; Rules Users List 
<[email protected]> 
Sent: Thursday, June 6, 2013 11:15 AM
Subject: Re: [drools-planner] please advice on IntConstraintOccurrence weight
 




On 06-06-13 10:22, Michiel Vermandel wrote:

Hi,
>
>
>(using drools-planner 5.5.0.Final)
>
>
>I'm struggling with assigning weights to IntConstraintOccurrence in a rule's 
>LHS.
>If I assign different weights for different rules (because we think one rule 
>is more important than an other)
The business analysis defines the score weights, it's not our call to make 
which is more important etc.
One way talk to you your business people and get them to convert
    their knowledge into score weights
is to ask "if you had to put a price tag on everything, how much
    would violating this constraint cost us?".
Basically normalize everything to a price.

For example: in nurse rostering, "not giving a nurse her day off
    requests costs the solution 100 $".
It might seem unethical to put a price tag on a nurse's happiness,
    but reality does it implicitly anyway.


our end result is far worse than when we assign all equal weights.
>I do not look at the total value of hard and soft score but at the number of 
>violations.
That's comparing apples and oranges.
If you have 2 solutions A and B scored using a different score
    function, it's impossible to state whether A is better/worse than B
    based on those scores or the number of violations.

What you can do is take solution B and grind it through A's score
    function to compare it with score A (or vica versa).


I can imagine that the planner can evolve much easier to a better solution with 
all weights being the same because if not then "transient" moves will be made 
impossible to take.
Yes, if and only if the more difficult constraints have higher weights 
(otherwise it's the opposite).

But it's a bit absurd. For example in nurse rostering, I could give
    all nurses their day off requests if I didn't have to worry about
    assigning no more than 2 shifts to the same nurse as the same
    time...


>
>But how should we then implement importance in rules?
Define your score function as your business needs it. Use the techniques 
described in the 6.0 manual: negative/postive, weights and levels.

PS: 6.0.0.Beta3 is out and the new addSoftConstraintMatch() system
    is much faster and easier to use (see the blog post of a few months
    ago).


>
>Thanks
> 
>-----------------
>http://www.codessentials.com - Your essential software, for free!
>Follow us at http://twitter.com/#!/Codessentials
>
>
>_______________________________________________
rules-users mailing list [email protected] 
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to