choco.palm.cbj.search
Class JumpAssignVar

java.lang.Object
  extended by choco.branch.AbstractBranching
      extended by choco.search.AbstractIntBranching
          extended by choco.search.AbstractLargeIntBranching
              extended by choco.search.AssignVar
                  extended by choco.palm.cbj.search.JumpAssignVar
All Implemented Interfaces:
Branching, IntBranching

public class JumpAssignVar
extends AssignVar

An variable assigning heuristic used by search algorithm.


Nested Class Summary
 
Nested classes/interfaces inherited from class choco.search.AssignVar
AssignVar.ValIteratorWrapper, AssignVar.ValSelectorWrapper, AssignVar.ValueChooserWrapper
 
Field Summary
 
Fields inherited from class choco.search.AssignVar
wrapper
 
Fields inherited from class choco.branch.AbstractBranching
LOG_DECISION_MSG, LOG_DOWN_MSG, LOG_UP_MSG, logger, manager, nextBranching
 
Constructor Summary
JumpAssignVar(IVarSelector varSel, IValIterator valHeuri)
          Builds an assign variable heuristic.
JumpAssignVar(IVarSelector varSel, IValSelector valHeuri)
          Builds an assign variable heuristic.
 
Method Summary
 void goDownBranch(java.lang.Object x, int i)
          Actually posts the choice taken if this search tree node.
 void goUpBranch(java.lang.Object x, int i, Explanation e)
          A previous choice is undone.
 
Methods inherited from class choco.search.AssignVar
finishedBranching, getDecisionLogMsg, getFirstBranch, getNextBranch, goUpBranch, selectBranchingObject
 
Methods inherited from class choco.search.AbstractLargeIntBranching
branchOn
 
Methods inherited from class choco.search.AbstractIntBranching
explore, logDownBranch, logUpBranch
 
Methods inherited from class choco.branch.AbstractBranching
getNextBranching, setNextBranching, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JumpAssignVar

public JumpAssignVar(IVarSelector varSel,
                     IValIterator valHeuri)
Builds an assign variable heuristic.

Parameters:
varSel - a variable selector
valHeuri - a value iterator

JumpAssignVar

public JumpAssignVar(IVarSelector varSel,
                     IValSelector valHeuri)
Builds an assign variable heuristic.

Parameters:
varSel - a variable selector
valHeuri - a value selector
Method Detail

goDownBranch

public void goDownBranch(java.lang.Object x,
                         int i)
                  throws ContradictionException
Actually posts the choice taken if this search tree node. Here the variable will be instantiated to the value i.

Specified by:
goDownBranch in interface IntBranching
Overrides:
goDownBranch in class AssignVar
Parameters:
x - the variable involved in the choice
i - the value chosen for this variable
Throws:
ContradictionException - if a contradiction occurs due to this choice

goUpBranch

public void goUpBranch(java.lang.Object x,
                       int i,
                       Explanation e)
                throws ContradictionException
A previous choice is undone. Here the bad value is removed from the domain and correctly explained.

Parameters:
x - the involved variable
i - the bad value
e - the explanation about inconsistancy
Throws:
ContradictionException - if a contradiction occurs due to the implied domain reduction