83#define EVENTHDLR_NAME "estim"
84#define EVENTHDLR_DESC "event handler for tree size estimation and restarts"
85#define EVENTTYPE_ESTIM (SCIP_EVENTTYPE_NODEDELETE | SCIP_EVENTTYPE_NODEBRANCHED)
102#define RESTARTPOLICY_CHAR_NEVER 'n'
103#define RESTARTPOLICY_CHAR_ALWAYS 'a'
104#define RESTARTPOLICY_CHAR_COMPLETION 'c'
105#define RESTARTPOLICY_CHAR_ESTIMATION 'e'
107#define DES_USETRENDINLEVEL TRUE
110#define TABLE_NAME "estim"
111#define TABLE_DESC "tree size estimations statistics table"
112#define TABLE_POSITION 18500
113#define TABLE_EARLIEST_STAGE SCIP_STAGE_INIT
116#define DISP_NAME "completed"
117#define DISP_DESC "completion of search in percent (based on tree size estimation)"
118#define DISP_HEADER "compl."
120#define DISP_PRIORITY 110000
121#define DISP_POSITION 30100
122#define DISP_STRIPLINE TRUE
124#define INITIALSIZE 100
128#define DES_ALPHA_TREEWEIGHT 0.65
129#define DES_BETA_TREEWEIGHT 0.15
131#define DES_ALPHA_GAP 0.6
132#define DES_BETA_GAP 0.15
134#define DES_ALPHA_LEAFFREQUENCY 0.3
135#define DES_BETA_LEAFFREQUENCY 0.33
137#define DES_ALPHA_SSG 0.6
138#define DES_BETA_SSG 0.15
140#define DES_ALPHA_OPENNODES 0.6
141#define DES_BETA_OPENNODES 0.15
143#define MAX_REGFORESTSIZE 10000000
148#define COMPLETIONTYPE_AUTO 'a'
149#define COMPLETIONTYPE_REGFOREST 'r'
150#define COMPLETIONTYPE_MONOREG 'm'
151#define COMPLETIONTYPE_TREEWEIGHT 'w'
152#define COMPLETIONTYPE_SSG 's'
153#define COMPLETIONTYPE_GAP 'g'
157#define ESTIMMETHOD_COMPL 'c'
158#define ESTIMMETHOD_WBE 'b'
159#define ESTIMMETHOD_ENSMBL 'e'
160#define ESTIMMETHOD_GAP 'g'
161#define ESTIMMETHOD_LFREQ 'l'
162#define ESTIMMETHOD_OPEN 'o'
163#define ESTIMMETHOD_SSG 's'
164#define ESTIMMETHOD_TPROF 't'
165#define ESTIMMETHOD_TREEWEIGHT 'w'
167#define ESTIMMETHODS "bceglostw"
170#define TREEPROFILE_MINSIZE 512
171#define SSG_STARTPRIMBOUND SCIP_INVALID
243#define DEFAULT_USELEAFTS TRUE
244#define DEFAULT_REPORTFREQ -1
245#define DEFAULT_REGFORESTFILENAME "-"
246#define DEFAULT_COEFMONOWEIGHT 0.3667
247#define DEFAULT_COEFMONOSSG 0.6333
248#define DEFAULT_COMPLETIONTYPE COMPLETIONTYPE_AUTO
249#define DEFAULT_ESTIMMETHOD ESTIMMETHOD_TREEWEIGHT
252#define DEFAULT_TREEPROFILE_ENABLED FALSE
253#define DEFAULT_TREEPROFILE_MINNODESPERDEPTH 20.0
254#define DEFAULT_RESTARTPOLICY 'e'
255#define DEFAULT_RESTARTLIMIT 1
256#define DEFAULT_MINNODES 1000L
257#define DEFAULT_COUNTONLYLEAVES FALSE
258#define DEFAULT_RESTARTFACTOR 50.0
259#define DEFAULT_RESTARTNONLINEAR FALSE
260#define DEFAULT_RESTARTACTPRICERS FALSE
261#define DEFAULT_HITCOUNTERLIM 50
262#define DEFAULT_SSG_NMAXSUBTREES -1
264#define DEFAULT_SSG_NMINNODESLASTSPLIT 0L
265#define DEFAULT_SHOWSTATS FALSE
268struct SCIP_EventhdlrData
274 char* regforestfilename;
282 int nrestartsperformed;
283 int restarthitcounter;
288 char restartpolicyparam;
292 char completiontypeparam;
331#define DECL_TIMESERIESUPDATE(x) SCIP_RETCODE x (\
334 TREEDATA* treedata, \
392 else if( num >= 1e+20 )
410 if( *regforest ==
NULL )
412 regforestptr = *regforest;
438 for( treeidx = 0; treeidx < regforest->
ntrees; ++treeidx )
440 int treepos = regforest->
nbegin[treeidx];
441 int* childtree = &(regforest->
child[2 * treepos]);
442 int* splitidxtree = &(regforest->
splitidx[treepos]);
449 while( splitidxtree[pos] != - 1 )
453 assert(splitidxtree[pos] < regforest->
dim);
455 goright = (datapoint[splitidxtree[pos]] > valuetree[pos]) ? 1 : 0;
456 pos = childtree[2 * pos + goright];
459 value += valuetree[pos];
502 SCIPerrorMessage(
"Could not read first line of regression file '%s'\n", filename);
507 sscanret = sscanf(buffer, firstlineformat, &ntrees, &dim, &size);
512 SCIPerrorMessage(
"Could not extract tree information from buffer line [%s]\n", buffer);
516 SCIPdebugMessage(
"Read ntrees=%d, dim=%d, size=%d (return value %d)\n", ntrees, dim, size, sscanret);
526 if( dim <= 0 || ntrees <= 0 || size <= 0 )
529 SCIPerrorMessage(
"Cannot create regression tree with negative size, dimension, or number of trees\n");
536 regforestptr = *regforest;
544 regforestptr->
dim = dim;
545 regforestptr->
size = size;
546 regforestptr->
ntrees = ntrees;
564 sscanret = sscanf(buffer, dataformat,
566 ®forestptr->
child[2 * pos],
567 ®forestptr->
child[2 * pos + 1],
582 assert(treepos < regforestptr->ntrees);
584 regforestptr->
nbegin[treepos++] = pos;
658 if( mindepth < treeprofile->profilesize )
697 (*treeprofile)->profile =
NULL;
698 (*treeprofile)->profilesize = 0;
704 (*treeprofile)->lastestimate = -1.0;
719 if( *treeprofile ==
NULL )
745 if( treeprofile ==
NULL )
757 nodedepthcnt = ++treeprofile->
profile[nodedepth];
762 nbits = 8*
sizeof(
unsigned int);
764 if( (
unsigned int)nodedepth < nbits && nodedepthcnt == (1U << nodedepth) )
779 if( nodedepthcnt > maxnodes )
785 else if( nodedepthcnt == maxnodes )
812 if( treeprofile ==
NULL )
838 estimate += growthfac;
839 growthfac *= gamma_d;
843 for( ; d < waist; ++d )
847 assert(1.0 <= gamma_d && gamma_d <= 2.0);
848 estimate += growthfac;
849 growthfac *= gamma_d;
856 assert(0.0 <= gamma_d && gamma_d <= 1.0);
858 estimate += growthfac;
859 growthfac *= gamma_d;
949 (*ssg)->nsubtrees = 0;
969 if( (*ssg)->nodes2info !=
NULL )
1001 assert(oldpos == -1 || oldpos == nodeinfo->
pos);
1002 nodeinfo->
pos = newpos;
1024 nodeinfo->
node = node;
1038 assert(subtreeidx < ssg->nsubtrees);
1074 nnewsubtrees = nopennodes[0] + nopennodes[1] + nopennodes[2] + (addfocusnode ? 1 : 0);
1099 for( t = 0; t < 3; ++t )
1102 int nnodes = nopennodes[t];
1106 for( n = 0; n <
nnodes; ++n )
1150 gap =
MIN(gap, 1.0);
1174 if( nodeinfo ==
NULL )
1182 if( nodeinfo ==
NULL )
1192 pos = nodeinfo->
pos;
1238 int parentnodelabel;
1249 if( nchildren == 0 )
1259 parentnode = focusnode;
1268 parentnode = focusnode;
1271 parentnodelabel = parentnodeinfo->
subtreeidx;
1274 for( n = 0; n < nchildren; ++n )
1292#ifdef SCIP_DISABLED_CODE
1336 for( t = 0; t < 3; ++t )
1340 for( n = 0; n < nopennodes[t]; ++n )
1350 assert(label >= 0 && label < ssg->nsubtrees);
1351 lowerbounds[label] =
MIN(lowerbounds[label], lowerbound);
1371 subtreegap =
MIN(subtreegap, 1.0);
1373 gapsum += subtreegap;
1433 gapsum += subtreegap;
1479 ((ssg->
nmaxsubtrees == -1 || nnewsubtrees <= ssg->nmaxsubtrees) &&
1491 SCIPdebugMsg(
scip,
"Keep split into %d subtrees because new split into %d subtrees exceeds limit %d\n",
1501 if( insertchildren )
1513 else if( insertchildren )
1519 if( nchildren == 0 )
1540 treedata->
nopen = 1;
1575 if( *treedata ==
NULL )
1598 if( nchildren == 0 )
1606 treedata->
nnodes += nchildren;
1607 treedata->
nopen += nchildren;
1646 "weight: %.4Lf, ssg %.4f",
1707 des->
level = newlevel;
1708 des->
trend = newtrend;
1733 timeseries->
nvals = 0;
1734 timeseries->
nobs = 0L;
1759 assert(beta >= 0.0 && beta <= 1);
1763 timeseriesptr = *timeseries;
1771 timeseriesptr->timeseriesupdate = timeseriesupdate;
1783 timeseriesptr->
des.
beta = beta;
1853 if( timeseries->
nobs == 0L )
1860 if(
EPSZ(val - targetval, tolerance) )
1868 if( (targetval > val && trend < tolerance) || (targetval < val && trend > -tolerance) )
1875 return timeseries->
useleafts ? 2.0 * estimated - 1.0 : estimated;
1914 des = ×eries->
des;
1918 for(
i = 0;
i < timeseries->
nvals / 2; ++
i )
1920 timeseries->
vals[
i] = timeseries->
vals[2 *
i];
1946 assert(timeseries->timeseriesupdate !=
NULL);
1947 SCIP_CALL( timeseries->timeseriesupdate(
scip, timeseries, treedata, &value) );
1964 tspos = timeseries->
nvals++;
1965 timeseries->
vals[tspos] = value;
1985 return timeseries->
name;
1994 TIMESERIES** tss = eventhdlrdata->timeseries;
2003 tss[t]->
useleafts = eventhdlrdata->useleafts;
2018 TIMESERIES** tss = eventhdlrdata->timeseries;
2080 treedata = eventhdlrdata->treedata;
2083 if( treedata->
weight <= 0.3 )
2086 coeffs = coeffs_early;
2090 else if( treedata->
weight <= 0.6 )
2092 coeffs = coeffs_intermediate;
2101 coeffs = coeffs_late;
2113 TSPOS tspos = tsposs[t];
2117 testim = treedata->
nnodes;
2119 estim += coeffs[t] * testim;
2122 if( estim < treedata->
nnodes )
2137 char completiontype;
2140 treedata = eventhdlrdata->treedata;
2141 completiontype = eventhdlrdata->completiontypeparam;
2155 SCIP_Bool useweight = eventhdlrdata->treeisbinary;
2158 if( eventhdlrdata->regforest !=
NULL )
2160 else if( useweight && usessg )
2162 else if( useweight )
2171 switch (completiontype)
2190 *completed = eventhdlrdata->coefmonoweight * (
SCIP_Real)treedata->
weight +
2191 eventhdlrdata->coefmonossg * (1.0 - treedata->
ssg->
value);
2203 *completed = 1.0 - treedata->
ssg->
value;
2228 completed =
MIN(completed, 1.0);
2230 if( completed > 0.0 )
2268 *value = 1.0 -
REALABS(primalbound - dualbound)/
MAX(abspb, absdb);
2272 *value =
MAX(*value, 0.0);
2361 switch (eventhdlrdata->restartpolicyparam)
2372 SCIPerrorMessage(
"Unknown restart policy %c\n", eventhdlrdata->restartpolicyparam);
2397 if( eventhdlrdata->restartlimit != -1 && eventhdlrdata->nrestartsperformed >= eventhdlrdata->restartlimit )
2401 if( eventhdlrdata->countonlyleaves )
2402 nnodes = eventhdlrdata->treedata->nleaves;
2404 nnodes = eventhdlrdata->treedata->nvisited;
2424 if( completion < 1.0 / eventhdlrdata->restartfactor )
2428 "Completion %.5f less than restart threshold %.5f\n",
2429 completion, 1.0 / eventhdlrdata->restartfactor);
2449 if( estimation < 0.0 )
2453 "Estimation %g is still unavailable\n",
2461 if( estimation > eventhdlrdata->treedata->nnodes * eventhdlrdata->restartfactor )
2465 "Estimation %g exceeds number of estimation tree nodes %" SCIP_LONGINT_FORMAT " by a factor of %.1f\n",
2466 estimation, eventhdlrdata->treedata->nnodes, estimation / eventhdlrdata->treedata->nnodes);
2487 applyrestart =
TRUE;
2490 applyrestart =
FALSE;
2502 return applyrestart;
2514 TIMESERIES** tss = eventhdlrdata->timeseries;
2523#ifdef SCIP_MORE_DEBUG
2525 "Update of time series '%s', current value %.4f (%" SCIP_LONGINT_FORMAT " observations)\n",
2542 TREEDATA* treedata = eventhdlrdata->treedata;
2559 completed =
MIN(1.0, completed);
2560 completed =
MAX(0.0, completed);
2569 "weight: %.4Lf completed %.4f\n",
2582 "estim",
"value",
"trend",
"resolution",
"smooth");
2587 real2String(wbeestim, wbeestimstr, 0),
"-",
"-",
"-",
"-");
2591 "-",
"-",
"-",
"-");
2598 TIMESERIES* ts = eventhdlrdata->timeseries[t];
2663 eventhdlrdata->lastrestartrun = 0;
2664 eventhdlrdata->nrestartsperformed = 0;
2692 eventhdlrdata->restarthitcounter = 0;
2693 eventhdlrdata->weightlastreport = 0.0;
2694 eventhdlrdata->nreports = 0;
2703 if( eventhdlrdata->treeprofile_enabled )
2708 eventhdlrdata->treeisbinary =
TRUE;
2722 if( eventhdlrdata->treeprofile !=
NULL )
2746 treedata = eventhdlrdata->treedata;
2767 if( nchildren != 2 )
2768 eventhdlrdata->treeisbinary =
FALSE;
2783 (eventhdlrdata->reportfreq == 0
2784 || treedata->
weight >= eventhdlrdata->weightlastreport + 1.0 / (
SCIP_Real)eventhdlrdata->reportfreq) )
2789 if( eventhdlrdata->reportfreq > 0 )
2807 eventhdlrdata->restarthitcounter++;
2809 if( eventhdlrdata->restarthitcounter >= eventhdlrdata->hitcounterlim )
2814 eventhdlrdata->nrestartsperformed++;
2817 "Restart triggered after %d consecutive estimations that the remaining tree will be large\n",
2818 eventhdlrdata->restarthitcounter);
2828 eventhdlrdata->restarthitcounter = 0;
2847 if( eventhdlrdata->showstats )
2874 treedata = eventhdlrdata->treedata;
2878 completed =
MIN(completed, 1.0);
2880 if( treedata->
weight >= 0.005 && completed > 0 )
2904 eventExecEstim, eventhdlrdata) );
2920 "tree size estimation method: (c)ompletion, (e)nsemble, "
2921 "time series forecasts on either (g)ap, (l)eaf frequency, (o)open nodes, tree (w)eight, (s)sg, "
2922 "or (t)ree profile or w(b)e",
2935 "factor by which the estimated number of nodes should exceed the current number of nodes",
2939 "whether to apply a restart when nonlinear constraints are present",
2943 "whether to apply a restart when active pricers are used",
2947 "coefficient of tree weight in monotone approximation of search completion",
2951 "coefficient of 1 - SSG in monotone approximation of search completion",
2954 SCIP_CALL(
SCIPaddIntParam(
scip,
"estimation/restarts/hitcounterlim",
"limit on the number of successive samples to really trigger a restart",
2958 "report frequency on estimation: -1: never, 0:always, k >= 1: k times evenly during search",
2965 "approximation of search tree completion: (a)uto, (g)ap, tree (w)eight, (m)onotone regression, (r)egression forest, (s)sg",
2969 "should the event handler collect data?",
2973 "minimum average number of nodes at each depth before producing estimations",
2977 "use leaf nodes as basic observations for time series, or all nodes?",
2981 "should statistics be shown at the end?",
2986 "the maximum number of individual SSG subtrees; -1: no limit",
2990 "minimum number of nodes to process between two consecutive SSG splits",
3029 if( eventhdlr ==
NULL )
3038 switch (eventhdlrdata->estimmethod)
3077 SCIPerrorMessage(
"Unknown estimation '%c' method specified, should be one of [%s]\n",
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)
#define SCIP_CALL_ABORT(x)
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
#define SCIP_LONGINT_FORMAT
static void SCIPregForestFree(SCIP_REGFOREST **regforest)
static char * timeSeriesGetName(TIMESERIES *timeseries)
static SCIP_RETCODE subtreeSumGapComputeFromScratchEfficiently(SCIP *scip, SUBTREESUMGAP *ssg, SCIP_Bool updatescaling)
enum RestartPolicy RESTARTPOLICY
#define DEFAULT_COEFMONOWEIGHT
static SCIP_RETCODE subtreeSumGapSplit(SCIP *scip, SUBTREESUMGAP *ssg, SCIP_Bool addfocusnode)
#define DES_BETA_TREEWEIGHT
static void freeTreeProfile(SCIP *scip, TREEPROFILE **treeprofile)
static SCIP_RETCODE updateTreeData(SCIP *scip, TREEDATA *treedata, SCIP_NODE *node, int nchildren)
#define DEFAULT_SHOWSTATS
#define DEFAULT_RESTARTLIMIT
static SCIP_Real getEnsembleEstimation(SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_Bool shouldApplyRestart(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
#define DES_ALPHA_TREEWEIGHT
#define DES_ALPHA_OPENNODES
#define MAX_REGFORESTSIZE
#define RESTARTPOLICY_CHAR_ALWAYS
#define RESTARTPOLICY_CHAR_NEVER
struct TreeProfile TREEPROFILE
static SCIP_Bool isRestartApplicable(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
#define DEFAULT_REPORTFREQ
struct TimeSeries TIMESERIES
static void printReport(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata, char *strbuf, int reportnum)
static SCIP_Real timeSeriesGetSmoothEstimation(TIMESERIES *timeseries)
static SCIP_RETCODE subtreeSumGapCreate(SCIP *scip, SUBTREESUMGAP **ssg)
static void doubleExpSmoothUpdate(DOUBLEEXPSMOOTH *des, SCIP_Real xnew)
static void copyTreeProfileStats(TREEPROFILESTATS *dest, TREEPROFILESTATS *src)
#define DEFAULT_SSG_NMAXSUBTREES
#define DES_BETA_LEAFFREQUENCY
#define DEFAULT_SSG_NMINNODESLASTSPLIT
#define COMPLETIONTYPE_REGFOREST
#define DES_USETRENDINLEVEL
#define COMPLETIONTYPE_MONOREG
#define ESTIMMETHOD_TREEWEIGHT
#define COMPLETIONTYPE_TREEWEIGHT
#define ESTIMMETHOD_LFREQ
static SCIP_RETCODE timeSeriesUpdate(SCIP *scip, TIMESERIES *timeseries, TREEDATA *treedata, SCIP_Bool isleaf)
#define DEFAULT_TREEPROFILE_ENABLED
struct TreeProfileStats TREEPROFILESTATS
static SCIP_Real SCIPregForestPredict(SCIP_REGFOREST *regforest, SCIP_Real *datapoint)
static void freeTreeData(SCIP *scip, TREEDATA **treedata)
static SCIP_RETCODE resetTreeData(SCIP *scip, TREEDATA *treedata)
static SCIP_Real timeSeriesEstimate(TIMESERIES *timeseries, TREEDATA *treedata)
static SCIP_RETCODE includeTimeseries(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
#define ESTIMMETHOD_ENSMBL
#define COMPLETIONTYPE_GAP
#define COMPLETIONTYPE_SSG
static void timeSeriesUpdateSmoothEstimation(TIMESERIES *timeseries, SCIP_Real estimation)
#define DEFAULT_COUNTONLYLEAVES
static SCIP_RETCODE subtreeSumGapRemoveNode(SCIP *scip, SUBTREESUMGAP *ssg, SCIP_NODE *node)
static void timeSeriesResample(TIMESERIES *timeseries)
static SCIP_RETCODE subtreeSumGapReset(SCIP *scip, SUBTREESUMGAP *ssg)
static SCIP_RETCODE updateTreeProfile(SCIP *scip, TREEPROFILE *treeprofile, SCIP_NODE *node)
static SCIP_RETCODE createTreeData(SCIP *scip, TREEDATA **treedata)
static SCIP_RETCODE getEstimCompletion(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata, SCIP_Real *estim)
#define DEFAULT_HITCOUNTERLIM
#define DES_BETA_OPENNODES
static SCIP_Real calcGap(SCIP *scip, SCIP_Real lowerbound)
static SCIP_RETCODE timeSeriesCreate(SCIP *scip, TIMESERIES **timeseries, const char *name, SCIP_Real targetvalue, SCIP_Real initialvalue, SCIP_Real alpha, SCIP_Real beta,)
#define DEFAULT_RESTARTACTPRICERS
SCIP_Real SCIPgetTreesizeEstimation(SCIP *scip)
static void timeSeriesFree(SCIP *scip, TIMESERIES **timeseries)
#define DEFAULT_RESTARTFACTOR
#define DEFAULT_USELEAFTS
SCIP_RETCODE SCIPincludeEventHdlrEstim(SCIP *scip)
#define DES_ALPHA_LEAFFREQUENCY
static SCIP_RETCODE subtreeSumGapInsertChildren(SCIP *scip, SUBTREESUMGAP *ssg)
static SCIP_Real timeSeriesGetValue(TIMESERIES *timeseries)
@ RESTARTPOLICY_COMPLETION
@ RESTARTPOLICY_ESTIMATION
static SCIP_Bool shouldApplyRestartCompletion(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_RETCODE extendMemoryTreeProfile(SCIP *scip, TREEPROFILE *treeprofile, int mindepth)
static void subtreeSumGapFree(SCIP *scip, SUBTREESUMGAP **ssg)
#define DECL_TIMESERIESUPDATE(x)
static void timeSeriesReset(TIMESERIES *timeseries)
#define RESTARTPOLICY_CHAR_COMPLETION
#define TABLE_EARLIEST_STAGE
#define ESTIMMETHOD_TPROF
static void doubleExpSmoothInit(DOUBLEEXPSMOOTH *des, SCIP_Real x1)
#define DEFAULT_COEFMONOSSG
static SCIP_Bool isEqualTreeProfileStats(TREEPROFILESTATS *stats, TREEPROFILESTATS *other)
static int timeSeriesGetResolution(TIMESERIES *timeseries)
static SCIP_RETCODE createTreeProfile(SCIP *scip, TREEPROFILE **treeprofile)
static void subtreeSumGapDelSubtrees(SCIP *scip, SUBTREESUMGAP *ssg)
static SCIP_RETCODE updateTimeseries(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata, TREEDATA *treedata, SCIP_Bool isleaf)
static void resetTreeProfileStats(TREEPROFILESTATS *treeprofilestats)
static SCIP_Real treeDataGetWbe(TREEDATA *treedata)
static void resetTimeSeries(SCIP_EVENTHDLRDATA *eventhdlrdata)
#define DEFAULT_COMPLETIONTYPE
struct SubtreeSumGap SUBTREESUMGAP
static SCIP_RETCODE SCIPregForestFromFile(SCIP_REGFOREST **regforest, const char *filename)
static RESTARTPOLICY getRestartPolicy(SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_Real doubleExpSmoothGetTrend(DOUBLEEXPSMOOTH *des)
struct DoubleExpSmooth DOUBLEEXPSMOOTH
static void doubleExpSmoothReset(DOUBLEEXPSMOOTH *des, SCIP_Real initialvalue)
static char * real2String(SCIP_Real num, char *buf, int digits)
static SCIP_RETCODE subtreeSumGapUpdate(SCIP *scip, SUBTREESUMGAP *ssg, SCIP_NODE *node, int nchildren, SCIP_Longint nsolvednodes)
static void freeTimeSeries(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_Real predictTotalSizeTreeProfile(SCIP *scip, TREEPROFILE *treeprofile, SCIP_Real minnodesperdepth)
#define ESTIMMETHOD_COMPL
#define TREEPROFILE_MINSIZE
#define COMPLETIONTYPE_AUTO
static SCIP_RETCODE subtreeSumGapStoreNode(SCIP *scip, SUBTREESUMGAP *ssg, SCIP_NODE *node, int subtreeidx)
static SCIP_RETCODE getSearchCompletion(SCIP_EVENTHDLRDATA *eventhdlrdata, SCIP_Real *completed)
#define RESTARTPOLICY_CHAR_ESTIMATION
static SCIP_Real timeSeriesGetTargetValue(TIMESERIES *timeseries)
#define DEFAULT_ESTIMMETHOD
#define SSG_STARTPRIMBOUND
#define DEFAULT_RESTARTNONLINEAR
#define DEFAULT_RESTARTPOLICY
static SCIP_Bool shouldApplyRestartEstimation(SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
#define DEFAULT_TREEPROFILE_MINNODESPERDEPTH
struct SCIP_RegForest SCIP_REGFOREST
#define DEFAULT_REGFORESTFILENAME
event handler for tree size estimation and restarts
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfeof(SCIP_FILE *stream)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
void ** SCIPpqueueElems(SCIP_PQUEUE *pqueue)
void SCIPpqueueDelPos(SCIP_PQUEUE *pqueue, int pos)
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)),)
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem)
int SCIPpqueueNElems(SCIP_PQUEUE *pqueue)
void * SCIPpqueueFirst(SCIP_PQUEUE *pqueue)
const char * SCIPdispGetName(SCIP_DISP *disp)
SCIP_RETCODE SCIPincludeDisp(SCIP *scip, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_RETCODE SCIPsetEventhdlrInitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_RETCODE SCIPsetEventhdlrCopy(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetEventhdlrExitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPreallocMemoryArray(scip, ptr, newnum)
#define SCIPallocMemoryArray(scip, ptr, num)
#define SCIPallocClearBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocClearMemoryArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeMemoryArray(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_NODETYPE SCIPnodeGetType(SCIP_NODE *node)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_NODE * SCIPnodeGetParent(SCIP_NODE *node)
int SCIPnodeGetDepth(SCIP_NODE *node)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
SCIP_RETCODE SCIPrestartSolve(SCIP *scip)
SCIP_Bool SCIPisInRestart(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetNSiblings(SCIP *scip)
int SCIPgetNChildren(SCIP *scip)
SCIP_RETCODE SCIPgetOpenNodesData(SCIP *scip, SCIP_NODE ***leaves, SCIP_NODE ***children, SCIP_NODE ***siblings, int *nleaves, int *nchildren, int *nsiblings)
SCIP_RETCODE SCIPgetChildren(SCIP *scip, SCIP_NODE ***children, int *nchildren)
SCIP_NODE * SCIPgetFocusNode(SCIP *scip)
int SCIPgetNLeaves(SCIP *scip)
SCIP_Bool SCIPwasNodeLastBranchParent(SCIP *scip, SCIP_NODE *node)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMSfreeMemory(ptr)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSclearMemory(ptr)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSclearMemoryArray(ptr, num)
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
propagator for symmetry handling
public methods for displaying runtime statistics
public methods for managing events
wrapper functions to map file i/o to standard or zlib file i/o
struct SCIP_File SCIP_FILE
public methods for message output
public data structures and miscellaneous methods
public methods for branch and bound tree
public methods for display handler plugins
public methods for event handler plugins and event handlers
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for variable pricer plugins
public methods for solutions
public methods for querying solving statistics
public methods for statistics table plugins
public methods for timing
public methods for the branch-and-bound tree
SCIP_Bool usetrendinlevel
SCIP_Longint nodelastsplit
SCIP_PQUEUE ** subtreepqueues
SCIP_HASHMAP * nodes2info
SCIP_Longint nminnodeslastsplit
DECL_TIMESERIESUPDATE((*timeseriesupdate))
SCIP_Real smoothestimation
TREEPROFILESTATS lastestimatestats
type definitions for displaying runtime statistics
#define SCIP_DECL_DISPOUTPUT(x)
type definitions for managing events
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_DECL_EVENTINITSOL(x)
#define SCIP_DECL_EVENTEXIT(x)
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_NODEBRANCHED
#define SCIP_DECL_EVENTCOPY(x)
#define SCIP_DECL_EVENTINIT(x)
#define SCIP_DECL_EVENTFREE(x)
#define SCIP_DECL_EVENTEXITSOL(x)
#define SCIP_EVENTTYPE_NODEDELETE
type definitions for message output methods
type definitions for miscellaneous datastructures
#define SCIP_DECL_PQUEUEELEMCHGPOS(x)
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_SORTPTRCOMP(x)
struct SCIP_PQueue SCIP_PQUEUE
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
type definitions for problem statistics
type definitions for displaying statistics tables
#define SCIP_DECL_TABLEOUTPUT(x)
struct SCIP_Node SCIP_NODE