Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2010 JBoss Inc
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.drools.planner.core.score.calculator;
A wrapper for the elements of a Score, injected as a global in the WorkingMemory to avoid a performance problem in Drools Expert with using 2 or more accumulates in the same rule.

TODO remove when the rule that sums the final score can be written as a single rule and ScoreCalculator is dead

public interface ScoreCalculator extends Cloneable {

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.

never null, the score of the solution
New to GrepCode? Check out our FAQ X