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;
297 minval += coefs[
i] *
bound;
357 minval += coefs[
i] *
bound;
392#ifdef WITH_DEBUG_SOLUTION
408 if( !SCIPdebugIsMainscip(
scip) )
415 if( debugsol ==
NULL )
423 activity += genvbound->
coefs[
i] * solval;
425 printf(
"***** debug: ignoring variable with %s value in debug solution\n",
463 assert(propdata->nindices == -1);
467 assert(propdata->ngindices == -1);
469 assert(propdata->ngenvbounds >= 1);
470 assert(propdata->ncomponents >= 1);
479 propdata->startindicessize = propdata->ncomponents;
480 propdata->gstartindicessize = propdata->ncomponents;
485 propdata->nindices = 0;
486 propdata->ngindices = 0;
503 if( propdata->startcomponents !=
NULL )
507 assert(propdata->nindices >= 0);
511 propdata->startindicessize = 0;
513 propdata->nindices = -1;
517 assert(propdata->ngindices >= 0);
521 propdata->gstartindicessize = 0;
522 propdata->ngindices = -1;
528 assert(propdata->nindices == -1);
532 assert(propdata->ngindices == -1);
550 assert(propdata->ngindices == 0);
554 for(
i = 0;
i < propdata->ncomponents;
i++ )
558 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
560 assert(j < propdata->ngenvbounds);
566 propdata->gstartcomponents[propdata->ngindices] =
i;
567 propdata->gstartindices[propdata->ngindices] = j;
570 propdata->ngindices++;
577 if( propdata->gstartindicessize != propdata->ngindices )
580 propdata->ngindices) );
582 propdata->ngindices) );
583 propdata->gstartindicessize = propdata->ngindices;
602 assert(propdata->nindices >= 0);
605 propdata->nindices = 0;
622 if( propdata->componentsstart !=
NULL )
624 assert(propdata->ncomponents > 0);
627 propdata->componentsstartsize = 0;
628 propdata->ncomponents = -1;
632 assert(propdata->ncomponents == -1);
680 if( propdata->genvboundstore !=
NULL )
683 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
696 propdata->ngenvbounds = 0;
705 if( propdata->cutoffboundvar !=
NULL )
709 propdata->cutoffboundvar =
NULL;
730 if( propdata->genvboundstore ==
NULL )
734 freedgenvbound =
FALSE;
735 for(
i = 0 ;
i < propdata->ngenvbounds; )
737 if( propdata->genvboundstore[
i]->relaxonly )
740 propdata->genvboundstore[
i]->var) );
743 if(
i != propdata->ngenvbounds-1 )
745 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds-1];
746 propdata->genvboundstore[
i]->index =
i;
748 --propdata->ngenvbounds;
750 propdata->issorted =
FALSE;
751 freedgenvbound =
TRUE;
795 lhsvar = genvbound->
var;
822 SCIPdebugMsg(
scip,
"resolving genvbound propagation: lhs=%s<%s> >= boundval=%.15g\n",
826 tmpboundval = *boundval;
830 SCIPdebugMsg(
scip,
"subtracting constant terms gives boundval=%.15g\n", tmpboundval);
835 SCIPdebugMsg(
scip,
"minactivity of right-hand side is minactivity=%.15g\n", minactivity);
843 SCIPdebugMsg(
scip,
"minactivity is too small to explain propagation; was genvbound replaced?\n");
850 slack =
MAX(minactivity - tmpboundval, 0.0);
862 if( genvbound->
coefs[
i] > 0.0 )
874 SCIPdebugMsg(
scip,
"lower bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
882 SCIPdebugMsg(
scip,
"skipping lower bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
890 relaxedlb = lbatindex - (slack / genvbound->
coefs[
i]);
891 assert(relaxedlb <= lbatindex);
904 slack -= genvbound->
coefs[
i] * (lbatindex - relaxedlb);
905 slack =
MAX(slack, 0.0);
907 SCIPdebugMsg(
scip,
"added lower bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
924 SCIPdebugMsg(
scip,
"upper bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
932 SCIPdebugMsg(
scip,
"skipping upper bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
940 relaxedub = ubatindex - (slack / genvbound->
coefs[
i]);
941 assert(relaxedub >= ubatindex);
954 slack -= genvbound->
coefs[
i] * (ubatindex - relaxedub);
955 slack =
MAX(slack, 0.0);
957 SCIPdebugMsg(
scip,
"added upper bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
965 tmpboundval += slack;
976 SCIPdebugMsg(
scip,
"boundval was reduced from %.15g to %.15g; propagation not resolved\n", *boundval, tmpboundval);
981 *boundval = tmpboundval;
1035 bound -= infeasthreshold;
1041 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1048 SCIPdebugMsg(
scip,
"skipping upper bound of left-hand side variable <%s> already enforced in conflict set\n",
1093 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1100 SCIPdebugMsg(
scip,
"skipping lower bound of left-hand side variable <%s> already enforced in conflict set\n",
1162 printGenVBound(
scip, genvbound);
1163 SCIPdebugMsg(
scip,
" [%.15g,%.15g] -> [%.15g,%.15g]\n", lb, ub, new_lb, new_ub);
1168 if( global || genvbound->
ncoefs <= 0 )
1191 SCIPdebugMsg(
scip,
" -> lower bound tightening on variable <%s> led to infeasibility\n",
1204 SCIPdebugMsg(
scip,
" -> upper bound tightening on variable <%s> led to infeasibility\n",
1218 else if( tightened )
1221 if( nchgbds !=
NULL )
1239 SCIPdebugMessage(
"event data: %s bound of <%s> tightened ==> start propagating at ",
1243 assert(eventdata->nstarts > 0);
1245 for(
i = 0;
i < eventdata->nstarts;
i++ )
1247 SCIPdebugPrintf(
"(component %d, index %d) ", eventdata->startcomponents[
i], eventdata->startindices[
i]);
1267 (*eventdata)->startindicessize = 0;
1268 (*eventdata)->nstarts = -1;
1269 (*eventdata)->var =
NULL;
1270 (*eventdata)->prop =
NULL;
1289 if( propdata->lbevents !=
NULL )
1298 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1303 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1310 propdata->nlbevents = -1;
1311 propdata->nubevents = -1;
1318 assert(propdata->nlbevents == -1);
1319 assert(propdata->nubevents == -1);
1339 if( propdata->lbevents !=
NULL )
1342 assert(propdata->nlbevents >= 0);
1343 assert(propdata->nubevents >= 0);
1345 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1349 propdata->lbevents[
i], -1) );
1352 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1356 propdata->ubevents[
i], -1) );
1365 assert(propdata->nlbevents == -1);
1366 assert(propdata->nubevents == -1);
1399 (*eventdata)->startindicessize = propdata->ncomponents;
1400 (*eventdata)->nstarts = 0;
1401 (*eventdata)->var =
var;
1402 (*eventdata)->prop = propdata->prop;
1407 propdata->lbevents[propdata->nlbevents] = *eventdata;
1408 propdata->nlbevents++;
1412 propdata->ubevents[propdata->nubevents] = *eventdata;
1413 propdata->nubevents++;
1442 assert(startcomponent >= 0);
1448 if( eventdata->nstarts > 0 && eventdata->startcomponents[eventdata->nstarts - 1] == startcomponent )
1454 assert(eventdata->startindices[eventdata->nstarts - 1] < startindex);
1459 eventdata->startcomponents[eventdata->nstarts] = startcomponent;
1460 eventdata->startindices[eventdata->nstarts] = startindex;
1463 eventdata->nstarts++;
1483 assert(propdata->issorted);
1484 assert(propdata->nlbevents == -1);
1485 assert(propdata->nubevents == -1);
1495 propdata->nlbevents = 0;
1496 propdata->nubevents = 0;
1499 for(
i = 0;
i < propdata->ncomponents;
i++ )
1504 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1509 assert(j < propdata->ngenvbounds);
1511 genvbound = propdata->genvboundstore[j];
1515 for( k = 0; k < genvbound->
ncoefs; k++ )
1530 assert(propdata->nlbevents <= nprobvars);
1531 assert(propdata->nubevents <= nprobvars);
1532 if( propdata->nlbevents < nprobvars )
1536 if( propdata->nubevents < nprobvars )
1542 for(
i = 0;
i < propdata->nlbevents;
i++ )
1547 assert(eventdata->nstarts > 0);
1552 if( eventdata->startindicessize != eventdata->nstarts )
1555 eventdata->nstarts) );
1557 eventdata->nstarts) );
1558 eventdata->startindicessize = eventdata->nstarts;
1567 for(
i = 0;
i < propdata->nubevents;
i++ )
1572 assert(eventdata->nstarts > 0);
1577 if( eventdata->startindicessize != eventdata->nstarts )
1580 eventdata->nstarts) );
1582 eventdata->nstarts) );
1583 eventdata->startindicessize = eventdata->nstarts;
1618 int* strongcomponents;
1619 int* strongcompstartidx;
1633 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1640 genvbound = propdata->genvboundstore[
i];
1642 for( j = 0; j < genvbound->
ncoefs; j++ )
1667 propdata->componentsstartsize = propdata->ncomponents + 1;
1675 propdata->componentsstart[propdata->ncomponents] = propdata->ngenvbounds;
1676 for(
i = 0;
i < propdata->ncomponents;
i++ )
1681 int nstrongcomponents;
1684 propdata->componentsstart[
i] = sortedindex;
1690 &nstrongcomponents) );
1692 for( j = 0; j <
nnodes; ++j )
1699 node = strongcomponents[
nnodes - j - 1];
1701 assert(node < propdata->ngenvbounds);
1702 genvboundssorted[sortedindex] = propdata->genvboundstore[node];
1708 for( j = 0; j <
nnodes; j++ )
1710 assert(nodes[j] < propdata->ngenvbounds);
1711 genvboundssorted[sortedindex] = propdata->genvboundstore[nodes[j]];
1716 assert(sortedindex == propdata->ngenvbounds);
1719 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1723 propdata->genvboundstore[
i] = genvboundssorted[
i];
1724 propdata->genvboundstore[
i]->index =
i;
1737 propdata->issorted =
TRUE;
1741 for(
i = 0;
i < propdata->ncomponents;
i++ )
1747 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1750 printGenVBound(
scip, propdata->genvboundstore[j]);
1771 int* startingcomponents;
1772 int* startingindices;
1776 SCIPdebugMsg(
scip,
"applying %s genvbound propagation in depth %d\n", global ?
1793 if( !propdata->issorted )
1807 SCIPdebugMsg(
scip,
"applying genvbound with index %d (unsorted mode)\n", j);
1816 startingcomponents = global ? propdata->gstartcomponents : propdata->startcomponents;
1817 startingindices = global ? propdata->gstartindices : propdata->startindices;
1818 nindices = global ? propdata->ngindices : propdata->nindices;
1824 SCIPdebugMsg(
scip,
"starting in component %d at index %d\n", startingcomponents[
i], startingindices[
i]);
1825 for( j = startingindices[
i]; j < propdata->componentsstart[startingcomponents[
i] + 1] &&
1828 assert(j < propdata->ngenvbounds);
1836 SCIPdebugMsg(
scip,
"applying genvbound with index %d, component %d\n", j, startingcomponents[
i]);
1869 propdata->genvboundstoresize = 2 * nprobvars;
1872 propdata->ngenvbounds = 0;
1902 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1903 if( propdata->ngenvbounds == propdata->genvboundstoresize )
1905 int oldsize = propdata->genvboundstoresize;
1906 propdata->genvboundstoresize = 2*propdata->genvboundstoresize + 1;
1912 propdata->genvboundstore[propdata->ngenvbounds] = genvbound;
1913 genvbound->
index = propdata->ngenvbounds;
1914 propdata->ngenvbounds++;
1916 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1941 if( !propdata->issorted )
1967 if( propdata->lbevents ==
NULL )
1976 if( propdata->ngindices > 0 )
1995 if( !propdata->issorted
2018 assert(propdata->propasconss);
2021 if( propdata->cutoffboundvar ==
NULL )
2047 for(
i = 0;
i < propdata->ngenvbounds; ++
i )
2057 genvbound = propdata->genvboundstore[
i];
2067 for( j = 0; j < genvbound->
ncoefs; j++ )
2070 vals[j] = genvbound->
coefs[j];
2081 vars[genvbound->
ncoefs + 1] = propdata->cutoffboundvar;
2101 if( propdata->ngenvbounds > 0 )
2105 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
2124 propdata->genvboundstore =
NULL;
2125 propdata->genvboundstoresize = 0;
2126 propdata->ngenvbounds = 0;
2167 assert(coefcutoffbound <= 0.0);
2172 SCIPerrorMessage(
"cannot create generalized variable bound from invalid data\n");
2180 if( propdata->genvboundstore ==
NULL )
2186 newgenvbound = (genvbound ==
NULL);
2191 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2199 if( !newgenvbound && genvbound->
ncoefs < ncoefs )
2210 else if( !newgenvbound && genvbound->
ncoefs == ncoefs )
2213 for(
i = 0;
i < ncoefs;
i++ )
2215 genvbound->
coefs[
i] = coefs[
i];
2219 else if( !newgenvbound && genvbound->
ncoefs > ncoefs )
2230 for(
i = 0;
i < ncoefs;
i++ )
2232 genvbound->
coefs[
i] = coefs[
i];
2236 else if( newgenvbound )
2250 genvbound->
ncoefs = ncoefs;
2255 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2299 propdata->issorted =
FALSE;
2304#ifdef WITH_DEBUG_SOLUTION
2347 propdata->genvboundstore =
NULL;
2348 propdata->genvboundstoresize = 0;
2349 propdata->lbevents =
NULL;
2350 propdata->ubevents =
NULL;
2351 propdata->lbgenvbounds =
NULL;
2352 propdata->ubgenvbounds =
NULL;
2353 propdata->lbeventsmap =
NULL;
2354 propdata->ubeventsmap =
NULL;
2355 propdata->startmap =
NULL;
2356 propdata->componentsstart =
NULL;
2357 propdata->startindices =
NULL;
2358 propdata->startcomponents =
NULL;
2359 propdata->gstartindices =
NULL;
2360 propdata->gstartcomponents =
NULL;
2362 propdata->lastnodenumber = -1;
2363 propdata->cutoffboundvar =
NULL;
2364 propdata->ngenvbounds = -1;
2365 propdata->ncomponents = -1;
2366 propdata->nindices = -1;
2367 propdata->ngindices = -1;
2368 propdata->nlbevents = -1;
2369 propdata->nubevents = -1;
2370 propdata->issorted =
FALSE;
2372 propdata->prop = prop;
2400 if( propdata->ngenvbounds < 1 )
2428 if( propdata->cutoffboundvar !=
NULL )
2430 SCIPdebugMsg(
scip,
"propinitpre in problem <%s>: locking cutoffboundvar (current downlocks=%d, uplocks=%d)\n",
2453 SCIPdebugMsg(
scip,
"propexitpre in problem <%s>: removing fixed, aggregated, negated, and multi-aggregated variables from right-hand side\n",
2467 for(
i = 0;
i < propdata->ngenvbounds; )
2474 genvbound = propdata->genvboundstore[
i];
2488 if( requiredsize > genvbound->
ncoefs )
2491 if( genvbound->
coefssize < requiredsize )
2499 assert(requiredsize <= genvbound->ncoefs);
2503 for( j = 0; j < genvbound->
ncoefs; ++j )
2508 for( j = 0; j <
nvars; ++j )
2534 --(propdata->ngenvbounds);
2539 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds];
2540 propdata->genvboundstore[
i]->index =
i;
2543 propdata->issorted =
FALSE;
2596 if( propdata->cutoffboundvar !=
NULL )
2603 assert(propdata->propasconss);
2615 SCIPdebugMsg(
scip,
"tightened UB of cutoffboundvar to %e (old: %e, infeas: %u, tightened: %u)\n",
2616 newub, oldub, infeasible, tightened);
2627 if( propdata->ngenvbounds < 1 )
2635 if( propdata->propasconss )
2676 assert(inferinfo < propdata->ngenvbounds);
2681 if( inferinfo >= propdata->ngenvbounds)
2683 SCIPerrorMessage(
"generalized variable bounds propagator received inferinfo out of range; propagation not resolved, safe to continue\n");
2688 genvbound = propdata->genvboundstore[inferinfo];
2693 if( genvbound->
var != infervar )
2695 SCIPerrorMessage(
"generalized variable bounds propagator received incorrect inferinfo; propagation not resolved, but it's safe to continue\n");
2712 boundval =
MIN(boundval, roundedboundval);
2793 assert(eventdata->nstarts > 0);
2821 for(
i = 0;
i < eventdata->nstarts;
i++ )
2826 component = eventdata->startcomponents[
i];
2828 startidx = eventdata->startindices[
i];
2837 assert(componentidx >= 0);
2838 assert(propdata->startcomponents[componentidx] == component);
2840 if( propdata->startindices[componentidx] > startidx )
2841 propdata->startindices[componentidx] = startidx;
2847 componentidx = propdata->nindices;
2850 propdata->startcomponents[componentidx] = component;
2851 propdata->startindices[componentidx] = startidx;
2857 propdata->nindices++;
2881 propExecGenvbounds, propdata) );
2895 "apply global propagation?",
2899 "apply genvbounds in root node if no new incumbent was found?",
2903 "sort genvbounds and wait for bound change events?",
2907 "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)
#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)
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_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_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
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_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)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#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 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 freeGenVBoundsRelaxOnly(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE freeGenVBound(SCIP *scip, GENVBOUND *genvbound)
static SCIP_Real getCutoffboundGenVBound(SCIP *scip)
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_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 createConstraints(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE resolveGenVBoundPropagation(SCIP *scip, GENVBOUND *genvbound, SCIP_BDCHGIDX *bdchgidx, SCIP_Real *boundval, SCIP_Bool *success)
static SCIP_RETCODE freeGenVBounds(SCIP *scip, SCIP_PROPDATA *propdata)
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
struct SCIP_Node SCIP_NODE
struct SCIP_BdChgIdx SCIP_BDCHGIDX
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED