68#define PROP_NAME "genvbounds"
69#define PROP_DESC "generalized variable bounds propagator"
70#define PROP_TIMING SCIP_PROPTIMING_ALWAYS
71#define PROP_PRIORITY 3000000
73#define PROP_DELAY FALSE
75#define PROP_PRESOL_PRIORITY -2000000
77#define PROP_PRESOLTIMING SCIP_PRESOLTIMING_FAST
78#define PROP_PRESOL_MAXROUNDS -1
80#define DEFAULT_GLOBAL_PROPAGATION TRUE
81#define DEFAULT_PROPAGATE_IN_ROOT_NODE TRUE
82#define DEFAULT_SORT TRUE
84#define DEFAULT_PROPASCONSS FALSE
86#define EVENTHDLR_NAME "genvbounds"
87#define EVENTHDLR_DESC "event handler for generalized variable bounds propagator"
119 int* startcomponents;
121 int startindicessize;
142 int* componentsstart;
145 int componentsstartsize;
147 int* startcomponents;
148 int startindicessize;
151 int* gstartcomponents;
152 int gstartindicessize;
154 int genvboundstoresize;
298 minval += coefs[
i] *
bound;
358 minval += coefs[
i] *
bound;
393#ifdef WITH_DEBUG_SOLUTION
409 if( !SCIPdebugIsMainscip(
scip) )
416 if( debugsol ==
NULL )
424 activity += genvbound->
coefs[
i] * solval;
426 printf(
"***** debug: ignoring variable with %s value in debug solution\n",
464 assert(propdata->nindices == -1);
468 assert(propdata->ngindices == -1);
470 assert(propdata->ngenvbounds >= 1);
471 assert(propdata->ncomponents >= 1);
480 propdata->startindicessize = propdata->ncomponents;
481 propdata->gstartindicessize = propdata->ncomponents;
486 propdata->nindices = 0;
487 propdata->ngindices = 0;
504 if( propdata->startcomponents !=
NULL )
508 assert(propdata->nindices >= 0);
512 propdata->startindicessize = 0;
514 propdata->nindices = -1;
518 assert(propdata->ngindices >= 0);
522 propdata->gstartindicessize = 0;
523 propdata->ngindices = -1;
529 assert(propdata->nindices == -1);
533 assert(propdata->ngindices == -1);
551 assert(propdata->ngindices == 0);
555 for(
i = 0;
i < propdata->ncomponents;
i++ )
559 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
561 assert(j < propdata->ngenvbounds);
567 propdata->gstartcomponents[propdata->ngindices] =
i;
568 propdata->gstartindices[propdata->ngindices] = j;
571 propdata->ngindices++;
578 if( propdata->gstartindicessize != propdata->ngindices )
581 propdata->ngindices) );
583 propdata->ngindices) );
584 propdata->gstartindicessize = propdata->ngindices;
603 assert(propdata->nindices >= 0);
606 propdata->nindices = 0;
623 if( propdata->componentsstart !=
NULL )
625 assert(propdata->ncomponents > 0);
628 propdata->componentsstartsize = 0;
629 propdata->ncomponents = -1;
633 assert(propdata->ncomponents == -1);
683 if( propdata->genvboundstore !=
NULL )
686 if( propdata->ngenvbounds >= 1 )
690 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
703 propdata->ngenvbounds = 0;
712 if( propdata->cutoffboundvar !=
NULL )
716 propdata->cutoffboundvar =
NULL;
738 if( propdata->genvboundstore ==
NULL )
742 freedgenvbound =
FALSE;
743 for(
i = 0 ;
i < propdata->ngenvbounds; )
745 if( propdata->genvboundstore[
i]->relaxonly )
748 propdata->genvboundstore[
i]->var) );
751 if(
i != propdata->ngenvbounds-1 )
753 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds-1];
754 propdata->genvboundstore[
i]->index =
i;
756 --propdata->ngenvbounds;
758 propdata->issorted =
FALSE;
759 freedgenvbound =
TRUE;
775 if( propdata->ngenvbounds == 0 )
807 lhsvar = genvbound->
var;
834 SCIPdebugMsg(
scip,
"resolving genvbound propagation: lhs=%s<%s> >= boundval=%.15g\n",
838 tmpboundval = *boundval;
842 SCIPdebugMsg(
scip,
"subtracting constant terms gives boundval=%.15g\n", tmpboundval);
847 SCIPdebugMsg(
scip,
"minactivity of right-hand side is minactivity=%.15g\n", minactivity);
855 SCIPdebugMsg(
scip,
"minactivity is too small to explain propagation; was genvbound replaced?\n");
862 slack =
MAX(minactivity - tmpboundval, 0.0);
874 if( genvbound->
coefs[
i] > 0.0 )
886 SCIPdebugMsg(
scip,
"lower bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
894 SCIPdebugMsg(
scip,
"skipping lower bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
902 relaxedlb = lbatindex - (slack / genvbound->
coefs[
i]);
903 assert(relaxedlb <= lbatindex);
916 slack -= genvbound->
coefs[
i] * (lbatindex - relaxedlb);
917 slack =
MAX(slack, 0.0);
919 SCIPdebugMsg(
scip,
"added lower bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
936 SCIPdebugMsg(
scip,
"upper bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
944 SCIPdebugMsg(
scip,
"skipping upper bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
952 relaxedub = ubatindex - (slack / genvbound->
coefs[
i]);
953 assert(relaxedub >= ubatindex);
966 slack -= genvbound->
coefs[
i] * (ubatindex - relaxedub);
967 slack =
MAX(slack, 0.0);
969 SCIPdebugMsg(
scip,
"added upper bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
977 tmpboundval += slack;
988 SCIPdebugMsg(
scip,
"boundval was reduced from %.15g to %.15g; propagation not resolved\n", *boundval, tmpboundval);
993 *boundval = tmpboundval;
1047 bound -= infeasthreshold;
1053 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1060 SCIPdebugMsg(
scip,
"skipping upper bound of left-hand side variable <%s> already enforced in conflict set\n",
1105 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1112 SCIPdebugMsg(
scip,
"skipping lower bound of left-hand side variable <%s> already enforced in conflict set\n",
1174 printGenVBound(
scip, genvbound);
1175 SCIPdebugMsg(
scip,
" [%.15g,%.15g] -> [%.15g,%.15g]\n", lb, ub, new_lb, new_ub);
1180 if( global || genvbound->
ncoefs <= 0 )
1203 SCIPdebugMsg(
scip,
" -> lower bound tightening on variable <%s> led to infeasibility\n",
1216 SCIPdebugMsg(
scip,
" -> upper bound tightening on variable <%s> led to infeasibility\n",
1230 else if( tightened )
1233 if( nchgbds !=
NULL )
1251 SCIPdebugMessage(
"event data: %s bound of <%s> tightened ==> start propagating at ",
1255 assert(eventdata->nstarts > 0);
1257 for(
i = 0;
i < eventdata->nstarts;
i++ )
1259 SCIPdebugPrintf(
"(component %d, index %d) ", eventdata->startcomponents[
i], eventdata->startindices[
i]);
1279 (*eventdata)->startindicessize = 0;
1280 (*eventdata)->nstarts = -1;
1281 (*eventdata)->var =
NULL;
1282 (*eventdata)->prop =
NULL;
1301 if( propdata->lbevents !=
NULL )
1310 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1315 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1322 propdata->nlbevents = -1;
1323 propdata->nubevents = -1;
1330 assert(propdata->nlbevents == -1);
1331 assert(propdata->nubevents == -1);
1351 if( propdata->lbevents !=
NULL )
1354 assert(propdata->nlbevents >= 0);
1355 assert(propdata->nubevents >= 0);
1357 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1361 propdata->lbevents[
i], -1) );
1364 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1368 propdata->ubevents[
i], -1) );
1377 assert(propdata->nlbevents == -1);
1378 assert(propdata->nubevents == -1);
1411 (*eventdata)->startindicessize = propdata->ncomponents;
1412 (*eventdata)->nstarts = 0;
1413 (*eventdata)->var =
var;
1414 (*eventdata)->prop = propdata->prop;
1419 propdata->lbevents[propdata->nlbevents] = *eventdata;
1420 propdata->nlbevents++;
1424 propdata->ubevents[propdata->nubevents] = *eventdata;
1425 propdata->nubevents++;
1454 assert(startcomponent >= 0);
1460 if( eventdata->nstarts > 0 && eventdata->startcomponents[eventdata->nstarts - 1] == startcomponent )
1466 assert(eventdata->startindices[eventdata->nstarts - 1] < startindex);
1471 eventdata->startcomponents[eventdata->nstarts] = startcomponent;
1472 eventdata->startindices[eventdata->nstarts] = startindex;
1475 eventdata->nstarts++;
1495 assert(propdata->issorted);
1496 assert(propdata->nlbevents == -1);
1497 assert(propdata->nubevents == -1);
1507 propdata->nlbevents = 0;
1508 propdata->nubevents = 0;
1511 for(
i = 0;
i < propdata->ncomponents;
i++ )
1516 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1521 assert(j < propdata->ngenvbounds);
1523 genvbound = propdata->genvboundstore[j];
1527 for( k = 0; k < genvbound->
ncoefs; k++ )
1542 assert(propdata->nlbevents <= nprobvars);
1543 assert(propdata->nubevents <= nprobvars);
1544 if( propdata->nlbevents < nprobvars )
1548 if( propdata->nubevents < nprobvars )
1554 for(
i = 0;
i < propdata->nlbevents;
i++ )
1559 assert(eventdata->nstarts > 0);
1564 if( eventdata->startindicessize != eventdata->nstarts )
1567 eventdata->nstarts) );
1569 eventdata->nstarts) );
1570 eventdata->startindicessize = eventdata->nstarts;
1579 for(
i = 0;
i < propdata->nubevents;
i++ )
1584 assert(eventdata->nstarts > 0);
1589 if( eventdata->startindicessize != eventdata->nstarts )
1592 eventdata->nstarts) );
1594 eventdata->nstarts) );
1595 eventdata->startindicessize = eventdata->nstarts;
1630 int* strongcomponents;
1631 int* strongcompstartidx;
1645 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1652 genvbound = propdata->genvboundstore[
i];
1654 for( j = 0; j < genvbound->
ncoefs; j++ )
1679 propdata->componentsstartsize = propdata->ncomponents + 1;
1687 propdata->componentsstart[propdata->ncomponents] = propdata->ngenvbounds;
1688 for(
i = 0;
i < propdata->ncomponents;
i++ )
1693 int nstrongcomponents;
1696 propdata->componentsstart[
i] = sortedindex;
1702 &nstrongcomponents) );
1704 for( j = 0; j <
nnodes; ++j )
1711 node = strongcomponents[
nnodes - j - 1];
1713 assert(node < propdata->ngenvbounds);
1714 genvboundssorted[sortedindex] = propdata->genvboundstore[node];
1720 for( j = 0; j <
nnodes; j++ )
1722 assert(nodes[j] < propdata->ngenvbounds);
1723 genvboundssorted[sortedindex] = propdata->genvboundstore[nodes[j]];
1728 assert(sortedindex == propdata->ngenvbounds);
1731 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1735 propdata->genvboundstore[
i] = genvboundssorted[
i];
1736 propdata->genvboundstore[
i]->index =
i;
1749 propdata->issorted =
TRUE;
1753 for(
i = 0;
i < propdata->ncomponents;
i++ )
1759 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1762 printGenVBound(
scip, propdata->genvboundstore[j]);
1783 int* startingcomponents;
1784 int* startingindices;
1788 SCIPdebugMsg(
scip,
"applying %s genvbound propagation in depth %d\n", global ?
1805 if( !propdata->issorted )
1819 SCIPdebugMsg(
scip,
"applying genvbound with index %d (unsorted mode)\n", j);
1828 startingcomponents = global ? propdata->gstartcomponents : propdata->startcomponents;
1829 startingindices = global ? propdata->gstartindices : propdata->startindices;
1830 nindices = global ? propdata->ngindices : propdata->nindices;
1836 SCIPdebugMsg(
scip,
"starting in component %d at index %d\n", startingcomponents[
i], startingindices[
i]);
1837 for( j = startingindices[
i]; j < propdata->componentsstart[startingcomponents[
i] + 1] &&
1840 assert(j < propdata->ngenvbounds);
1848 SCIPdebugMsg(
scip,
"applying genvbound with index %d, component %d\n", j, startingcomponents[
i]);
1875 assert(propdata->ngenvbounds == -1);
1882 propdata->genvboundstoresize = 2 * nprobvars;
1885 propdata->ngenvbounds = 0;
1916 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1917 if( propdata->ngenvbounds == propdata->genvboundstoresize )
1919 int oldsize = propdata->genvboundstoresize;
1920 propdata->genvboundstoresize = 2*propdata->genvboundstoresize + 1;
1925 if( propdata->ngenvbounds == 0 )
1930 propdata->genvboundstore[propdata->ngenvbounds] = genvbound;
1931 genvbound->
index = propdata->ngenvbounds;
1932 propdata->ngenvbounds++;
1934 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1959 if( !propdata->issorted )
1985 if( propdata->lbevents ==
NULL )
1994 if( propdata->ngindices > 0 )
2013 if( !propdata->issorted
2037 assert(propdata->propasconss);
2040 if( propdata->cutoffboundvar ==
NULL )
2066 for(
i = 0;
i < propdata->ngenvbounds; ++
i )
2076 genvbound = propdata->genvboundstore[
i];
2086 for( j = 0; j < genvbound->
ncoefs; j++ )
2089 vals[j] = genvbound->
coefs[j];
2100 vars[genvbound->
ncoefs + 1] = propdata->cutoffboundvar;
2120 if( propdata->genvboundstore !=
NULL )
2123 if( propdata->ngenvbounds >= 1 )
2126 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
2145 propdata->genvboundstore =
NULL;
2146 propdata->genvboundstoresize = 0;
2147 propdata->ngenvbounds = 0;
2188 assert(coefcutoffbound <= 0.0);
2193 SCIPerrorMessage(
"cannot create generalized variable bound from invalid data\n");
2201 if( propdata->genvboundstore ==
NULL )
2207 newgenvbound = (genvbound ==
NULL);
2212 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2220 if( !newgenvbound && genvbound->
ncoefs < ncoefs )
2231 else if( !newgenvbound && genvbound->
ncoefs == ncoefs )
2234 for(
i = 0;
i < ncoefs;
i++ )
2236 genvbound->
coefs[
i] = coefs[
i];
2240 else if( !newgenvbound && genvbound->
ncoefs > ncoefs )
2251 for(
i = 0;
i < ncoefs;
i++ )
2253 genvbound->
coefs[
i] = coefs[
i];
2257 else if( newgenvbound )
2271 genvbound->
ncoefs = ncoefs;
2276 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2320 propdata->issorted =
FALSE;
2325#ifdef WITH_DEBUG_SOLUTION
2368 propdata->genvboundstore =
NULL;
2369 propdata->genvboundstoresize = 0;
2370 propdata->lbevents =
NULL;
2371 propdata->ubevents =
NULL;
2372 propdata->lbgenvbounds =
NULL;
2373 propdata->ubgenvbounds =
NULL;
2374 propdata->lbeventsmap =
NULL;
2375 propdata->ubeventsmap =
NULL;
2376 propdata->startmap =
NULL;
2377 propdata->componentsstart =
NULL;
2378 propdata->startindices =
NULL;
2379 propdata->startcomponents =
NULL;
2380 propdata->gstartindices =
NULL;
2381 propdata->gstartcomponents =
NULL;
2383 propdata->lastnodenumber = -1;
2384 propdata->cutoffboundvar =
NULL;
2385 propdata->ngenvbounds = -1;
2386 propdata->ncomponents = -1;
2387 propdata->nindices = -1;
2388 propdata->ngindices = -1;
2389 propdata->nlbevents = -1;
2390 propdata->nubevents = -1;
2391 propdata->issorted =
FALSE;
2393 propdata->prop = prop;
2423 if( propdata->ngenvbounds < 1 )
2453 if( propdata->cutoffboundvar !=
NULL )
2455 SCIPdebugMsg(
scip,
"propinitpre in problem <%s>: locking cutoffboundvar (current downlocks=%d, uplocks=%d)\n",
2478 SCIPdebugMsg(
scip,
"propexitpre in problem <%s>: removing fixed, aggregated, negated, and multi-aggregated variables from right-hand side\n",
2492 for(
i = 0;
i < propdata->ngenvbounds; )
2499 genvbound = propdata->genvboundstore[
i];
2513 if( requiredsize > genvbound->
ncoefs )
2516 if( genvbound->
coefssize < requiredsize )
2524 assert(requiredsize <= genvbound->coefssize);
2529 for( j = 0; j < genvbound->
ncoefs; ++j )
2534 for( j = 0; j <
nvars; ++j )
2560 --(propdata->ngenvbounds);
2565 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds];
2566 propdata->genvboundstore[
i]->index =
i;
2569 propdata->issorted =
FALSE;
2579 if( propdata->ngenvbounds == 0 )
2624 assert(propdata->ngenvbounds >= 1);
2631 if( propdata->cutoffboundvar !=
NULL )
2638 assert(propdata->propasconss);
2650 SCIPdebugMsg(
scip,
"tightened UB of cutoffboundvar to %e (old: %e, infeas: %u, tightened: %u)\n",
2651 newub, oldub, infeasible, tightened);
2662 if( propdata->propasconss )
2703 assert(inferinfo < propdata->ngenvbounds);
2708 if( inferinfo >= propdata->ngenvbounds)
2710 SCIPerrorMessage(
"generalized variable bounds propagator received inferinfo out of range; propagation not resolved, safe to continue\n");
2715 genvbound = propdata->genvboundstore[inferinfo];
2720 if( genvbound->
var != infervar )
2722 SCIPerrorMessage(
"generalized variable bounds propagator received incorrect inferinfo; propagation not resolved, but it's safe to continue\n");
2739 boundval =
MIN(boundval, roundedboundval);
2820 assert(eventdata->nstarts > 0);
2848 for(
i = 0;
i < eventdata->nstarts;
i++ )
2853 component = eventdata->startcomponents[
i];
2855 startidx = eventdata->startindices[
i];
2864 assert(componentidx >= 0);
2865 assert(propdata->startcomponents[componentidx] == component);
2867 if( propdata->startindices[componentidx] > startidx )
2868 propdata->startindices[componentidx] = startidx;
2874 componentidx = propdata->nindices;
2877 propdata->startcomponents[componentidx] = component;
2878 propdata->startindices[componentidx] = startidx;
2884 propdata->nindices++;
2909 propExecGenvbounds, propdata) );
2923 "apply global propagation?",
2927 "apply genvbounds in root node if no new incumbent was found?",
2931 "sort genvbounds and wait for bound change events?",
2935 "should genvbounds be transformed to (linear) constraints?",
Constraint handler for linear constraints in their most general form, .
#define SCIPdebugCheckLbGlobal(scip, var, lb)
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugCheckUbGlobal(scip, var, ub)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPdigraphComputeUndirectedComponents(SCIP_DIGRAPH *digraph, int minsize, int *components, int *ncomponents)
int SCIPdigraphGetNNodes(SCIP_DIGRAPH *digraph)
void SCIPdigraphGetComponent(SCIP_DIGRAPH *digraph, int compidx, int **nodes, int *nnodes)
SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
SCIP_RETCODE SCIPdigraphTopoSortComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPdigraphComputeDirectedComponents(SCIP_DIGRAPH *digraph, int compidx, int *strongcomponents, int *strongcompstartidx, int *nstrongcomponents)
void SCIPdigraphFree(SCIP_DIGRAPH **digraph)
int SCIPdigraphGetNComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPcreateDigraph(SCIP *scip, SCIP_DIGRAPH **digraph, int nnodes)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
const char * SCIPgetProbName(SCIP *scip)
SCIP_Real SCIPgetTransObjoffset(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNFixedVars(SCIP *scip)
int SCIPgetNTotalVars(SCIP *scip)
SCIP_Real SCIPgetTransObjscale(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
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 SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPgenVBoundAdd(SCIP *scip, SCIP_PROP *genvboundprop, SCIP_VAR **vars, SCIP_VAR *var, SCIP_Real *coefs, int ncoefs, SCIP_Real coefcutoffbound, SCIP_Real constant, SCIP_BOUNDTYPE boundtype)
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)
SCIP_RETCODE SCIPincludePropGenvbounds(SCIP *scip)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPsetPropInitpre(SCIP *scip, SCIP_PROP *prop,)
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
SCIP_RETCODE SCIPsetPropExitpre(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop,)
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetPropExitsol(SCIP *scip, SCIP_PROP *prop,)
const char * SCIPpropGetName(SCIP_PROP *prop)
void SCIPpropSetTimingmask(SCIP_PROP *prop, SCIP_PROPTIMING timingmask)
SCIP_RETCODE SCIPsetPropResprop(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropInit(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
SCIP_PROPTIMING SCIPpropGetTimingmask(SCIP_PROP *prop)
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Bool SCIPisInRestart(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_RETCODE SCIPinferVarUbProp(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsRelaxationOnly(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPinferVarLbProp(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
#define PROP_PRESOL_MAXROUNDS
#define PROP_PRESOLTIMING
#define PROP_PRESOL_PRIORITY
static SCIP_RETCODE addEventData(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, int startindex, int startcomponent, SCIP_BOUNDTYPE boundtype)
static SCIP_RETCODE freeComponentsData(SCIP *scip, SCIP_PROPDATA *propdata)
#define DEFAULT_PROPAGATE_IN_ROOT_NODE
static SCIP_RETCODE analyzeGenVBoundConflict(SCIP *scip, GENVBOUND *genvbound)
static SCIP_RETCODE freeGenVBoundsRelaxOnly(SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata)
static SCIP_RETCODE execGenVBounds(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_RESULT *result, SCIP_Bool local, int *nchgbds)
static SCIP_Real getGenVBoundsMinActivityConflict(SCIP *scip, SCIP_VAR **vars, SCIP_Real *coefs, int nvars, SCIP_BDCHGIDX *bdchgidx)
static SCIP_Real getGenVBoundsMinActivity(SCIP *scip, SCIP_VAR **vars, SCIP_Real *coefs, int nvars, SCIP_Bool global)
static SCIP_Real getGenVBoundsBound(SCIP *scip, GENVBOUND *genvbound, SCIP_Bool global)
static SCIP_RETCODE freeEventData(SCIP *scip, SCIP_EVENTDATA **eventdata)
static SCIP_RETCODE dropAndFreeEvents(SCIP *scip, SCIP_PROPDATA *propdata)
#define DEFAULT_PROPASCONSS
static SCIP_RETCODE setUpEvents(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE sortGenVBounds(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE fillGlobalStartingData(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE resetLocalStartingData(SCIP *scip, SCIP_PROPDATA *propdata)
static GENVBOUND * getGenVBound(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype)
static SCIP_RETCODE freeGenVBound(SCIP *scip, GENVBOUND *genvbound)
static SCIP_Real getCutoffboundGenVBound(SCIP *scip)
static SCIP_RETCODE createConstraints(SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata)
static SCIP_RETCODE applyGenVBounds(SCIP *scip, SCIP_PROP *prop, SCIP_Bool global, SCIP_RESULT *result, int *nchgbds)
#define DEFAULT_GLOBAL_PROPAGATION
static SCIP_RETCODE freeStartingData(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE addNewGenVBound(SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata, GENVBOUND *genvbound)
static SCIP_RETCODE getEventData(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_EVENTDATA **eventdata)
static SCIP_RETCODE createStartingData(SCIP *scip, SCIP_PROPDATA *propdata)
struct GenVBound GENVBOUND
static SCIP_RETCODE applyGenVBound(SCIP *scip, SCIP_PROP *prop, GENVBOUND *genvbound, SCIP_Bool global, SCIP_RESULT *result, int *nchgbds)
static SCIP_RETCODE freeAllEventData(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE freeGenVBounds(SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata)
static SCIP_RETCODE resolveGenVBoundPropagation(SCIP *scip, GENVBOUND *genvbound, SCIP_BDCHGIDX *bdchgidx, SCIP_Real *boundval, SCIP_Bool *success)
static SCIP_RETCODE initPropdata(SCIP *scip, SCIP_PROPDATA *propdata)
generalized variable bounds propagator
public methods for managing events
public methods for message output
public data structures and miscellaneous methods
public methods for propagators
public methods for branch and bound tree
public methods for problem variables
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for data structures
public methods for event handler plugins and event handlers
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for propagator plugins
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
@ SCIP_CONFTYPE_PROPAGATION
struct SCIP_Cons SCIP_CONS
struct SCIP_Eventhdlr SCIP_EVENTHDLR
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBTIGHTENED
enum SCIP_BoundType SCIP_BOUNDTYPE
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_Digraph SCIP_DIGRAPH
#define SCIP_DECL_PROPCOPY(x)
#define SCIP_DECL_PROPEXITPRE(x)
#define SCIP_DECL_PROPINIT(x)
#define SCIP_DECL_PROPFREE(x)
#define SCIP_DECL_PROPEXITSOL(x)
#define SCIP_DECL_PROPEXIT(x)
struct SCIP_Prop SCIP_PROP
#define SCIP_DECL_PROPPRESOL(x)
#define SCIP_DECL_PROPINITPRE(x)
#define SCIP_DECL_PROPRESPROP(x)
struct SCIP_PropData SCIP_PROPDATA
#define SCIP_DECL_PROPEXEC(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
#define SCIP_PROPTIMING_NONE
unsigned int SCIP_PROPTIMING
struct SCIP_Node SCIP_NODE
struct SCIP_BdChgIdx SCIP_BDCHGIDX
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED