public class DomOverWDeg extends AbstractStrategy<IntVar> implements IMonitorContradiction
Modifier and Type | Field and Description |
---|---|
protected IntMap |
p2w
Map (propagator - weight), where weight is the number of times the propagator fails.
|
vars
Constructor and Description |
---|
DomOverWDeg(IntVar[] variables,
long seed,
IntValueSelector valueSelector)
Creates a DomOverWDeg variable selector
|
Modifier and Type | Method and Description |
---|---|
Decision<IntVar> |
computeDecision(IntVar variable)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
Decision<IntVar> |
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 |
void |
onContradiction(ContradictionException cex) |
void |
remove()
Remove the current strategy.
|
getVariables, makeIntDecision, toString
protected IntMap p2w
public DomOverWDeg(IntVar[] variables, long seed, IntValueSelector valueSelector)
variables
- decision variablesseed
- seed for breaking ties randomlyvalueSelector
- a value selectorpublic boolean init()
AbstractStrategy
this
to be used in a search loop
The initialization can detect inconsistency, in that case, it returns falseinit
in class AbstractStrategy<IntVar>
public void remove()
AbstractStrategy
remove
in class AbstractStrategy<IntVar>
public void onContradiction(ContradictionException cex)
onContradiction
in interface IMonitorContradiction
public Decision<IntVar> computeDecision(IntVar variable)
AbstractStrategy
computeDecision
in class AbstractStrategy<IntVar>
variable
- a variablepublic Decision<IntVar> getDecision()
AbstractStrategy
null
.getDecision
in class AbstractStrategy<IntVar>
Copyright © 2018. All rights reserved.