choco.search
Class BranchAndBound

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractSolver
          extended by choco.search.AbstractGlobalSearchSolver
              extended by choco.search.AbstractOptimize
                  extended by choco.search.BranchAndBound
All Implemented Interfaces:
Entity

public class BranchAndBound
extends AbstractOptimize

A branch and bound implementation of optimizer solver.


Field Summary
 
Fields inherited from class choco.search.AbstractOptimize
doMaximize, lowerBound, objective, targetLowerBound, targetUpperBound, upperBound
 
Fields inherited from class choco.search.AbstractGlobalSearchSolver
baseWorld, currentTraceIndex, DOWN_BRANCH, encounteredLimit, INIT_SEARCH, limits, loggingMaxDepth, mainGoal, nbSolutions, nextMove, OPEN_NODE, stopAtFirstSol, traceStack, UP_BRANCH
 
Fields inherited from class choco.AbstractSolver
logger, maxNbSolutionStored, solutions
 
Fields inherited from class choco.AbstractEntity
hook, problem
 
Constructor Summary
BranchAndBound(IntDomainVarImpl obj, boolean maximize)
          Builds a new optimizing solver with the specified variable.
 
Method Summary
 void endTreeSearch()
          Called when a new search tree has been completely browsed.
 void newTreeSearch()
          Called when a new search tree is built.
 
Methods inherited from class choco.search.AbstractOptimize
getBestObjectiveValue, getObjectiveTarget, getObjectiveValue, initBounds, postDynamicCut, postTargetBound, postTargetLowerBound, postTargetUpperBound, recordSolution, setBound, setTargetBound, setTargetLowerBound, setTargetUpperBound
 
Methods inherited from class choco.search.AbstractGlobalSearchSolver
endTreeNode, getEncounteredLimit, incrementalRun, isEncounteredLimit, newTreeNode, nextSolution, popTrace, popTraceUntil, printRuntimeStatistics, pushTrace, run, setLoggingMaxDepth, topTrace
 
Methods inherited from class choco.AbstractSolver
existsSolution, makeSolutionFromCurrentState, restoreBestSolution, showSolution, storeSolution
 
Methods inherited from class choco.AbstractEntity
getProblem, pretty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchAndBound

public BranchAndBound(IntDomainVarImpl obj,
                      boolean maximize)
Builds a new optimizing solver with the specified variable.

Parameters:
obj - is the variable that should be optimized
maximize - states if the objective variable should be maximized
Method Detail

newTreeSearch

public void newTreeSearch()
Called when a new search tree is built. It initializes the bounds and resets all limits.

Overrides:
newTreeSearch in class AbstractGlobalSearchSolver

endTreeSearch

public void endTreeSearch()
Called when a new search tree has been completely browsed. It resets all limits.

Overrides:
endTreeSearch in class AbstractGlobalSearchSolver