[rules-users] Purpose of difficultyWeightFactoryClass in @PlanningEntity annotation.

Michiel Vermandel mvermand at yahoo.com
Mon Jan 7 15:26:12 EST 2013


Hi,

I am struggling with the purpose of difficultyWeightFactoryClass in the @PlanningEntity annotation.

I thought it was used to indicate which PlanningEntities to handle first in order to get faster to a solution.
Though it seems that it also has impact on whether or not to get to a zero-hardscore solution.
I mean I have a testcase that resolves to a zero-hardscore solution.
Then I change something small in how the difficultyWeightFactoryClass calculates the weight and all the sudden I get a negative-hardscore solution.
I thought it would still get to the same zero-hardscore solution but in a shorter solving time.

My solver termination is as follows:

    <termination>
        <terminationCompositionStyle>OR</terminationCompositionStyle>
        <maximumSecondsSpend>3600</maximumSecondsSpend>
        <scoreAttained>0hard/0soft</scoreAttained>
    </termination>

and constructionHeuristic:

    <constructionHeuristic>
        <constructionHeuristicType>BEST_FIT_DECREASING</constructionHeuristicType>
    </constructionHeuristic>


I do not reach a zero-hardscore and the time spent is about 2.8 seconds...

If I read the best solution I get:
.isEveryProblemFactChangeProcessed(): true
.isTerminateEarly(): false


Any idea why I do not get a zero-hardscore solution anymore when only making a small change to the difficultyWeightFactoryClass logic?

Thanks

Michiel.

 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130107/9c01043b/attachment.html 


More information about the rules-users mailing list