Class ConflictOrderingSearch<V extends Variable>
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.strategy.AbstractStrategy<V>
-
- org.chocosolver.solver.search.strategy.strategy.ConflictOrderingSearch<V>
-
- All Implemented Interfaces:
IMonitorContradiction,ISearchMonitor
public class ConflictOrderingSearch<V extends Variable> extends AbstractStrategy<V> implements IMonitorContradiction
Conflict Ordering Search Composite heuristic which hacks a mainStrategy by forcing the use of variables involved in recent conflicts See "Conflict Ordering Search for Scheduling Problems", Steven Gay et al., CP2015.- Since:
- 15/06/2016
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description ConflictOrderingSearch(Model model, AbstractStrategy<V> mainStrategy)Creates a conflict-ordering search
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decision<V>getDecision()Provides access to the current decision in the strategy.booleaninit()Preparethisto be used in a search loop The initialization can detect inconsistency, in that case, it returns falsevoidonContradiction(ContradictionException cex)-
Methods inherited from class org.chocosolver.solver.search.strategy.strategy.AbstractStrategy
computeDecision, getVariables, makeIntDecision, toString
-
-
-
-
Constructor Detail
-
ConflictOrderingSearch
public ConflictOrderingSearch(Model model, AbstractStrategy<V> mainStrategy)
Creates a conflict-ordering search- Parameters:
model- the solver to attach this tomainStrategy- the main strategy declared
-
-
Method Detail
-
init
public boolean init()
Description copied from class:AbstractStrategyPreparethisto be used in a search loop The initialization can detect inconsistency, in that case, it returns false- Overrides:
initin classAbstractStrategy<V extends Variable>
-
getDecision
public Decision<V> getDecision()
Description copied from class:AbstractStrategyProvides access to the current decision in the strategy. If there are no more decision to provide, it returnsnull.- Specified by:
getDecisionin classAbstractStrategy<V extends Variable>- Returns:
- the current decision
-
onContradiction
public void onContradiction(ContradictionException cex)
- Specified by:
onContradictionin interfaceIMonitorContradiction
-
-