V - public class FindAndProve<V extends Variable> extends AbstractStrategy<V>
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.
|
boolean |
init()
Prepare
this to be used in a search loop
The initialization can detect inconsistency, in that case, it returns false |
getVariables, makeIntDecision, toStringpublic 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 boolean init()
AbstractStrategythis to be used in a search loop
The initialization can detect inconsistency, in that case, it returns falseinit in class AbstractStrategy<V extends Variable>public Decision getDecision()
AbstractStrategynull.getDecision in class AbstractStrategy<V extends Variable>public Decision<V> computeDecision(V variable)
AbstractStrategycomputeDecision in class AbstractStrategy<V extends Variable>variable - a variableCopyright © 2018. All rights reserved.