org.drools.planner.core.score.buildin.hardandsoftlong
Class HardAndSoftLongScoreCalculator
java.lang.Object
org.drools.planner.core.score.calculator.AbstractScoreCalculator
org.drools.planner.core.score.buildin.hardandsoftlong.HardAndSoftLongScoreCalculator
- All Implemented Interfaces:
- Serializable, Cloneable, ScoreCalculator
public class HardAndSoftLongScoreCalculator
- extends AbstractScoreCalculator
- See Also:
- Serialized Form
hardConstraintsBroken
protected long hardConstraintsBroken
softConstraintsBroken
protected long softConstraintsBroken
HardAndSoftLongScoreCalculator
public HardAndSoftLongScoreCalculator()
getHardConstraintsBroken
public long getHardConstraintsBroken()
setHardConstraintsBroken
public void setHardConstraintsBroken(long hardConstraintsBroken)
getSoftConstraintsBroken
public long getSoftConstraintsBroken()
setSoftConstraintsBroken
public void setSoftConstraintsBroken(long softConstraintsBroken)
calculateScore
public Score calculateScore()
- Description copied from interface:
ScoreCalculator
- Calculates the score: the solution (encountered at a step)
with the highest score will be seen as the the best solution.
The step score calculation should be kept stable over all steps.
When the solution is modified during a Move,
the WorkingMemory's FactHandles should have been correctly notified.
Before the score is calculated, all rules are fired,
which should trigger an update of this instance.
- Returns:
- never null, the score of the solution
Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.