Detailed Description
data structures and methods for collecting reoptimization information
Definition in file reopt.h.
#include "blockmemshell/memory.h"#include "scip/def.h"#include "scip/pub_reopt.h"#include "scip/type_branch.h"#include "scip/type_cutpool.h"#include "scip/type_misc.h"#include "scip/type_primal.h"#include "scip/type_prob.h"#include "scip/type_retcode.h"#include "scip/type_reopt.h"#include "scip/type_sepastore.h"#include "scip/type_set.h"#include "scip/type_stat.h"#include "scip/struct_reopt.h"#include "scip/struct_var.h"#include "scip/struct_history.h"Go to the source code of this file.
Function Documentation
◆ SCIPreoptCreate()
| SCIP_RETCODE SCIPreoptCreate | ( | SCIP_REOPT ** | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
creates reopt data
constructor for the reoptimization data
- Parameters
-
reopt pointer to reoptimization data structure set global SCIP settings blkmem block memory
Definition at line 5017 of file reopt.c.
References BMSallocBlockMemoryArray, BMSallocMemory, BMSallocMemoryArray, createReopttree(), createSolTree(), DEFAULT_MEM_RUN, DEFAULT_RANDSEED, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, SCIPclockCreate(), SCIPeventhdlrCreate(), SCIPrandomCreate(), SCIPsetIncludeEventhdlr(), and SCIPsetInitializeRandomSeed().
Referenced by SCIPenableReoptimization().
◆ SCIPreoptFree()
| SCIP_RETCODE SCIPreoptFree | ( | SCIP_REOPT ** | reopt, |
| SCIP_SET * | set, | ||
| SCIP_PRIMAL * | origprimal, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
frees reopt data
frees reoptimization data
- Parameters
-
reopt reoptimization data structure set global SCIP settings origprimal original primal blkmem block memory
Definition at line 5125 of file reopt.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemory, BMSfreeMemoryArray, freeReoptTree(), freeSolTree(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, SCIPclockFree(), SCIPgetNOrigVars(), SCIPhashmapFree(), SCIPhashsetFree(), SCIPhistoryFree(), SCIPrandomFree(), and SCIPsolFree().
Referenced by SCIPenableReoptimization(), and SCIPfreeProb().
◆ SCIPreoptReleaseData()
| SCIP_RETCODE SCIPreoptReleaseData | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
- Parameters
-
reopt pointer to reoptimization data structure set global SCIP settings blkmem block memory
Definition at line 5098 of file reopt.c.
References SCIP_Reopt::addedconss, SCIP_Reopt::addedconsssize, BMSfreeBlockMemoryArray, cleanActiveConss(), SCIP_Reopt::naddedconss, NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsRelease().
Referenced by SCIPfreeTransform().
◆ SCIPreoptGetNAddedConss()
| int SCIPreoptGetNAddedConss | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node | ||
| ) |
returns the number of constraints added by the reoptimization plug-in
- Parameters
-
reopt reoptimization data structure node node of the search tree
Definition at line 5251 of file reopt.c.
References MAX, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetNAddedConss(), and SCIPnodeGetReoptID().
Referenced by SCIPreoptCheckCutoff().
◆ SCIPreoptAddSol()
| SCIP_RETCODE SCIPreoptAddSol | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PRIMAL * | origprimal, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SOL * | sol, | ||
| SCIP_Bool | bestsol, | ||
| SCIP_Bool * | added, | ||
| SCIP_VAR ** | vars, | ||
| int | nvars, | ||
| int | run | ||
| ) |
add a solution to the solution tree
- Parameters
-
reopt reoptimization data set global SCIP settings stat dynamic problem statistics origprimal original primal blkmem block memory sol solution to add bestsol is the current solution an optimal solution? added pointer to store the information if the soltion was added vars variable array nvars number of variables run number of the current run (1,2,...)
Definition at line 5275 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().
◆ SCIPreoptAddOptSol()
| SCIP_RETCODE SCIPreoptAddOptSol | ( | SCIP_REOPT * | reopt, |
| SCIP_SOL * | sol, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PRIMAL * | origprimal, | ||
| SCIP_VAR ** | vars, | ||
| int | nvars | ||
| ) |
add optimal solution
we want to store the optimal solution of each run in a separate array
- Parameters
-
reopt reoptimization data structure sol solution to add blkmem block memory set global SCIP settings stat dynamic problem statistics origprimal original primal vars original problem variables nvars number of original problem variables
Definition at line 5328 of file reopt.c.
References NULL, SCIP_Reopt::prevbestsols, SCIP_Reopt::run, SCIP_CALL, SCIP_OKAY, SCIPsolCopy(), and separateSolution().
Referenced by SCIPsolve().
◆ SCIPreoptAddRun()
| SCIP_RETCODE SCIPreoptAddRun | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_VAR ** | origvars, | ||
| int | norigvars, | ||
| int | size | ||
| ) |
add a run
add a new iteration after changing the objective function
- Parameters
-
reopt reoptimization data sturcture set global SCIP settings blkmem block memory origvars original problem variables norigvars number of original variables size number of expected solutions
Definition at line 5362 of file reopt.c.
References BMSallocBlockMemoryArray, ensureRunSize(), FALSE, NULL, SCIP_Reopt::objhaschanged, reoptSaveNewObj(), resetStats(), SCIP_Reopt::run, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SolTree::sols, SCIP_SolTree::solssize, and SCIP_Reopt::soltree.
Referenced by prepareReoptimization().
◆ SCIPreoptGetNCheckedSols()
| int SCIPreoptGetNCheckedSols | ( | SCIP_REOPT * | reopt | ) |
get the number of checked solutions during the reoptimization process
- Parameters
-
reopt reoptimization data structure
Definition at line 5398 of file reopt.c.
References SCIP_Reopt::ncheckedsols, and NULL.
◆ SCIPreoptAddNCheckedSols()
| void SCIPreoptAddNCheckedSols | ( | SCIP_REOPT * | reopt, |
| int | ncheckedsols | ||
| ) |
update the number of checked solutions during the reoptimization process
- Parameters
-
reopt reoptimization data structure ncheckedsols number of updated solutions
Definition at line 5408 of file reopt.c.
References SCIP_Reopt::ncheckedsols, and NULL.
◆ SCIPreoptGetNImprovingSols()
| int SCIPreoptGetNImprovingSols | ( | SCIP_REOPT * | reopt | ) |
get the number of checked solutions during the reoptimization process
- Parameters
-
reopt reoptimization data structure
Definition at line 5419 of file reopt.c.
References SCIP_Reopt::nimprovingsols, and NULL.
◆ SCIPreoptAddNImprovingSols()
| void SCIPreoptAddNImprovingSols | ( | SCIP_REOPT * | reopt, |
| int | nimprovingsols | ||
| ) |
update the number of checked solutions during the reoptimization process
- Parameters
-
reopt reoptimization data structure nimprovingsols number of improving solutions
Definition at line 5429 of file reopt.c.
References SCIP_Reopt::nimprovingsols, and NULL.
◆ SCIPreoptGetNSolsRun()
| int SCIPreoptGetNSolsRun | ( | SCIP_REOPT * | reopt, |
| int | run | ||
| ) |
returns number of solutions stored in the solution tree of a given run
- Parameters
-
reopt reoptimization data structure run number of the run (1,2,..)
Definition at line 5440 of file reopt.c.
References SCIP_SolTree::nsols, NULL, SCIP_SolTree::sols, and SCIP_Reopt::soltree.
◆ SCIPreoptGetNSols()
| int SCIPreoptGetNSols | ( | SCIP_REOPT * | reopt | ) |
returns number of all solutions of all runs
- Parameters
-
reopt reoptimization data structure
Definition at line 5455 of file reopt.c.
References SCIP_SolTree::nsols, NULL, r, SCIP_Reopt::run, and SCIP_Reopt::soltree.
◆ SCIPreoptGetSolsRun()
| SCIP_RETCODE SCIPreoptGetSolsRun | ( | SCIP_REOPT * | reopt, |
| int | run, | ||
| SCIP_SOL ** | sols, | ||
| int | solssize, | ||
| int * | nsols | ||
| ) |
return the stored solutions of a given run
- Parameters
-
reopt reoptimization data structure run number of the run (1,2,...) sols array of solutions to fill solssize length of the array nsols pointer to store the number of added solutions
Definition at line 5470 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 SCIPgetReoptSolsRun().
◆ SCIPreoptGetNSavedSols()
| int SCIPreoptGetNSavedSols | ( | SCIP_REOPT * | reopt | ) |
returns the number of saved solutions overall runs
- Parameters
-
reopt reoptimization data structure
Definition at line 5510 of file reopt.c.
References SCIP_SolNode::child, NULL, SCIP_SolTree::root, SCIP_Reopt::soltree, and soltreeNInducedSols().
◆ SCIPreoptCheckRestart()
| SCIP_RETCODE SCIPreoptCheckRestart | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE * | node, | ||
| SCIP_VAR ** | transvars, | ||
| int | ntransvars, | ||
| SCIP_Bool * | restart | ||
| ) |
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
- the objective function has changed too much, or
- the number of stored nodes is exceeded, or
- the last n optimal solutions were found by heur_reoptsols (in this case, the stored tree was only needed to prove the optimality and this can probably be done faster by solving from scratch).
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
- the objective function has changed too much
- the number of stored nodes is exceeded
- the last n optimal solutions were found by heur_reoptsols (in this case, the stored tree was only needed to prove the optimality and this can be probably faster by solving from scratch)
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.
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory node current node of the branch and bound tree (or NULL) transvars transformed problem variables ntransvars number of transformed problem variables restart pointer to store if the reoptimization process should be restarted
Definition at line 5537 of file reopt.c.
References FALSE, SCIP_Reopt::lastrestart, MAX, SCIP_Reopt::noptsolsbyreoptsol, SCIP_ReoptTree::nreoptnodes, NULL, reoptCheckLocalRestart(), reoptRestart(), reoptSimilarity(), SCIP_Reopt::reopttree, SCIP_Reopt::run, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_Real, SCIPsetDebugMsg, SCIPsetIsFeasLT(), and TRUE.
Referenced by prepareReoptimization(), and SCIPcheckReoptRestart().
◆ SCIPreoptGetSimToPrevious()
| SCIP_Real SCIPreoptGetSimToPrevious | ( | SCIP_REOPT * | reopt | ) |
returns the similarity to the previous objective function
returns the similarity to the previous objective function, if no exist return -2.0
- Parameters
-
reopt reoptimization data structure
Definition at line 5606 of file reopt.c.
References NULL, and SCIP_Reopt::simtolastobj.
Referenced by SCIPgetReoptSimilarity().
◆ SCIPreoptGetSimToFirst()
| SCIP_Real SCIPreoptGetSimToFirst | ( | SCIP_REOPT * | reopt | ) |
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
- Parameters
-
reopt reoptimization data structure
Definition at line 5615 of file reopt.c.
References NULL, and SCIP_Reopt::simtofirstobj.
◆ SCIPreoptGetSimilarity()
| SCIP_Real SCIPreoptGetSimilarity | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| int | run1, | ||
| int | run2, | ||
| SCIP_VAR ** | origvars, | ||
| int | norigvars | ||
| ) |
return the similarity between two of objective functions of two given runs
- Parameters
-
reopt reoptimization data structure set global SCIP settings run1 number of the first run run2 number of the second run origvars original problem variables norigvars number of original problem variables
Definition at line 5624 of file reopt.c.
References NULL, and reoptSimilarity().
Referenced by SCIPgetReoptSimilarity().
◆ SCIPreoptGetLastBestSol()
| SCIP_SOL * SCIPreoptGetLastBestSol | ( | SCIP_REOPT * | reopt | ) |
returns the best solution of the last run
- Parameters
-
reopt reoptimization data structure
Definition at line 5643 of file reopt.c.
References NULL, SCIP_Reopt::prevbestsols, and SCIP_Reopt::run.
Referenced by SCIPgetReoptLastOptSol().
◆ SCIPreoptGetReoptnode()
| SCIP_REOPTNODE * SCIPreoptGetReoptnode | ( | SCIP_REOPT * | reopt, |
| unsigned int | id | ||
| ) |
returns the node of the reoptimization tree corresponding to the unique id
- Parameters
-
reopt reoptimization data structure id unique id
Definition at line 5657 of file reopt.c.
References NULL, SCIP_ReoptTree::reoptnodes, and SCIP_Reopt::reopttree.
Referenced by SCIPgetReoptnode().
◆ SCIPreoptGetOldObjCoef()
| SCIP_Real SCIPreoptGetOldObjCoef | ( | SCIP_REOPT * | reopt, |
| int | run, | ||
| int | idx | ||
| ) |
returns the coefficent of variable with index idx in run run
returns the coefficient of variable with index idx in run run
- Parameters
-
reopt reoptimization data structure run number of the run (1,2,...) idx index of original variable
Definition at line 5671 of file reopt.c.
References NULL, and SCIP_Reopt::objs.
Referenced by reoptCheckLocalRestart(), and SCIPgetReoptOldObjCoef().
◆ SCIPreoptGetBestSolRun()
| SCIP_SOL * SCIPreoptGetBestSolRun | ( | SCIP_REOPT * | reopt, |
| int | run | ||
| ) |
return the best solution of a given run
- Note
- the returned solution is part of the original space.
return the best solution of a given run.
- Note
- the returned solution is part of the original space.
- Parameters
-
reopt reoptimization data structure run number of the run (1,2,...)
Definition at line 5687 of file reopt.c.
References NULL, and SCIP_Reopt::prevbestsols.
◆ SCIPreoptReset()
| SCIP_RETCODE SCIPreoptReset | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
reset solving specific paramters
reset solving specific parameters
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory
Definition at line 5699 of file reopt.c.
References SCIP_Reopt::addedconss, SCIP_Reopt::consadded, FALSE, SCIP_Reopt::naddedconss, NULL, SCIP_Reopt::objhaschanged, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconsRelease(), and SCIPsetDebugMsg.
Referenced by freeReoptSolve(), and freeTransform().
◆ SCIPreoptResetSolMarks()
| void SCIPreoptResetSolMarks | ( | SCIP_REOPT * | reopt | ) |
reset marks of stored solutions to not updated
- Parameters
-
reopt reoptimization data structure
Definition at line 5733 of file reopt.c.
References SCIP_SolNode::child, NULL, SCIP_SolTree::root, SCIP_SolNode::sibling, SCIP_Reopt::soltree, and soltreeResetMarks().
Referenced by SCIPresetReoptSolMarks().
◆ SCIPreoptGetNNodes()
| int SCIPreoptGetNNodes | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node | ||
| ) |
returns the number of stored nodes
returns the number of stored nodes in the subtree induced by node
- Parameters
-
reopt reoptimization data structure node node of the search tree
Definition at line 5754 of file reopt.c.
References SCIP_ReoptTree::nreoptnodes, NULL, SCIP_Reopt::reopttree, reopttreeGetNNodes(), SCIPnodeGetDepth(), and SCIPnodeGetReoptID().
Referenced by compressReoptTree(), and SCIPgetNReoptnodes().
◆ SCIPreoptAddInfNode()
| SCIP_RETCODE SCIPreoptAddInfNode | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE * | node | ||
| ) |
save information that given node is infeasible
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory node node of the search tree
Definition at line 5938 of file reopt.c.
References SCIP_ReoptTree::ninfnodes, SCIP_ReoptTree::ntotalinfnodes, NULL, REOPT_CONSTYPE_CUT, SCIP_Reopt::reopttree, saveGlobalCons(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPreoptCheckCutoff().
◆ SCIPreoptCheckCutoff()
| SCIP_RETCODE SCIPreoptCheckCutoff | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE * | node, | ||
| SCIP_EVENTTYPE | eventtype, | ||
| SCIP_LP * | lp, | ||
| SCIP_LPSOLSTAT | lpsolstat, | ||
| SCIP_Bool | isrootnode, | ||
| SCIP_Bool | isfocusnode, | ||
| SCIP_Real | lowerbound, | ||
| int | effectiverootdepth | ||
| ) |
check the reason for cut off a node and if necessary store the node
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory node node of the search tree eventtype eventtype lp LP data lpsolstat solution status of the LP isrootnode the node is the root isfocusnode the node is the current focus node lowerbound lower bound of the node effectiverootdepth effective root depth
Definition at line 5962 of file reopt.c.
References addNode(), SCIP_Reopt::currentnode, deleteLastDualBndchgs(), SCIP_Reopt::dualreds, FALSE, SCIP_Reopt::lastbranched, SCIP_Reopt::lastseennode, MIN, NULL, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_FORMAT, SCIP_EVENTTYPE_NODEBRANCHED, SCIP_EVENTTYPE_NODEFEASIBLE, SCIP_EVENTTYPE_NODEINFEASIBLE, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_NODETYPE_PROBINGNODE, SCIP_OKAY, SCIP_Real, SCIP_REOPTTYPE_FEASIBLE, SCIP_REOPTTYPE_INFSUBTREE, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_PRUNED, SCIP_REOPTTYPE_STRBRANCHED, SCIP_REOPTTYPE_TRANSIT, SCIPlpGetCutoffbound(), SCIPlpGetSolstat(), SCIPnodeGetDepth(), SCIPnodeGetNDualBndchgs(), SCIPnodeGetNumber(), SCIPnodeGetType(), SCIPreoptAddDualBndchg(), SCIPreoptAddInfNode(), SCIPreoptGetNAddedConss(), SCIPreoptGetNDualBndchgs(), SCIPreoptResetDualBndchgs(), SCIPsetDebugMsg, and TRUE.
Referenced by SCIPnodeCutoff(), SCIPnodeFocus(), SCIPnodepqBound(), SCIPsolveCIP(), and solveNodeLP().
◆ SCIPreoptAddDualBndchg()
| SCIP_RETCODE SCIPreoptAddDualBndchg | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE * | node, | ||
| SCIP_VAR * | var, | ||
| SCIP_Real | newval, | ||
| SCIP_Real | oldval | ||
| ) |
store bound change based on dual information
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory node node of the search tree var variable newval new bound oldval old bound
Definition at line 6230 of file reopt.c.
References checkMemDualCons(), SCIP_Reopt::currentnode, DEFAULT_MEM_DUALCONS, SCIP_Reopt::dualreds, FALSE, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPnodeGetNumber(), SCIPsetDebugMsg, SCIPsetFindBranchrule(), SCIPsetGetIntParam(), SCIPsetIsEQ(), SCIPsetIsLT(), SCIPvarGetName(), SCIPvarGetOrigvarSum(), and SCIPvarIsOriginal().
Referenced by SCIPaddReoptDualBndchg(), and SCIPreoptCheckCutoff().
◆ SCIPreoptGetNDualBndchgs()
| int SCIPreoptGetNDualBndchgs | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node | ||
| ) |
returns the number of bound changes based on dual information
- Parameters
-
reopt reoptimization data structure node node of the search tree
Definition at line 6320 of file reopt.c.
References SCIP_Reopt::currentnode, SCIP_Reopt::dualreds, NULL, and SCIPnodeGetNumber().
Referenced by SCIPreoptCheckCutoff().
◆ SCIPreoptGetNLeaves()
| int SCIPreoptGetNLeaves | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node | ||
| ) |
returns the number of leaf nodes of the subtree induced by node (of the whole tree if node == NULL)
- Parameters
-
reopt reoptimization data structure node node of the search tree (or NULL)
Definition at line 5904 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().
◆ SCIPreoptGetChildIDs()
| SCIP_RETCODE SCIPreoptGetChildIDs | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE * | node, | ||
| unsigned int * | childs, | ||
| int | childssize, | ||
| int * | nchilds | ||
| ) |
returns the child nodes of node that need to be reoptimized next or NULL if node is a leaf
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory node node of the search tree childs array to store the child ids childssize size of the childs array nchilds pointer to store the number of child nodes
Definition at line 6340 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().
◆ SCIPreoptGetLeaves()
| SCIP_RETCODE SCIPreoptGetLeaves | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node, | ||
| unsigned int * | leaves, | ||
| int | leavessize, | ||
| int * | nleaves | ||
| ) |
returns all leaves of the subtree induced by node
- Parameters
-
reopt reoptimization data node node of the search tree leaves array to the the ids leavessize size of leaves array nleaves pointer to store the number of leave node
Definition at line 6393 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().
◆ SCIPreoptGetSavingtime()
| SCIP_Real SCIPreoptGetSavingtime | ( | SCIP_REOPT * | reopt | ) |
returns the time needed to store the nodes for reoptimization
- Parameters
-
reopt reoptimization data structure
Definition at line 7565 of file reopt.c.
References NULL, SCIP_Reopt::savingtime, and SCIPclockGetTime().
Referenced by SCIPprintReoptStatistics().
◆ SCIPreoptApplyGlbConss()
| SCIP_RETCODE SCIPreoptApplyGlbConss | ( | SCIP * | scip, |
| SCIP_REOPT * | reopt, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
add the stored constraints globally to the problem
- Parameters
-
scip SCIP data structure reopt reoptimization data structure set global SCIP settings stat dynamic problem statistics blkmem block memory
Definition at line 7575 of file reopt.c.
References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, ensureActiveconssSize(), FALSE, SCIP_Reopt::glbconss, SCIP_Reopt::nactiveconss, SCIP_Reopt::nglbconss, SCIP_Reopt::nmaxactiveconss, NULL, REOPT_CONSTYPE_CUT, SCIP_Reopt::run, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsBasicBounddisjunction(), SCIPcreateConsLogicor(), SCIPdebugPrintCons, SCIPerrorMessage, SCIPfreeBufferArray, SCIPhashsetExists(), SCIPhashsetInsert(), SCIPsetDebugMsg, SCIPsetIsFeasEQ(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), SCIPvarIsOriginal(), SCIPvarNegate(), and TRUE.
Referenced by prepareReoptimization().
◆ SCIPreoptApplyCuts()
| SCIP_RETCODE SCIPreoptApplyCuts | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node, | ||
| SCIP_SEPASTORE * | sepastore, | ||
| SCIP_CUTPOOL * | cutpool, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_EVENTFILTER * | eventfilter, | ||
| SCIP_LP * | lp, | ||
| SCIP_Bool | root | ||
| ) |
add the stored cuts to the separation storage
- Parameters
-
reopt reoptimization data structure node current focus node sepastore separation storage cutpool global cutpool blkmem block memory set global SCIP settings stat dynamic problem statistics eventqueue event queue eventfilter event filter lp current LP root bool whether the current node is the root
Definition at line 7697 of file reopt.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_ReoptNode::conss, FALSE, SCIP_ReoptNode::nconss, NULL, REOPT_CONSTYPE_CUT, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_ROWORIGINTYPE_REOPT, SCIP_VARSTATUS_COLUMN, SCIPcutpoolAddRow(), SCIPnodeGetDepth(), SCIPnodeGetNumber(), SCIPnodeGetReoptID(), SCIProwCreate(), SCIProwRelease(), SCIPsepastoreAddCut(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsnprintf(), SCIPvarGetCol(), SCIPvarGetStatus(), SCIPvarGetTransVar(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIPinitConssLP().
◆ SCIPreoptGetSolveLP()
| SCIP_Bool SCIPreoptGetSolveLP | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_NODE * | node | ||
| ) |
check if the LP of the given node should be solved or not
- Parameters
-
reopt reoptimization data structure set global SCIP settings node node of the current search tree
Definition at line 7827 of file reopt.c.
References FALSE, SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), SCIPnodeGetReopttype(), SCIPsetIsGE(), SCIP_Reopt::simtolastobj, and TRUE.
Referenced by solveNode().
◆ SCIPreoptApply()
| SCIP_RETCODE SCIPreoptApply | ( | SCIP_REOPT * | reopt, |
| SCIP * | scip, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PROB * | transprob, | ||
| SCIP_PROB * | origprob, | ||
| SCIP_TREE * | tree, | ||
| SCIP_LP * | lp, | ||
| SCIP_BRANCHCAND * | branchcand, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_EVENTFILTER * | eventfilter, | ||
| SCIP_CLIQUETABLE * | cliquetable, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_REOPTNODE * | reoptnode, | ||
| unsigned int | id, | ||
| SCIP_Real | estimate, | ||
| SCIP_NODE ** | childnodes, | ||
| int * | ncreatedchilds, | ||
| int * | naddedconss, | ||
| int | childnodessize, | ||
| SCIP_Bool * | success | ||
| ) |
reactivate the given reoptnode and split them into several nodes if necessary
- Parameters
-
reopt reoptimization data structure scip SCIP data structure set global SCIP settings stat dynamic problem statistics transprob transformed problem origprob original problem tree branching tree lp current LP branchcand branching candidate eventqueue event queue eventfilter global event filter cliquetable clique table blkmem block memory reoptnode node of the reoptimization tree to reactivate id id of the node to reactivate estimate estimate of the child nodes that should be created childnodes array to store the created child nodes ncreatedchilds pointer to store number of created child nodes naddedconss pointer to store number of generated constraints childnodessize available size of childnodes array success pointer store the result
Definition at line 7262 of file reopt.c.
References addLocalConss(), addNode(), addSplitcons(), changeAncestorBranchings(), SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, FALSE, fixBounds(), fixInterdiction(), getInferenceOrder(), SCIP_ReoptNode::lowerbound, SCIP_ReoptNode::nafterdualvars, SCIP_ReoptNode::nconss, NULL, SCIP_Reopt::objhaschanged, SCIP_Reopt::randnumgen, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, 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, SCIPnodeCreateChild(), SCIPnodeGetNumber(), SCIPnodeSetEstimate(), SCIPnodeSetReoptID(), SCIPnodeSetReopttype(), SCIPrandomPermuteIntArray(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsGT(), and TRUE.
Referenced by SCIPapplyReopt().
◆ SCIPreoptDeleteNode()
| SCIP_RETCODE SCIPreoptDeleteNode | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| unsigned int | id, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
delete a node stored in the reoptimization tree
- Parameters
-
reopt reoptimization data structure set global SCIP settings id id of a stored node blkmem block memory
Definition at line 7242 of file reopt.c.
References NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeDeleteNode(), SCIP_CALL, SCIP_OKAY, SCIPqueueInsertUInt(), and TRUE.
◆ SCIPreoptResetDualBndchgs()
| SCIP_RETCODE SCIPreoptResetDualBndchgs | ( | SCIP_REOPT * | reopt, |
| SCIP_NODE * | node, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
reset the stored information abound bound changes based on dual information
- Parameters
-
reopt reoptimization data structure node node of the search tree blkmem block memory
Definition at line 7158 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().
◆ SCIPreoptSplitRoot()
| SCIP_RETCODE SCIPreoptSplitRoot | ( | SCIP_REOPT * | reopt, |
| SCIP_TREE * | tree, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| BMS_BLKMEM * | blkmem, | ||
| int * | ncreatedchilds, | ||
| int * | naddedconss | ||
| ) |
splits the root into several nodes and moves the child nodes of the root to one of the created nodes
- Parameters
-
reopt reoptimization data structure tree branch and bound tree set global SCIP settings stat dynamic SCIP statistics blkmem block memory ncreatedchilds pointer to store the number of created nodes naddedconss pointer to store the number added constraints
Definition at line 6869 of file reopt.c.
References BMSallocBlockMemory, SCIP_ReoptNode::conss, createReoptnode(), SCIP_ReoptNode::dualredscur, getInferenceOrder(), SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptNode::parentID, SCIP_Reopt::randnumgen, 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, SCIP_VARTYPE_BINARY, SCIPnodeSetReopttype(), SCIPqueueRemoveUInt(), SCIPrandomPermuteIntArray(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPtreeGetRootNode(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), transformDualredsToBounddisjunction(), transformDualredsToLinear(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.
Referenced by SCIPsplitReoptRoot().
◆ SCIPreoptApplyCompression()
| SCIP_RETCODE SCIPreoptApplyCompression | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_REOPTNODE ** | representatives, | ||
| int | nrepresentatives, | ||
| SCIP_Bool * | success | ||
| ) |
reset the complete tree and set the given search frontier
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory representatives array of representatives nrepresentatives number of representatives success pointer to store if the method was successful
Definition at line 6653 of file reopt.c.
References SCIP_ReoptNode::conss, createReoptnode(), FALSE, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, SCIP_ReoptTree::nreoptnodes, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptNode::parentID, r, reoptAddChild(), SCIP_ReoptTree::reoptnodes, reoptResetTree(), SCIP_Reopt::reopttree, SCIP_ReoptNode::reopttype, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_LEAF, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_TRANSIT, SCIPqueueRemoveUInt(), SCIPreoptnodeAddBndchg(), SCIPreoptnodeAddCons(), SCIPsetDebugMsg, TRUE, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize.
Referenced by SCIPsetReoptCompression().
◆ SCIPreoptSaveOpenNodes()
| SCIP_RETCODE SCIPreoptSaveOpenNodes | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_LP * | lp, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_NODE ** | leaves, | ||
| int | nleaves, | ||
| SCIP_NODE ** | childs, | ||
| int | nchilds, | ||
| SCIP_NODE ** | siblings, | ||
| int | nsiblings | ||
| ) |
add all unprocessed nodes to the reoptimization tree
- Parameters
-
reopt reoptimization data structure set global SCIP settings lp current LP blkmem block memory leaves array of open leave nodes nleaves number of open leave nodes childs array of open children nodes nchilds number of open leave nodes siblings array of open sibling nodes nsiblings number of open leave nodes
Definition at line 6456 of file reopt.c.
References addNode(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_PRUNED, SCIPnodeGetLowerbound(), and SCIPsetDebugMsg.
Referenced by SCIPsolve().
◆ SCIPreoptMergeVarHistory()
| SCIP_RETCODE SCIPreoptMergeVarHistory | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_VAR ** | vars, | ||
| int | nvars | ||
| ) |
merges the variable history of the current run with the stored history
- Parameters
-
reopt reoptimization data structure set global SCIP settings stat dynamic problem statistics vars original problem variables nvars number of original problem variables
Definition at line 6506 of file reopt.c.
References SCIP_Var::history, NULL, SCIP_Reopt::objhaschanged, SCIP_History::pscostcount, SCIP_History::pscostvariance, SCIP_History::pscostweightedmean, r, reoptSimilarity(), SCIP_Reopt::run, SCIP_INVALID, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_NORMAL, SCIPhistoryGetAvgCutoffs(), SCIPhistoryGetAvgInferences(), SCIPhistoryIncCutoffSum(), SCIPhistoryIncInferenceSum(), SCIPhistoryIncNBranchings(), SCIPsetDebugMsg, SCIPsetIsGT(), SCIPsetIsZero(), SCIPvarGetIndex(), SCIPvarGetName(), SCIPvarGetTransVar(), SCIPvarIsActive(), SCIPvarIsOriginal(), SCIPverbMessage(), SCIP_Reopt::simtolastobj, and SCIP_Reopt::varhistory.
Referenced by prepareReoptimization().
◆ SCIPreoptUpdateVarHistory()
| SCIP_RETCODE SCIPreoptUpdateVarHistory | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_VAR ** | vars, | ||
| int | nvars | ||
| ) |
updates the variable history
- Parameters
-
reopt reoptimization data structure set global SCIP settings stat dynamic problem statistics blkmem block memory vars original variable array nvars number of original variables
Definition at line 6598 of file reopt.c.
References BMSallocBlockMemoryArray, FALSE, SCIP_Var::history, NULL, SCIP_Reopt::run, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPhistoryCreate(), SCIPhistoryReset(), SCIPhistoryUnite(), SCIPsetDebugMsg, SCIPvarGetIndex(), SCIPvarGetTransVar(), SCIPvarIsActive(), SCIPvarIsOriginal(), and SCIP_Reopt::varhistory.
Referenced by SCIPsolve().
◆ SCIPreoptnodeInit()
| void SCIPreoptnodeInit | ( | SCIP_REOPTNODE * | reoptnode, |
| SCIP_SET * | set | ||
| ) |
initialize an empty node
- Parameters
-
reoptnode node of the reopttree set global SCIP settings
Definition at line 7874 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::dualreds, SCIP_ReoptNode::dualredscur, SCIP_ReoptNode::dualredsnex, 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().
◆ SCIPreoptnodeReset()
| SCIP_RETCODE SCIPreoptnodeReset | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_REOPTNODE * | reoptnode | ||
| ) |
reset the given reoptimization node
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory reoptnode reoptimization node
Definition at line 7907 of file reopt.c.
References NULL, reoptnodeReset(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPresetRepresentation().
◆ SCIPreoptnodeDelete()
| SCIP_RETCODE SCIPreoptnodeDelete | ( | SCIP_REOPTNODE ** | reoptnode, |
| BMS_BLKMEM * | blkmem | ||
| ) |
delete the given reoptimization node
- Parameters
-
reoptnode pointer of reoptnode blkmem block memory
Definition at line 7925 of file reopt.c.
References NULL, reoptnodeDelete(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPdeleteReoptnode(), and SCIPfreeRepresentation().
◆ SCIPreoptnodeAddBndchg()
| SCIP_RETCODE SCIPreoptnodeAddBndchg | ( | SCIP_REOPTNODE * | reoptnode, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_VAR * | var, | ||
| SCIP_Real | val, | ||
| SCIP_BOUNDTYPE | boundtype | ||
| ) |
add a variable to a given reoptnode
- Parameters
-
reoptnode node of the reopttree set global SCIP settings blkmem block memory var variable to add val value of the variable boundtype boundtype of the variable
Definition at line 7939 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().
◆ SCIPreoptnodeAddCons()
| SCIP_RETCODE SCIPreoptnodeAddCons | ( | SCIP_REOPTNODE * | reoptnode, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_VAR ** | vars, | ||
| SCIP_Real * | bounds, | ||
| SCIP_BOUNDTYPE * | boundtypes, | ||
| SCIP_Real | lhs, | ||
| SCIP_Real | rhs, | ||
| int | nvars, | ||
| REOPT_CONSTYPE | constype, | ||
| SCIP_Bool | linear | ||
| ) |
add a constraint to a given reoptnode
- Parameters
-
reoptnode node of the reopttree set global SCIP settings blkmem block memory vars variables which are part of the constraint bounds bounds of the variables boundtypes boundtypes of the variables (or NULL is the constraint is a cut) lhs lhs of the constraint rhs rhs of the constraint nvars number of variables constype type of the constraint linear the given constraint has a linear representation
Definition at line 7967 of file reopt.c.
References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, SCIP_ReoptNode::conss, SCIP_ReoptNode::nconss, NULL, REOPT_CONSTYPE_CUT, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, reoptnodeCheckMemory(), SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPreoptnodeAddBndchg(), SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsLE(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbLocal(), and SCIPvarIsImpliedIntegral().
Referenced by SCIPaddReoptnodeCons(), SCIPreoptApplyCompression(), and storeCuts().
◆ SCIPreoptnodeGetPath()
| void SCIPreoptnodeGetPath | ( | SCIP_REOPT * | reopt, |
| SCIP_REOPTNODE * | reoptnode, | ||
| SCIP_VAR ** | vars, | ||
| SCIP_Real * | vals, | ||
| SCIP_BOUNDTYPE * | boundtypes, | ||
| int | varssize, | ||
| int * | nbndchgs, | ||
| int * | nbndchgsafterdual | ||
| ) |
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
- Parameters
-
reopt reoptimization data structure reoptnode node of the reoptimization tree vars array for variables vals array for values boundtypes array for bound types varssize size of arrays vars, vals, and boundtypes nbndchgs pointer to store the number of bound changes nbndchgsafterdual pointer to store the number of bound changes applied after the first dual reduction at the given node
Definition at line 7183 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().
◆ SCIPreoptAddCons()
| SCIP_RETCODE SCIPreoptAddCons | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_CONS * | cons | ||
| ) |
add a constraint to the reoptimization data structure
- Parameters
-
reopt reoptimization data structure set global SCIP settings blkmem block memory cons constraint to add
Definition at line 8060 of file reopt.c.
References SCIP_Reopt::addedconss, SCIP_Reopt::addedconsssize, BMSallocClearBlockMemoryArray, BMSclearMemoryArray, BMSreallocBlockMemoryArray, SCIP_Reopt::consadded, SCIP_Reopt::naddedconss, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPconsCapture(), SCIPconsGetName(), SCIPsetCalcMemGrowSize(), SCIPsetDebugMsg, and TRUE.
Referenced by SCIPaddCons().
◆ SCIPreoptSaveGlobalBounds()
| SCIP_RETCODE SCIPreoptSaveGlobalBounds | ( | SCIP_REOPT * | reopt, |
| SCIP_PROB * | transprob, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
save global lower and upper bounds
- Note
- this method can only called once, i.e., after fishing presolving of the first problem
save global lower and upper bounds
- Note
- this method should only be called once, i.e., after fishing presolving of the first problem
- Parameters
-
reopt reoptimization data structure transprob transformed problem data blkmem block memory
Definition at line 8111 of file reopt.c.
References SCIP_Reopt::glblb, SCIP_Reopt::glbub, NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsertReal(), SCIPprobGetNVars(), SCIPprobGetVars(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and SCIPvarIsRelaxationOnly().
Referenced by prepareReoptimization().
◆ SCIPreoptSaveActiveConss()
| SCIP_RETCODE SCIPreoptSaveActiveConss | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_PROB * | transprob, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
save active constraints
- Note
- this method can only called once, i.e., after fishing presolving of the first problem
- Parameters
-
reopt reoptimization data structure set global SCIP settings transprob transformed problem data blkmem block memory
Definition at line 8151 of file reopt.c.
References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, ensureActiveconssSize(), SCIP_Reopt::nactiveconss, SCIP_Reopt::nmaxactiveconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsCapture(), SCIPconsIsActive(), SCIPhashsetCreate(), SCIPhashsetExists(), SCIPhashsetInsert(), SCIPprobGetConss(), SCIPprobGetNConss(), and SCIPsetDebugMsg.
Referenced by prepareReoptimization().
◆ SCIPreoptInstallBounds()
| SCIP_RETCODE SCIPreoptInstallBounds | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PROB * | transprob, | ||
| SCIP_LP * | lp, | ||
| SCIP_BRANCHCAND * | branchcand, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_CLIQUETABLE * | cliquetable, | ||
| BMS_BLKMEM * | blkmem | ||
| ) |
installs global lower and upper bounds
- Parameters
-
reopt reoptimization data structure set global SCIP settings stat dynamic SCIP statistics transprob transformed problem data lp current LP data branchcand branching candidate storage eventqueue event queue cliquetable clique table data structure blkmem block memory
Definition at line 8191 of file reopt.c.
References SCIP_Reopt::glblb, SCIP_Reopt::glbub, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageReal(), SCIPprobGetNVars(), SCIPprobGetVars(), SCIPprobIsTransformed(), SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), and SCIPvarIsRelaxationOnly().
Referenced by prepareReoptimization().
◆ SCIPreoptResetActiveConss()
| SCIP_RETCODE SCIPreoptResetActiveConss | ( | SCIP_REOPT * | reopt, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat | ||
| ) |
reactivate globally valid constraints that were deactivated and necessary to ensure correctness
- Parameters
-
reopt reoptimization data structure set global SCIP settings stat dynamic SCIP statistics
Definition at line 8243 of file reopt.c.
References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, SCIP_Cons::deleted, FALSE, SCIP_Reopt::nactiveconss, SCIP_Reopt::nmaxactiveconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsActivate(), SCIPconsDeactivate(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPhashsetExists(), SCIPsetDebugMsg, and TRUE.
Referenced by prepareReoptimization().
◆ SCIPreoptConsCanBeDeleted()
| SCIP_Bool SCIPreoptConsCanBeDeleted | ( | SCIP_REOPT * | reopt, |
| SCIP_CONS * | cons | ||
| ) |
returns whether a constraint is necessary to ensure correctness and cannot be deleted
- Parameters
-
reopt reoptimization data structure cons problem constraint
Definition at line 8284 of file reopt.c.
References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, NULL, SCIPhashsetExists(), and TRUE.
Referenced by SCIPconsDelete().