choco.cp.solver.search.integer.branching.domwdeg
Class AbstractDomOverWDegBranching
java.lang.Object
choco.kernel.solver.branch.AbstractBranchingStrategy
choco.kernel.solver.branch.AbstractIntBranchingStrategy
choco.kernel.solver.branch.AbstractLargeIntBranchingStrategy
choco.cp.solver.search.integer.branching.domwdeg.AbstractDomOverWDegBranching
- All Implemented Interfaces:
- IRandomBreakTies, BranchingStrategy, IntBranching, PropagationEngineListener
- Direct Known Subclasses:
- AbstractDomOverWDegBinBranching, DomOverWDegBranchingNew
public abstract class AbstractDomOverWDegBranching
- extends AbstractLargeIntBranchingStrategy
- implements PropagationEngineListener, IRandomBreakTies
solver
protected final Solver solver
varRatios
protected final IntRatio[] varRatios
updateWeightsCount
protected int updateWeightsCount
AbstractDomOverWDegBranching
public AbstractDomOverWDegBranching(Solver solver,
IntRatio[] varRatios,
Number seed)
getSolver
public final Solver getSolver()
getRatioSelector
public final IntVarRatioSelector getRatioSelector()
cancelRandomBreakTies
public void cancelRandomBreakTies()
- Specified by:
cancelRandomBreakTies
in interface IRandomBreakTies
setRandomBreakTies
public void setRandomBreakTies(long seed)
- Specified by:
setRandomBreakTies
in interface IRandomBreakTies
initConstraintForBranching
public void initConstraintForBranching(SConstraint c)
- Description copied from class:
AbstractBranchingStrategy
- this method is used to build the data structure in the branching for
the given constraint. This is used when the constraint was not present
at the initialization of the branching, for example a cut
- Overrides:
initConstraintForBranching
in class AbstractBranchingStrategy
- Parameters:
c
- constraint
getExpectedUpdateWeightsCount
protected abstract int getExpectedUpdateWeightsCount()
initBranching
public final void initBranching()
- Description copied from class:
AbstractBranchingStrategy
- This method is called before launching the search. it may be used to intialiaze data structures or counters for
instance.
- Overrides:
initBranching
in class AbstractBranchingStrategy
reinitBranching
protected final void reinitBranching()
increaseVarWeights
protected final void increaseVarWeights(Var currentVar)
decreaseVarWeights
protected final void decreaseVarWeights(Var currentVar)
contradictionOccured
public final void contradictionOccured(ContradictionException e)
- Specified by:
contradictionOccured
in interface PropagationEngineListener
safeDelete
public final void safeDelete()
- Description copied from interface:
PropagationEngineListener
- Define action to do just before a deletion.
- Specified by:
safeDelete
in interface PropagationEngineListener
selectBranchingObject
public Object selectBranchingObject()
throws ContradictionException
- Description copied from interface:
BranchingStrategy
- selecting the object under scrutiny (that object on which an alternative will be set)
- Specified by:
selectBranchingObject
in interface BranchingStrategy
- Returns:
- the object on which an alternative will be set (often a variable)
- Throws:
ContradictionException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.