choco.palm.benders.search
Class MasterSlaveOptimizer

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractSolver
          extended by choco.search.AbstractGlobalSearchSolver
              extended by choco.search.Solve
                  extended by choco.palm.cbj.search.JumpGlobalSearchSolver
                      extended by choco.palm.benders.search.MasterGlobalSearchSolver
                          extended by choco.palm.benders.search.MasterOptimizer
                              extended by choco.palm.benders.search.MasterSlaveOptimizer
All Implemented Interfaces:
Entity

public class MasterSlaveOptimizer
extends MasterOptimizer

Benders search in case of problem of the form P_{xy} ( an optimization function on the variable of the master AND slaves) assuming that the master provide a relaxation of the whole problem


Field Summary
protected  int[] subOptSol
          store the optimal solution of each subproblem
protected  IntDomainVar[] subOptVar
          store the objectives variables of each subproblem
 
Fields inherited from class choco.palm.benders.search.MasterOptimizer
maximize, objective, targetLowerBound, targetUpperBound, zobjective
 
Fields inherited from class choco.palm.benders.search.MasterGlobalSearchSolver
bendersCut, cuts, decomposition, fail, feasible, logger, master, masterWorld, nbCutLearned, nbFeasibleProblems, partialSol, stop, subgoals, subproblems
 
Fields inherited from class choco.palm.cbj.search.JumpGlobalSearchSolver
currentFail
 
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
maxNbSolutionStored, solutions
 
Fields inherited from class choco.AbstractEntity
hook, problem
 
Constructor Summary
MasterSlaveOptimizer(IntDomainVar mobj, IntDomainVar[] objs, boolean maximize, MasterSlavesRelation relation)
           
 
Method Summary
 boolean goToSubProblem(int i)
           
 void logBestSol()
           
protected  Solution makeSolutionFromCurrentState()
           
 void manageCuts()
          compute the global cut using the MasterSlavesRelation and add the cut the nogood constraint managing BendersCut
 void nextMasterMove()
          Describes the way the master search solver has to be set to look for the next solution.
 void postKnownBound()
           
 void printBestSol()
           
 void resetSubPbData()
           
 void solveSubProblems()
          Main iteration over the subproblems
 void storePartialSolution(int subpb)
           
 boolean updateTargetBound(int globalbound)
           
 
Methods inherited from class choco.palm.benders.search.MasterOptimizer
getOptimumValue, logMasterSolution, solutionFound
 
Methods inherited from class choco.palm.benders.search.MasterGlobalSearchSolver
addCuts, cleanPartialSolutions, getMaster, getNbCuts, getSubproblems, incrementalRun, logCuts, logSolution, nextSolution, restorePartialSolutions, setCutsConstraint, setMainGoal, setSubGoal, storeCuts, updateLimit
 
Methods inherited from class choco.search.AbstractGlobalSearchSolver
endTreeNode, endTreeSearch, getEncounteredLimit, isEncounteredLimit, newTreeNode, newTreeSearch, popTrace, popTraceUntil, postDynamicCut, printRuntimeStatistics, pushTrace, recordSolution, run, setLoggingMaxDepth, topTrace
 
Methods inherited from class choco.AbstractSolver
existsSolution, 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
 

Field Detail

subOptSol

protected int[] subOptSol
store the optimal solution of each subproblem


subOptVar

protected IntDomainVar[] subOptVar
store the objectives variables of each subproblem

Constructor Detail

MasterSlaveOptimizer

public MasterSlaveOptimizer(IntDomainVar mobj,
                            IntDomainVar[] objs,
                            boolean maximize,
                            MasterSlavesRelation relation)
Method Detail

solveSubProblems

public void solveSubProblems()
Description copied from class: MasterGlobalSearchSolver
Main iteration over the subproblems

Overrides:
solveSubProblems in class MasterGlobalSearchSolver

goToSubProblem

public boolean goToSubProblem(int i)

storePartialSolution

public void storePartialSolution(int subpb)
Overrides:
storePartialSolution in class MasterOptimizer

manageCuts

public void manageCuts()
Description copied from class: MasterGlobalSearchSolver
compute the global cut using the MasterSlavesRelation and add the cut the nogood constraint managing BendersCut

Overrides:
manageCuts in class MasterGlobalSearchSolver

makeSolutionFromCurrentState

protected Solution makeSolutionFromCurrentState()
Overrides:
makeSolutionFromCurrentState in class AbstractSolver

resetSubPbData

public void resetSubPbData()

updateTargetBound

public boolean updateTargetBound(int globalbound)

nextMasterMove

public void nextMasterMove()
Description copied from class: MasterGlobalSearchSolver
Describes the way the master search solver has to be set to look for the next solution.

Overrides:
nextMasterMove in class MasterOptimizer

postKnownBound

public void postKnownBound()
                    throws ContradictionException
Throws:
ContradictionException

printBestSol

public void printBestSol()
Overrides:
printBestSol in class MasterOptimizer

logBestSol

public void logBestSol()