Module org.chocosolver
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.boolean
init()
Preparethis
to be used in a search loop The initialization can detect inconsistency, in that case, it returns falsevoid
onContradiction(ContradictionException cex)
void
remove()
Remove the current strategy.-
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:AbstractStrategy
Preparethis
to be used in a search loop The initialization can detect inconsistency, in that case, it returns false- Overrides:
init
in classAbstractStrategy<V extends Variable>
-
remove
public void remove()
Description copied from class:AbstractStrategy
Remove the current strategy. This implies unplugging variable or search monitors.- Overrides:
remove
in classAbstractStrategy<V extends Variable>
-
getDecision
public Decision<V> getDecision()
Description copied from class:AbstractStrategy
Provides access to the current decision in the strategy. If there are no more decision to provide, it returnsnull
.- Specified by:
getDecision
in classAbstractStrategy<V extends Variable>
- Returns:
- the current decision
-
onContradiction
public void onContradiction(ContradictionException cex)
- Specified by:
onContradiction
in interfaceIMonitorContradiction
-
-