reopt.h File Reference Detailed Descriptiondata structures and methods for collecting reoptimization information Definition in file reopt.h. #include "scip/def.h" #include "scip/pub_reopt.h" #include "scip/type_primal.h" #include "scip/type_retcode.h" #include "scip/type_reopt.h" #include "scip/struct_reopt.h" Go to the source code of this file. Function Documentation
creates reopt data constructor for the reoptimization data
Definition at line 3977 of file reopt.c. References BMSallocBlockMemoryArray, BMSallocMemory, BMSallocMemoryArray, createReopttree(), createSolTree(), DEFAULT_MEM_RUN, EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, SCIPclockCreate(), SCIPeventhdlrCreate(), and SCIPsetIncludeEventhdlr(). Referenced by SCIPenableReoptimization().
frees reopt data frees reoptimization data
Definition at line 4042 of file reopt.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeMemory, BMSfreeMemoryArray, freeReoptTree(), freeSolTree(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, and SCIPclockFree(). Referenced by SCIPenableReoptimization(), and SCIPfreeProb().
returns the number of constraints added by the reoptimization plug-in
Definition at line 4131 of file reopt.c. References MAX, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetNAddedConss(), and SCIPnodeGetReoptID(). Referenced by SCIPreoptCheckCutoff().
add a solution to the solution tree
Definition at line 4155 of file reopt.c. References ensureSolsSize(), SCIP_Reopt::noptsolsbyreoptsol, SCIP_SolTree::nsols, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), SCIPsolGetHeur(), SCIP_SolTree::sols, SCIP_Reopt::soltree, and soltreeAddSol(). Referenced by SCIPsolve().
add optimal solution we want to store the optimal solution of each run in a separate array
Definition at line 4208 of file reopt.c. References NULL, SCIP_Reopt::prevbestsols, SCIP_Reopt::run, SCIP_CALL, SCIP_OKAY, and SCIPsolCopy(). Referenced by SCIPsolve().
add a run add a new iteration after changing the objective function
Definition at line 4234 of file reopt.c. References BMSallocBlockMemoryArray, ensureRunSize(), NULL, reoptSaveNewObj(), resetStats(), SCIP_Reopt::run, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SolTree::sols, SCIP_SolTree::solssize, and SCIP_Reopt::soltree. Referenced by SCIPsolve().
get the number of checked solutions during the reoptimization process get the number of checked during the reoptimization process
Definition at line 4266 of file reopt.c. References SCIP_Reopt::ncheckedsols, and NULL. Referenced by SCIPprintReoptStatistics().
update the number of checked solutions during the reoptimization process update the number of checked during the reoptimization process
Definition at line 4276 of file reopt.c. References SCIP_Reopt::ncheckedsols, and NULL.
get the number of checked during the reoptimization process
Definition at line 4287 of file reopt.c. References SCIP_Reopt::nimprovingsols, and NULL. Referenced by SCIPprintReoptStatistics().
update the number of checked during the reoptimization process
Definition at line 4297 of file reopt.c. References SCIP_Reopt::nimprovingsols, and NULL.
returns number of solution returns number of solution of a given run
Definition at line 4308 of file reopt.c. References SCIP_SolTree::nsols, NULL, SCIP_SolTree::sols, and SCIP_Reopt::soltree.
returns number of all solutions of all runs
Definition at line 4323 of file reopt.c. References SCIP_SolTree::nsols, NULL, SCIP_Reopt::run, and SCIP_Reopt::soltree.
return the stored solutions of a given run
Definition at line 4339 of file reopt.c. References SCIP_SolTree::nsols, NULL, SCIP_OKAY, SCIP_SolNode::sol, SCIP_SolTree::sols, SCIP_Reopt::soltree, TRUE, and SCIP_SolNode::updated. Referenced by SCIPgetReopSolsRun().
returns the number of saved solutions overall runs
Definition at line 4381 of file reopt.c. References SCIP_SolNode::lchild, NULL, SCIP_SolNode::rchild, SCIP_SolTree::root, SCIP_Reopt::soltree, and soltreeNInducedSols().
Check if the reoptimization process should be (locally) restarted. First, we check whether the current node is the root node, e.g., node == NULL. In this case, we do not need to calculate the similarity again. We trigger a restart if
If the current node is different to the root node we calculate the local similarity, i.e., exclude all variables that are already fixed at the given node. check if the reoptimization process should be (locally) restarted. First, we check whether the current node is the root node, e.g., node == NULL. in this case, we do not need to calculate the similarity again. we trigger a restart if
If the current node is different to the root node we calculate the local similarity, i.e., exclude all variable that are already fixed by bounding.
Definition at line 4408 of file reopt.c. References FALSE, SCIP_Reopt::noptsolsbyreoptsol, SCIP_ReoptTree::nreoptnodes, NULL, reoptCheckLocalRestart(), reoptRestart(), SCIP_Reopt::reopttree, SCIP_Reopt::run, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPsetIsFeasLT(), SCIP_Reopt::simtolastobj, and TRUE. Referenced by SCIPcheckReoptRestart(), and SCIPsolve().
returns the similarity to the previous objective function returns the similarity to the previous objective function, if no exist return -2.0
Definition at line 4471 of file reopt.c. References NULL, and SCIP_Reopt::simtolastobj. Referenced by SCIPgetReoptSimilarity().
returns the similarity to the first objective functions returns the similarity to the first objective different to the zero-function function, if no exist return -2.0
Definition at line 4480 of file reopt.c. References NULL, and SCIP_Reopt::simtofirstobj.
return the similarity between two of objective functions of two given runs
Definition at line 4489 of file reopt.c. References NULL, and reoptSimilarity(). Referenced by SCIPgetReoptSimilarity().
returns the best solution of the last run
Definition at line 4508 of file reopt.c. References NULL, SCIP_Reopt::prevbestsols, and SCIP_Reopt::run. Referenced by SCIPgetReoptLastOptSol().
returns the node of the reoptimization tree corresponding to the unique
Definition at line 4524 of file reopt.c. References NULL, SCIP_ReoptTree::reoptnodes, and SCIP_Reopt::reopttree. Referenced by SCIPgetReoptnode().
returns the coefficent of variable with index returns the coefficient of variable with index
Definition at line 4538 of file reopt.c. References NULL, and SCIP_Reopt::objs. Referenced by reoptCheckLocalRestart(), and SCIPgetReoptOldObjCoef().
return the best solution of a given run
return the best solution of a given run.
Definition at line 4554 of file reopt.c. References NULL, and SCIP_Reopt::prevbestsols.
reset marks of stored solutions to not updated
Definition at line 4566 of file reopt.c. References SCIP_SolNode::lchild, NULL, SCIP_SolNode::rchild, SCIP_SolTree::root, SCIP_Reopt::soltree, and soltreeResetMarks(). Referenced by SCIPresetReoptSolMarks().
returns the number of stored nodes returns the number of stored nodes in the subtree induced by
Definition at line 4581 of file reopt.c. References SCIP_ReoptTree::nreoptnodes, NULL, SCIP_Reopt::reopttree, reopttreeGetNNodes(), SCIPnodeGetDepth(), and SCIPnodeGetReoptID(). Referenced by compressReoptTree(), and SCIPgetNReoptnodes().
save information that given node is infeasible
Definition at line 4801 of file reopt.c. References SCIP_ReoptTree::ninfnodes, SCIP_ReoptTree::ntotalinfnodes, NULL, REOPT_CONSTYPE_INFSUBTREE, SCIP_Reopt::reopttree, saveGlobalCons(), SCIP_CALL, and SCIP_OKAY. Referenced by SCIPreoptCheckCutoff().
check the reason for cut off a node and if necessary store the node
Definition at line 4825 of file reopt.c. References addNode(), SCIP_Reopt::currentnode, deleteLastDualBndchgs(), SCIP_Reopt::dualcons, FALSE, SCIP_Reopt::lastbranched, SCIP_Reopt::lastseennode, NULL, LogicOrData::nvars, REOPT_CONSTYPE_INFSUBTREE, REOPT_CONSTYPE_STRBRANCHED, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_NODEBRANCHED, SCIP_EVENTTYPE_NODEFEASIBLE, SCIP_EVENTTYPE_NODEINFEASIBLE, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_REOPTTYPE_FEASIBLE, SCIP_REOPTTYPE_INFSUBTREE, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_PRUNED, SCIP_REOPTTYPE_STRBRANCHED, SCIP_REOPTTYPE_TRANSIT, SCIPdebugMessage, SCIPnodeGetDepth(), SCIPnodeGetNDualBndchgs(), SCIPnodeGetNumber(), SCIPreoptAddDualBndchg(), SCIPreoptAddInfNode(), SCIPreoptGetNAddedConss(), SCIPreoptGetNDualBndchgs(), SCIPreoptResetDualBndchgs(), and TRUE. Referenced by nodeToLeaf(), SCIPnodeCutoff(), SCIPnodeFocus(), SCIPnodepqBound(), SCIPsolveCIP(), SCIPtreeCutoff(), and solveNodeLP().
store bound change based on dual information
Definition at line 5073 of file reopt.c. References checkMemDualCons(), SCIP_Reopt::currentnode, DEFAULT_MEM_DUALCONS, SCIP_Reopt::dualcons, NULL, LogicOrData::nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnodeGetNumber(), SCIPsetIsFeasEQ(), SCIPvarGetName(), SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), LogicOrData::vals, LogicOrData::vars, and LogicOrData::varssize. Referenced by SCIPaddReoptDualBndchg(), and SCIPreoptCheckCutoff().
returns the number of bound changes based on dual information
Definition at line 5138 of file reopt.c. References SCIP_Reopt::currentnode, SCIP_Reopt::dualcons, NULL, LogicOrData::nvars, and SCIPnodeGetNumber(). Referenced by SCIPreoptCheckCutoff().
returns the number of leaf nodes of the subtree induced by
Definition at line 4766 of file reopt.c. References SCIP_ReoptNode::childids, SCIP_ReoptNode::nchilds, NULL, reoptGetNLeaves(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), and SCIPnodeGetReoptID(). Referenced by SCIPcomprExec(), and SCIPgetNReoptLeaves().
returns the child nodes of
Definition at line 5158 of file reopt.c. References SCIP_ReoptNode::childids, dryBranch(), SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), and TRUE. Referenced by SCIPgetReoptChildIDs().
returns all leaves of the subtree induced by
Definition at line 5211 of file reopt.c. References SCIP_ReoptNode::childids, SCIP_ReoptNode::nchilds, NULL, reoptGetLeaves(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_OKAY, and SCIPnodeGetReoptID(). Referenced by SCIPgetReoptLeaveIDs().
returns the time needed to store the nodes for reoptimization
Definition at line 6126 of file reopt.c. References NULL, SCIP_Reopt::savingtime, and SCIPclockGetTime(). Referenced by SCIPprintReoptStatistics().
store a global constraint that should be added at the beginning of the next iteration
Definition at line 6136 of file reopt.c. References SCIP_Reopt::allocmemglbconss, BMSallocBlockMemory, BMSduplicateBlockMemoryArray, checkMemGlbCons(), SCIP_Reopt::glbconss, SCIP_Reopt::nglbconss, NULL, LogicOrData::nvars, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, LogicOrData::vals, LogicOrData::vars, and LogicOrData::varssize.
add the stored constraints globally to the problem
Definition at line 6173 of file reopt.c. References FALSE, SCIP_Reopt::glbconss, SCIP_Reopt::nglbconss, NULL, LogicOrData::nvars, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsLogicor(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBlockMemoryArrayNull, SCIPfreeBlockMemoryNull, SCIPfreeBufferArray, SCIPreleaseCons(), SCIPsetIsFeasEQ(), SCIPvarGetTransVar(), SCIPvarNegate(), TRUE, LogicOrData::vals, and LogicOrData::vars. Referenced by SCIPsolve().
check if the LP of the given node should be solved or not
Definition at line 6252 of file reopt.c. References FALSE, SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), SCIPnodeGetReopttype(), SCIPsetIsGT(), SCIP_Reopt::simtolastobj, and TRUE. Referenced by solveNode().
reactivate the given
Definition at line 5738 of file reopt.c. References addLocalConss(), addSplitcons(), changeAncestorBranchings(), LogicOrData::constype, SCIP_ReoptNode::dualconscur, SCIP_ReoptNode::dualfixing, FALSE, fixBounds(), fixInterdiction(), SCIP_ReoptNode::lowerbound, SCIP_ReoptNode::nafterdualvars, SCIP_ReoptNode::nconss, NULL, LogicOrData::nvars, permuteRandom(), REALABS, REOPT_CONSTYPE_INFSUBTREE, REOPT_CONSTYPE_STRBRANCHED, SCIP_ReoptTree::reoptnodes, reoptnodeUpdateDualConss(), SCIP_Reopt::reopttree, SCIP_ReoptNode::reopttype, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_REOPTTYPE_INFSUBTREE, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_NONE, SCIP_REOPTTYPE_STRBRANCHED, SCIP_REOPTTYPE_TRANSIT, SCIPdebugMessage, SCIPnodeCreateChild(), SCIPnodeGetLowerbound(), SCIPnodeGetNumber(), SCIPnodeSetEstimate(), SCIPnodeSetReoptID(), SCIPnodeSetReopttype(), SCIPsetIsInfinity(), SCIPsetIsRelGE(), TRUE, LogicOrData::vals, LogicOrData::vars, and LogicOrData::varssize. Referenced by SCIPapplyReopt().
delete a node stored in the reoptimization tree
Definition at line 5719 of file reopt.c. References NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeDeleteNode(), SCIP_CALL, SCIP_OKAY, and TRUE.
reset the stored information abound bound changes based on dual information
Definition at line 5639 of file reopt.c. References NULL, reoptnodeResetDualConss(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_OKAY, SCIPnodeGetDepth(), and SCIPnodeGetReoptID(). Referenced by addNode(), SCIPreoptCheckCutoff(), and SCIPresetReoptnodeDualcons().
splits the root into several nodes and moves the child nodes of the root to one of the created nodes
Definition at line 5420 of file reopt.c. References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, SCIP_ReoptNode::conss, LogicOrData::constype, createReoptnode(), SCIP_ReoptNode::dualconscur, SCIP_ReoptNode::dualfixing, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, NULL, LogicOrData::nvars, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptNode::parentID, permuteRandom(), REOPT_CONSTYPE_STRBRANCHED, reoptAddChild(), reoptMoveIDs(), reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, reoptnodeUpdateDualConss(), SCIP_Reopt::reopttree, reopttreeCheckMemory(), SCIP_ReoptNode::reopttype, SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_STRBRANCHED, SCIP_REOPTTYPE_TRANSIT, SCIPnodeSetReopttype(), SCIPqueueRemove(), SCIPsetIsFeasEQ(), SCIPtreeGetRootNode(), LogicOrData::vals, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, LogicOrData::vars, SCIP_ReoptNode::vars, LogicOrData::varssize, and SCIP_ReoptNode::varssize. Referenced by SCIPsplitReoptRoot().
reset the complete tree and set the given search frontier
Definition at line 5320 of file reopt.c. References SCIP_ReoptNode::conss, LogicOrData::constype, createReoptnode(), FALSE, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, SCIP_ReoptTree::nreoptnodes, NULL, LogicOrData::nvars, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptNode::parentID, reoptAddChild(), SCIP_ReoptTree::reoptnodes, reoptResetTree(), SCIP_Reopt::reopttree, SCIP_ReoptNode::reopttype, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_LEAF, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_TRANSIT, SCIPdebugMessage, SCIPqueueRemove(), SCIPreoptnodeAddBndchg(), SCIPreoptnodeAddCons(), TRUE, LogicOrData::vals, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, LogicOrData::vars, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize. Referenced by SCIPsetReoptCompression().
add all unprocessed nodes to the reoptimization tree
Definition at line 5271 of file reopt.c. References addNode(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_PRUNED, SCIPdebugMessage, and SCIPnodeGetLowerbound(). Referenced by SCIPsolve().
initialize an empty node
Definition at line 6295 of file reopt.c. References SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, SCIP_ReoptNode::afterdualvarssize, SCIP_ReoptNode::allocchildmem, SCIP_ReoptNode::childids, SCIP_ReoptNode::conss, SCIP_ReoptNode::consssize, SCIP_ReoptNode::dualconscur, SCIP_ReoptNode::dualconsnex, SCIP_ReoptNode::dualfixing, FALSE, SCIP_ReoptNode::lowerbound, SCIP_ReoptNode::nafterdualvars, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptNode::parentID, SCIP_ReoptNode::reopttype, SCIP_REOPTTYPE_NONE, SCIPsetInfinity(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize. Referenced by SCIPinitRepresentation().
reset the given reoptimization node
Definition at line 6328 of file reopt.c. References NULL, reoptnodeReset(), SCIP_CALL, and SCIP_OKAY. Referenced by SCIPresetRepresentation().
delete the given reoptimization node
Definition at line 6346 of file reopt.c. References NULL, reoptnodeDelete(), SCIP_CALL, and SCIP_OKAY. Referenced by SCIPdeleteReoptnode(), and SCIPfreeRepresentation().
add a variable to a given reoptnode
Definition at line 6360 of file reopt.c. References NULL, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_CALL, SCIP_OKAY, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars. Referenced by SCIPaddReoptnodeBndchg(), SCIPreoptApplyCompression(), and SCIPreoptnodeAddCons().
add a constraint to a given reoptnode
Definition at line 6387 of file reopt.c. References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, SCIP_ReoptNode::conss, LogicOrData::constype, SCIP_ReoptNode::nconss, NULL, LogicOrData::nvars, reoptnodeCheckMemory(), SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPreoptnodeAddBndchg(), LogicOrData::vals, LogicOrData::vars, and LogicOrData::varssize. Referenced by SCIPaddReoptnodeCons(), and SCIPreoptApplyCompression().
return the branching path of the given node in the reoptimization tree return the branching path stored of the given node in the reoptimization tree
Definition at line 5664 of file reopt.c. References SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, SCIP_ReoptNode::nafterdualvars, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptNode::parentID, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPreoptnodeGetPath(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars. Referenced by SCIPgetReoptnodePath(), and SCIPreoptnodeGetPath(). |