SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

data structures and methods for collecting reoptimization information

Author
Jakob Witzig

Definition in file reopt.c.

#include "scip/def.h"
#include "scip/mem.h"
#include "scip/event.h"
#include "scip/scip.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/var.h"
#include "scip/lp.h"
#include "scip/misc.h"
#include "scip/reopt.h"
#include "scip/tree.h"
#include "scip/primal.h"
#include "scip/sepastore.h"
#include "scip/cutpool.h"
#include "scip/prob.h"
#include "scip/cons.h"
#include "scip/cons_bounddisjunction.h"
#include "scip/cons_linear.h"
#include "scip/cons_logicor.h"
#include "scip/cons_setppc.h"
#include "scip/clock.h"
#include "scip/history.h"
#include "blockmemshell/memory.h"

Go to the source code of this file.

Macros

#define DEFAULT_MEM_VARAFTERDUAL   10
#define DEFAULT_MEM_VAR   10
#define DEFAULT_MEM_NODES   1000
#define DEFAULT_MEM_RUN   200
#define DEFAULT_MEM_DUALCONS   10
#define DEFAULT_RANDSEED   67
#define EVENTHDLR_NAME   "Reopt"
#define EVENTHDLR_DESC   "node event handler for reoptimization"

Functions

static SCIP_DECL_EVENTEXEC (eventExecReopt)
static SCIP_DECL_EVENTINITSOL (eventInitsolReopt)
static SCIP_DECL_EVENTEXITSOL (eventExitsolReopt)
static SCIP_RETCODE ensureActiveconssSize (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, int num)
static SCIP_RETCODE ensureSolsSize (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, int num, int runidx)
static SCIP_RETCODE ensureRunSize (SCIP_REOPT *reopt, SCIP_SET *set, int num, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reopttreeCheckMemory (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reoptnodeCheckMemory (SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem, int var_mem, int child_mem, int conss_mem)
static int soltreeNInducedSols (SCIP_SOLNODE *solnode)
static SCIP_Real reoptSimilarity (SCIP_REOPT *reopt, SCIP_SET *set, int obj1_id, int obj2_id, SCIP_VAR **vars, int nvars)
static SCIP_RETCODE reoptnodeDelete (SCIP_REOPTNODE **reoptnode, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reoptnodeReset (SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reopttreeDeleteNode (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int id, SCIP_Bool softreset)
static SCIP_RETCODE createSolTree (SCIP_SOLTREE *soltree, BMS_BLKMEM *blkmem)
static SCIP_RETCODE soltreefreeNode (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SOLNODE **solnode)
static SCIP_RETCODE freeSolTree (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem)
static SCIP_RETCODE solnodeAddChild (SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_SOLNODE *curnode, SCIP_SOLNODE **child, SCIP_VAR *var, SCIP_Real val, SCIP_Bool *added)
static SCIP_RETCODE soltreeAddSol (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem, SCIP_VAR **vars, SCIP_SOL *sol, SCIP_SOLNODE **solnode, int nvars, SCIP_Bool bestsol, SCIP_Bool *added)
static void soltreeResetMarks (SCIP_SOLNODE *node)
static SCIP_RETCODE createReoptnode (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int id)
static SCIP_RETCODE createReopttree (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE clearReoptnodes (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_Bool softreset)
static SCIP_RETCODE freeReoptTree (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE checkMemDualCons (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, int size)
static SCIP_RETCODE checkMemGlbCons (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, int mem)
static SCIP_RETCODE cleanActiveConss (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE updatePropagation (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int id, SCIP_Bool *transintoorig)
static SCIP_RETCODE saveAfterDualBranchings (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int id, SCIP_Bool *transintoorig)
static SCIP_RETCODE storeCuts (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_LP *lp, unsigned int id)
static SCIP_RETCODE transformIntoOrig (SCIP_REOPT *reopt, unsigned int id)
static SCIP_RETCODE getLastSavedNode (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_NODE *node, SCIP_NODE **parent, unsigned int *parentid, int *nbndchgs)
static SCIP_RETCODE reoptAddChild (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int parentid, unsigned int childid)
static SCIP_RETCODE moveChildrenUp (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int nodeid, unsigned int parentid)
static SCIP_RETCODE deleteChildrenBelow (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int id, SCIP_Bool delnodeitself, SCIP_Bool exitsolve)
static SCIP_RETCODE shrinkNode (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_NODE *node, unsigned int id, SCIP_Bool *shrank, BMS_BLKMEM *blkmem)
static SCIP_RETCODE changeReopttypeOfSubtree (SCIP_REOPTTREE *reopttree, unsigned int id, SCIP_REOPTTYPE reopttype)
static SCIP_RETCODE reoptnodeUpdateDualConss (SCIP_REOPTNODE *reoptnode, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reoptCheckLocalRestart (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_VAR **transvars, int ntransvars, SCIP_Bool *localrestart)
static SCIP_RETCODE saveAncestorBranchings (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_NODE *parent, unsigned int id, unsigned int parentid)
static SCIP_RETCODE saveConsLinear (SCIP_REOPTCONSDATA *reoptconsdata, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons, SCIP_Bool *success)
static SCIP_RETCODE saveConsBounddisjuction (SCIP_REOPTCONSDATA *reoptconsdata, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons, SCIP_Bool *success)
static SCIP_RETCODE saveLocalConssData (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int id)
static SCIP_RETCODE collectDualInformation (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int id, SCIP_REOPTTYPE reopttype)
static SCIP_RETCODE addNode (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_REOPTTYPE reopttype, SCIP_Bool saveafterdual, SCIP_Bool isrootnode, SCIP_Real lowerbound)
static void deleteLastDualBndchgs (SCIP_REOPT *reopt)
static SCIP_RETCODE reoptnodeResetDualConss (SCIP_REOPTNODE *reoptnode, BMS_BLKMEM *blkmem)
static SCIP_RETCODE addGlobalCut (SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, int nvars, int nbinvars, int nintvars)
static SCIP_RETCODE saveGlobalCons (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, REOPT_CONSTYPE consttype)
static SCIP_RETCODE reoptMoveIDs (SCIP_REOPTTREE *reopttree, SCIP_SET *set, BMS_BLKMEM *blkmem, unsigned int id1, unsigned int id2)
static SCIP_RETCODE changeAncestorBranchings (SCIP_REOPT *reopt, 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_NODE *node, unsigned int id, SCIP_Bool afterdualbranching)
static SCIP_RETCODE addSplitcons (SCIP_REOPT *reopt, SCIP *scip, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_NODE *node, unsigned int id)
static SCIP_RETCODE fixBounds (SCIP_REOPT *reopt, 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_NODE *node, unsigned int id, SCIP_Bool updatedualconss)
static SCIP_RETCODE fixInterdiction (SCIP_REOPT *reopt, 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_NODE *node, unsigned int id, int *perm, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, int nvars, int negbndchg)
static SCIP_RETCODE addLocalConss (SCIP *scip, SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int id)
static void resetStats (SCIP_REOPT *reopt)
static SCIP_RETCODE dryBranch (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_Bool *runagain, unsigned int id)
static int reopttreeGetNNodes (SCIP_REOPTTREE *reopttree, unsigned int id)
static int reoptGetNLeaves (SCIP_REOPT *reopt, unsigned int id)
static SCIP_RETCODE reoptGetLeaves (SCIP_REOPT *reopt, unsigned int id, unsigned int *leaves, int leavessize, int *nleaves)
static SCIP_RETCODE reoptResetTree (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_Bool softreset)
static SCIP_RETCODE reoptRestart (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
static SCIP_RETCODE reoptSaveNewObj (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **origvars, int norigvars)
static SCIP_RETCODE getInferenceOrder (SCIP_SET *set, SCIP_STAT *stat, int *perm, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_BOUNDTYPE *boundtypes, int nvars)
static SCIP_RETCODE separateSolution (SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_VAR **vars, int nvars)
int SCIPreoptGetNRestartsGlobal (SCIP_REOPT *reopt)
int SCIPreoptGetNRestartsLocal (SCIP_REOPT *reopt)
int SCIPreoptGetNTotalRestartsLocal (SCIP_REOPT *reopt)
int SCIPreoptGetFirstRestarts (SCIP_REOPT *reopt)
int SCIPreoptGetLastRestarts (SCIP_REOPT *reopt)
int SCIPreoptGetNFeasNodes (SCIP_REOPT *reopt)
int SCIPreoptGetNTotalFeasNodes (SCIP_REOPT *reopt)
int SCIPreoptGetNPrunedNodes (SCIP_REOPT *reopt)
int SCIPreoptGetNTotalPrunedNodes (SCIP_REOPT *reopt)
int SCIPreoptGetNCutoffReoptnodes (SCIP_REOPT *reopt)
int SCIPreoptGetNTotalCutoffReoptnodes (SCIP_REOPT *reopt)
int SCIPreoptGetNInfNodes (SCIP_REOPT *reopt)
int SCIPreoptGetNTotalInfNodes (SCIP_REOPT *reopt)
SCIP_RETCODE SCIPreoptCreate (SCIP_REOPT **reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPreoptReleaseData (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPreoptFree (SCIP_REOPT **reopt, SCIP_SET *set, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem)
int SCIPreoptGetNAddedConss (SCIP_REOPT *reopt, SCIP_NODE *node)
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)
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)
SCIP_RETCODE SCIPreoptAddRun (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **origvars, int norigvars, int size)
int SCIPreoptGetNCheckedSols (SCIP_REOPT *reopt)
void SCIPreoptAddNCheckedSols (SCIP_REOPT *reopt, int ncheckedsols)
int SCIPreoptGetNImprovingSols (SCIP_REOPT *reopt)
void SCIPreoptAddNImprovingSols (SCIP_REOPT *reopt, int nimprovingsols)
int SCIPreoptGetNSolsRun (SCIP_REOPT *reopt, int run)
int SCIPreoptGetNSols (SCIP_REOPT *reopt)
SCIP_RETCODE SCIPreoptGetSolsRun (SCIP_REOPT *reopt, int run, SCIP_SOL **sols, int solssize, int *nsols)
int SCIPreoptGetNSavedSols (SCIP_REOPT *reopt)
SCIP_RETCODE SCIPreoptCheckRestart (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_VAR **transvars, int ntransvars, SCIP_Bool *restart)
SCIP_Real SCIPreoptGetSimToPrevious (SCIP_REOPT *reopt)
SCIP_Real SCIPreoptGetSimToFirst (SCIP_REOPT *reopt)
SCIP_Real SCIPreoptGetSimilarity (SCIP_REOPT *reopt, SCIP_SET *set, int run1, int run2, SCIP_VAR **origvars, int norigvars)
SCIP_SOLSCIPreoptGetLastBestSol (SCIP_REOPT *reopt)
SCIP_REOPTNODESCIPreoptGetReoptnode (SCIP_REOPT *reopt, unsigned int id)
SCIP_Real SCIPreoptGetOldObjCoef (SCIP_REOPT *reopt, int run, int idx)
SCIP_SOLSCIPreoptGetBestSolRun (SCIP_REOPT *reopt, int run)
SCIP_RETCODE SCIPreoptReset (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
void SCIPreoptResetSolMarks (SCIP_REOPT *reopt)
int SCIPreoptGetNNodes (SCIP_REOPT *reopt, SCIP_NODE *node)
int SCIPreoptnodeGetNVars (SCIP_REOPTNODE *reoptnode)
int SCIPreoptnodeGetNConss (SCIP_REOPTNODE *reoptnode)
int SCIPreoptnodeGetNDualBoundChgs (SCIP_REOPTNODE *reoptnode)
int SCIPreoptnodeGetNChildren (SCIP_REOPTNODE *reoptnode)
SCIP_Real SCIPreoptnodeGetLowerbound (SCIP_REOPTNODE *reoptnode)
SCIP_REOPTTYPE SCIPreoptnodeGetType (SCIP_REOPTNODE *reoptnode)
void SCIPreoptnodeGetConss (SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
void SCIPreoptnodeSetParentID (SCIP_REOPTNODE *reoptnode, unsigned int parentid)
int SCIPreoptGetNLeaves (SCIP_REOPT *reopt, SCIP_NODE *node)
SCIP_RETCODE SCIPreoptAddInfNode (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node)
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)
SCIP_RETCODE SCIPreoptAddDualBndchg (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newval, SCIP_Real oldval)
int SCIPreoptGetNDualBndchgs (SCIP_REOPT *reopt, SCIP_NODE *node)
SCIP_RETCODE SCIPreoptGetChildIDs (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int *childs, int childssize, int *nchilds)
SCIP_RETCODE SCIPreoptGetLeaves (SCIP_REOPT *reopt, SCIP_NODE *node, unsigned int *leaves, int leavessize, int *nleaves)
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)
SCIP_RETCODE SCIPreoptMergeVarHistory (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, int nvars)
SCIP_RETCODE SCIPreoptUpdateVarHistory (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nvars)
SCIP_RETCODE SCIPreoptApplyCompression (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE **representatives, int nrepresentatives, SCIP_Bool *success)
static SCIP_RETCODE transformDualredsToLinear (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTCONSDATA *consdata, SCIP_REOPTCONSDATA *dualreds)
static SCIP_RETCODE transformDualredsToBounddisjunction (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTCONSDATA *consdata, SCIP_REOPTCONSDATA *dualreds)
SCIP_RETCODE SCIPreoptSplitRoot (SCIP_REOPT *reopt, SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, int *ncreatedchilds, int *naddedconss)
SCIP_RETCODE SCIPreoptResetDualBndchgs (SCIP_REOPT *reopt, SCIP_NODE *node, BMS_BLKMEM *blkmem)
void SCIPreoptnodeGetPath (SCIP_REOPT *reopt, SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, int varssize, int *nbndchgs, int *nbndchgsafterdual)
SCIP_RETCODE SCIPreoptDeleteNode (SCIP_REOPT *reopt, SCIP_SET *set, unsigned int id, BMS_BLKMEM *blkmem)
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)
SCIP_Real SCIPreoptGetSavingtime (SCIP_REOPT *reopt)
SCIP_RETCODE SCIPreoptApplyGlbConss (SCIP *scip, SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem)
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)
SCIP_Bool SCIPreoptGetSolveLP (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_NODE *node)
void SCIPreoptnodeInit (SCIP_REOPTNODE *reoptnode, SCIP_SET *set)
SCIP_RETCODE SCIPreoptnodeReset (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE *reoptnode)
SCIP_RETCODE SCIPreoptnodeDelete (SCIP_REOPTNODE **reoptnode, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPreoptnodeAddBndchg (SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE boundtype)
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)
SCIP_RETCODE SCIPreoptAddCons (SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons)
SCIP_RETCODE SCIPreoptSaveGlobalBounds (SCIP_REOPT *reopt, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPreoptSaveActiveConss (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
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)
SCIP_RETCODE SCIPreoptResetActiveConss (SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat)
SCIP_Bool SCIPreoptConsCanBeDeleted (SCIP_REOPT *reopt, SCIP_CONS *cons)

Macro Definition Documentation

◆ DEFAULT_MEM_VARAFTERDUAL

#define DEFAULT_MEM_VARAFTERDUAL   10

Definition at line 58 of file reopt.c.

Referenced by saveAfterDualBranchings().

◆ DEFAULT_MEM_VAR

#define DEFAULT_MEM_VAR   10

Definition at line 59 of file reopt.c.

Referenced by saveAncestorBranchings().

◆ DEFAULT_MEM_NODES

#define DEFAULT_MEM_NODES   1000

Definition at line 60 of file reopt.c.

Referenced by createReopttree().

◆ DEFAULT_MEM_RUN

#define DEFAULT_MEM_RUN   200

Definition at line 61 of file reopt.c.

Referenced by createSolTree(), and SCIPreoptCreate().

◆ DEFAULT_MEM_DUALCONS

#define DEFAULT_MEM_DUALCONS   10

Definition at line 62 of file reopt.c.

Referenced by SCIPreoptAddDualBndchg().

◆ DEFAULT_RANDSEED

#define DEFAULT_RANDSEED   67

Definition at line 64 of file reopt.c.

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "Reopt"

Definition at line 67 of file reopt.c.

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "node event handler for reoptimization"

Definition at line 68 of file reopt.c.

Function Documentation

◆ SCIP_DECL_EVENTEXEC()

◆ SCIP_DECL_EVENTINITSOL()

SCIP_DECL_EVENTINITSOL ( eventInitsolReopt )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 113 of file reopt.c.

References assert(), EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_EVENTINITSOL, SCIP_EVENTTYPE_GBDCHANGED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STRINGEQ, SCIPcatchVarEvent(), SCIPeventhdlrGetName(), SCIPgetNVars(), SCIPgetVars(), SCIPisReoptEnabled(), SCIPvarIsIntegral(), and vars.

◆ SCIP_DECL_EVENTEXITSOL()

SCIP_DECL_EVENTEXITSOL ( eventExitsolReopt )
static

solving process deinitialization method of event handler (called before branch and bound process data is freed)

Definition at line 139 of file reopt.c.

References assert(), EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_EVENTEXITSOL, SCIP_EVENTTYPE_GBDCHANGED, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STRINGEQ, SCIP_VARTYPE_BINARY, SCIPdropVarEvent(), SCIPeventhdlrGetName(), SCIPgetNVars(), SCIPgetVars(), SCIPisReoptEnabled(), SCIPvarGetType(), and vars.

◆ ensureActiveconssSize()

SCIP_RETCODE ensureActiveconssSize ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
int num )
static

ensures size for activeconss

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
numminimum number of entries to store

Definition at line 171 of file reopt.c.

References SCIP_Reopt::activeconss, assert(), BMSreallocBlockMemoryArray, ensureActiveconssSize(), SCIP_Reopt::nmaxactiveconss, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by ensureActiveconssSize(), SCIPreoptApplyGlbConss(), and SCIPreoptSaveActiveConss().

◆ ensureSolsSize()

SCIP_RETCODE ensureSolsSize ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
int num,
int runidx )
static

ensures, that sols[pos] array can store at least num entries

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
numminimum number of entries to store
runidxrun index for which the memory should checked

Definition at line 192 of file reopt.c.

References assert(), BMSreallocBlockMemoryArray, ensureSolsSize(), SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_SolTree::sols, SCIP_SolTree::solssize, and SCIP_Reopt::soltree.

◆ ensureRunSize()

SCIP_RETCODE ensureRunSize ( SCIP_REOPT * reopt,
SCIP_SET * set,
int num,
BMS_BLKMEM * blkmem )
static

ensures, that sols array can store at least num entries

Parameters
reoptreoptimization data structure
setgloabl SCIP settings
numminimum number of entries to store
blkmemblock memory

Definition at line 219 of file reopt.c.

References assert(), BMSreallocBlockMemoryArray, BMSreallocMemoryArray, ensureRunSize(), SCIP_SolTree::nsols, NULL, SCIP_Reopt::objs, SCIP_Reopt::prevbestsols, SCIP_Reopt::runsize, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_SolTree::sols, SCIP_SolTree::solssize, SCIP_Reopt::soltree, and SCIP_Reopt::varhistory.

Referenced by ensureRunSize(), reoptSaveNewObj(), and SCIPreoptAddRun().

◆ reopttreeCheckMemory()

SCIP_RETCODE reopttreeCheckMemory ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem )
static

check the memory of the reoptimization tree and if necessary reallocate

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory

Definition at line 255 of file reopt.c.

References assert(), BMSreallocBlockMemoryArray, SCIP_ReoptTree::nreoptnodes, NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, reopttreeCheckMemory(), SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPqueueInsertUInt(), SCIPqueueIsEmpty(), and SCIPsetCalcMemGrowSize().

Referenced by addNode(), reopttreeCheckMemory(), and SCIPreoptSplitRoot().

◆ reoptnodeCheckMemory()

SCIP_RETCODE reoptnodeCheckMemory ( SCIP_REOPTNODE * reoptnode,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
int var_mem,
int child_mem,
int conss_mem )
static

◆ soltreeNInducedSols()

int soltreeNInducedSols ( SCIP_SOLNODE * solnode)
static

returns the number of stored solutions in the subtree induced by solnode

Parameters
solnodenode within the solution tree

Definition at line 367 of file reopt.c.

References assert(), SCIP_SolNode::child, NULL, SCIP_SolNode::sibling, SCIP_SolNode::sol, and soltreeNInducedSols().

Referenced by SCIPreoptGetNSavedSols(), solnodeAddChild(), and soltreeNInducedSols().

◆ reoptSimilarity()

SCIP_Real reoptSimilarity ( SCIP_REOPT * reopt,
SCIP_SET * set,
int obj1_id,
int obj2_id,
SCIP_VAR ** vars,
int nvars )
static

returns the similarity of the objective functions of two given iterations

Parameters
reoptreoptimization data
setglobal SCIP settings
obj1_idid of one objective function
obj2_idid of the other objective function
varsproblem variables
nvarsnumber of problem variables

Definition at line 396 of file reopt.c.

References assert(), MAX, MIN, NULL, nvars, SCIP_Reopt::objs, reoptSimilarity(), SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPsetIsFeasLT(), SCIPsetIsZero(), SCIPvarGetIndex(), SCIPvarGetLbLocal(), SCIPvarGetOrigvarSum(), SCIPvarGetTransVar(), SCIPvarGetUbLocal(), SCIPvarIsOriginal(), SQR, and vars.

Referenced by reoptSaveNewObj(), reoptSimilarity(), SCIPreoptCheckRestart(), SCIPreoptGetSimilarity(), and SCIPreoptMergeVarHistory().

◆ reoptnodeDelete()

SCIP_RETCODE reoptnodeDelete ( SCIP_REOPTNODE ** reoptnode,
BMS_BLKMEM * blkmem )
static

delete the given reoptimization node

Parameters
reoptnodenode of the reoptimization tree
blkmemblock memory

Definition at line 483 of file reopt.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, c, NULL, reoptnodeDelete(), and SCIP_OKAY.

Referenced by reoptnodeDelete(), reopttreeDeleteNode(), and SCIPreoptnodeDelete().

◆ reoptnodeReset()

◆ reopttreeDeleteNode()

SCIP_RETCODE reopttreeDeleteNode ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
unsigned int id,
SCIP_Bool softreset )
static

delete the node stored at position nodeID of the reoptimization tree

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory
idid of a node
softresetdelete at the end of the solving process

Definition at line 680 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, SCIP_ReoptNode::conss, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, SCIP_ReoptTree::nreoptnodes, NULL, reoptnodeDelete(), reoptnodeReset(), SCIP_ReoptTree::reoptnodes, reopttreeDeleteNode(), SCIP_Bool, SCIP_CALL, and SCIP_OKAY.

Referenced by clearReoptnodes(), deleteChildrenBelow(), dryBranch(), reopttreeDeleteNode(), SCIPreoptDeleteNode(), and shrinkNode().

◆ createSolTree()

◆ soltreefreeNode()

SCIP_RETCODE soltreefreeNode ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_PRIMAL * primal,
BMS_BLKMEM * blkmem,
SCIP_SOLNODE ** solnode )
static

free the given solution node

Parameters
reoptreoptimization data
setglobal SCIP settings
primalthe primal
blkmemblock memory
solnodenode within the solution tree

Definition at line 744 of file reopt.c.

References assert(), BMSfreeBlockMemoryNull, SCIP_SolNode::child, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, SCIPsolFree(), SCIP_SolNode::sibling, and soltreefreeNode().

Referenced by freeSolTree(), and soltreefreeNode().

◆ freeSolTree()

SCIP_RETCODE freeSolTree ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_PRIMAL * origprimal,
BMS_BLKMEM * blkmem )
static

free the solution tree

Parameters
reoptreoptimization data
setglobal SCIP settings
origprimalthe origprimal
blkmemblock memory

Definition at line 786 of file reopt.c.

References assert(), BMSfreeBlockMemoryArray, BMSfreeBlockMemoryNull, BMSfreeMemory, freeSolTree(), SCIP_SolTree::nsols, NULL, SCIP_SolTree::root, SCIP_Reopt::runsize, SCIP_CALL, SCIP_OKAY, SCIP_SolTree::sols, SCIP_SolTree::solssize, SCIP_Reopt::soltree, and soltreefreeNode().

Referenced by freeSolTree(), and SCIPreoptFree().

◆ solnodeAddChild()

SCIP_RETCODE solnodeAddChild ( SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_SOLNODE * curnode,
SCIP_SOLNODE ** child,
SCIP_VAR * var,
SCIP_Real val,
SCIP_Bool * added )
static

creates and adds a solution node to the solution tree

Parameters
setglobal SCIP settings
blkmemblock memory
curnodecurrent node in the solution tree
childpointer to store the node representing the solution value
varvariable represented by this node
valvalue the child shell represent
addedTRUE iff we created a new node, i.e, we have not seen this solution so far

Definition at line 814 of file reopt.c.

References assert(), BMSallocBlockMemory, SCIP_SolNode::child, FALSE, SCIP_SolNode::father, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIP_SolNode::sibling, SCIP_SolNode::sol, solnodeAddChild(), soltreeNInducedSols(), TRUE, SCIP_SolNode::updated, SCIP_SolNode::value, SCIP_SolNode::var, and var.

Referenced by solnodeAddChild(), and soltreeAddSol().

◆ soltreeAddSol()

SCIP_RETCODE soltreeAddSol ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_PRIMAL * origprimal,
BMS_BLKMEM * blkmem,
SCIP_VAR ** vars,
SCIP_SOL * sol,
SCIP_SOLNODE ** solnode,
int nvars,
SCIP_Bool bestsol,
SCIP_Bool * added )
static

add a solution to the solution tree

Parameters
reoptreoptimization data
setglobal SCIP settings
statdynamic problem statistics
origprimalorig primal
blkmemblock memory
varsarray of original variables
solsolution to add
solnodecurrent solution node
nvarsnumber of variables
bestsolis the solution an optimal (best found) solution
addedpointer to store the result

Definition at line 995 of file reopt.c.

References assert(), SCIP_SolNode::child, FALSE, NULL, nvars, SCIP_Reopt::prevbestsols, SCIP_SolTree::root, SCIP_Reopt::run, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), SCIPsetDebugMsg, SCIPsolCopy(), SCIPsolGetHeur(), SCIPsolGetVal(), SCIPvarIsIntegral(), SCIP_SolNode::sol, sol, solnodeAddChild(), SCIP_Reopt::soltree, soltreeAddSol(), TRUE, and vars.

Referenced by SCIPreoptAddSol(), and soltreeAddSol().

◆ soltreeResetMarks()

void soltreeResetMarks ( SCIP_SOLNODE * node)
static

reset all marks 'updated' to FALSE

Parameters
nodenode within the solution tree

Definition at line 1082 of file reopt.c.

References assert(), SCIP_SolNode::child, FALSE, SCIP_SolNode::father, NULL, SCIP_SolNode::sibling, SCIP_SolNode::sol, soltreeResetMarks(), and SCIP_SolNode::updated.

Referenced by SCIPreoptResetSolMarks(), and soltreeResetMarks().

◆ createReoptnode()

◆ createReopttree()

◆ clearReoptnodes()

SCIP_RETCODE clearReoptnodes ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_Bool softreset )
static

clears the reopttree, e.g., to restart and solve the next problem from scratch

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory
softresetdelete nodes before exit the solving process

Definition at line 1217 of file reopt.c.

References assert(), clearReoptnodes(), SCIP_ReoptTree::nreoptnodes, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, reopttreeDeleteNode(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPqueueClear(), SCIPqueueInsertUInt(), and SCIPqueueNElems().

Referenced by clearReoptnodes(), freeReoptTree(), and reoptResetTree().

◆ freeReoptTree()

SCIP_RETCODE freeReoptTree ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem )
static

free the reoptimization tree

Parameters
reopttreereoptimization tree data
setglobal SCIP settings
blkmemblock memory

Definition at line 1253 of file reopt.c.

References assert(), BMSfreeBlockMemoryArray, BMSfreeMemory, clearReoptnodes(), FALSE, freeReoptTree(), NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, SCIP_CALL, SCIP_OKAY, and SCIPqueueFree().

Referenced by freeReoptTree(), and SCIPreoptFree().

◆ checkMemDualCons()

SCIP_RETCODE checkMemDualCons ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
int size )
static

check memory for the constraint to handle bound changes based on dual information

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
sizesize which need to be allocated

Definition at line 1277 of file reopt.c.

References assert(), BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, checkMemDualCons(), SCIP_Reopt::dualreds, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by checkMemDualCons(), collectDualInformation(), and SCIPreoptAddDualBndchg().

◆ checkMemGlbCons()

SCIP_RETCODE checkMemGlbCons ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
int mem )
static

check the memory to store global constraints

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
memmemory which has to be allocated

Definition at line 1311 of file reopt.c.

References SCIP_Reopt::allocmemglbconss, assert(), BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, c, checkMemGlbCons(), SCIP_Reopt::glbconss, SCIP_Reopt::nglbconss, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by addGlobalCut(), and checkMemGlbCons().

◆ cleanActiveConss()

SCIP_RETCODE cleanActiveConss ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem )
static

reactivate globally valid constraints that were deactivated and necessary to ensure correctness

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory

Definition at line 1351 of file reopt.c.

References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, assert(), cleanActiveConss(), i, SCIP_Reopt::nactiveconss, SCIP_Reopt::nmaxactiveconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsRelease(), SCIPhashsetExists(), SCIPhashsetRemoveAll(), and SCIPsetDebugMsg.

Referenced by cleanActiveConss(), and SCIPreoptReleaseData().

◆ updatePropagation()

SCIP_RETCODE updatePropagation ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
unsigned int id,
SCIP_Bool * transintoorig )
static

update the bound changes made by propagations during current iteration; stop saving the bound changes if we reach a branching decision based on a dual information

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
idid of the node
transintoorigtransform variables into originals

Definition at line 1387 of file reopt.c.

References assert(), NULL, nvars, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPnodeGetNDomchg(), SCIPnodeGetPropsBeforeDual(), TRUE, updatePropagation(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize.

Referenced by addNode(), and updatePropagation().

◆ saveAfterDualBranchings()

SCIP_RETCODE saveAfterDualBranchings ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
unsigned int id,
SCIP_Bool * transintoorig )
static

save bound changes made after the first bound change based on dual information, e.g., mode by strong branching

This method can be used during reoptimization. If we want to reconstruct a node containing dual bound changes we have to split the node into the original one and at least one node representing the pruned part. All bound changes, i.e., (constraint) propagation, made after the first bound change based on dual information are still valid for the original node after changing the objective function. thus, we can store them for the following iterations.

It should be noted, that these bound changes will be found by (constraint) propagation methods anyway after changing the objective function. do not saving these information and find them again might be useful for conflict analysis.

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
idid of the node
transintoorigtransform variables into originals

Definition at line 1444 of file reopt.c.

References SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, SCIP_ReoptNode::afterdualvarssize, assert(), BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, DEFAULT_MEM_VARAFTERDUAL, SCIP_ReoptNode::nafterdualvars, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, saveAfterDualBranchings(), SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIPnodeGetPropsAfterDual(), SCIPsetCalcMemGrowSize(), SCIPsetDebugMsg, and TRUE.

Referenced by addNode(), and saveAfterDualBranchings().

◆ storeCuts()

◆ transformIntoOrig()

SCIP_RETCODE transformIntoOrig ( SCIP_REOPT * reopt,
unsigned int id )
static

◆ getLastSavedNode()

SCIP_RETCODE getLastSavedNode ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_NODE * node,
SCIP_NODE ** parent,
unsigned int * parentid,
int * nbndchgs )
static

search the next node along the root path that was saved by reoptimization

Parameters
reoptreoptimization data structure
setglobal SCIP settings
nodenode of the search tree
parentparent node within the search tree
parentidid of the parent node
nbndchgsnumber of bound changes

Definition at line 1667 of file reopt.c.

References assert(), getLastSavedNode(), NULL, SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, SCIP_Reopt::reopttree, SCIP_OKAY, SCIP_REOPTTYPE_NONE, SCIP_REOPTTYPE_TRANSIT, SCIPnodeGetDepth(), SCIPnodeGetNDomchg(), SCIPnodeGetParent(), SCIPnodeGetReoptID(), SCIPnodeGetReopttype(), SCIPnodeSetReoptID(), and SCIPnodeSetReopttype().

Referenced by addNode(), getLastSavedNode(), and shrinkNode().

◆ reoptAddChild()

SCIP_RETCODE reoptAddChild ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
unsigned int parentid,
unsigned int childid )
static

adds the id childid to the array of child nodes of parentid

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory
parentidid of the parent node
childidid of the child node

Definition at line 1729 of file reopt.c.

References SCIP_ReoptNode::allocchildmem, assert(), SCIP_ReoptNode::childids, SCIP_ReoptNode::nchilds, NULL, reoptAddChild(), reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_ReoptTree::reoptnodessize, SCIP_CALL, SCIP_OKAY, and SCIPsetDebugMsg.

Referenced by addNode(), moveChildrenUp(), reoptAddChild(), SCIPreoptApplyCompression(), and SCIPreoptSplitRoot().

◆ moveChildrenUp()

SCIP_RETCODE moveChildrenUp ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
unsigned int nodeid,
unsigned int parentid )
static

move all children to the next node (along the root path) stored in the reoptimization tree

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodeidid of the node
parentidid of the parent node

Definition at line 1762 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, moveChildrenUp(), SCIP_ReoptNode::nchilds, NULL, nvars, SCIP_ReoptNode::nvars, SCIP_ReoptNode::parentID, reoptAddChild(), reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_OKAY, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize.

Referenced by moveChildrenUp(), and shrinkNode().

◆ deleteChildrenBelow()

SCIP_RETCODE deleteChildrenBelow ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
unsigned int id,
SCIP_Bool delnodeitself,
SCIP_Bool exitsolve )
static

delete all nodes in the subtree induced by nodeID

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory
idid of the node
delnodeitselfshould the node be deleted after deleting the induced subtree?
exitsolvewill the solving process end after deletion

Definition at line 1822 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, deleteChildrenBelow(), SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, reopttreeDeleteNode(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPqueueInsertUInt(), SCIPsetDebugMsg, and TRUE.

Referenced by addNode(), deleteChildrenBelow(), dryBranch(), and reoptCheckLocalRestart().

◆ shrinkNode()

SCIP_RETCODE shrinkNode ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_NODE * node,
unsigned int id,
SCIP_Bool * shrank,
BMS_BLKMEM * blkmem )
static

replaces a reoptimization nodes by its stored child nodes

Parameters
reoptreoptimization data structure
setglobal SCIP settings
nodenode of the search tree
idid of the node
shrankpointer to store if the node was shrank
blkmemblock memory

Definition at line 1868 of file reopt.c.

References assert(), c, SCIP_ReoptNode::childids, getLastSavedNode(), moveChildrenUp(), SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeDeleteNode(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_NONE, SCIPnodeGetNumber(), SCIPnodeSetReopttype(), SCIPqueueInsertUInt(), SCIPsetDebugMsg, shrinkNode(), and TRUE.

Referenced by addNode(), and shrinkNode().

◆ changeReopttypeOfSubtree()

SCIP_RETCODE changeReopttypeOfSubtree ( SCIP_REOPTTREE * reopttree,
unsigned int id,
SCIP_REOPTTYPE reopttype )
static

change all reopttypes in the subtree induced by nodeID

Parameters
reopttreereopttree
idid of the node
reopttypereopttype

Definition at line 1946 of file reopt.c.

References assert(), changeReopttypeOfSubtree(), SCIP_ReoptNode::childids, SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptTree::reoptnodes, SCIP_ReoptNode::reopttype, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_INFSUBTREE, and SCIP_REOPTTYPE_STRBRANCHED.

Referenced by addNode(), and changeReopttypeOfSubtree().

◆ reoptnodeUpdateDualConss()

SCIP_RETCODE reoptnodeUpdateDualConss ( SCIP_REOPTNODE * reoptnode,
BMS_BLKMEM * blkmem )
static

delete the constraint handling dual information for the current iteration and replace it with the dual constraint for the next iteration

Parameters
reoptnodereoptimization node
blkmemblock memory

Definition at line 1992 of file reopt.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, SCIP_ReoptNode::dualredsnex, FALSE, NULL, reoptnodeUpdateDualConss(), SCIP_OKAY, SCIPdebugMessage, and TRUE.

Referenced by fixBounds(), reoptCheckLocalRestart(), reoptnodeUpdateDualConss(), SCIPreoptApply(), and SCIPreoptSplitRoot().

◆ reoptCheckLocalRestart()

SCIP_RETCODE reoptCheckLocalRestart ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
SCIP_VAR ** transvars,
int ntransvars,
SCIP_Bool * localrestart )
static

calculates a (local) similarity of a given node and returns if the subproblem should be solved from scratch

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
transvarstransformed variables
ntransvarsnumber of transformed variables
localrestartpointer to store if we want to restart solving the (sub)problem

Definition at line 2025 of file reopt.c.

References assert(), deleteChildrenBelow(), FALSE, SCIP_Reopt::nlocrestarts, SCIP_Reopt::ntotallocrestarts, NULL, reoptCheckLocalRestart(), SCIP_ReoptTree::reoptnodes, reoptnodeUpdateDualConss(), SCIP_Reopt::reopttree, SCIP_Reopt::run, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), SCIPreoptGetOldObjCoef(), SCIPsetDebugMsg, SCIPsetIsFeasLT(), SCIPsetIsLT(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetUbLocal(), and TRUE.

Referenced by reoptCheckLocalRestart(), and SCIPreoptCheckRestart().

◆ saveAncestorBranchings()

SCIP_RETCODE saveAncestorBranchings ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
SCIP_NODE * parent,
unsigned int id,
unsigned int parentid )
static

save ancestor branching information up to the next stored node

Parameters
reopttreereoptimization tree
setglobal SCIP settings
blkmemblock memory
nodenode of the branch and bound tree
parentparent node
idid of the node
parentidid of the parent node

Definition at line 2113 of file reopt.c.

References assert(), DEFAULT_MEM_VAR, NULL, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, saveAncestorBranchings(), SCIP_CALL, SCIP_OKAY, SCIPnodeGetAncestorBranchingsPart(), SCIPsetDebugMsg, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and SCIP_ReoptNode::varssize.

Referenced by addNode(), and saveAncestorBranchings().

◆ saveConsLinear()

SCIP_RETCODE saveConsLinear ( SCIP_REOPTCONSDATA * reoptconsdata,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_CONS * cons,
SCIP_Bool * success )
static

transform a constraint with linear representation into reoptimization constraint data

Parameters
reoptconsdatareoptimization constraint data
setglobal SCIP settings
blkmemblock memory
conslinear constraint that should be stored
successpointer to store the success

Definition at line 2182 of file reopt.c.

References assert(), BMSallocBlockMemoryArray, FALSE, NULL, REALABS, saveConsLinear(), SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIPconsGetHdlr(), SCIPconsGetNVars(), SCIPconshdlrGetName(), SCIPerrorMessage, SCIPgetLhsLinear(), SCIPgetRhsLinear(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPvarGetOrigvarSum(), TRUE, and vars.

Referenced by saveConsLinear(), and saveLocalConssData().

◆ saveConsBounddisjuction()

SCIP_RETCODE saveConsBounddisjuction ( SCIP_REOPTCONSDATA * reoptconsdata,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_CONS * cons,
SCIP_Bool * success )
static

transform a bounddisjunction constraint into reoptimization constraint data

Parameters
reoptconsdatareoptimization constraint data
setglobal SCIP settings
blkmemblock memory
consbounddisjuction constraint that should be stored
successpointer to store the success

Definition at line 2314 of file reopt.c.

References assert(), BMSduplicateBlockMemoryArray, FALSE, NULL, REALABS, saveConsBounddisjuction(), SCIP_ALLOC, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STRINGEQ, SCIP_UNKNOWN, SCIPconsGetHdlr(), SCIPconsGetNVars(), SCIPconshdlrGetName(), SCIPgetBoundsBounddisjunction(), SCIPgetBoundtypesBounddisjunction(), SCIPgetVarsBounddisjunction(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsZero(), SCIPvarGetOrigvarSum(), and vars.

Referenced by saveConsBounddisjuction(), and saveLocalConssData().

◆ saveLocalConssData()

SCIP_RETCODE saveLocalConssData ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
unsigned int id )
static

◆ collectDualInformation()

SCIP_RETCODE collectDualInformation ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
unsigned int id,
SCIP_REOPTTYPE reopttype )
static

collect all bound changes based on dual information

If the bound changes are global, all information are already stored because they were caught by the event handler. otherwise, we have to use SCIPnodeGetDualBoundchgs.

Afterwards, we check if the constraint will be added in the next iteration or after splitting the node.

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
idid of the node
reopttypereopttype

Definition at line 2468 of file reopt.c.

References assert(), BMSallocBlockMemory, BMSduplicateBlockMemoryArray, checkMemDualCons(), collectDualInformation(), SCIP_Reopt::currentnode, SCIP_Reopt::dualreds, SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, SCIP_ReoptNode::dualredsnex, FALSE, NULL, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_REOPTTYPE_STRBRANCHED, SCIPnodeGetDualBoundchgs(), SCIPnodeGetNDualBndchgs(), SCIPnodeGetNumber(), SCIPsetDebugMsg, SCIPsetInfinity(), SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), and TRUE.

Referenced by addNode(), and collectDualInformation().

◆ addNode()

SCIP_RETCODE addNode ( SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_LP * lp,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
SCIP_REOPTTYPE reopttype,
SCIP_Bool saveafterdual,
SCIP_Bool isrootnode,
SCIP_Real lowerbound )
static

adds a node of the branch and bound tree to the reoptimization tree

Parameters
reoptreoptimization data structure
setglobal SCIP settings
lpcurrent LP
blkmemblock memory
nodecurrent node
reopttypereason for storing the node
saveafterdualsave branching decisions after the first dual
isrootnodenode is the root node
lowerboundlower bound of the node

Definition at line 2594 of file reopt.c.

References addNode(), SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, SCIP_ReoptNode::allocchildmem, assert(), changeReopttypeOfSubtree(), SCIP_ReoptNode::childids, collectDualInformation(), createReoptnode(), SCIP_Reopt::currentnode, deleteChildrenBelow(), SCIP_Reopt::dualreds, SCIP_ReoptNode::dualreds, FALSE, getLastSavedNode(), SCIP_ReoptNode::lowerbound, SCIP_ReoptNode::nafterdualvars, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, SCIP_ReoptTree::ncutoffreoptnodes, SCIP_ReoptTree::nfeasnodes, SCIP_ReoptTree::nprunednodes, SCIP_ReoptTree::ntotalcutoffreoptnodes, SCIP_ReoptTree::ntotalfeasnodes, SCIP_ReoptTree::ntotalprunednodes, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, SCIP_ReoptNode::parentID, REALABS, reoptAddChild(), reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeCheckMemory(), SCIP_ReoptNode::reopttype, saveAfterDualBranchings(), saveAncestorBranchings(), saveLocalConssData(), SCIP_Reopt::savingtime, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_REOPTTYPE_FEASIBLE, SCIP_REOPTTYPE_INFSUBTREE, SCIP_REOPTTYPE_LEAF, SCIP_REOPTTYPE_LOGICORNODE, SCIP_REOPTTYPE_NONE, SCIP_REOPTTYPE_PRUNED, SCIP_REOPTTYPE_STRBRANCHED, SCIP_REOPTTYPE_TRANSIT, SCIPclockStart(), SCIPclockStop(), SCIPnodeGetDepth(), SCIPnodeGetNAddedConss(), SCIPnodeGetNumber(), SCIPnodeGetParent(), SCIPnodeGetReoptID(), SCIPnodeSetReoptID(), SCIPnodeSetReopttype(), SCIPqueueRemoveUInt(), SCIPreoptResetDualBndchgs(), SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPvarGetName(), shrinkNode(), storeCuts(), transformIntoOrig(), TRUE, updatePropagation(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.

Referenced by addNode(), SCIPreoptApply(), SCIPreoptCheckCutoff(), and SCIPreoptSaveOpenNodes().

◆ deleteLastDualBndchgs()

void deleteLastDualBndchgs ( SCIP_REOPT * reopt)
static

delete the stored information about dual bound changes of the last focused node

Parameters
reoptreoptimization data structure

Definition at line 3145 of file reopt.c.

References assert(), SCIP_Reopt::currentnode, deleteLastDualBndchgs(), SCIP_Reopt::dualreds, NULL, and SCIPdebugMessage.

Referenced by deleteLastDualBndchgs(), and SCIPreoptCheckCutoff().

◆ reoptnodeResetDualConss()

SCIP_RETCODE reoptnodeResetDualConss ( SCIP_REOPTNODE * reoptnode,
BMS_BLKMEM * blkmem )
static

delete the stored constraints that dual information at the given reoptimization node

Parameters
reoptnodereoptimization node
blkmemblock memory

Definition at line 3162 of file reopt.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, SCIP_ReoptNode::dualredsnex, FALSE, NULL, reoptnodeResetDualConss(), SCIP_OKAY, and SCIPdebugMessage.

Referenced by reoptnodeResetDualConss(), and SCIPreoptResetDualBndchgs().

◆ addGlobalCut()

SCIP_RETCODE addGlobalCut ( SCIP_REOPT * reopt,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_VAR ** vars,
SCIP_Real * vals,
SCIP_BOUNDTYPE * boundtypes,
int nvars,
int nbinvars,
int nintvars )
static

transform given set of variables, bounds and boundtypes into a global cut.

Note
: boundtypes can be NULL if all variables are binary or a MIP solution should be separated.
: continuous variables will be skiped if boundtypes is NULL
Parameters
reoptreoptimization data structure
blkmemblock memory
setglobal SCIP settings
varsvariables of the cut
valsvalues of the cut
boundtypesbounds of the cut
nvarsnumber of variables in the cut
nbinvarsnumber of binary variables
nintvarsnumber of integer variables

Definition at line 3212 of file reopt.c.

References addGlobalCut(), assert(), BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, checkMemGlbCons(), FALSE, SCIP_Reopt::glbconss, SCIP_Reopt::nglbconss, NULL, nvars, REOPT_CONSTYPE_CUT, SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsIntegral(), SCIPsetRound(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), SCIPvarIsOriginal(), and vars.

Referenced by addGlobalCut(), saveGlobalCons(), and separateSolution().

◆ saveGlobalCons()

SCIP_RETCODE saveGlobalCons ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
REOPT_CONSTYPE consttype )
static

generate a global constraint to separate an infeasible subtree

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
consttypereopttype of the constraint

Definition at line 3409 of file reopt.c.

References addGlobalCut(), assert(), SCIP_Reopt::glbconss, SCIP_Reopt::nglbconss, NULL, REOPT_CONSTYPE_INFSUBTREE, saveGlobalCons(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPnodeGetAncestorBranchings(), SCIPnodeGetDepth(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetReallocBufferArray, SCIPvarGetType(), SCIPvarIsImpliedIntegral(), and vars.

Referenced by saveGlobalCons(), and SCIPreoptAddInfNode().

◆ reoptMoveIDs()

SCIP_RETCODE reoptMoveIDs ( SCIP_REOPTTREE * reopttree,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
unsigned int id1,
unsigned int id2 )
static

move all id of child nodes from reoptimization node stored at id1 to the node stored at id2

Parameters
reopttreereopttree
setglobal SCIP settings
blkmemblock memory
id1source id
id2target id

Definition at line 3476 of file reopt.c.

References SCIP_ReoptNode::allocchildmem, assert(), c, SCIP_ReoptNode::childids, SCIP_ReoptNode::nchilds, NULL, reoptMoveIDs(), reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_CALL, SCIP_OKAY, and SCIPsetDebugMsg.

Referenced by reoptMoveIDs(), and SCIPreoptSplitRoot().

◆ changeAncestorBranchings()

SCIP_RETCODE changeAncestorBranchings ( SCIP_REOPT * reopt,
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_NODE * node,
unsigned int id,
SCIP_Bool afterdualbranching )
static

change all bound changes along the root path

Parameters
reoptreoptimization data structure
setglobal SCIP settings
statdynamic problem statistics
transprobtransformed problem
origproboriginal problem
treesearch tree
lpcurrent LP
branchcandbranching candidates
eventqueueevent queue
eventfilterglobal event filter
cliquetableclique table
blkmemblock memory
nodenode of the branch and bound tree
idid of stored node
afterdualbranchingconvert all bound changes made directly after the first bound changes based on dual information into normal branchings

Definition at line 3526 of file reopt.c.

References SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, SCIP_ReoptNode::afterdualvarssize, assert(), BMSfreeBlockMemoryArray, changeAncestorBranchings(), FALSE, SCIP_ReoptNode::nafterdualvars, NULL, nvars, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPnodeAddBoundchg(), SCIPsetDebugMsg, SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPvarAdjustLb(), SCIPvarAdjustUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsOriginal(), SCIPvarIsTransformed(), TRUE, var, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.

Referenced by changeAncestorBranchings(), and SCIPreoptApply().

◆ addSplitcons()

SCIP_RETCODE addSplitcons ( SCIP_REOPT * reopt,
SCIP * scip,
SCIP_SET * set,
SCIP_STAT * stat,
BMS_BLKMEM * blkmem,
SCIP_PROB * transprob,
SCIP_PROB * origprob,
SCIP_TREE * tree,
SCIP_LP * lp,
SCIP_BRANCHCAND * branchcand,
SCIP_EVENTQUEUE * eventqueue,
SCIP_EVENTFILTER * eventfilter,
SCIP_CLIQUETABLE * cliquetable,
SCIP_NODE * node,
unsigned int id )
static

add a constraint to ensure that at least one variable bound gets different

Parameters
reoptreoptimization data structure
scipSCIP data structure
setglobal SCIP settings
statdynamic problem statistics
blkmemblock memory
transprobtransformed problem
origproboriginal problem
treesearch tree
lpcurrent LP
branchcandbranching candidates
eventqueueevent queue
eventfilterglobal event filter
cliquetableclique table data structure
nodenode corresponding to the pruned part
idid of stored node

Definition at line 3701 of file reopt.c.

References addSplitcons(), assert(), SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, FALSE, NULL, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddConsNode(), SCIPallocBufferArray, SCIPcreateConsBounddisjunctionRedundant(), SCIPcreateConsLogicor(), SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPisEQ(), SCIPisGE(), SCIPisGT(), SCIPisLE(), SCIPisLT(), SCIPnodeAddBoundchg(), SCIPnodeGetNumber(), SCIPreleaseCons(), SCIPsetDebugMsg, SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsnprintf(), SCIPvarAdjustLb(), SCIPvarAdjustUb(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), SCIPvarIsNegated(), SCIPvarIsOriginal(), SCIPvarIsTransformed(), SCIPvarNegate(), TRUE, and var.

Referenced by addSplitcons(), and SCIPreoptApply().

◆ fixBounds()

SCIP_RETCODE fixBounds ( SCIP_REOPT * reopt,
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_NODE * node,
unsigned int id,
SCIP_Bool updatedualconss )
static

fix all bounds ad stored in dualredscur at the given node node_fix

Parameters
reoptreoptimization data structure
setglobal SCIP settings
statdynamic problem statistics
transprobtransformed problem
origproboriginal problem
treesearch tree
lpcurrent LP
branchcandbranching candidates
eventqueueevent queue
eventfilterglobal event filter
cliquetableclique table
blkmemblock memory
nodenode corresponding to the fixed part
idid of stored node
updatedualconssupdate constraint representing dual bound changes

Definition at line 3958 of file reopt.c.

References assert(), SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, FALSE, fixBounds(), NULL, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, reoptnodeUpdateDualConss(), SCIP_Reopt::reopttree, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPnodeAddBoundchg(), SCIPsetDebugMsg, SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPvarAdjustLb(), SCIPvarAdjustUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetOrigvarSum(), SCIPvarGetProbvarBound(), SCIPvarGetUbLocal(), SCIPvarIsOriginal(), SCIPvarIsTransformedOrigvar(), TRUE, var, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.

Referenced by fixBounds(), and SCIPreoptApply().

◆ fixInterdiction()

SCIP_RETCODE fixInterdiction ( SCIP_REOPT * reopt,
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_NODE * node,
unsigned int id,
int * perm,
SCIP_VAR ** vars,
SCIP_Real * vals,
SCIP_BOUNDTYPE * boundtypes,
int nvars,
int negbndchg )
static

fix all bounds corresponding to dual bound changes in a previous iteration in the fashion of interdiction branching; keep the first negbndchg-1 bound changes as stored in dualredscur and negate the negbndchg-th bound.

Parameters
reoptreoptimization data structure
setglobal SCIP settings
statdynamic problem statistics
transprobtransformed problem
origproboriginal problem
treesearch tree
lpcurrent LP
branchcandbranching candidates
eventqueueevent queue
eventfilterglobal event filter
cliquetableclique table
blkmemblock memory
nodechild node
idid of the node
permarray of permuted indices
varsvariables
valsbounds
boundtypesboundtypes
nvarsnumber of variables
negbndchgindex of the variable that should negated

Definition at line 4080 of file reopt.c.

References assert(), SCIP_ReoptNode::dualreds, FALSE, fixInterdiction(), MIN, NULL, nvars, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPnodeAddBoundchg(), SCIPsetDebugMsg, SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPvarAdjustLb(), SCIPvarAdjustUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), SCIPvarIsTransformedOrigvar(), var, and vars.

Referenced by fixInterdiction(), and SCIPreoptApply().

◆ addLocalConss()

SCIP_RETCODE addLocalConss ( SCIP * scip,
SCIP_REOPT * reopt,
SCIP_SET * set,
SCIP_STAT * stat,
BMS_BLKMEM * blkmem,
SCIP_NODE * node,
unsigned int id )
static

add all constraints stored at id to the given nodes node_fix and node_cons

Parameters
scipSCIP data structure
reoptreoptimization data structure
setglobal SCIP settings
statdynamic problem statistics
blkmemblock memory
nodenode of the branch and bound tree
idid of stored node

Definition at line 4192 of file reopt.c.

References addLocalConss(), assert(), c, SCIP_ReoptNode::conss, FALSE, SCIP_ReoptNode::nconss, NULL, REOPT_CONSTYPE_CUT, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddConsNode(), SCIPcreateConsBounddisjunctionRedundant(), SCIPcreateConsLinear(), SCIPdebugPrintCons, SCIPnodeGetNumber(), SCIPreleaseCons(), SCIPsetDebugMsg, SCIPsnprintf(), and TRUE.

Referenced by addLocalConss(), and SCIPreoptApply().

◆ resetStats()

void resetStats ( SCIP_REOPT * reopt)
static

reset the internal statistics at the beginning of a new iteration

Parameters
reoptreoptimization data structure

Definition at line 4262 of file reopt.c.

References assert(), SCIP_Reopt::currentnode, SCIP_Reopt::dualreds, SCIP_Reopt::lastbranched, SCIP_Reopt::lastseennode, SCIP_ReoptTree::ncutoffreoptnodes, SCIP_ReoptTree::nfeasnodes, SCIP_ReoptTree::ninfnodes, SCIP_ReoptTree::nprunednodes, NULL, SCIP_Reopt::reopttree, and resetStats().

Referenced by resetStats(), and SCIPreoptAddRun().

◆ dryBranch()

SCIP_RETCODE dryBranch ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_Bool * runagain,
unsigned int id )
static

check the stored bound changes of all child nodes for redundancy and infeasibility

Due to strongbranching initialization at node stored at id it can happen, that some bound changes stored in the child nodes of the reoptimization node stored at id become redundant or make the subproblem infeasible. in this method we remove all redundant bound changes and delete infeasible child nodes.

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
runagainpointer to store of this method should run again
idid of stored node

Definition at line 4287 of file reopt.c.

References assert(), c, SCIP_ReoptNode::childids, cutoff, deleteChildrenBelow(), dryBranch(), FALSE, SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::openids, reoptnodeCheckMemory(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeDeleteNode(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPqueueInsertUInt(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsetIsFeasEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetUbLocal(), TRUE, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.

Referenced by dryBranch(), and SCIPreoptGetChildIDs().

◆ reopttreeGetNNodes()

int reopttreeGetNNodes ( SCIP_REOPTTREE * reopttree,
unsigned int id )
static

return the number of all nodes in the subtree induced by the reoptimization node stored at id

Parameters
reopttreereopttree
idid of stored node

Definition at line 4502 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, i, SCIP_ReoptNode::nchilds, nnodes, NULL, SCIP_ReoptTree::reoptnodes, and reopttreeGetNNodes().

Referenced by reopttreeGetNNodes(), and SCIPreoptGetNNodes().

◆ reoptGetNLeaves()

int reoptGetNLeaves ( SCIP_REOPT * reopt,
unsigned int id )
static

returns the number of leaf nodes of the induced subtree

Parameters
reoptreoptimization data structure
idid of stored node

Definition at line 4520 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, i, SCIP_ReoptNode::nchilds, NULL, reoptGetNLeaves(), SCIP_ReoptTree::reoptnodes, and SCIP_Reopt::reopttree.

Referenced by reoptGetNLeaves(), and SCIPreoptGetNLeaves().

◆ reoptGetLeaves()

SCIP_RETCODE reoptGetLeaves ( SCIP_REOPT * reopt,
unsigned int id,
unsigned int * leaves,
int leavessize,
int * nleaves )
static

returns all leaves of the subtree induced by the node stored at id

Parameters
reoptreoptimization data structure
idid of stored node
leavesarray of leave nodes
leavessizesize of leaves array
nleavespointer to store the number of leave nodes

Definition at line 4550 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, i, SCIP_ReoptNode::nchilds, NULL, reoptGetLeaves(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, and SCIP_OKAY.

Referenced by reoptGetLeaves(), and SCIPreoptGetLeaves().

◆ reoptResetTree()

SCIP_RETCODE reoptResetTree ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_Bool softreset )
static

after restarting the reoptimization and an after compressing the search tree we have to delete all stored information

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
softresetmark the nodes to overwriteable (TRUE) or delete them completely (FALSE)

Definition at line 4594 of file reopt.c.

References assert(), clearReoptnodes(), SCIP_Reopt::currentnode, SCIP_Reopt::dualreds, SCIP_ReoptTree::nreoptnodes, NULL, reoptResetTree(), SCIP_Reopt::reopttree, SCIP_Bool, SCIP_CALL, and SCIP_OKAY.

Referenced by reoptResetTree(), reoptRestart(), and SCIPreoptApplyCompression().

◆ reoptRestart()

SCIP_RETCODE reoptRestart ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem )
static

restart the reoptimization by removing all stored information about nodes and increase the number of restarts

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory

Definition at line 4620 of file reopt.c.

References assert(), createReoptnode(), FALSE, SCIP_Reopt::firstrestart, SCIP_Reopt::lastrestart, SCIP_Reopt::nglbrestarts, SCIP_ReoptTree::nreoptnodes, NULL, reoptResetTree(), reoptRestart(), SCIP_Reopt::reopttree, SCIP_Reopt::run, SCIP_CALL, and SCIP_OKAY.

Referenced by reoptRestart(), and SCIPreoptCheckRestart().

◆ reoptSaveNewObj()

SCIP_RETCODE reoptSaveNewObj ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_VAR ** origvars,
int norigvars )
static

◆ getInferenceOrder()

SCIP_RETCODE getInferenceOrder ( SCIP_SET * set,
SCIP_STAT * stat,
int * perm,
SCIP_VAR ** vars,
SCIP_Real * bounds,
SCIP_BOUNDTYPE * boundtypes,
int nvars )
static

orders the variable by inference score

Parameters
setglobal SCIP settings
statdynamic problem statistics
permarray of indices that need to be permuted
varsvariable array to permute
boundsbound array to permute in the same order
boundtypesboundtype array to permute in the same order
nvarsnumber of variables

Definition at line 4737 of file reopt.c.

References assert(), getInferenceOrder(), NULL, nvars, SCIP_BOUNDTYPE_UPPER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsortDownRealInt(), SCIPvarGetAvgInferences(), and vars.

Referenced by getInferenceOrder(), SCIPreoptApply(), and SCIPreoptSplitRoot().

◆ separateSolution()

SCIP_RETCODE separateSolution ( SCIP_REOPT * reopt,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_SOL * sol,
SCIP_VAR ** vars,
int nvars )
static

create a global constraint to separate the given solution

Parameters
reoptreoptimization data structure
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
solsolution to separate
varsarray of original problem variables
nvarsnumber of original problem variables

Definition at line 4784 of file reopt.c.

References addGlobalCut(), assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), SCIPvarIsOriginal(), separateSolution(), sol, vars, and w.

Referenced by SCIPreoptAddOptSol(), and separateSolution().

◆ SCIPreoptGetNRestartsGlobal()

int SCIPreoptGetNRestartsGlobal ( SCIP_REOPT * reopt)

returns the number of global restarts

Parameters
reoptreoptimization data structure

Definition at line 4878 of file reopt.c.

References assert(), SCIP_Reopt::nglbrestarts, NULL, and SCIPreoptGetNRestartsGlobal().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNRestartsGlobal().

◆ SCIPreoptGetNRestartsLocal()

int SCIPreoptGetNRestartsLocal ( SCIP_REOPT * reopt)

returns the number of local restarts in the current run

Parameters
reoptreoptimization data structure

Definition at line 4888 of file reopt.c.

References assert(), SCIP_Reopt::nlocrestarts, NULL, and SCIPreoptGetNRestartsLocal().

Referenced by SCIPreoptGetNRestartsLocal().

◆ SCIPreoptGetNTotalRestartsLocal()

int SCIPreoptGetNTotalRestartsLocal ( SCIP_REOPT * reopt)

returns the number of local restarts over all runs

Parameters
reoptreoptimization data structure

Definition at line 4898 of file reopt.c.

References assert(), SCIP_Reopt::ntotallocrestarts, NULL, and SCIPreoptGetNTotalRestartsLocal().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNTotalRestartsLocal().

◆ SCIPreoptGetFirstRestarts()

int SCIPreoptGetFirstRestarts ( SCIP_REOPT * reopt)

returns the number of iteration with the first global restarts

Parameters
reoptreoptimization data structure

Definition at line 4908 of file reopt.c.

References assert(), SCIP_Reopt::firstrestart, NULL, and SCIPreoptGetFirstRestarts().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetFirstRestarts().

◆ SCIPreoptGetLastRestarts()

int SCIPreoptGetLastRestarts ( SCIP_REOPT * reopt)

returns the number of iteration with the last global restarts

Parameters
reoptreoptimization data structure

Definition at line 4918 of file reopt.c.

References assert(), SCIP_Reopt::lastrestart, NULL, and SCIPreoptGetLastRestarts().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetLastRestarts().

◆ SCIPreoptGetNFeasNodes()

int SCIPreoptGetNFeasNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes providing an improving feasible LP solution in the current run

returns the number of nodes providing an improving feasible LP solution in the current run

Parameters
reoptreoptimization data structure

Definition at line 4928 of file reopt.c.

References assert(), SCIP_ReoptTree::nfeasnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNFeasNodes().

Referenced by SCIPreoptGetNFeasNodes().

◆ SCIPreoptGetNTotalFeasNodes()

int SCIPreoptGetNTotalFeasNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes providing an improving feasible LP solution over all runs

returns the number of nodes providing an improving feasible LP solution over all runs

Parameters
reoptreoptimization data structure

Definition at line 4938 of file reopt.c.

References assert(), SCIP_ReoptTree::ntotalfeasnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNTotalFeasNodes().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNTotalFeasNodes().

◆ SCIPreoptGetNPrunedNodes()

int SCIPreoptGetNPrunedNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes that exceeded the cutoff bound in the current run

returns the number of nodes that exceeded the cutoff bound in the current run

Parameters
reoptreoptimization data structure

Definition at line 4948 of file reopt.c.

References assert(), SCIP_ReoptTree::nprunednodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNPrunedNodes().

Referenced by SCIPreoptGetNPrunedNodes().

◆ SCIPreoptGetNTotalPrunedNodes()

int SCIPreoptGetNTotalPrunedNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes that exceeded the cutoff bound over all runs

returns the number of nodes that exceeded the cutoff bound over all runs

Parameters
reoptreoptimization data structure

Definition at line 4958 of file reopt.c.

References assert(), SCIP_ReoptTree::ntotalprunednodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNTotalPrunedNodes().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNTotalPrunedNodes().

◆ SCIPreoptGetNCutoffReoptnodes()

int SCIPreoptGetNCutoffReoptnodes ( SCIP_REOPT * reopt)

rerturns the number of reoptimized nodes that were cutoff in the same iteration in the current run

returns the number of reoptimized nodes that were cut off in the current run

Parameters
reoptreoptimization data structure

Definition at line 4968 of file reopt.c.

References assert(), SCIP_ReoptTree::ncutoffreoptnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNCutoffReoptnodes().

Referenced by SCIPreoptGetNCutoffReoptnodes().

◆ SCIPreoptGetNTotalCutoffReoptnodes()

int SCIPreoptGetNTotalCutoffReoptnodes ( SCIP_REOPT * reopt)

rerturns the number of reoptimized nodes that were cutoff in the same iteration over all runs

returns the number of reoptimized nodes that were cut off over all runs

Parameters
reoptreoptimization data structure

Definition at line 4978 of file reopt.c.

References assert(), SCIP_ReoptTree::ntotalcutoffreoptnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNTotalCutoffReoptnodes().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNTotalCutoffReoptnodes().

◆ SCIPreoptGetNInfNodes()

int SCIPreoptGetNInfNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes with an infeasible LP in the current run

Parameters
reoptreoptimization data structure

Definition at line 4988 of file reopt.c.

References assert(), SCIP_ReoptTree::ninfnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNInfNodes().

Referenced by SCIPreoptGetNInfNodes().

◆ SCIPreoptGetNTotalInfNodes()

int SCIPreoptGetNTotalInfNodes ( SCIP_REOPT * reopt)

returns the number of stored nodes with an infeasible LP over all runs

Parameters
reoptreoptimization data structure

Definition at line 4998 of file reopt.c.

References assert(), SCIP_ReoptTree::ntotalinfnodes, NULL, SCIP_Reopt::reopttree, and SCIPreoptGetNTotalInfNodes().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetNTotalInfNodes().

◆ SCIPreoptCreate()

SCIP_RETCODE SCIPreoptCreate ( SCIP_REOPT ** reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem )

constructor for the reoptimization data

creates reopt data

Parameters
reoptpointer to reoptimization data structure
setglobal SCIP settings
blkmemblock memory

Definition at line 5008 of file reopt.c.

References assert(), BMSallocBlockMemoryArray, BMSallocMemory, BMSallocMemoryArray, createReopttree(), createSolTree(), DEFAULT_MEM_RUN, DEFAULT_RANDSEED, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, i, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, SCIPclockCreate(), SCIPeventhdlrCreate(), SCIPrandomCreate(), SCIPreoptCreate(), SCIPsetIncludeEventhdlr(), and SCIPsetInitializeRandomSeed().

Referenced by SCIPenableReoptimization(), and SCIPreoptCreate().

◆ SCIPreoptReleaseData()

SCIP_RETCODE SCIPreoptReleaseData ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem )
Parameters
reoptpointer to reoptimization data structure
setglobal SCIP settings
blkmemblock memory

Definition at line 5089 of file reopt.c.

References SCIP_Reopt::addedconss, SCIP_Reopt::addedconsssize, assert(), BMSfreeBlockMemoryArray, c, cleanActiveConss(), SCIP_Reopt::naddedconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsRelease(), and SCIPreoptReleaseData().

Referenced by SCIPfreeTransform(), and SCIPreoptReleaseData().

◆ SCIPreoptFree()

SCIP_RETCODE SCIPreoptFree ( SCIP_REOPT ** reopt,
SCIP_SET * set,
SCIP_PRIMAL * origprimal,
BMS_BLKMEM * blkmem )

frees reoptimization data

frees reopt data

Parameters
reoptreoptimization data structure
setglobal SCIP settings
origprimaloriginal primal
blkmemblock memory

Definition at line 5116 of file reopt.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemory, BMSfreeMemoryArray, c, freeReoptTree(), freeSolTree(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, SCIPclockFree(), SCIPgetNOrigVars(), SCIPhashmapFree(), SCIPhashsetFree(), SCIPhistoryFree(), SCIPrandomFree(), SCIPreoptFree(), and SCIPsolFree().

Referenced by SCIPenableReoptimization(), SCIPfreeProb(), and SCIPreoptFree().

◆ SCIPreoptGetNAddedConss()

int SCIPreoptGetNAddedConss ( SCIP_REOPT * reopt,
SCIP_NODE * node )

returns the number of constraints added by the reoptimization plug-in

Parameters
reoptreoptimization data structure
nodenode of the search tree

Definition at line 5242 of file reopt.c.

References assert(), MAX, SCIP_ReoptNode::nconss, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetNAddedConss(), SCIPnodeGetReoptID(), and SCIPreoptGetNAddedConss().

Referenced by SCIPreoptCheckCutoff(), and SCIPreoptGetNAddedConss().

◆ 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
reoptreoptimization data
setglobal SCIP settings
statdynamic problem statistics
origprimaloriginal primal
blkmemblock memory
solsolution to add
bestsolis the current solution an optimal solution?
addedpointer to store the information if the soltion was added
varsvariable array
nvarsnumber of variables
runnumber of the current run (1,2,...)

Definition at line 5266 of file reopt.c.

References assert(), ensureSolsSize(), SCIP_Reopt::noptsolsbyreoptsol, SCIP_SolTree::nsols, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), SCIPreoptAddSol(), SCIPsolGetHeur(), sol, SCIP_SolTree::sols, SCIP_Reopt::soltree, soltreeAddSol(), and vars.

Referenced by SCIPreoptAddSol(), and 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 )

we want to store the optimal solution of each run in a separate array

add optimal solution

Parameters
reoptreoptimization data structure
solsolution to add
blkmemblock memory
setglobal SCIP settings
statdynamic problem statistics
origprimaloriginal primal
varsoriginal problem variables
nvarsnumber of original problem variables

Definition at line 5319 of file reopt.c.

References assert(), NULL, nvars, SCIP_Reopt::prevbestsols, SCIP_Reopt::run, SCIP_CALL, SCIP_OKAY, SCIPreoptAddOptSol(), SCIPsolCopy(), separateSolution(), sol, and vars.

Referenced by SCIPreoptAddOptSol(), and SCIPsolve().

◆ SCIPreoptAddRun()

SCIP_RETCODE SCIPreoptAddRun ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_VAR ** origvars,
int norigvars,
int size )

add a new iteration after changing the objective function

add a run

Parameters
reoptreoptimization data sturcture
setglobal SCIP settings
blkmemblock memory
origvarsoriginal problem variables
norigvarsnumber of original variables
sizenumber of expected solutions

Definition at line 5353 of file reopt.c.

References assert(), BMSallocBlockMemoryArray, ensureRunSize(), FALSE, NULL, SCIP_Reopt::objhaschanged, reoptSaveNewObj(), resetStats(), SCIP_Reopt::run, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPreoptAddRun(), SCIP_SolTree::sols, SCIP_SolTree::solssize, and SCIP_Reopt::soltree.

Referenced by prepareReoptimization(), and SCIPreoptAddRun().

◆ SCIPreoptGetNCheckedSols()

int SCIPreoptGetNCheckedSols ( SCIP_REOPT * reopt)

get the number of checked solutions during the reoptimization process

Parameters
reoptreoptimization data structure

Definition at line 5389 of file reopt.c.

References assert(), SCIP_Reopt::ncheckedsols, NULL, and SCIPreoptGetNCheckedSols().

Referenced by SCIPreoptGetNCheckedSols().

◆ SCIPreoptAddNCheckedSols()

void SCIPreoptAddNCheckedSols ( SCIP_REOPT * reopt,
int ncheckedsols )

update the number of checked solutions during the reoptimization process

Parameters
reoptreoptimization data structure
ncheckedsolsnumber of updated solutions

Definition at line 5399 of file reopt.c.

References assert(), SCIP_Reopt::ncheckedsols, NULL, and SCIPreoptAddNCheckedSols().

Referenced by SCIPreoptAddNCheckedSols().

◆ SCIPreoptGetNImprovingSols()

int SCIPreoptGetNImprovingSols ( SCIP_REOPT * reopt)

get the number of checked solutions during the reoptimization process

Parameters
reoptreoptimization data structure

Definition at line 5410 of file reopt.c.

References assert(), SCIP_Reopt::nimprovingsols, NULL, and SCIPreoptGetNImprovingSols().

Referenced by SCIPreoptGetNImprovingSols().

◆ SCIPreoptAddNImprovingSols()

void SCIPreoptAddNImprovingSols ( SCIP_REOPT * reopt,
int nimprovingsols )

update the number of checked solutions during the reoptimization process

Parameters
reoptreoptimization data structure
nimprovingsolsnumber of improving solutions

Definition at line 5420 of file reopt.c.

References assert(), SCIP_Reopt::nimprovingsols, NULL, and SCIPreoptAddNImprovingSols().

Referenced by SCIPreoptAddNImprovingSols().

◆ SCIPreoptGetNSolsRun()

int SCIPreoptGetNSolsRun ( SCIP_REOPT * reopt,
int run )

returns number of solutions stored in the solution tree of a given run

Parameters
reoptreoptimization data structure
runnumber of the run (1,2,..)

Definition at line 5431 of file reopt.c.

References assert(), SCIP_SolTree::nsols, NULL, SCIPreoptGetNSolsRun(), SCIP_SolTree::sols, and SCIP_Reopt::soltree.

Referenced by SCIPreoptGetNSolsRun().

◆ SCIPreoptGetNSols()

int SCIPreoptGetNSols ( SCIP_REOPT * reopt)

returns number of all solutions of all runs

Parameters
reoptreoptimization data structure

Definition at line 5446 of file reopt.c.

References assert(), SCIP_SolTree::nsols, NULL, r, SCIP_Reopt::run, SCIPreoptGetNSols(), and SCIP_Reopt::soltree.

Referenced by SCIPreoptGetNSols().

◆ 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
reoptreoptimization data structure
runnumber of the run (1,2,...)
solsarray of solutions to fill
solssizelength of the array
nsolspointer to store the number of added solutions

Definition at line 5461 of file reopt.c.

References assert(), SCIP_SolTree::nsols, NULL, SCIP_OKAY, SCIPreoptGetSolsRun(), SCIP_SolNode::sol, SCIP_SolTree::sols, SCIP_Reopt::soltree, TRUE, and SCIP_SolNode::updated.

Referenced by SCIPgetReoptSolsRun(), and SCIPreoptGetSolsRun().

◆ SCIPreoptGetNSavedSols()

int SCIPreoptGetNSavedSols ( SCIP_REOPT * reopt)

returns the number of saved solutions overall runs

Parameters
reoptreoptimization data structure

Definition at line 5501 of file reopt.c.

References assert(), SCIP_SolNode::child, NULL, SCIP_SolTree::root, SCIPreoptGetNSavedSols(), SCIP_Reopt::soltree, and soltreeNInducedSols().

Referenced by SCIPreoptGetNSavedSols().

◆ 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

  1. the objective function has changed too much
  2. the number of stored nodes is exceeded
  3. 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.

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

  1. the objective function has changed too much, or
  2. the number of stored nodes is exceeded, or
  3. 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.

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodecurrent node of the branch and bound tree (or NULL)
transvarstransformed problem variables
ntransvarsnumber of transformed problem variables
restartpointer to store if the reoptimization process should be restarted

Definition at line 5528 of file reopt.c.

References assert(), FALSE, SCIP_Reopt::lastrestart, MAX, SCIP_Reopt::noptsolsbyreoptsol, SCIP_ReoptTree::nreoptnodes, NULL, reoptCheckLocalRestart(), reoptRestart(), reoptSimilarity(), SCIP_Reopt::reopttree, SCIP_Reopt::run, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_Real, SCIPreoptCheckRestart(), SCIPsetDebugMsg, SCIPsetIsFeasLT(), and TRUE.

Referenced by prepareReoptimization(), SCIPcheckReoptRestart(), and SCIPreoptCheckRestart().

◆ SCIPreoptGetSimToPrevious()

SCIP_Real SCIPreoptGetSimToPrevious ( SCIP_REOPT * reopt)

returns the similarity to the previous objective function, if no exist return -2.0

returns the similarity to the previous objective function

Parameters
reoptreoptimization data structure

Definition at line 5597 of file reopt.c.

References assert(), NULL, SCIP_Real, SCIPreoptGetSimToPrevious(), and SCIP_Reopt::simtolastobj.

Referenced by SCIPgetReoptSimilarity(), and SCIPreoptGetSimToPrevious().

◆ SCIPreoptGetSimToFirst()

SCIP_Real SCIPreoptGetSimToFirst ( SCIP_REOPT * reopt)

returns the similarity to the first objective different to the zero-function function, if no exist return -2.0

returns the similarity to the first objective functions

Parameters
reoptreoptimization data structure

Definition at line 5606 of file reopt.c.

References assert(), NULL, SCIP_Real, SCIPreoptGetSimToFirst(), and SCIP_Reopt::simtofirstobj.

Referenced by SCIPreoptGetSimToFirst().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
run1number of the first run
run2number of the second run
origvarsoriginal problem variables
norigvarsnumber of original problem variables

Definition at line 5615 of file reopt.c.

References assert(), NULL, reoptSimilarity(), SCIP_Real, and SCIPreoptGetSimilarity().

Referenced by SCIPgetReoptSimilarity(), and SCIPreoptGetSimilarity().

◆ SCIPreoptGetLastBestSol()

SCIP_SOL * SCIPreoptGetLastBestSol ( SCIP_REOPT * reopt)

returns the best solution of the last run

Parameters
reoptreoptimization data structure

Definition at line 5634 of file reopt.c.

References assert(), NULL, SCIP_Reopt::prevbestsols, SCIP_Reopt::run, and SCIPreoptGetLastBestSol().

Referenced by SCIPgetReoptLastOptSol(), and SCIPreoptGetLastBestSol().

◆ SCIPreoptGetReoptnode()

SCIP_REOPTNODE * SCIPreoptGetReoptnode ( SCIP_REOPT * reopt,
unsigned int id )

returns the node of the reoptimization tree corresponding to the unique id

Parameters
reoptreoptimization data structure
idunique id

Definition at line 5648 of file reopt.c.

References assert(), NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, and SCIPreoptGetReoptnode().

Referenced by SCIPgetReoptnode(), and SCIPreoptGetReoptnode().

◆ SCIPreoptGetOldObjCoef()

SCIP_Real SCIPreoptGetOldObjCoef ( SCIP_REOPT * reopt,
int run,
int idx )

returns the coefficient of variable with index idx in run run

returns the coefficent of variable with index idx in run run

Parameters
reoptreoptimization data structure
runnumber of the run (1,2,...)
idxindex of original variable

Definition at line 5662 of file reopt.c.

References assert(), NULL, SCIP_Reopt::objs, SCIP_Real, and SCIPreoptGetOldObjCoef().

Referenced by reoptCheckLocalRestart(), SCIPgetReoptOldObjCoef(), and SCIPreoptGetOldObjCoef().

◆ 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
reoptreoptimization data structure
runnumber of the run (1,2,...)

Definition at line 5678 of file reopt.c.

References assert(), NULL, SCIP_Reopt::prevbestsols, and SCIPreoptGetBestSolRun().

Referenced by SCIPreoptGetBestSolRun().

◆ SCIPreoptReset()

SCIP_RETCODE SCIPreoptReset ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem )

reset solving specific parameters

reset solving specific paramters

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory

Definition at line 5690 of file reopt.c.

References SCIP_Reopt::addedconss, assert(), c, SCIP_Reopt::consadded, FALSE, SCIP_Reopt::naddedconss, NULL, SCIP_Reopt::objhaschanged, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconsRelease(), SCIPreoptReset(), and SCIPsetDebugMsg.

Referenced by freeReoptSolve(), freeTransform(), and SCIPreoptReset().

◆ SCIPreoptResetSolMarks()

void SCIPreoptResetSolMarks ( SCIP_REOPT * reopt)

reset marks of stored solutions to not updated

Parameters
reoptreoptimization data structure

Definition at line 5724 of file reopt.c.

References assert(), SCIP_SolNode::child, NULL, SCIP_SolTree::root, SCIPreoptResetSolMarks(), SCIP_SolNode::sibling, SCIP_Reopt::soltree, and soltreeResetMarks().

Referenced by SCIPreoptResetSolMarks(), and SCIPresetReoptSolMarks().

◆ SCIPreoptGetNNodes()

int SCIPreoptGetNNodes ( SCIP_REOPT * reopt,
SCIP_NODE * node )

returns the number of stored nodes in the subtree induced by node

returns the number of stored nodes

Parameters
reoptreoptimization data structure
nodenode of the search tree

Definition at line 5745 of file reopt.c.

References assert(), SCIP_ReoptTree::nreoptnodes, NULL, SCIP_Reopt::reopttree, reopttreeGetNNodes(), SCIPnodeGetDepth(), SCIPnodeGetReoptID(), and SCIPreoptGetNNodes().

Referenced by compressReoptTree(), SCIPgetNReoptnodes(), and SCIPreoptGetNNodes().

◆ SCIPreoptnodeGetNVars()

int SCIPreoptnodeGetNVars ( SCIP_REOPTNODE * reoptnode)

In debug mode, the following methods are implemented as function calls to ensure type validity. In optimized mode, the methods are implemented as defines to improve performance. However, we want to have them in the library anyways, so we have to undef the defines. returns the number of bound changes stored in the reopttree at ID id

returns the number of bound changes stored in the reoptnode

Parameters
reoptnodenode of the reopttree

Definition at line 5785 of file reopt.c.

References assert(), SCIP_ReoptNode::nafterdualvars, NULL, SCIP_ReoptNode::nvars, and SCIPreoptnodeGetNVars().

Referenced by constructCompression(), constructCompression(), and SCIPreoptnodeGetNVars().

◆ SCIPreoptnodeGetNConss()

int SCIPreoptnodeGetNConss ( SCIP_REOPTNODE * reoptnode)

returns the number of bound changes at the node stored at ID id

Parameters
reoptnodenode of the reoptimization tree

Definition at line 5795 of file reopt.c.

References assert(), SCIP_ReoptNode::nconss, NULL, and SCIPreoptnodeGetNConss().

Referenced by constructCompression(), and SCIPreoptnodeGetNConss().

◆ SCIPreoptnodeGetNDualBoundChgs()

int SCIPreoptnodeGetNDualBoundChgs ( SCIP_REOPTNODE * reoptnode)

returns the number of stored bound changes based on dual information in the reopttree at ID id

Parameters
reoptnodenode of the reoptimization tree

Definition at line 5805 of file reopt.c.

References assert(), SCIP_ReoptNode::dualredscur, NULL, and SCIPreoptnodeGetNDualBoundChgs().

Referenced by SCIPreoptnodeGetNDualBoundChgs().

◆ SCIPreoptnodeGetNChildren()

int SCIPreoptnodeGetNChildren ( SCIP_REOPTNODE * reoptnode)

returns the number of child nodes of reoptnode

Parameters
reoptnodenode of the reoptimization tree

Definition at line 5818 of file reopt.c.

References assert(), SCIP_ReoptNode::nchilds, NULL, and SCIPreoptnodeGetNChildren().

Referenced by Exec(), SCIPreoptimizeNode(), and SCIPreoptnodeGetNChildren().

◆ SCIPreoptnodeGetLowerbound()

SCIP_Real SCIPreoptnodeGetLowerbound ( SCIP_REOPTNODE * reoptnode)

return the lower bound stored at ID id

Parameters
reoptnodenode of the reoptimization tree

Definition at line 5828 of file reopt.c.

References assert(), SCIP_ReoptNode::lowerbound, NULL, SCIP_Real, and SCIPreoptnodeGetLowerbound().

Referenced by constructCompression(), constructCompression(), SCIPreoptnodeGetLowerbound(), and sortIDs().

◆ SCIPreoptnodeGetType()

SCIP_REOPTTYPE SCIPreoptnodeGetType ( SCIP_REOPTNODE * reoptnode)

returns the type of the reoptnode

Parameters
reoptnodenode of the reoptimization tree

Definition at line 5838 of file reopt.c.

References assert(), NULL, SCIP_ReoptNode::reopttype, and SCIPreoptnodeGetType().

Referenced by Exec(), and SCIPreoptnodeGetType().

◆ SCIPreoptnodeGetConss()

void SCIPreoptnodeGetConss ( SCIP_REOPTNODE * reoptnode,
SCIP_VAR *** vars,
SCIP_Real ** bounds,
SCIP_BOUNDTYPE ** boundtypes,
int mem,
int * nconss,
int * nvars )

returns all added constraints at ID id

Parameters
reoptnodenode of the reoptimization tree
vars2-dim array of variables
bounds2-dim array of bounds
boundtypes2-dim array of boundtypes
memallocated memory for constraints
nconsspointer to store the number of constraints
nvarspointer to store the number of variables

Definition at line 5848 of file reopt.c.

References assert(), c, SCIP_ReoptNode::conss, SCIP_ReoptNode::nconss, NULL, nvars, SCIP_Real, SCIPreoptnodeGetConss(), and vars.

Referenced by constructCompression(), and SCIPreoptnodeGetConss().

◆ SCIPreoptnodeSetParentID()

void SCIPreoptnodeSetParentID ( SCIP_REOPTNODE * reoptnode,
unsigned int parentid )

set the parent id

Parameters
reoptnodenode of the reopttree
parentidid of the parent node

Definition at line 5883 of file reopt.c.

References assert(), NULL, SCIP_ReoptNode::parentID, and SCIPreoptnodeSetParentID().

Referenced by applyCompression(), applyCompression(), and SCIPreoptnodeSetParentID().

◆ 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
reoptreoptimization data structure
nodenode of the search tree (or NULL)

Definition at line 5895 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, i, SCIP_ReoptNode::nchilds, NULL, reoptGetNLeaves(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), and SCIPreoptGetNLeaves().

Referenced by SCIPcomprExec(), SCIPgetNReoptLeaves(), and SCIPreoptGetNLeaves().

◆ SCIPreoptAddInfNode()

SCIP_RETCODE SCIPreoptAddInfNode ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_NODE * node )

save information that given node is infeasible

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree

Definition at line 5929 of file reopt.c.

References assert(), SCIP_ReoptTree::ninfnodes, SCIP_ReoptTree::ntotalinfnodes, NULL, REOPT_CONSTYPE_CUT, SCIP_Reopt::reopttree, saveGlobalCons(), SCIP_CALL, SCIP_OKAY, and SCIPreoptAddInfNode().

Referenced by SCIPreoptAddInfNode(), and 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
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
eventtypeeventtype
lpLP data
lpsolstatsolution status of the LP
isrootnodethe node is the root
isfocusnodethe node is the current focus node
lowerboundlower bound of the node
effectiverootdeptheffective root depth

Definition at line 5953 of file reopt.c.

References addNode(), assert(), SCIP_Reopt::currentnode, deleteLastDualBndchgs(), SCIP_Reopt::dualreds, FALSE, SCIP_Reopt::lastbranched, SCIP_Reopt::lastseennode, lpsolstat, 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(), SCIPreoptCheckCutoff(), SCIPreoptGetNAddedConss(), SCIPreoptGetNDualBndchgs(), SCIPreoptResetDualBndchgs(), SCIPsetDebugMsg, and TRUE.

Referenced by SCIPnodeCutoff(), SCIPnodeFocus(), SCIPnodepqBound(), SCIPreoptCheckCutoff(), 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
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
varvariable
newvalnew bound
oldvalold bound

Definition at line 6221 of file reopt.c.

References assert(), 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(), SCIPreoptAddDualBndchg(), SCIPsetDebugMsg, SCIPsetFindBranchrule(), SCIPsetGetIntParam(), SCIPsetIsEQ(), SCIPsetIsLT(), SCIPvarGetName(), SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), and var.

Referenced by SCIPaddReoptDualBndchg(), SCIPreoptAddDualBndchg(), and SCIPreoptCheckCutoff().

◆ SCIPreoptGetNDualBndchgs()

int SCIPreoptGetNDualBndchgs ( SCIP_REOPT * reopt,
SCIP_NODE * node )

returns the number of bound changes based on dual information

Parameters
reoptreoptimization data structure
nodenode of the search tree

Definition at line 6311 of file reopt.c.

References assert(), SCIP_Reopt::currentnode, SCIP_Reopt::dualreds, NULL, SCIPnodeGetNumber(), and SCIPreoptGetNDualBndchgs().

Referenced by SCIPreoptCheckCutoff(), and SCIPreoptGetNDualBndchgs().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
nodenode of the search tree
childsarray to store the child ids
childssizesize of the childs array
nchildspointer to store the number of child nodes

Definition at line 6331 of file reopt.c.

References assert(), c, SCIP_ReoptNode::childids, dryBranch(), SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), SCIPreoptGetChildIDs(), and TRUE.

Referenced by SCIPgetReoptChildIDs(), and SCIPreoptGetChildIDs().

◆ 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
reoptreoptimization data
nodenode of the search tree
leavesarray to the the ids
leavessizesize of leaves array
nleavespointer to store the number of leave node

Definition at line 6384 of file reopt.c.

References assert(), SCIP_ReoptNode::childids, i, SCIP_ReoptNode::nchilds, NULL, reoptGetLeaves(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_OKAY, SCIPnodeGetReoptID(), and SCIPreoptGetLeaves().

Referenced by SCIPgetReoptLeaveIDs(), and SCIPreoptGetLeaves().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
lpcurrent LP
blkmemblock memory
leavesarray of open leave nodes
nleavesnumber of open leave nodes
childsarray of open children nodes
nchildsnumber of open leave nodes
siblingsarray of open sibling nodes
nsiblingsnumber of open leave nodes

Definition at line 6447 of file reopt.c.

References addNode(), assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_REOPTTYPE_PRUNED, SCIPnodeGetLowerbound(), SCIPreoptSaveOpenNodes(), and SCIPsetDebugMsg.

Referenced by SCIPreoptSaveOpenNodes(), and SCIPsolve().

◆ SCIPreoptMergeVarHistory()

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
statdynamic problem statistics
blkmemblock memory
varsoriginal variable array
nvarsnumber of original variables

Definition at line 6589 of file reopt.c.

References assert(), BMSallocBlockMemoryArray, FALSE, SCIP_Var::history, NULL, nvars, SCIP_Reopt::run, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPhistoryCreate(), SCIPhistoryReset(), SCIPhistoryUnite(), SCIPreoptUpdateVarHistory(), SCIPsetDebugMsg, SCIPvarGetIndex(), SCIPvarGetTransVar(), SCIPvarIsActive(), SCIPvarIsOriginal(), SCIP_Reopt::varhistory, and vars.

Referenced by SCIPreoptUpdateVarHistory(), and SCIPsolve().

◆ SCIPreoptApplyCompression()

SCIP_RETCODE SCIPreoptApplyCompression ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_REOPTNODE ** representatives,
int nrepresentatives,
SCIP_Bool * success )

◆ transformDualredsToLinear()

SCIP_RETCODE transformDualredsToLinear ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_REOPTCONSDATA * consdata,
SCIP_REOPTCONSDATA * dualreds )
static

transforms a set of dual reductions into a linear constraint

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
consdatareoptimization constraint data that should represent to set of solutions pruned by the dual reductions
dualredsset of dual reductions

Definition at line 6743 of file reopt.c.

References assert(), BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, NULL, REOPT_CONSTYPE_DUALREDS, SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_OKAY, SCIPsetInfinity(), SCIPsetIsEQ(), transformDualredsToLinear(), and TRUE.

Referenced by SCIPreoptSplitRoot(), and transformDualredsToLinear().

◆ transformDualredsToBounddisjunction()

SCIP_RETCODE transformDualredsToBounddisjunction ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_REOPTCONSDATA * consdata,
SCIP_REOPTCONSDATA * dualreds )
static

transforms a set of dual reductions into a bounddisjuction constraint

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
consdatareoptimization constraint data that should represent to set of solutions pruned by the dual reductions
dualredsset of dual reductions

Definition at line 6803 of file reopt.c.

References assert(), BMSduplicateBlockMemoryArray, FALSE, MAX, MIN, NULL, REOPT_CONSTYPE_DUALREDS, SCIP_ALLOC, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and transformDualredsToBounddisjunction().

Referenced by SCIPreoptSplitRoot(), and transformDualredsToBounddisjunction().

◆ 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
reoptreoptimization data structure
treebranch and bound tree
setglobal SCIP settings
statdynamic SCIP statistics
blkmemblock memory
ncreatedchildspointer to store the number of created nodes
naddedconsspointer to store the number added constraints

Definition at line 6860 of file reopt.c.

References assert(), BMSallocBlockMemory, c, SCIP_ReoptNode::conss, createReoptnode(), SCIP_ReoptNode::dualredscur, getInferenceOrder(), SCIP_ReoptNode::nchilds, SCIP_ReoptNode::nconss, NULL, nvars, 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(), SCIPreoptSplitRoot(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPtreeGetRootNode(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), transformDualredsToBounddisjunction(), transformDualredsToLinear(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and vars.

Referenced by SCIPreoptSplitRoot(), and SCIPsplitReoptRoot().

◆ 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
reoptreoptimization data structure
nodenode of the search tree
blkmemblock memory

Definition at line 7149 of file reopt.c.

References assert(), NULL, reoptnodeResetDualConss(), SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_CALL, SCIP_OKAY, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), and SCIPreoptResetDualBndchgs().

Referenced by addNode(), SCIPreoptCheckCutoff(), SCIPreoptResetDualBndchgs(), and SCIPresetReoptnodeDualcons().

◆ 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 stored of the given node in the reoptimization tree

return the branching path of the given node in the reoptimization tree

Parameters
reoptreoptimization data structure
reoptnodenode of the reoptimization tree
varsarray for variables
valsarray for values
boundtypesarray for bound types
varssizesize of arrays vars, vals, and boundtypes
nbndchgspointer to store the number of bound changes
nbndchgsafterdualpointer to store the number of bound changes applied after the first dual reduction at the given node

Definition at line 7174 of file reopt.c.

References SCIP_ReoptNode::afterdualvarbounds, SCIP_ReoptNode::afterdualvarboundtypes, SCIP_ReoptNode::afterdualvars, assert(), SCIP_ReoptNode::nafterdualvars, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptNode::parentID, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Real, SCIPreoptnodeGetPath(), SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, SCIP_ReoptNode::vars, and vars.

Referenced by SCIPgetReoptnodePath(), and SCIPreoptnodeGetPath().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
idid of a stored node
blkmemblock memory

Definition at line 7233 of file reopt.c.

References assert(), NULL, SCIP_ReoptTree::openids, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, reopttreeDeleteNode(), SCIP_CALL, SCIP_OKAY, SCIPqueueInsertUInt(), SCIPreoptDeleteNode(), and TRUE.

Referenced by SCIPreoptDeleteNode().

◆ 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
reoptreoptimization data structure
scipSCIP data structure
setglobal SCIP settings
statdynamic problem statistics
transprobtransformed problem
origproboriginal problem
treebranching tree
lpcurrent LP
branchcandbranching candidate
eventqueueevent queue
eventfilterglobal event filter
cliquetableclique table
blkmemblock memory
reoptnodenode of the reoptimization tree to reactivate
idid of the node to reactivate
estimateestimate of the child nodes that should be created
childnodesarray to store the created child nodes
ncreatedchildspointer to store number of created child nodes
naddedconsspointer to store number of generated constraints
childnodessizeavailable size of childnodes array
successpointer store the result

Definition at line 7253 of file reopt.c.

References addLocalConss(), addNode(), addSplitcons(), assert(), c, changeAncestorBranchings(), SCIP_ReoptNode::dualreds, SCIP_ReoptNode::dualredscur, FALSE, fixBounds(), fixInterdiction(), getInferenceOrder(), SCIP_ReoptNode::lowerbound, SCIP_ReoptNode::nafterdualvars, SCIP_ReoptNode::nconss, NULL, nvars, SCIP_Reopt::objhaschanged, SCIP_Reopt::randnumgen, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, SCIP_ReoptTree::reoptnodes, reoptnodeUpdateDualConss(), SCIP_Reopt::reopttree, SCIP_ReoptNode::reopttype, SCIP_Bool, 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(), SCIPreoptApply(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsGT(), TRUE, and vars.

Referenced by SCIPapplyReopt(), and SCIPreoptApply().

◆ SCIPreoptGetSavingtime()

SCIP_Real SCIPreoptGetSavingtime ( SCIP_REOPT * reopt)

returns the time needed to store the nodes for reoptimization

Parameters
reoptreoptimization data structure

Definition at line 7556 of file reopt.c.

References assert(), NULL, SCIP_Reopt::savingtime, SCIP_Real, SCIPclockGetTime(), and SCIPreoptGetSavingtime().

Referenced by SCIPprintReoptStatistics(), and SCIPreoptGetSavingtime().

◆ SCIPreoptApplyGlbConss()

◆ 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
reoptreoptimization data structure
nodecurrent focus node
sepastoreseparation storage
cutpoolglobal cutpool
blkmemblock memory
setglobal SCIP settings
statdynamic problem statistics
eventqueueevent queue
eventfilterevent filter
lpcurrent LP
rootbool whether the current node is the root

Definition at line 7688 of file reopt.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, c, SCIP_ReoptNode::conss, FALSE, i, 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(), SCIPreoptApplyCuts(), SCIProwCreate(), SCIProwRelease(), SCIPsepastoreAddCut(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsnprintf(), SCIPvarGetCol(), SCIPvarGetStatus(), SCIPvarGetTransVar(), SCIPvarIsOriginal(), and TRUE.

Referenced by SCIPinitConssLP(), and SCIPreoptApplyCuts().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
nodenode of the current search tree

Definition at line 7818 of file reopt.c.

References assert(), FALSE, SCIP_ReoptNode::nchilds, NULL, SCIP_ReoptNode::nvars, SCIP_ReoptTree::reoptnodes, SCIP_Reopt::reopttree, SCIP_Bool, SCIPnodeGetDepth(), SCIPnodeGetReoptID(), SCIPnodeGetReopttype(), SCIPreoptGetSolveLP(), SCIPsetIsGE(), SCIP_Reopt::simtolastobj, and TRUE.

Referenced by SCIPreoptGetSolveLP(), and solveNode().

◆ SCIPreoptnodeInit()

◆ SCIPreoptnodeReset()

SCIP_RETCODE SCIPreoptnodeReset ( SCIP_REOPT * reopt,
SCIP_SET * set,
BMS_BLKMEM * blkmem,
SCIP_REOPTNODE * reoptnode )

reset the given reoptimization node

Parameters
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
reoptnodereoptimization node

Definition at line 7898 of file reopt.c.

References assert(), NULL, reoptnodeReset(), SCIP_CALL, SCIP_OKAY, and SCIPreoptnodeReset().

Referenced by SCIPreoptnodeReset(), and SCIPresetRepresentation().

◆ SCIPreoptnodeDelete()

SCIP_RETCODE SCIPreoptnodeDelete ( SCIP_REOPTNODE ** reoptnode,
BMS_BLKMEM * blkmem )

delete the given reoptimization node

Parameters
reoptnodepointer of reoptnode
blkmemblock memory

Definition at line 7916 of file reopt.c.

References assert(), NULL, reoptnodeDelete(), SCIP_CALL, SCIP_OKAY, and SCIPreoptnodeDelete().

Referenced by SCIPdeleteReoptnode(), SCIPfreeRepresentation(), and SCIPreoptnodeDelete().

◆ 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
reoptnodenode of the reopttree
setglobal SCIP settings
blkmemblock memory
varvariable to add
valvalue of the variable
boundtypeboundtype of the variable

Definition at line 7930 of file reopt.c.

References assert(), NULL, nvars, SCIP_ReoptNode::nvars, reoptnodeCheckMemory(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPreoptnodeAddBndchg(), var, SCIP_ReoptNode::varbounds, SCIP_ReoptNode::varboundtypes, and SCIP_ReoptNode::vars.

Referenced by SCIPaddReoptnodeBndchg(), SCIPreoptApplyCompression(), SCIPreoptnodeAddBndchg(), 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
reoptnodenode of the reopttree
setglobal SCIP settings
blkmemblock memory
varsvariables which are part of the constraint
boundsbounds of the variables
boundtypesboundtypes of the variables (or NULL is the constraint is a cut)
lhslhs of the constraint
rhsrhs of the constraint
nvarsnumber of variables
constypetype of the constraint
linearthe given constraint has a linear representation

Definition at line 7958 of file reopt.c.

References assert(), BMSallocBlockMemory, BMSduplicateBlockMemoryArray, SCIP_ReoptNode::conss, SCIP_ReoptNode::nconss, NULL, nvars, REOPT_CONSTYPE_CUT, REOPT_CONSTYPE_DUALREDS, REOPT_CONSTYPE_INFSUBTREE, reoptnodeCheckMemory(), SCIP_ALLOC, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPreoptnodeAddBndchg(), SCIPreoptnodeAddCons(), SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsLE(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsImpliedIntegral(), and vars.

Referenced by SCIPaddReoptnodeCons(), SCIPreoptApplyCompression(), SCIPreoptnodeAddCons(), and storeCuts().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
blkmemblock memory
consconstraint to add

Definition at line 8051 of file reopt.c.

References SCIP_Reopt::addedconss, SCIP_Reopt::addedconsssize, assert(), BMSallocClearBlockMemoryArray, BMSclearMemoryArray, BMSreallocBlockMemoryArray, SCIP_Reopt::consadded, SCIP_Reopt::naddedconss, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPconsCapture(), SCIPconsGetName(), SCIPreoptAddCons(), SCIPsetCalcMemGrowSize(), SCIPsetDebugMsg, and TRUE.

Referenced by SCIPaddCons(), and SCIPreoptAddCons().

◆ SCIPreoptSaveGlobalBounds()

SCIP_RETCODE SCIPreoptSaveGlobalBounds ( SCIP_REOPT * reopt,
SCIP_PROB * transprob,
BMS_BLKMEM * blkmem )

save global lower and upper bounds

Note
this method should only be called once, i.e., after fishing presolving of the first problem

save global lower and upper bounds

Note
this method can only called once, i.e., after fishing presolving of the first problem
Parameters
reoptreoptimization data structure
transprobtransformed problem data
blkmemblock memory

Definition at line 8102 of file reopt.c.

References assert(), SCIP_Reopt::glblb, SCIP_Reopt::glbub, i, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapInsertReal(), SCIPprobGetNVars(), SCIPprobGetVars(), SCIPreoptSaveGlobalBounds(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsRelaxationOnly(), and vars.

Referenced by prepareReoptimization(), and SCIPreoptSaveGlobalBounds().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
transprobtransformed problem data
blkmemblock memory

Definition at line 8142 of file reopt.c.

References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, assert(), ensureActiveconssSize(), i, SCIP_Reopt::nactiveconss, SCIP_Reopt::nmaxactiveconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsCapture(), SCIPconsIsActive(), SCIPhashsetCreate(), SCIPhashsetExists(), SCIPhashsetInsert(), SCIPprobGetConss(), SCIPprobGetNConss(), SCIPreoptSaveActiveConss(), and SCIPsetDebugMsg.

Referenced by prepareReoptimization(), and SCIPreoptSaveActiveConss().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
statdynamic SCIP statistics
transprobtransformed problem data
lpcurrent LP data
branchcandbranching candidate storage
eventqueueevent queue
cliquetableclique table data structure
blkmemblock memory

Definition at line 8182 of file reopt.c.

References assert(), SCIP_Reopt::glblb, SCIP_Reopt::glbub, i, NULL, nvars, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageReal(), SCIPprobGetNVars(), SCIPprobGetVars(), SCIPprobIsTransformed(), SCIPreoptInstallBounds(), SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), SCIPvarIsRelaxationOnly(), and vars.

Referenced by prepareReoptimization(), and SCIPreoptInstallBounds().

◆ 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
reoptreoptimization data structure
setglobal SCIP settings
statdynamic SCIP statistics

Definition at line 8234 of file reopt.c.

References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, assert(), SCIP_Cons::deleted, FALSE, i, SCIP_Reopt::nactiveconss, SCIP_Reopt::nmaxactiveconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsActivate(), SCIPconsDeactivate(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPhashsetExists(), SCIPreoptResetActiveConss(), SCIPsetDebugMsg, and TRUE.

Referenced by prepareReoptimization(), and SCIPreoptResetActiveConss().

◆ SCIPreoptConsCanBeDeleted()

SCIP_Bool SCIPreoptConsCanBeDeleted ( SCIP_REOPT * reopt,
SCIP_CONS * cons )

returns whether a constraint is necessary to ensure correctness and cannot be deleted

Parameters
reoptreoptimization data structure
consproblem constraint

Definition at line 8275 of file reopt.c.

References SCIP_Reopt::activeconss, SCIP_Reopt::activeconssset, assert(), NULL, SCIP_Bool, SCIPhashsetExists(), SCIPreoptConsCanBeDeleted(), and TRUE.

Referenced by SCIPconsDelete(), and SCIPreoptConsCanBeDeleted().