choco.cp.solver.search.integer.branching
Class AssignOrForbidIntVarVal

java.lang.Object
  extended by choco.kernel.solver.branch.AbstractBranchingStrategy
      extended by choco.kernel.solver.branch.AbstractIntBranchingStrategy
          extended by choco.kernel.solver.branch.AbstractBinIntBranchingStrategy
              extended by choco.cp.solver.search.integer.branching.AbstractAssignOrForbidBranching
                  extended by choco.cp.solver.search.integer.branching.AssignOrForbidIntVarVal
All Implemented Interfaces:
BranchingStrategy, IntBranching

public class AssignOrForbidIntVarVal
extends AbstractAssignOrForbidBranching

A class for branching schemes that consider two branches: - one assigning a value to an IntVar (X == v) - and the other forbidding this assignment (X != v)


Field Summary
 
Fields inherited from class choco.cp.solver.search.integer.branching.AbstractAssignOrForbidBranching
valSelector
 
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
AssignOrForbidIntVarVal(VarSelector<IntDomainVar> varHeuristic, ValSelector<IntDomainVar> valSHeuristic)
           
AssignOrForbidIntVarVal(VarValPairSelector pairh)
          Deprecated. 
 
Method Summary
 void goDownBranch(IntBranchingDecision ctx)
          Performs the action, so that we go down a branch from the current choice point.
 Object selectBranchingObject()
          selecting the object under scrutiny (that object on which an alternative will be set)
 
Methods inherited from class choco.cp.solver.search.integer.branching.AbstractAssignOrForbidBranching
getDecisionLogMessage, setFirstBranch
 
Methods inherited from class choco.kernel.solver.branch.AbstractBinIntBranchingStrategy
finishedBranching, goUpBranch, setNextBranch
 
Methods inherited from class choco.kernel.solver.branch.AbstractIntBranchingStrategy
getDefaultAssignMsg, getDefaultAssignOrForbidMsg
 
Methods inherited from class choco.kernel.solver.branch.AbstractBranchingStrategy
getManager, getNextBranching, initBranching, initConstraintForBranching, setNextBranching, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignOrForbidIntVarVal

public AssignOrForbidIntVarVal(VarSelector<IntDomainVar> varHeuristic,
                               ValSelector<IntDomainVar> valSHeuristic)

AssignOrForbidIntVarVal

@Deprecated
public AssignOrForbidIntVarVal(VarValPairSelector pairh)
Deprecated. 

replaced by AssignOrForbidIntVarValPair

Method Detail

goDownBranch

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

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

selectBranchingObject

public Object selectBranchingObject()
                             throws ContradictionException
selecting the object under scrutiny (that object on which an alternative will be set)

Returns:
the object on which an alternative will be set (often a variable)
Throws:
ContradictionException


Copyright © 2012. All Rights Reserved.