internal methods for storing cuts in a cut pool
Definition in file cutpool.h.
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_event.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_sol.h"
#include "scip/type_stat.h"
#include "scip/type_lp.h"
#include "scip/type_sepastore.h"
#include "scip/type_cutpool.h"
#include "scip/pub_cutpool.h"
Go to the source code of this file.
SCIP_RETCODE SCIPcutpoolCreate | ( | SCIP_CUTPOOL ** | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
int | agelimit, | ||
SCIP_Bool | globalcutpool ) |
creates cut pool
cutpool | pointer to store cut pool |
blkmem | block memory |
set | global SCIP settings |
agelimit | maximum age a cut can reach before it is deleted from the pool |
globalcutpool | is this the global cut pool of SCIP? |
Definition at line 427 of file cutpool.c.
References assert(), BMSallocMemory, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_HASHSIZE_CUTPOOLS, SCIP_HASHSIZE_CUTPOOLS_SMALL, SCIP_INVALID, SCIP_OKAY, SCIPclockCreate(), and SCIPhashtableCreate().
Referenced by initSolve(), and SCIPcreateCutpool().
SCIP_RETCODE SCIPcutpoolFree | ( | SCIP_CUTPOOL ** | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_LP * | lp ) |
frees cut pool
cutpool | pointer to store cut pool |
blkmem | block memory |
set | global SCIP settings |
lp | current LP data |
Definition at line 468 of file cutpool.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockFree(), SCIPcutpoolClear(), and SCIPhashtableFree().
Referenced by freeReoptSolve(), freeSolve(), and SCIPfreeCutpool().
SCIP_RETCODE SCIPcutpoolClear | ( | SCIP_CUTPOOL * | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_LP * | lp ) |
removes all rows from the cut pool
cutpool | cut pool |
blkmem | block memory |
set | global SCIP settings |
lp | current LP data |
Definition at line 494 of file cutpool.c.
References assert(), cutFree(), SCIP_Cutpool::cuts, FALSE, SCIP_Cutpool::globalcutpool, SCIP_Cutpool::hashtable, i, SCIP_Row::inglobalcutpool, SCIP_Cutpool::ncuts, SCIP_Cutpool::nremovablecuts, NULL, SCIP_Cut::row, SCIP_CALL, SCIP_OKAY, SCIPhashtableRemoveAll(), and SCIProwUnlock().
Referenced by freeReoptSolve(), freeSolve(), and SCIPcutpoolFree().
SCIP_Bool SCIPcutpoolIsCutNew | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_SET * | set, | ||
SCIP_ROW * | row ) |
checks if cut is already existing
cutpool | cut pool |
set | global SCIP settings |
row | cutting plane to add |
Definition at line 593 of file cutpool.c.
References assert(), SCIP_Row::constant, FALSE, SCIP_Cutpool::hashtable, SCIP_Row::len, SCIP_Row::lhs, NULL, SCIP_Row::rhs, SCIP_Cut::row, SCIP_Bool, SCIP_Real, SCIPhashtableRetrieve(), SCIProwGetMaxval(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), and TRUE.
Referenced by SCIPisCutNew().
SCIP_RETCODE SCIPcutpoolAddRow | ( | SCIP_CUTPOOL * | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_ROW * | row ) |
if not already existing, adds row to cut pool and captures it
cutpool | cut pool |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
lp | current LP data |
row | cutting plane to add |
Definition at line 656 of file cutpool.c.
References assert(), SCIP_Row::constant, cutpoolDelCut(), SCIP_Cutpool::hashtable, SCIP_Row::len, SCIP_Row::lhs, NULL, SCIP_Row::rhs, SCIP_Cut::row, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcutpoolAddNewRow(), SCIPcutpoolAddRow(), SCIPhashtableRetrieve(), SCIProwGetMaxidx(), SCIProwGetMaxval(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), and SCIP_Row::validminmaxidx.
Referenced by SCIPaddDelayedPoolCut(), SCIPaddPoolCut(), SCIPaddRowCutpool(), SCIPcutpoolAddRow(), and SCIPreoptApplyCuts().
SCIP_RETCODE SCIPcutpoolAddNewRow | ( | SCIP_CUTPOOL * | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_ROW * | row ) |
adds row to cut pool and captures it; doesn't check for multiple cuts
cutpool | cut pool |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
lp | current LP data |
row | cutting plane to add |
Definition at line 733 of file cutpool.c.
References assert(), SCIP_Stat::bestefficacy, cutCreate(), cutpoolEnsureCutsMem(), SCIP_Cutpool::cuts, SCIP_Cutpool::globalcutpool, SCIP_Cutpool::hashtable, SCIP_Row::inglobalcutpool, MAX, SCIP_Cutpool::maxncuts, SCIP_Cutpool::ncuts, SCIP_Cutpool::ncutsfound, SCIP_Cutpool::nremovablecuts, NULL, SCIP_Cut::pos, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPhashtableExists(), SCIPhashtableInsert(), SCIPlpGetSolstat(), SCIProwGetLPEfficacy(), SCIProwGetMaxidx(), SCIProwGetName(), SCIProwIsLocal(), SCIProwIsModifiable(), SCIProwIsRemovable(), SCIProwLock(), TRUE, and SCIP_Row::validminmaxidx.
Referenced by SCIPaddNewRowCutpool(), and SCIPcutpoolAddRow().
SCIP_RETCODE SCIPcutpoolDelRow | ( | SCIP_CUTPOOL * | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_ROW * | row ) |
removes the LP row from the cut pool
cutpool | cut pool |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
lp | current LP data |
row | row to remove |
Definition at line 806 of file cutpool.c.
References assert(), cutpoolDelCut(), SCIP_Cutpool::hashtable, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPhashtableRetrieve(), and SCIProwGetName().
Referenced by SCIPdelDelayedPoolCut(), SCIPdelPoolCut(), and SCIPdelRowCutpool().
SCIP_RETCODE SCIPcutpoolSeparate | ( | SCIP_CUTPOOL * | cutpool, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_LP * | lp, | ||
SCIP_SEPASTORE * | sepastore, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool | cutpoolisdelayed, | ||
SCIP_Bool | root, | ||
SCIP_RESULT * | result ) |
separates cuts of the cut pool
cutpool | cut pool |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
eventfilter | event filter for global events |
lp | current LP data |
sepastore | separation storage |
sol | solution to be separated (or NULL for LP-solution) |
cutpoolisdelayed | is the cutpool delayed (count cuts found)? |
root | are we at the root node? |
result | pointer to store the result of the separation call |
Definition at line 835 of file cutpool.c.
References SCIP_Cut::age, SCIP_Cutpool::agelimit, assert(), SCIP_Stat::bestefficacy, c, cutIsAged(), cutoff, cutpoolDelCut(), SCIP_Cutpool::cuts, FALSE, SCIP_Cutpool::firstunprocessed, SCIP_Cutpool::firstunprocessedsol, SCIP_Row::fromcutpool, SCIP_Stat::lpcount, MAX, MIN, SCIP_Stat::minefficacyfac, SCIP_Cutpool::ncalls, SCIP_Stat::ncutpoolfails, SCIP_Cutpool::ncuts, SCIP_Cutpool::ncutsadded, SCIP_Cutpool::nremovablecuts, SCIP_Cutpool::nrootcalls, NULL, SCIP_Cutpool::poolclock, SCIP_Cut::pos, SCIP_Cut::processedlp, SCIP_Cutpool::processedlp, SCIP_Cutpool::processedlpefficacy, SCIP_Cut::processedlpsol, SCIP_Cutpool::processedlpsol, SCIP_Cutpool::processedlpsolefficacy, result, SCIP_Cut::row, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPclockStart(), SCIPclockStop(), SCIPconshdlrIncNCutsFound(), SCIProwGetLPEfficacy(), SCIProwGetLPFeasibility(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetOriginConshdlr(), SCIProwGetOriginSepa(), SCIProwGetSolEfficacy(), SCIProwGetSolFeasibility(), SCIProwIsInLP(), SCIProwIsModifiable(), SCIPsepaIncNCutsAdded(), SCIPsepaIncNCutsFoundAtNode(), SCIPsepastoreAddCut(), SCIPsepastoreGetNCuts(), SCIPsepastoreGetNCutsAdded(), SCIPsetDebugMsg, SCIPsetGetSepaMaxcuts(), SCIPsetIsFeasPositive(), sol, and TRUE.
Referenced by cutpoolSeparate(), SCIPseparateCutpool(), and SCIPseparateSolCutpool().
void SCIPcutpoolAddMaxNCuts | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Longint | ncuts ) |
adds the maximum number of cuts that were stored in the pool; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
ncuts | number of cuts to add |
Definition at line 1156 of file cutpool.c.
References assert(), SCIP_Cutpool::maxncuts, NULL, and SCIP_Longint.
Referenced by SCIPsolve().
void SCIPcutpoolSetTime | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Real | time ) |
sets time in seconds used for separating cuts from the pool; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
time | poolclock time |
Definition at line 1168 of file cutpool.c.
References assert(), NULL, SCIP_Cutpool::poolclock, SCIP_Real, and SCIPclockSetTime().
Referenced by SCIPsolve().
void SCIPcutpoolAddNCalls | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Longint | ncalls ) |
adds the number of times the cut pool was separated; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
ncalls | ncalls |
Definition at line 1180 of file cutpool.c.
References assert(), ncalls, SCIP_Cutpool::ncalls, NULL, and SCIP_Longint.
Referenced by SCIPsolve().
void SCIPcutpoolAddNRootCalls | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Longint | nrootcalls ) |
adds the number of times the cut pool was separated at the root; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
nrootcalls | nrootcalls |
Definition at line 1192 of file cutpool.c.
References assert(), SCIP_Cutpool::nrootcalls, NULL, and SCIP_Longint.
Referenced by SCIPsolve().
void SCIPcutpoolAddNCutsFound | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Longint | ncutsfound ) |
adds the total number of cuts that were added to the pool; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
ncutsfound | total number of cuts added to cut pool |
Definition at line 1204 of file cutpool.c.
References assert(), SCIP_Cutpool::ncutsfound, NULL, and SCIP_Longint.
Referenced by SCIPsolve().
void SCIPcutpoolAddNCutsAdded | ( | SCIP_CUTPOOL * | cutpool, |
SCIP_Longint | ncutsadded ) |
adds the total number of cuts that were separated from the pool; this is primarily used to keep statistics when SCIP performs a restart
cutpool | cut pool |
ncutsadded | total number of cuts added from cut pool to sepastore |
Definition at line 1216 of file cutpool.c.
References assert(), SCIP_Cutpool::ncutsadded, NULL, and SCIP_Longint.
Referenced by SCIPsolve().