|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.branch.AbstractBranchingStrategy
choco.kernel.solver.branch.AbstractIntBranchingStrategy
choco.kernel.solver.branch.AbstractLargeIntBranchingStrategy
choco.cp.solver.search.integer.branching.ImpactBasedBranching
public class ImpactBasedBranching
Impact based branchging based on the code from Hadrien
Written by Guillaumme on 17 may 2008
Nested Class Summary | |
---|---|
static class |
ImpactBasedBranching.AbstractImpactStrategy
|
static interface |
ImpactBasedBranching.ImpactStrategy
|
Field Summary | |
---|---|
protected Random |
randomBreakTies
|
protected Random |
randValueChoice
|
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 | |
---|---|
ImpactBasedBranching(Solver solver)
|
|
ImpactBasedBranching(Solver solver,
IntDomainVar[] vars)
|
|
ImpactBasedBranching(Solver solver,
IntDomainVar[] vars,
ImpactBasedBranching.AbstractImpactStrategy ibs)
|
Method Summary | |
---|---|
boolean |
finishedBranching(IntBranchingDecision ctx)
Checks whether all branches have already been explored at the current choice point. |
int |
getBestVal(IntDomainVar var)
|
String |
getDecisionLogMessage(IntBranchingDecision decision)
The logging message associated with the current decision. |
ImpactBasedBranching.AbstractImpactStrategy |
getImpactStrategy()
|
void |
goDownBranch(IntBranchingDecision ctx)
Performs the action, so that we go down a branch from the current choice point. |
protected void |
goDownBranch(IntDomainVar var,
int val)
|
void |
goUpBranch(IntBranchingDecision decision)
Performs the action, so that we go up the current branch to the father choice point. |
Object |
selectBranchingObject()
selecting the object under scrutiny (that object on which an alternative will be set) |
void |
setFirstBranch(IntBranchingDecision ctx)
compute the first decision by setting a branching value or modifying the branching object |
void |
setNextBranch(IntBranchingDecision ctx)
compute the next decision by setting a branching value or modifying the branching object |
void |
setRandomValueChoice(long seed)
|
void |
setRandomVarTies(int seed)
|
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 |
Field Detail |
---|
protected Random randValueChoice
protected Random randomBreakTies
Constructor Detail |
---|
public ImpactBasedBranching(Solver solver, IntDomainVar[] vars, ImpactBasedBranching.AbstractImpactStrategy ibs)
public ImpactBasedBranching(Solver solver, IntDomainVar[] vars)
public ImpactBasedBranching(Solver solver)
Method Detail |
---|
public ImpactBasedBranching.AbstractImpactStrategy getImpactStrategy()
public void setRandomVarTies(int seed)
public Object selectBranchingObject() throws ContradictionException
BranchingStrategy
ContradictionException
public final void setFirstBranch(IntBranchingDecision ctx)
IntBranching
public void setNextBranch(IntBranchingDecision ctx)
IntBranching
public void setRandomValueChoice(long seed)
public int getBestVal(IntDomainVar var)
public boolean finishedBranching(IntBranchingDecision ctx)
IntBranching
ctx
- the last decision applied
protected final void goDownBranch(IntDomainVar var, int val) throws ContradictionException
ContradictionException
public void goDownBranch(IntBranchingDecision ctx) throws ContradictionException
IntBranching
ctx
- the decision to apply.
ContradictionException
- if a domain empties or a contradiction is
inferedpublic void goUpBranch(IntBranchingDecision decision) throws ContradictionException
IntBranching
decision
- the decision that has been set at the father choice point
ContradictionException
- if a domain empties or a contradiction is
inferedpublic String getDecisionLogMessage(IntBranchingDecision decision)
IntBranching
decision
- current decision
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |