choco.cp.solver.search.integer.branching.domwdeg
Class DomOverWDegBranchingNew

java.lang.Object
  extended by choco.kernel.solver.branch.AbstractBranchingStrategy
      extended by choco.kernel.solver.branch.AbstractIntBranchingStrategy
          extended by choco.kernel.solver.branch.AbstractLargeIntBranchingStrategy
              extended by choco.cp.solver.search.integer.branching.domwdeg.AbstractDomOverWDegBranching
                  extended by choco.cp.solver.search.integer.branching.domwdeg.DomOverWDegBranchingNew
All Implemented Interfaces:
IRandomBreakTies, BranchingStrategy, IntBranching, PropagationEngineListener

public class DomOverWDegBranchingNew
extends AbstractDomOverWDegBranching

History: 2008-04-23 : Creation : dom / wdeg needs to be a branching not just an heuristic to allow to deal with backtracking events ! WARNING ! This implementation suppose that the variables will not change. It copies all variables in an array at the beginning !!


Field Summary
 
Fields inherited from class choco.cp.solver.search.integer.branching.domwdeg.AbstractDomOverWDegBranching
solver, updateWeightsCount, varRatios
 
Fields inherited from class choco.kernel.solver.branch.AbstractBranchingStrategy
LOG_DECISION_MSG_ASSIGN, LOG_DECISION_MSG_REMOVE, LOG_DOWN_MSG, LOG_UP_MSG, manager
 
Fields inherited from interface choco.kernel.solver.branch.BranchingStrategy
LOGGER
 
Constructor Summary
DomOverWDegBranchingNew(Solver s, IntDomainVar[] vars, ValIterator valHeuri, Number seed)
           
 
Method Summary
 boolean finishedBranching(IntBranchingDecision decision)
          Checks whether all branches have already been explored at the current choice point.
 String getDecisionLogMessage(IntBranchingDecision decision)
          The logging message associated with the current decision.
protected  int getExpectedUpdateWeightsCount()
           
 void goDownBranch(IntBranchingDecision decision)
          Performs the action, so that we go down a branch from the current choice point.
 void goUpBranch(IntBranchingDecision decision)
          Performs the action, so that we go up the current branch to the father choice point.
 void setFirstBranch(IntBranchingDecision decision)
          compute the first decision by setting a branching value or modifying the branching object
 void setNextBranch(IntBranchingDecision decision)
          compute the next decision by setting a branching value or modifying the branching object
 
Methods inherited from class choco.cp.solver.search.integer.branching.domwdeg.AbstractDomOverWDegBranching
cancelRandomBreakTies, contradictionOccured, decreaseVarWeights, getRatioSelector, getSolver, increaseVarWeights, initBranching, initConstraintForBranching, reinitBranching, safeDelete, selectBranchingObject, setRandomBreakTies, toString
 
Methods inherited from class choco.kernel.solver.branch.AbstractIntBranchingStrategy
getDefaultAssignMsg, getDefaultAssignOrForbidMsg
 
Methods inherited from class choco.kernel.solver.branch.AbstractBranchingStrategy
getManager, getNextBranching, setNextBranching, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DomOverWDegBranchingNew

public DomOverWDegBranchingNew(Solver s,
                               IntDomainVar[] vars,
                               ValIterator valHeuri,
                               Number seed)
Method Detail

getDecisionLogMessage

public String getDecisionLogMessage(IntBranchingDecision decision)
Description copied from interface: IntBranching
The logging message associated with the current decision.

Parameters:
decision - current decision
Returns:
logging message.

getExpectedUpdateWeightsCount

protected int getExpectedUpdateWeightsCount()
Specified by:
getExpectedUpdateWeightsCount in class AbstractDomOverWDegBranching

goDownBranch

public void goDownBranch(IntBranchingDecision decision)
                  throws ContradictionException
Description copied from interface: IntBranching
Performs the action, so that we go down a branch from the current choice point.

Parameters:
decision - the decision to apply.
Throws:
ContradictionException - if a domain empties or a contradiction is infered

goUpBranch

public void goUpBranch(IntBranchingDecision decision)
                throws ContradictionException
Description copied from interface: IntBranching
Performs the action, so that we go up the current branch to the father choice point.

Parameters:
decision - the decision that has been set at the father choice point
Throws:
ContradictionException - if a domain empties or a contradiction is infered

setFirstBranch

public void setFirstBranch(IntBranchingDecision decision)
Description copied from interface: IntBranching
compute the first decision by setting a branching value or modifying the branching object


setNextBranch

public void setNextBranch(IntBranchingDecision decision)
Description copied from interface: IntBranching
compute the next decision by setting a branching value or modifying the branching object


finishedBranching

public boolean finishedBranching(IntBranchingDecision decision)
Description copied from interface: IntBranching
Checks whether all branches have already been explored at the current choice point.

Parameters:
decision - the last decision applied
Returns:
true if no more branches can be generated


Copyright © 2012. All Rights Reserved.