V
- public class FindAndProve<V extends Variable> extends AbstractStrategy<V>
LOGGER, vars
Constructor and Description |
---|
FindAndProve(V[] vars,
AbstractStrategy<V> heurToFindASol,
AbstractStrategy<V> heurToProveOpt)
Heuristic which switches from one heuristic (heurToFindASol) to another (heurToProveOpt)
once a solution has been found
|
Modifier and Type | Method and Description |
---|---|
Decision<V> |
computeDecision(V variable)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
Decision |
getDecision()
Provides access to the current decision in the strategy.
|
void |
init()
Prepare
this to be used in a search loop |
getVariables, toString
public FindAndProve(V[] vars, AbstractStrategy<V> heurToFindASol, AbstractStrategy<V> heurToProveOpt)
vars
- variables to branch onheurToFindASol
- a heuristic to branch on vars, to find a (good) solution easilyheurToProveOpt
- a heuristic to branch on vars, to prove the optimality of the solutionpublic void init() throws ContradictionException
AbstractStrategy
this
to be used in a search loopinit
in class AbstractStrategy<V extends Variable>
ContradictionException
public Decision getDecision()
AbstractStrategy
null
.getDecision
in class AbstractStrategy<V extends Variable>
public Decision<V> computeDecision(V variable)
AbstractStrategy
computeDecision
in class AbstractStrategy<V extends Variable>
variable
- a variableCopyright © 2015. All rights reserved.