event handler for tree size estimation and restarts
This event handler plugin provides different methods for approximating the current fraction of the search that has already been completed and for estimating the total tree size at completion. It can trigger restarts of the current run if the current run seems hopeless.
For details about the available approximations of search completion, please see
Anderson, Hendel, Le Bodic, Pfetsch Estimating The Size of Branch-and-Bound Trees under preparation
This code is a largely enriched version of a code that was used for clairvoyant restarts, see
Anderson, Hendel, Le Bodic, Viernickel Clairvoyant Restarts in Branch-and-Bound Search Using Online Tree-Size Estimation AAAI-19: Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, 2018
Definition in file event_estim.c.
#include <string.h>#include "blockmemshell/memory.h"#include "scip/event_estim.h"#include "scip/prop_symmetry.h"#include "scip/pub_disp.h"#include "scip/pub_event.h"#include "scip/pub_fileio.h"#include "scip/pub_message.h"#include "scip/pub_misc.h"#include "scip/pub_tree.h"#include "scip/scip_disp.h"#include "scip/scip_event.h"#include "scip/scip_general.h"#include "scip/scip_mem.h"#include "scip/scip_message.h"#include "scip/scip_nlp.h"#include "scip/scip_numerics.h"#include "scip/scip_param.h"#include "scip/scip_pricer.h"#include "scip/scip_sol.h"#include "scip/scip_solve.h"#include "scip/scip_solvingstats.h"#include "scip/scip_table.h"#include "scip/scip_timing.h"#include "scip/scip_tree.h"#include "scip/type_disp.h"#include "scip/type_event.h"#include "scip/type_message.h"#include "scip/type_misc.h"#include "scip/type_retcode.h"#include "scip/type_stat.h"#include "scip/type_table.h"Go to the source code of this file.
Data Structures | |
| struct | DoubleExpSmooth |
| struct | TreeProfileStats |
| struct | TreeProfile |
| struct | TreeData |
| struct | SubtreeSumGap |
| struct | TimeSeries |
| struct | NodeInfo |
| struct | SCIP_RegForest |
| #define EVENTHDLR_NAME "estim" |
Definition at line 83 of file event_estim.c.
| #define EVENTHDLR_DESC "event handler for tree size estimation and restarts" |
Definition at line 84 of file event_estim.c.
| #define EVENTTYPE_ESTIM (SCIP_EVENTTYPE_NODEDELETE | SCIP_EVENTTYPE_NODEBRANCHED) |
Definition at line 85 of file event_estim.c.
Referenced by SCIP_DECL_EVENTEXITSOL(), and SCIP_DECL_EVENTINITSOL().
| #define RESTARTPOLICY_CHAR_NEVER 'n' |
Definition at line 102 of file event_estim.c.
Referenced by getRestartPolicy().
| #define RESTARTPOLICY_CHAR_ALWAYS 'a' |
Definition at line 103 of file event_estim.c.
Referenced by getRestartPolicy().
| #define RESTARTPOLICY_CHAR_COMPLETION 'c' |
Definition at line 104 of file event_estim.c.
Referenced by getRestartPolicy().
| #define RESTARTPOLICY_CHAR_ESTIMATION 'e' |
Definition at line 105 of file event_estim.c.
Referenced by getRestartPolicy().
| #define DES_USETRENDINLEVEL TRUE |
Should the trend be used in the level update?
Definition at line 107 of file event_estim.c.
Referenced by doubleExpSmoothInit().
| #define TABLE_NAME "estim" |
Definition at line 110 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define TABLE_DESC "tree size estimations statistics table" |
Definition at line 111 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define TABLE_POSITION 18500 |
the position of the statistics table
Definition at line 112 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define TABLE_EARLIEST_STAGE SCIP_STAGE_INIT |
output of the statistics table is only printed from this stage onwards
Definition at line 113 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_NAME "completed" |
Definition at line 116 of file event_estim.c.
Referenced by SCIP_DECL_DISPOUTPUT(), and SCIPincludeEventHdlrEstim().
| #define DISP_DESC "completion of search in percent (based on tree size estimation)" |
Definition at line 117 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_HEADER "compl." |
Definition at line 118 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_WIDTH 8 |
the width of the display column
Definition at line 119 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_PRIORITY 110000 |
the priority of the display column
Definition at line 120 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_POSITION 30100 |
the relative position of the display column
Definition at line 121 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DISP_STRIPLINE TRUE |
the default for whether the display column should be separated with a line from its right neighbor
Definition at line 122 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define INITIALSIZE 100 |
Definition at line 124 of file event_estim.c.
Referenced by ensureMemorySize(), and subtreeSumGapCreate().
| #define SESCOEFF 0.75 |
coefficient of single exponential smoothing of estimation
Definition at line 125 of file event_estim.c.
Referenced by timeSeriesUpdateSmoothEstimation().
| #define DES_ALPHA_TREEWEIGHT 0.65 |
Definition at line 128 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_BETA_TREEWEIGHT 0.15 |
Definition at line 129 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_ALPHA_GAP 0.6 |
Definition at line 131 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_BETA_GAP 0.15 |
Definition at line 132 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_ALPHA_LEAFFREQUENCY 0.3 |
Definition at line 134 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_BETA_LEAFFREQUENCY 0.33 |
Definition at line 135 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_ALPHA_SSG 0.6 |
Definition at line 137 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_BETA_SSG 0.15 |
Definition at line 138 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_ALPHA_OPENNODES 0.6 |
Definition at line 140 of file event_estim.c.
Referenced by includeTimeseries().
| #define DES_BETA_OPENNODES 0.15 |
Definition at line 141 of file event_estim.c.
Referenced by includeTimeseries().
| #define MAX_REGFORESTSIZE 10000000 |
size limit (number of nodes) for regression forest
Definition at line 143 of file event_estim.c.
Referenced by SCIPregForestFromFile().
| #define COMPLETIONTYPE_AUTO 'a' |
automatic (regression forest if available, else monotone regression on binary and SSG on nonbinary trees)
Definition at line 148 of file event_estim.c.
Referenced by getSearchCompletion().
| #define COMPLETIONTYPE_REGFOREST 'r' |
regression forest (must be provided by user)
Definition at line 149 of file event_estim.c.
Referenced by getSearchCompletion().
| #define COMPLETIONTYPE_MONOREG 'm' |
monotone regression (using tree weight and SSG)
Definition at line 150 of file event_estim.c.
Referenced by getSearchCompletion().
| #define COMPLETIONTYPE_TREEWEIGHT 'w' |
use tree weight value as approximation of search tree completion
Definition at line 151 of file event_estim.c.
Referenced by getSearchCompletion().
| #define COMPLETIONTYPE_SSG 's' |
use SSG value as approximation of search tree completion
Definition at line 152 of file event_estim.c.
Referenced by getSearchCompletion().
| #define COMPLETIONTYPE_GAP 'g' |
use gap value as approximation of search tree completion
Definition at line 153 of file event_estim.c.
Referenced by getSearchCompletion().
| #define ESTIMMETHOD_COMPL 'c' |
estimation based on projection of current search completion
Definition at line 157 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_WBE 'b' |
weighted backtrack estimation
Definition at line 158 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_ENSMBL 'e' |
estimation based on an ensemble of the individual estimations
Definition at line 159 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_GAP 'g' |
estimation based on double exponential smoothing for open nodes
Definition at line 160 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_LFREQ 'l' |
estimation based on double exponential smoothing for leaf frequency
Definition at line 161 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_OPEN 'o' |
estimation based on double exponential smoothing for open nodes
Definition at line 162 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_SSG 's' |
estimation based on double exponential smoothing for sum of subtree gaps
Definition at line 163 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_TPROF 't' |
estimation based on tree profile method
Definition at line 164 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHOD_TREEWEIGHT 'w' |
estimation based on double exponential smoothing for tree weight
Definition at line 165 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation().
| #define ESTIMMETHODS "bceglostw" |
Definition at line 167 of file event_estim.c.
Referenced by SCIPgetTreesizeEstimation(), and SCIPincludeEventHdlrEstim().
| #define TREEPROFILE_MINSIZE 512 |
minimum size (depth) that tree profile can hold
Definition at line 170 of file event_estim.c.
Referenced by createTreeProfile().
| #define SSG_STARTPRIMBOUND SCIP_INVALID |
initial value of primal bound used within SSG
Definition at line 171 of file event_estim.c.
Referenced by getSearchCompletion(), and subtreeSumGapReset().
| #define NTIMESERIES 5 |
Definition at line 200 of file event_estim.c.
Referenced by freeTimeSeries(), getEnsembleEstimation(), printReport(), resetTimeSeries(), and updateTimeseries().
| #define DEFAULT_USELEAFTS TRUE |
Use leaf nodes as basic observations for time series, or all nodes?
Definition at line 243 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_REPORTFREQ -1 |
report frequency on estimation: -1: never, 0: always, k >= 1: k times evenly during search
Definition at line 244 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_REGFORESTFILENAME "-" |
default file name of user regression forest in RFCSV format
Definition at line 245 of file event_estim.c.
Referenced by SCIP_DECL_EVENTINIT(), and SCIPincludeEventHdlrEstim().
| #define DEFAULT_COEFMONOWEIGHT 0.3667 |
coefficient of tree weight in monotone approximation of search completion
Definition at line 246 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_COEFMONOSSG 0.6333 |
coefficient of 1 - SSG in monotone approximation of search completion
Definition at line 247 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_COMPLETIONTYPE COMPLETIONTYPE_AUTO |
default computation of search tree completion
Definition at line 248 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_ESTIMMETHOD ESTIMMETHOD_TREEWEIGHT |
default tree size estimation method: (c)ompletion, (e)nsemble, time series forecasts on either (g)ap, (l)eaf frequency, (o)open nodes, tree (w)eight, (s)sg, or (t)ree profile or w(b)e
Definition at line 249 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_TREEPROFILE_ENABLED FALSE |
Should the event handler collect data?
Definition at line 252 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_TREEPROFILE_MINNODESPERDEPTH 20.0 |
minimum average number of nodes at each depth before producing estimations
Definition at line 253 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_RESTARTPOLICY 'e' |
default restart policy: (a)lways, (c)ompletion, (e)stimation, (n)ever
Definition at line 254 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_RESTARTLIMIT 1 |
default restart limit
Definition at line 255 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_MINNODES 1000L |
minimum number of nodes before restart
Definition at line 256 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim(), SCIPincludeHeurAlns(), SCIPincludeHeurClique(), SCIPincludeHeurCompletesol(), SCIPincludeHeurCrossover(), SCIPincludeHeurDins(), SCIPincludeHeurGins(), SCIPincludeHeurLocalbranching(), SCIPincludeHeurLocks(), SCIPincludeHeurLpface(), SCIPincludeHeurMutation(), SCIPincludeHeurOfins(), SCIPincludeHeurPADM(), SCIPincludeHeurProximity(), SCIPincludeHeurRepair(), SCIPincludeHeurRins(), SCIPincludeHeurScheduler(), SCIPincludeHeurTrustregion(), SCIPincludeHeurUndercover(), SCIPincludeHeurVbounds(), SCIPincludeHeurZeroobj(), and SCIPincludeSepaRapidlearning().
| #define DEFAULT_COUNTONLYLEAVES FALSE |
should only leaves count for the minnodes parameter?
Definition at line 257 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_RESTARTFACTOR 50.0 |
factor by which the estimated number of nodes should exceed the current number of nodes
Definition at line 258 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_RESTARTNONLINEAR FALSE |
whether to apply a restart when nonlinear constraints are present
Definition at line 259 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_RESTARTACTPRICERS FALSE |
whether to apply a restart when active pricers are used
Definition at line 260 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_HITCOUNTERLIM 50 |
limit on the number of successive samples to really trigger a restart
Definition at line 261 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_SSG_NMAXSUBTREES -1 |
the maximum number of individual SSG subtrees; the old split is kept if a new split exceeds this number of subtrees ; -1: no limit
Definition at line 262 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_SSG_NMINNODESLASTSPLIT 0L |
minimum number of nodes to process between two consecutive SSG splits
Definition at line 264 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DEFAULT_SHOWSTATS FALSE |
should statistics be shown at the end?
Definition at line 265 of file event_estim.c.
Referenced by SCIPincludeEventHdlrEstim().
| #define DECL_TIMESERIESUPDATE | ( | x | ) |
update callback of time series
Definition at line 331 of file event_estim.c.
Referenced by timeSeriesCreate().
| typedef enum RestartPolicy RESTARTPOLICY |
Definition at line 100 of file event_estim.c.
| typedef struct DoubleExpSmooth DOUBLEEXPSMOOTH |
Definition at line 184 of file event_estim.c.
| typedef struct TimeSeries TIMESERIES |
time series data structure for leaf time series
These time series are the basic ingredient for tree size estimation via forecasting.
This general class represents concrete time series such as the closed gap, tree weight, and leaf frequency. Through callbacks for data (de-)initialization and value queries, it provides a common interface to which double exponential smoothing or window forecasts can be applied.
Definition at line 194 of file event_estim.c.
data structure for convenient access of tree information
Definition at line 197 of file event_estim.c.
Definition at line 213 of file event_estim.c.
| typedef struct SCIP_RegForest SCIP_REGFOREST |
regression forest data structure
Definition at line 216 of file event_estim.c.
| typedef struct TreeProfileStats TREEPROFILESTATS |
Definition at line 227 of file event_estim.c.
| typedef struct TreeProfile TREEPROFILE |
Definition at line 240 of file event_estim.c.
| typedef struct SubtreeSumGap SUBTREESUMGAP |
Definition at line 303 of file event_estim.c.
Definition at line 365 of file event_estim.c.
| enum RestartPolicy |
enumerator for available restart policies
Definition at line 92 of file event_estim.c.
| enum TsPos |
time series position in event handler time series array
Definition at line 203 of file event_estim.c.
|
static |
convert number to string and treat SCIP_INVALID as '-'
| num | number to convert to string |
| buf | string buffer |
| digits | number of decimal digits |
Definition at line 384 of file event_estim.c.
References SCIP_INVALID, SCIP_MAXSTRLEN, SCIP_Real, and SCIPsnprintf().
Referenced by printReport().
|
static |
free a regression forest data structure
| regforest | regression forest data structure |
Definition at line 402 of file event_estim.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, SCIP_RegForest::child, SCIP_RegForest::nbegin, NULL, SCIP_RegForest::splitidx, and SCIP_RegForest::value.
Referenced by SCIP_DECL_EVENTEXIT(), and SCIPregForestFromFile().
|
static |
make a prediction with regression forest
| regforest | regression forest data structure |
| datapoint | a data point that matches the dimension of this regression forest |
Definition at line 424 of file event_estim.c.
References assert(), SCIP_RegForest::child, SCIP_RegForest::dim, SCIP_RegForest::nbegin, SCIP_RegForest::ntrees, NULL, SCIP_Real, SCIPdebugMessage, SCIP_RegForest::splitidx, and SCIP_RegForest::value.
Referenced by getSearchCompletion().
|
static |
read a regression forest from an rfcsv file
TODO improve this parser to better capture wrong user input, e.g., if the dimension is wrong
| regforest | regression forest data structure |
| filename | name of file with the regression forest data |
Definition at line 471 of file event_estim.c.
References assert(), BMSallocMemory, BMSallocMemoryArray, BMSclearMemory, SCIP_RegForest::child, SCIP_RegForest::dim, FALSE, MAX_REGFORESTSIZE, SCIP_RegForest::nbegin, SCIP_RegForest::ntrees, NULL, SCIP_ALLOC_TERMINATE, SCIP_Bool, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_NOFILE, SCIP_NOMEMORY, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, SCIPfclose(), SCIPfeof(), SCIPfgets(), SCIPfopen(), SCIPregForestFree(), SCIPsnprintf(), SCIPstrToRealValue(), SCIP_RegForest::size, SCIP_RegForest::splitidx, TRUE, and SCIP_RegForest::value.
Referenced by SCIP_DECL_EVENTINIT().
|
static |
compare two tree profile statistics for equality
| stats | first tree profile statistics |
| other | other tree profile statistics |
Definition at line 608 of file event_estim.c.
References assert(), TreeProfileStats::lastfulldepth, TreeProfileStats::maxdepth, TreeProfileStats::maxwaistdepth, TreeProfileStats::minwaistdepth, NULL, and SCIP_Bool.
Referenced by predictTotalSizeTreeProfile().
|
static |
copy source tree profile into destination
| dest | destination tree profile statistics |
| src | source tree profile statistics |
Definition at line 624 of file event_estim.c.
References assert(), TreeProfileStats::lastfulldepth, TreeProfileStats::maxdepth, TreeProfileStats::maxwaistdepth, TreeProfileStats::minwaistdepth, and NULL.
Referenced by predictTotalSizeTreeProfile().
|
static |
reset tree profile statistics
| treeprofilestats | tree profile statistics |
Definition at line 640 of file event_estim.c.
References assert(), BMSclearMemory, and NULL.
Referenced by createTreeProfile().
|
static |
extend tree profile to deeper tree
| scip | SCIP data structure |
| treeprofile | tree profile data structure |
| mindepth | minimum depth that the tree profile should hold |
Definition at line 652 of file event_estim.c.
References assert(), BMSclearMemoryArray, NULL, TreeProfile::profile, TreeProfile::profilesize, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocClearMemoryArray, SCIPcalcMemGrowSize(), and SCIPreallocMemoryArray.
Referenced by createTreeProfile(), and updateTreeProfile().
|
static |
create a tree profile
Definition at line 687 of file event_estim.c.
References assert(), extendMemoryTreeProfile(), NULL, resetTreeProfileStats(), SCIP_CALL, SCIP_OKAY, SCIPallocMemory, and TREEPROFILE_MINSIZE.
Referenced by SCIP_DECL_EVENTINITSOL().
|
static |
free a tree profile
Definition at line 711 of file event_estim.c.
References assert(), NULL, SCIPfreeMemory, and SCIPfreeMemoryArray.
Referenced by SCIP_DECL_EVENTEXITSOL().
|
static |
update tree profile
| scip | SCIP data structure |
| treeprofile | tree profile data structure |
| node | node that should be added to the profile |
Definition at line 731 of file event_estim.c.
References assert(), extendMemoryTreeProfile(), TreeProfileStats::lastfulldepth, TreeProfileStats::maxdepth, TreeProfileStats::maxwaistdepth, TreeProfileStats::minwaistdepth, NULL, TreeProfile::profile, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPdebugMsg, SCIPnodeGetDepth(), and TreeProfile::stats.
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
make a prediction of the total tree size based on the current tree profile
| scip | SCIP data structure |
| treeprofile | tree profile data structure |
| minnodesperdepth | minimum number of average nodes per depth to make a prediction |
Definition at line 800 of file event_estim.c.
References assert(), copyTreeProfileStats(), isEqualTreeProfileStats(), TreeProfile::lastestimate, TreeProfile::lastestimatestats, TreeProfileStats::lastfulldepth, TreeProfileStats::maxdepth, TreeProfileStats::maxwaistdepth, TreeProfileStats::minwaistdepth, NULL, SCIP_Real, SCIPdebugMsg, SCIPgetNNodes(), and TreeProfile::stats.
Referenced by printReport(), and SCIPgetTreesizeEstimation().
|
static |
clean subtrees stored as priority queues
Definition at line 872 of file event_estim.c.
References assert(), i, SubtreeSumGap::nsubtrees, NULL, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPpqueueElems(), SCIPpqueueFree(), SCIPpqueueNElems(), and SubtreeSumGap::subtreepqueues.
Referenced by subtreeSumGapFree(), subtreeSumGapReset(), and subtreeSumGapSplit().
|
static |
reset subtree sum gap
Definition at line 912 of file event_estim.c.
References assert(), SubtreeSumGap::nodelastsplit, SubtreeSumGap::nodes2info, SubtreeSumGap::nsubtrees, NULL, SubtreeSumGap::pblastsplit, SubtreeSumGap::scalingfactor, SCIP_CALL, SCIP_OKAY, SCIPhashmapRemoveAll(), SSG_STARTPRIMBOUND, SubtreeSumGap::subtreepqueues, subtreeSumGapDelSubtrees(), and SubtreeSumGap::value.
Referenced by resetTreeData(), and subtreeSumGapCreate().
|
static |
create a subtree sum gap
Definition at line 936 of file event_estim.c.
References assert(), INITIALSIZE, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPblkmem(), SCIPhashmapCreate(), and subtreeSumGapReset().
Referenced by createTreeData().
|
static |
free a subtree sum gap
Definition at line 959 of file event_estim.c.
References assert(), NULL, SCIPfreeMemory, SCIPhashmapFree(), and subtreeSumGapDelSubtrees().
Referenced by freeTreeData().
|
static |
compare two node infos by comparing their lower bound
Definition at line 982 of file event_estim.c.
References NodeInfo::lowerbound.
|
static |
position change callback of element in priority queue
Definition at line 997 of file event_estim.c.
References assert(), and NodeInfo::pos.
|
static |
store node in SSG data structure
| scip | SCIP data structure |
| ssg | subtree sum gap data structure |
| node | node that should be stored |
| subtreeidx | subtree index of that node |
Definition at line 1007 of file event_estim.c.
References assert(), NodeInfo::lowerbound, NodeInfo::node, SubtreeSumGap::nodes2info, NULL, NodeInfo::pos, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPallocBlockMemory, SCIPdebugMsg, SCIPhashmapExists(), SCIPhashmapInsert(), SCIPnodeGetLowerbound(), SCIPnodeGetNumber(), SCIPpqueueCreate(), SCIPpqueueElems(), SCIPpqueueInsert(), SCIPpqueueNElems(), NodeInfo::subtreeidx, and SubtreeSumGap::subtreepqueues.
Referenced by subtreeSumGapInsertChildren(), and subtreeSumGapSplit().
|
static |
split the open nodes of the current tree
| scip | SCIP data structure |
| ssg | subtree sum gap data structure |
| addfocusnode | should the focus node be a subtree, too? |
Definition at line 1056 of file event_estim.c.
References assert(), nnodes, SubtreeSumGap::nodes2info, SubtreeSumGap::nsubtrees, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocClearBlockMemoryArray, SCIPdebugMsg, SCIPgetFocusNode(), SCIPgetOpenNodesData(), SCIPhashmapRemoveAll(), SubtreeSumGap::subtreepqueues, subtreeSumGapDelSubtrees(), and subtreeSumGapStoreNode().
Referenced by subtreeSumGapUpdate().
compute a gap between a lower bound and the current upper bound
Definition at line 1124 of file event_estim.c.
References MAX, MIN, REALABS, SCIP_Real, SCIPgetPrimalbound(), SCIPgetUpperbound(), SCIPisEQ(), SCIPisInfinity(), and SCIPretransformObj().
Referenced by subtreeSumGapComputeFromScratchEfficiently(), and subtreeSumGapRemoveNode().
|
static |
remove node from the subtree sum gap (because it has been solved by branching or is a leaf)
| scip | SCIP data structure |
| ssg | subtree sum gap data structure |
| node | node that should be removed |
Definition at line 1157 of file event_estim.c.
References assert(), calcGap(), NodeInfo::lowerbound, MIN, SubtreeSumGap::nodes2info, SubtreeSumGap::nsubtrees, NULL, NodeInfo::pos, SubtreeSumGap::scalingfactor, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPfreeBlockMemory, SCIPhashmapGetImage(), SCIPhashmapRemove(), SCIPinfinity(), SCIPisLE(), SCIPnodeGetNumber(), SCIPnodeGetParent(), SCIPpqueueDelPos(), SCIPpqueueElems(), SCIPpqueueFirst(), SCIPpqueueNElems(), NodeInfo::subtreeidx, SubtreeSumGap::subtreepqueues, and SubtreeSumGap::value.
Referenced by subtreeSumGapInsertChildren(), and subtreeSumGapUpdate().
|
static |
insert children into subtree sum gap
Definition at line 1228 of file event_estim.c.
References assert(), SubtreeSumGap::nodes2info, SubtreeSumGap::nsubtrees, NULL, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPdebugMsg, SCIPgetChildren(), SCIPgetFocusNode(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPnodeGetNumber(), SCIPnodeGetParent(), NodeInfo::subtreeidx, subtreeSumGapRemoveNode(), and subtreeSumGapStoreNode().
Referenced by subtreeSumGapUpdate().
|
static |
compute subtree sum gap from scratch efficiently (linear effort in the number of subtrees)
| scip | SCIP data structure |
| ssg | subtree sum gap data structure |
| updatescaling | should the scaling factor be updated? |
Definition at line 1393 of file event_estim.c.
References assert(), calcGap(), NodeInfo::lowerbound, MAX, SubtreeSumGap::nsubtrees, NULL, SubtreeSumGap::scalingfactor, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPgetLowerbound(), SCIPgetUpperbound(), SCIPisInfinity(), SCIPpqueueFirst(), SubtreeSumGap::subtreepqueues, and SubtreeSumGap::value.
Referenced by subtreeSumGapUpdate().
|
static |
update the subtree sum gap after a node event (branching or deletion of a node)
| scip | SCIP data structure |
| ssg | subtree sum gap data structure |
| node | the corresponding node |
| nchildren | number of children |
| nsolvednodes | number of solved nodes so far, used as a time stamp |
Definition at line 1450 of file event_estim.c.
References SubtreeSumGap::nmaxsubtrees, SubtreeSumGap::nminnodeslastsplit, SubtreeSumGap::nodelastsplit, SubtreeSumGap::nsubtrees, NULL, SubtreeSumGap::pblastsplit, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_STAGE_SOLVED, SCIPdebugMsg, SCIPgetFocusNode(), SCIPgetNChildren(), SCIPgetNLeaves(), SCIPgetNSiblings(), SCIPgetPrimalbound(), SCIPgetStage(), SCIPgetUpperbound(), SCIPisEQ(), SCIPisInfinity(), SCIPwasNodeLastBranchParent(), subtreeSumGapComputeFromScratchEfficiently(), subtreeSumGapInsertChildren(), subtreeSumGapRemoveNode(), subtreeSumGapSplit(), TRUE, and SubtreeSumGap::value.
Referenced by updateTreeData().
|
static |
reset tree data
Definition at line 1529 of file event_estim.c.
References TreeData::ninner, TreeData::nleaves, TreeData::nnodes, TreeData::nopen, TreeData::nvisited, SCIP_CALL, SCIP_OKAY, TreeData::ssg, subtreeSumGapReset(), and TreeData::weight.
Referenced by createTreeData(), and SCIP_DECL_EVENTINITSOL().
|
static |
create tree data structure
Definition at line 1549 of file event_estim.c.
References assert(), NULL, resetTreeData(), SCIP_CALL, SCIP_OKAY, SCIPallocMemory, and subtreeSumGapCreate().
Referenced by SCIPincludeEventHdlrEstim().
free tree data structure
Definition at line 1568 of file event_estim.c.
References assert(), NULL, SCIPfreeMemory, and subtreeSumGapFree().
Referenced by SCIP_DECL_EVENTFREE(), and SCIPincludeEventHdlrEstim().
|
static |
update tree data structure after a node has been solved/is about to be deleted
| scip | SCIP data structure |
| treedata | tree data |
| node | the corresponding node |
| nchildren | the number of children |
Definition at line 1586 of file event_estim.c.
References assert(), depth, TreeData::ninner, TreeData::nleaves, TreeData::nnodes, TreeData::nopen, NULL, TreeData::nvisited, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPisInRestart(), SCIPnodeGetDepth(), TreeData::ssg, subtreeSumGapUpdate(), and TreeData::weight.
Referenced by SCIP_DECL_EVENTEXEC().
get weighted backtrack estimation from this tree data
| treedata | tree data |
Definition at line 1622 of file event_estim.c.
References TreeData::nleaves, SCIP_Real, and TreeData::weight.
Referenced by getEnsembleEstimation(), printReport(), and SCIPgetTreesizeEstimation().
|
static |
reset double exponential smoothing
| des | double exponential smoothing data structure |
| initialvalue | the initial value |
Definition at line 1661 of file event_estim.c.
References DoubleExpSmooth::initialvalue, DoubleExpSmooth::level, DoubleExpSmooth::n, SCIP_INVALID, SCIP_Real, and DoubleExpSmooth::trend.
Referenced by timeSeriesResample(), and timeSeriesReset().
|
static |
initialize a double exponential smoothing data structure
| des | double exponential smoothing data structure |
| x1 | the first sample value |
Definition at line 1674 of file event_estim.c.
References assert(), DES_USETRENDINLEVEL, DoubleExpSmooth::initialvalue, DoubleExpSmooth::level, DoubleExpSmooth::n, NULL, SCIP_Real, DoubleExpSmooth::trend, and DoubleExpSmooth::usetrendinlevel.
Referenced by doubleExpSmoothUpdate().
|
static |
update a double exponential smoothing data structure
| des | double exponential smoothing data structure |
| xnew | new sample value |
Definition at line 1692 of file event_estim.c.
References DoubleExpSmooth::alpha, DoubleExpSmooth::beta, doubleExpSmoothInit(), DoubleExpSmooth::level, DoubleExpSmooth::n, SCIP_Real, DoubleExpSmooth::trend, and DoubleExpSmooth::usetrendinlevel.
Referenced by timeSeriesResample(), and timeSeriesUpdate().
|
static |
get the current trend (slope) computed by this double exponential smoothing
| des | double exponential smoothing data structure |
Definition at line 1714 of file event_estim.c.
References assert(), DoubleExpSmooth::n, NULL, SCIP_INVALID, SCIP_Real, and DoubleExpSmooth::trend.
Referenced by getSearchCompletion(), printReport(), and timeSeriesEstimate().
|
static |
reset time series
| timeseries | pointer to store time series |
Definition at line 1728 of file event_estim.c.
References TimeSeries::currentvalue, TimeSeries::des, doubleExpSmoothReset(), TimeSeries::initialvalue, TimeSeries::nobs, TimeSeries::nvals, TimeSeries::resolution, SCIP_INVALID, and TimeSeries::smoothestimation.
Referenced by resetTimeSeries(), and timeSeriesCreate().
|
static |
create a time series object
| scip | SCIP data structure |
| timeseries | pointer to store time series |
| name | name of this time series |
| targetvalue | target value of this time series |
| initialvalue | the initial value of time series |
| alpha | alpha parameter (level weight) for double exponential smoothing |
| beta | beta parameter (level weight) for double exponential smoothing update callback at nodes, or NULL |
Definition at line 1743 of file event_estim.c.
References alpha, DoubleExpSmooth::alpha, assert(), DoubleExpSmooth::beta, BMSduplicateMemoryArray, DECL_TIMESERIESUPDATE, TimeSeries::des, TimeSeries::estimation, TimeSeries::initialvalue, TimeSeries::name, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocMemory, SCIPallocMemoryArray, SCIPdebugMsg, TimeSeries::targetvalue, timeSeriesReset(), TimeSeries::vals, and TimeSeries::valssize.
Referenced by includeTimeseries().
|
static |
free a time series
Definition at line 1792 of file event_estim.c.
References assert(), BMSfreeMemoryArray, NULL, SCIPfreeMemory, and SCIPfreeMemoryArray.
Referenced by freeTimeSeries().
|
static |
get current value of time series
| timeseries | time series |
Definition at line 1812 of file event_estim.c.
References assert(), TimeSeries::currentvalue, NULL, and SCIP_Real.
Referenced by DECL_TIMESERIESUPDATE(), getSearchCompletion(), printReport(), timeSeriesEstimate(), and updateTimeseries().
|
static |
get target value (which this time series reaches at the end of the solution process)
| timeseries | time series |
Definition at line 1823 of file event_estim.c.
References SCIP_Real, and TimeSeries::targetvalue.
Referenced by timeSeriesEstimate().
|
static |
get resolution of time series
| timeseries | time series |
Definition at line 1832 of file event_estim.c.
References TimeSeries::resolution.
Referenced by printReport(), and timeSeriesEstimate().
|
static |
estimate tree size at which time series reaches target value
| timeseries | time series |
| treedata | tree data for fallback estimation |
Definition at line 1841 of file event_estim.c.
References TimeSeries::des, doubleExpSmoothGetTrend(), EPSZ, TreeData::nnodes, TimeSeries::nobs, TimeSeries::nvals, SCIP_Real, timeSeriesGetResolution(), timeSeriesGetTargetValue(), timeSeriesGetValue(), and TimeSeries::useleafts.
Referenced by getEnsembleEstimation(), printReport(), SCIPgetTreesizeEstimation(), and timeSeriesUpdate().
|
static |
update time series smoothened estimation
| timeseries | time series |
| estimation | estimation value |
Definition at line 1878 of file event_estim.c.
References SCIP_INVALID, SCIP_Real, SESCOEFF, and TimeSeries::smoothestimation.
Referenced by timeSeriesResample(), and timeSeriesUpdate().
|
static |
get smooth estimation of time series
| timeseries | time series |
Definition at line 1894 of file event_estim.c.
References SCIP_Real, and TimeSeries::smoothestimation.
Referenced by printReport().
|
static |
resample to lower resolution
| timeseries | time series |
Definition at line 1903 of file event_estim.c.
References assert(), TimeSeries::des, doubleExpSmoothReset(), doubleExpSmoothUpdate(), TimeSeries::estimation, i, TimeSeries::initialvalue, TimeSeries::nvals, TimeSeries::resolution, timeSeriesUpdateSmoothEstimation(), and TimeSeries::vals.
Referenced by timeSeriesUpdate().
|
static |
update time series
| scip | SCIP data structure |
| timeseries | time series |
| treedata | tree data |
| isleaf | are we at a leaf node? |
Definition at line 1930 of file event_estim.c.
References assert(), TimeSeries::currentvalue, TimeSeries::des, doubleExpSmoothUpdate(), TimeSeries::estimation, TimeSeries::nobs, NULL, TimeSeries::nvals, TimeSeries::resolution, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, timeSeriesEstimate(), timeSeriesResample(), timeSeriesUpdateSmoothEstimation(), TimeSeries::useleafts, TimeSeries::vals, and TimeSeries::valssize.
Referenced by updateTimeseries().
|
static |
get name of time series
| timeseries | time series |
Definition at line 1979 of file event_estim.c.
References TimeSeries::name.
Referenced by printReport(), and updateTimeseries().
|
static |
reset all time series
| eventhdlrdata | event handler data |
Definition at line 1988 of file event_estim.c.
References assert(), NTIMESERIES, NULL, timeSeriesReset(), and TimeSeries::useleafts.
Referenced by SCIP_DECL_EVENTINITSOL().
|
static |
free all time series
Definition at line 2011 of file event_estim.c.
References assert(), NTIMESERIES, NULL, and timeSeriesFree().
Referenced by SCIP_DECL_EVENTFREE().
|
static |
get ensemble tree size estimation as a combination of the individual time series estimations
the coefficients have been computed based on a nonlinear fit on a broad set of publicly available MIP instances; please refer to the publication at the top of this file for further details.
| eventhdlrdata | event handler data |
Definition at line 2033 of file event_estim.c.
References assert(), nnodes, TreeData::nnodes, NTIMESERIES, NULL, SCIP_Real, timeSeriesEstimate(), treeDataGetWbe(), TSPOS_GAP, TSPOS_LFREQ, TSPOS_OPEN, TSPOS_SSG, TSPOS_TREEWEIGHT, and TreeData::weight.
Referenced by SCIPgetTreesizeEstimation().
|
static |
get approximation of search tree completion depending on the selected method
| eventhdlrdata | event handler data |
| completed | pointer to store the search tree completion |
Definition at line 2128 of file event_estim.c.
References assert(), COMPLETIONTYPE_AUTO, COMPLETIONTYPE_GAP, COMPLETIONTYPE_MONOREG, COMPLETIONTYPE_REGFOREST, COMPLETIONTYPE_SSG, COMPLETIONTYPE_TREEWEIGHT, doubleExpSmoothGetTrend(), NULL, SubtreeSumGap::pblastsplit, SCIP_Bool, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIPregForestPredict(), TreeData::ssg, SSG_STARTPRIMBOUND, timeSeriesGetValue(), TSPOS_GAP, TSPOS_LFREQ, TSPOS_OPEN, TSPOS_SSG, TSPOS_TREEWEIGHT, SubtreeSumGap::value, and TreeData::weight.
Referenced by getEstimCompletion(), printReport(), SCIP_DECL_DISPOUTPUT(), and shouldApplyRestartCompletion().
|
static |
tree size estimation based on search tree completion
| scip | SCIP data structure |
| eventhdlrdata | event handler data |
| estim | pointer to store the estimation value |
Definition at line 2214 of file event_estim.c.
References getSearchCompletion(), MIN, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPgetNNodes().
Referenced by SCIPgetTreesizeEstimation().
|
static |
update callback at nodes
Definition at line 2236 of file event_estim.c.
References assert(), MAX, NULL, REALABS, SCIP_OKAY, SCIP_Real, SCIPgetDualbound(), SCIPgetPrimalbound(), SCIPisEQ(), SCIPisInfinity(), SCIPisInRestart(), and timeSeriesGetValue().
|
static |
update callback at nodes
Definition at line 2277 of file event_estim.c.
References SCIP_OKAY, SCIP_Real, and TreeData::weight.
|
static |
update callback at nodes
Definition at line 2286 of file event_estim.c.
References TreeData::nleaves, TreeData::nvisited, SCIP_OKAY, and SCIP_Real.
|
static |
update callback at nodes
Definition at line 2298 of file event_estim.c.
References TreeData::nvisited, SCIP_OKAY, TreeData::ssg, and SubtreeSumGap::value.
|
static |
update callback at nodes
Definition at line 2310 of file event_estim.c.
References TreeData::nopen, TreeData::nvisited, SCIP_OKAY, and SCIP_Real.
|
static |
include time series to forecast into event handler
Definition at line 2322 of file event_estim.c.
References assert(), DES_ALPHA_GAP, DES_ALPHA_LEAFFREQUENCY, DES_ALPHA_OPENNODES, DES_ALPHA_SSG, DES_ALPHA_TREEWEIGHT, DES_BETA_GAP, DES_BETA_LEAFFREQUENCY, DES_BETA_OPENNODES, DES_BETA_SSG, DES_BETA_TREEWEIGHT, NULL, SCIP_CALL, SCIP_OKAY, timeSeriesCreate(), TSPOS_GAP, TSPOS_LFREQ, TSPOS_OPEN, TSPOS_SSG, and TSPOS_TREEWEIGHT.
Referenced by SCIPincludeEventHdlrEstim().
|
static |
get restartpolicy based on the value of the restart parameter
| eventhdlrdata | event handler data |
Definition at line 2355 of file event_estim.c.
References RESTARTPOLICY_ALWAYS, RESTARTPOLICY_CHAR_ALWAYS, RESTARTPOLICY_CHAR_COMPLETION, RESTARTPOLICY_CHAR_ESTIMATION, RESTARTPOLICY_CHAR_NEVER, RESTARTPOLICY_COMPLETION, RESTARTPOLICY_ESTIMATION, RESTARTPOLICY_NEVER, and SCIPerrorMessage.
Referenced by shouldApplyRestart().
|
static |
check if a restart is applicable considering limit and threshold user parameters
Definition at line 2379 of file event_estim.c.
References FALSE, nnodes, SCIP_Bool, SCIP_Longint, SCIPgetNActivePricers(), SCIPgetNRootIntFixingsRun(), SCIPisNLPConstructed(), and TRUE.
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
should a restart be applied based on the value of the selected completion method?
Definition at line 2416 of file event_estim.c.
References FALSE, getSearchCompletion(), NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIP_Real, SCIP_VERBLEVEL_FULL, SCIPstatistic, SCIPverbMessage(), and TRUE.
Referenced by shouldApplyRestart().
|
static |
should a restart be applied based on the value of the selected completion method?
Definition at line 2442 of file event_estim.c.
References FALSE, NULL, SCIP_Bool, SCIP_LONGINT_FORMAT, SCIP_Real, SCIP_VERBLEVEL_FULL, SCIPgetTreesizeEstimation(), SCIPstatistic, SCIPverbMessage(), and TRUE.
Referenced by shouldApplyRestart().
|
static |
check if a restart should be performed based on the given restart policy
Definition at line 2479 of file event_estim.c.
References FALSE, getRestartPolicy(), RESTARTPOLICY_ALWAYS, RESTARTPOLICY_COMPLETION, RESTARTPOLICY_ESTIMATION, RESTARTPOLICY_NEVER, SCIP_Bool, shouldApplyRestartCompletion(), shouldApplyRestartEstimation(), and TRUE.
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
update all time series
| scip | SCIP data structure |
| eventhdlrdata | event handler data |
| treedata | tree data |
| isleaf | are we at a leaf node? |
Definition at line 2509 of file event_estim.c.
References assert(), NTIMESERIES, NULL, SCIP_Bool, SCIP_CALL, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPdebugMsg, timeSeriesGetName(), timeSeriesGetValue(), and timeSeriesUpdate().
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
print a treesize estimation report into the string buffer
| scip | SCIP data structure |
| eventhdlrdata | event handler data |
| strbuf | string buffer |
| reportnum | report number, or 0 to omit number |
Definition at line 2537 of file event_estim.c.
References TimeSeries::des, doubleExpSmoothGetTrend(), getSearchCompletion(), MAX, MIN, TreeData::ninner, TreeData::nleaves, TreeData::nnodes, TreeData::nopen, NTIMESERIES, TreeData::nvisited, predictTotalSizeTreeProfile(), real2String(), SCIP_CALL_ABORT, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_Real, SCIPgetSolvingTime(), SCIPgetTreesizeEstimation(), SCIPsnprintf(), timeSeriesEstimate(), timeSeriesGetName(), timeSeriesGetResolution(), timeSeriesGetSmoothEstimation(), timeSeriesGetValue(), treeDataGetWbe(), and TreeData::weight.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIP_DECL_TABLEOUTPUT().
|
static |
copy method for event handler plugins (called when SCIP copies plugins)
Definition at line 2623 of file event_estim.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeEventHdlrEstim().
|
static |
destructor of event handler to free user data (called when SCIP is exiting)
Definition at line 2634 of file event_estim.c.
References assert(), freeTimeSeries(), freeTreeData(), NULL, SCIP_OKAY, SCIPeventhdlrGetData(), and SCIPfreeMemory.
|
static |
initialization method of event handler (called after problem was transformed)
Definition at line 2652 of file event_estim.c.
References assert(), DEFAULT_REGFORESTFILENAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPeventhdlrGetData(), and SCIPregForestFromFile().
|
static |
deinitialization method of event handler (called before transformed problem is freed)
Definition at line 2673 of file event_estim.c.
References assert(), NULL, SCIP_OKAY, SCIPeventhdlrGetData(), and SCIPregForestFree().
|
static |
solving process initialization method of event handler (called when branch and bound process is about to begin)
Definition at line 2687 of file event_estim.c.
References assert(), createTreeProfile(), EVENTTYPE_ESTIM, NULL, resetTimeSeries(), resetTreeData(), SCIP_CALL, SCIP_OKAY, SCIPcatchEvent(), SCIPeventhdlrGetData(), and TRUE.
|
static |
solving process deinitialization method of event handler (called before branch and bound process data is freed)
Definition at line 2717 of file event_estim.c.
References assert(), EVENTTYPE_ESTIM, freeTreeProfile(), NULL, SCIP_CALL, SCIP_OKAY, SCIPdropEvent(), and SCIPeventhdlrGetData().
|
static |
execution method of event handler
Definition at line 2734 of file event_estim.c.
References assert(), FALSE, isRestartApplicable(), NULL, printReport(), SCIP_CALL, SCIP_EVENTTYPE_NODEBRANCHED, SCIP_EVENTTYPE_NODEDELETE, SCIP_MAXSTRLEN, SCIP_NODETYPE_CHILD, SCIP_NODETYPE_DEADEND, SCIP_NODETYPE_LEAF, SCIP_NODETYPE_SIBLING, SCIP_OKAY, SCIP_Real, SCIP_STATUS_UNKNOWN, SCIP_VERBLEVEL_HIGH, SCIPdebugMsg, SCIPeventGetNode(), SCIPeventGetType(), SCIPeventhdlrGetData(), SCIPfloor(), SCIPgetNChildren(), SCIPgetNRuns(), SCIPgetStatus(), SCIPisExact(), SCIPnodeGetType(), SCIPrestartSolve(), SCIPverbMessage(), SCIPwasNodeLastBranchParent(), shouldApplyRestart(), updateTimeseries(), updateTreeData(), updateTreeProfile(), and TreeData::weight.
|
static |
output method of statistics table to output file stream 'file'
Definition at line 2839 of file event_estim.c.
References assert(), EVENTHDLR_NAME, NULL, printReport(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPfindEventhdlr(), and SCIPinfoMessage().
|
static |
output method of search tree completion display column to output file stream 'file'
Definition at line 2862 of file event_estim.c.
References assert(), DISP_NAME, EVENTHDLR_NAME, getSearchCompletion(), MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdispGetName(), SCIPeventhdlrGetData(), SCIPfindEventhdlr(), SCIPinfoMessage(), and TreeData::weight.
| SCIP_RETCODE SCIPincludeEventHdlrEstim | ( | SCIP * | scip | ) |
creates event handler for tree size estimation
Definition at line 2892 of file event_estim.c.
References assert(), BMSclearMemory, createTreeData(), DEFAULT_COEFMONOSSG, DEFAULT_COEFMONOWEIGHT, DEFAULT_COMPLETIONTYPE, DEFAULT_COUNTONLYLEAVES, DEFAULT_ESTIMMETHOD, DEFAULT_HITCOUNTERLIM, DEFAULT_MINNODES, DEFAULT_REGFORESTFILENAME, DEFAULT_REPORTFREQ, DEFAULT_RESTARTACTPRICERS, DEFAULT_RESTARTFACTOR, DEFAULT_RESTARTLIMIT, DEFAULT_RESTARTNONLINEAR, DEFAULT_RESTARTPOLICY, DEFAULT_SHOWSTATS, DEFAULT_SSG_NMAXSUBTREES, DEFAULT_SSG_NMINNODESLASTSPLIT, DEFAULT_TREEPROFILE_ENABLED, DEFAULT_TREEPROFILE_MINNODESPERDEPTH, DEFAULT_USELEAFTS, DISP_DESC, DISP_HEADER, DISP_NAME, DISP_POSITION, DISP_PRIORITY, DISP_STRIPLINE, DISP_WIDTH, ESTIMMETHODS, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, freeTreeData(), includeTimeseries(), NULL, SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_DISPSTATUS_AUTO, SCIP_LONGINT_MAX, SCIP_OKAY, SCIP_REAL_MAX, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddLongintParam(), SCIPaddRealParam(), SCIPaddStringParam(), SCIPallocMemory, SCIPfreeMemory, SCIPincludeDisp(), SCIPincludeEventhdlrBasic(), SCIPincludeTable(), SCIPsetEventhdlrCopy(), SCIPsetEventhdlrExit(), SCIPsetEventhdlrExitsol(), SCIPsetEventhdlrFree(), SCIPsetEventhdlrInit(), SCIPsetEventhdlrInitsol(), TABLE_DESC, TABLE_EARLIEST_STAGE, TABLE_NAME, TABLE_POSITION, and TRUE.
Referenced by SCIP_DECL_EVENTCOPY(), and SCIPincludeDefaultPlugins().
return an estimation of the final tree size
Definition at line 3020 of file event_estim.c.
References assert(), ESTIMMETHOD_COMPL, ESTIMMETHOD_ENSMBL, ESTIMMETHOD_GAP, ESTIMMETHOD_LFREQ, ESTIMMETHOD_OPEN, ESTIMMETHOD_SSG, ESTIMMETHOD_TPROF, ESTIMMETHOD_TREEWEIGHT, ESTIMMETHOD_WBE, ESTIMMETHODS, EVENTHDLR_NAME, getEnsembleEstimation(), getEstimCompletion(), NULL, predictTotalSizeTreeProfile(), SCIP_CALL_ABORT, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIPeventhdlrGetData(), SCIPfindEventhdlr(), SCIPwarningMessage(), timeSeriesEstimate(), treeDataGetWbe(), TSPOS_GAP, TSPOS_LFREQ, TSPOS_NONE, TSPOS_OPEN, TSPOS_SSG, and TSPOS_TREEWEIGHT.
Referenced by printReport(), and shouldApplyRestartEstimation().