choco.palm.benders.search
Class MasterSlaveOptimizer
java.lang.Object
choco.AbstractEntity
choco.AbstractSolver
choco.search.AbstractGlobalSearchSolver
choco.search.Solve
choco.palm.cbj.search.JumpGlobalSearchSolver
choco.palm.benders.search.MasterGlobalSearchSolver
choco.palm.benders.search.MasterOptimizer
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.MasterGlobalSearchSolver |
bendersCut, cuts, decomposition, fail, feasible, logger, master, masterWorld, nbCutLearned, nbFeasibleProblems, partialSol, stop, subgoals, subproblems |
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subOptSol
protected int[] subOptSol
- store the optimal solution of each subproblem
subOptVar
protected IntDomainVar[] subOptVar
- store the objectives variables of each subproblem
MasterSlaveOptimizer
public MasterSlaveOptimizer(IntDomainVar mobj,
IntDomainVar[] objs,
boolean maximize,
MasterSlavesRelation relation)
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()