choco.palm.dbt.search
Class PalmAssignVar
java.lang.Object
choco.branch.AbstractBranching
choco.palm.dbt.search.PalmAbstractBranching
choco.palm.dbt.search.PalmAssignVar
- All Implemented Interfaces:
- Branching, ObjectBranching
- Direct Known Subclasses:
- PathRepairAssignVar
public class PalmAssignVar
- extends PalmAbstractBranching
A classic implementation of branching algorithm for Palm. It selects the variable with a minimal domain size
and tries to instantiate it to the inf bound.
Method Summary |
boolean |
finishedBranching(java.lang.Object item,
java.lang.Object previousBranch)
Not defined in this algorithm. |
java.lang.String |
getDecisionLogMsg(int branchIndex)
used for logging messages related to the search tree |
java.lang.Object |
getNextBranch(java.lang.Object branchingItem,
java.lang.Object previousBranch)
Not defined in this algorithm. |
java.lang.Object |
selectBranchingObject()
Selects an item to branch on. |
java.lang.Object |
selectFirstBranch(java.lang.Object item)
Returns a decision to take on the choosen item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
varHeuristic
protected IVarSelector varHeuristic
valHeuristic
protected IValIterator valHeuristic
valSHeuristic
protected IValSelector valSHeuristic
wrapper
protected PalmAssignVar.ValueChooserWrapper wrapper
PalmAssignVar
public PalmAssignVar(IVarSelector varSel,
IValIterator valHeuri)
PalmAssignVar
public PalmAssignVar(IVarSelector varSel,
IValSelector valHeuri)
selectBranchingObject
public java.lang.Object selectBranchingObject()
- Selects an item to branch on. In this algorithm, the variable with the minimal domain size is choosen.
- Returns:
- An item to branch on.
selectFirstBranch
public java.lang.Object selectFirstBranch(java.lang.Object item)
- Returns a decision to take on the choosen item. In this algorithm, the variable is instantiated to the
inf bound.
- Parameters:
item
- The variable (item) involved.
- Returns:
- The decision the solver should take.
getNextBranch
public java.lang.Object getNextBranch(java.lang.Object branchingItem,
java.lang.Object previousBranch)
- Not defined in this algorithm.
- Parameters:
branchingItem
- previousBranch
-
- Returns:
- the object labelling the current branch
finishedBranching
public boolean finishedBranching(java.lang.Object item,
java.lang.Object previousBranch)
- Not defined in this algorithm.
- Returns:
- true if no more branches can be generated
getDecisionLogMsg
public java.lang.String getDecisionLogMsg(int branchIndex)
- Description copied from class:
AbstractBranching
- used for logging messages related to the search tree
- Specified by:
getDecisionLogMsg
in class AbstractBranching
- Returns:
- an string that will be printed between the branching object and the branch index
Suggested implementations return LOG_DECISION_MSG[0] or LOG_DECISION_MSG[branchIndex]