choco.cp.solver.search
Class AbstractSearchLoopWithRestart

java.lang.Object
  extended by choco.kernel.solver.search.AbstractSearchLoop
      extended by choco.cp.solver.search.AbstractSearchLoopWithRestart
All Implemented Interfaces:
ISearchLoop
Direct Known Subclasses:
SearchLoop, SearchLoopWithRecomputation

public abstract class AbstractSearchLoopWithRestart
extends AbstractSearchLoop


Field Summary
protected  AbstractBranchingStrategy br
           
protected  Object branchingObj
           
protected  IntBranchingTrace ctx
          current trace object.
protected  AbstractIntBranchingStrategy currentBranching
           
protected  IKickRestart kickRestart
           
protected  int moveAfterSolution
           
protected  int previousNbSolutions
           
 
Fields inherited from class choco.kernel.solver.search.AbstractSearchLoop
searchStrategy, stop
 
Fields inherited from interface choco.kernel.solver.search.ISearchLoop
LOGGER
 
Constructor Summary
AbstractSearchLoopWithRestart(AbstractGlobalSearchStrategy searchStrategy, IKickRestart kickRestart)
           
 
Method Summary
 void downBranch()
           
 Boolean endLoop()
          reset the limit and compute the exit status.
 IntBranchingTrace getCurrentTrace()
           
 IKickRestart getKickRestart()
           
protected  void goUpBranch()
          post the dynamic cut, backtrack and propagate.
 void initialize()
           
 void initLoop()
           
 void initSearch()
           
 void openNode()
           
 void restart()
          perform the restart.
 void setKickRestart(IKickRestart kickRestart)
           
 void setRestartAfterEachSolution(boolean restart)
           
 void upBranch()
           
protected abstract  void worldPop()
           
protected abstract  void worldPush()
           
 
Methods inherited from class choco.kernel.solver.search.AbstractSearchLoop
getBacktrackCount, getDepthCount, getNodeCount, getRestartCount, getSearchStrategy, isStopped, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moveAfterSolution

protected int moveAfterSolution

previousNbSolutions

protected int previousNbSolutions

kickRestart

protected IKickRestart kickRestart

ctx

protected IntBranchingTrace ctx
current trace object.


br

protected AbstractBranchingStrategy br

branchingObj

protected Object branchingObj

currentBranching

protected AbstractIntBranchingStrategy currentBranching
Constructor Detail

AbstractSearchLoopWithRestart

public AbstractSearchLoopWithRestart(AbstractGlobalSearchStrategy searchStrategy,
                                     IKickRestart kickRestart)
Method Detail

getCurrentTrace

public final IntBranchingTrace getCurrentTrace()

getKickRestart

public final IKickRestart getKickRestart()

setRestartAfterEachSolution

public final void setRestartAfterEachSolution(boolean restart)

setKickRestart

public final void setKickRestart(IKickRestart kickRestart)

initialize

public void initialize()
Specified by:
initialize in interface ISearchLoop
Overrides:
initialize in class AbstractSearchLoop

initSearch

public void initSearch()
Specified by:
initSearch in class AbstractSearchLoop

initLoop

public void initLoop()
Specified by:
initLoop in class AbstractSearchLoop

endLoop

public Boolean endLoop()
reset the limit and compute the exit status.

Specified by:
endLoop in class AbstractSearchLoop

openNode

public void openNode()
Specified by:
openNode in class AbstractSearchLoop

worldPop

protected abstract void worldPop()

goUpBranch

protected void goUpBranch()
                   throws ContradictionException
post the dynamic cut, backtrack and propagate.

Throws:
ContradictionException - can be thrown

upBranch

public void upBranch()
Specified by:
upBranch in class AbstractSearchLoop

worldPush

protected abstract void worldPush()

downBranch

public void downBranch()
Specified by:
downBranch in class AbstractSearchLoop

restart

public void restart()
perform the restart.

Specified by:
restart in class AbstractSearchLoop


Copyright © 2012. All Rights Reserved.