67#define PROP_NAME "genvbounds"
68#define PROP_DESC "generalized variable bounds propagator"
69#define PROP_TIMING SCIP_PROPTIMING_ALWAYS
70#define PROP_PRIORITY 3000000
72#define PROP_DELAY FALSE
74#define PROP_PRESOL_PRIORITY -2000000
76#define PROP_PRESOLTIMING SCIP_PRESOLTIMING_FAST
77#define PROP_PRESOL_MAXROUNDS -1
79#define DEFAULT_GLOBAL_PROPAGATION TRUE
80#define DEFAULT_PROPAGATE_IN_ROOT_NODE TRUE
81#define DEFAULT_SORT TRUE
83#define DEFAULT_PROPASCONSS FALSE
85#define EVENTHDLR_NAME "genvbounds"
86#define EVENTHDLR_DESC "event handler for generalized variable bounds propagator"
118 int* startcomponents;
120 int startindicessize;
141 int* componentsstart;
144 int componentsstartsize;
146 int* startcomponents;
147 int startindicessize;
150 int* gstartcomponents;
151 int gstartindicessize;
153 int genvboundstoresize;
296 minval += coefs[
i] *
bound;
356 minval += coefs[
i] *
bound;
391#ifdef WITH_DEBUG_SOLUTION
407 if( !SCIPdebugIsMainscip(
scip) )
414 if( debugsol ==
NULL )
422 activity += genvbound->
coefs[
i] * solval;
424 printf(
"***** debug: ignoring variable with %s value in debug solution\n",
462 assert(propdata->nindices == -1);
466 assert(propdata->ngindices == -1);
468 assert(propdata->ngenvbounds >= 1);
469 assert(propdata->ncomponents >= 1);
478 propdata->startindicessize = propdata->ncomponents;
479 propdata->gstartindicessize = propdata->ncomponents;
484 propdata->nindices = 0;
485 propdata->ngindices = 0;
502 if( propdata->startcomponents !=
NULL )
506 assert(propdata->nindices >= 0);
510 propdata->startindicessize = 0;
512 propdata->nindices = -1;
516 assert(propdata->ngindices >= 0);
520 propdata->gstartindicessize = 0;
521 propdata->ngindices = -1;
527 assert(propdata->nindices == -1);
531 assert(propdata->ngindices == -1);
549 assert(propdata->ngindices == 0);
553 for(
i = 0;
i < propdata->ncomponents;
i++ )
557 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
559 assert(j < propdata->ngenvbounds);
565 propdata->gstartcomponents[propdata->ngindices] =
i;
566 propdata->gstartindices[propdata->ngindices] = j;
569 propdata->ngindices++;
576 if( propdata->gstartindicessize != propdata->ngindices )
579 propdata->ngindices) );
581 propdata->ngindices) );
582 propdata->gstartindicessize = propdata->ngindices;
601 assert(propdata->nindices >= 0);
604 propdata->nindices = 0;
621 if( propdata->componentsstart !=
NULL )
623 assert(propdata->ncomponents > 0);
626 propdata->componentsstartsize = 0;
627 propdata->ncomponents = -1;
631 assert(propdata->ncomponents == -1);
679 if( propdata->genvboundstore !=
NULL )
682 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
695 propdata->ngenvbounds = 0;
704 if( propdata->cutoffboundvar !=
NULL )
708 propdata->cutoffboundvar =
NULL;
729 if( propdata->genvboundstore ==
NULL )
733 freedgenvbound =
FALSE;
734 for(
i = 0 ;
i < propdata->ngenvbounds; )
736 if( propdata->genvboundstore[
i]->relaxonly )
739 propdata->genvboundstore[
i]->var) );
742 if(
i != propdata->ngenvbounds-1 )
744 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds-1];
745 propdata->genvboundstore[
i]->index =
i;
747 --propdata->ngenvbounds;
749 propdata->issorted =
FALSE;
750 freedgenvbound =
TRUE;
794 lhsvar = genvbound->
var;
821 SCIPdebugMsg(
scip,
"resolving genvbound propagation: lhs=%s<%s> >= boundval=%.15g\n",
825 tmpboundval = *boundval;
829 SCIPdebugMsg(
scip,
"subtracting constant terms gives boundval=%.15g\n", tmpboundval);
834 SCIPdebugMsg(
scip,
"minactivity of right-hand side is minactivity=%.15g\n", minactivity);
842 SCIPdebugMsg(
scip,
"minactivity is too small to explain propagation; was genvbound replaced?\n");
849 slack =
MAX(minactivity - tmpboundval, 0.0);
861 if( genvbound->
coefs[
i] > 0.0 )
873 SCIPdebugMsg(
scip,
"lower bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
881 SCIPdebugMsg(
scip,
"skipping lower bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
889 relaxedlb = lbatindex - (slack / genvbound->
coefs[
i]);
890 assert(relaxedlb <= lbatindex);
903 slack -= genvbound->
coefs[
i] * (lbatindex - relaxedlb);
904 slack =
MAX(slack, 0.0);
906 SCIPdebugMsg(
scip,
"added lower bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
923 SCIPdebugMsg(
scip,
"upper bound of variable <%s> (genvbound->vars[%d]) in conflict set / at index is %.15g / %.15g\n",
931 SCIPdebugMsg(
scip,
"skipping upper bound of variable <%s> (genvbound->vars[%d]) already enforced in conflict set\n",
939 relaxedub = ubatindex - (slack / genvbound->
coefs[
i]);
940 assert(relaxedub >= ubatindex);
953 slack -= genvbound->
coefs[
i] * (ubatindex - relaxedub);
954 slack =
MAX(slack, 0.0);
956 SCIPdebugMsg(
scip,
"added upper bound of variable <%s> (genvbound->vars[%d]); new slack=%.15g\n",
964 tmpboundval += slack;
975 SCIPdebugMsg(
scip,
"boundval was reduced from %.15g to %.15g; propagation not resolved\n", *boundval, tmpboundval);
980 *boundval = tmpboundval;
1034 bound -= infeasthreshold;
1040 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1047 SCIPdebugMsg(
scip,
"skipping upper bound of left-hand side variable <%s> already enforced in conflict set\n",
1092 SCIPdebugMsg(
scip,
"strange: could not create initial reason to start conflict analysis\n");
1099 SCIPdebugMsg(
scip,
"skipping lower bound of left-hand side variable <%s> already enforced in conflict set\n",
1161 printGenVBound(
scip, genvbound);
1162 SCIPdebugMsg(
scip,
" [%.15g,%.15g] -> [%.15g,%.15g]\n", lb, ub, new_lb, new_ub);
1167 if( global || genvbound->
ncoefs <= 0 )
1190 SCIPdebugMsg(
scip,
" -> lower bound tightening on variable <%s> led to infeasibility\n",
1203 SCIPdebugMsg(
scip,
" -> upper bound tightening on variable <%s> led to infeasibility\n",
1217 else if( tightened )
1220 if( nchgbds !=
NULL )
1238 SCIPdebugMessage(
"event data: %s bound of <%s> tightened ==> start propagating at ",
1242 assert(eventdata->nstarts > 0);
1244 for(
i = 0;
i < eventdata->nstarts;
i++ )
1246 SCIPdebugPrintf(
"(component %d, index %d) ", eventdata->startcomponents[
i], eventdata->startindices[
i]);
1266 (*eventdata)->startindicessize = 0;
1267 (*eventdata)->nstarts = -1;
1268 (*eventdata)->var =
NULL;
1269 (*eventdata)->prop =
NULL;
1288 if( propdata->lbevents !=
NULL )
1297 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1302 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1309 propdata->nlbevents = -1;
1310 propdata->nubevents = -1;
1317 assert(propdata->nlbevents == -1);
1318 assert(propdata->nubevents == -1);
1338 if( propdata->lbevents !=
NULL )
1341 assert(propdata->nlbevents >= 0);
1342 assert(propdata->nubevents >= 0);
1344 for(
i = propdata->nlbevents - 1;
i >= 0;
i-- )
1348 propdata->lbevents[
i], -1) );
1351 for(
i = propdata->nubevents - 1;
i >= 0;
i-- )
1355 propdata->ubevents[
i], -1) );
1364 assert(propdata->nlbevents == -1);
1365 assert(propdata->nubevents == -1);
1398 (*eventdata)->startindicessize = propdata->ncomponents;
1399 (*eventdata)->nstarts = 0;
1400 (*eventdata)->var =
var;
1401 (*eventdata)->prop = propdata->prop;
1406 propdata->lbevents[propdata->nlbevents] = *eventdata;
1407 propdata->nlbevents++;
1411 propdata->ubevents[propdata->nubevents] = *eventdata;
1412 propdata->nubevents++;
1441 assert(startcomponent >= 0);
1447 if( eventdata->nstarts > 0 && eventdata->startcomponents[eventdata->nstarts - 1] == startcomponent )
1453 assert(eventdata->startindices[eventdata->nstarts - 1] < startindex);
1458 eventdata->startcomponents[eventdata->nstarts] = startcomponent;
1459 eventdata->startindices[eventdata->nstarts] = startindex;
1462 eventdata->nstarts++;
1482 assert(propdata->issorted);
1483 assert(propdata->nlbevents == -1);
1484 assert(propdata->nubevents == -1);
1494 propdata->nlbevents = 0;
1495 propdata->nubevents = 0;
1498 for(
i = 0;
i < propdata->ncomponents;
i++ )
1503 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1508 assert(j < propdata->ngenvbounds);
1510 genvbound = propdata->genvboundstore[j];
1514 for( k = 0; k < genvbound->
ncoefs; k++ )
1529 assert(propdata->nlbevents <= nprobvars);
1530 assert(propdata->nubevents <= nprobvars);
1531 if( propdata->nlbevents < nprobvars )
1535 if( propdata->nubevents < nprobvars )
1541 for(
i = 0;
i < propdata->nlbevents;
i++ )
1546 assert(eventdata->nstarts > 0);
1551 if( eventdata->startindicessize != eventdata->nstarts )
1554 eventdata->nstarts) );
1556 eventdata->nstarts) );
1557 eventdata->startindicessize = eventdata->nstarts;
1566 for(
i = 0;
i < propdata->nubevents;
i++ )
1571 assert(eventdata->nstarts > 0);
1576 if( eventdata->startindicessize != eventdata->nstarts )
1579 eventdata->nstarts) );
1581 eventdata->nstarts) );
1582 eventdata->startindicessize = eventdata->nstarts;
1617 int* strongcomponents;
1618 int* strongcompstartidx;
1632 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1639 genvbound = propdata->genvboundstore[
i];
1641 for( j = 0; j < genvbound->
ncoefs; j++ )
1666 propdata->componentsstartsize = propdata->ncomponents + 1;
1674 propdata->componentsstart[propdata->ncomponents] = propdata->ngenvbounds;
1675 for(
i = 0;
i < propdata->ncomponents;
i++ )
1680 int nstrongcomponents;
1683 propdata->componentsstart[
i] = sortedindex;
1689 &nstrongcomponents) );
1691 for( j = 0; j <
nnodes; ++j )
1698 node = strongcomponents[
nnodes - j - 1];
1700 assert(node < propdata->ngenvbounds);
1701 genvboundssorted[sortedindex] = propdata->genvboundstore[node];
1707 for( j = 0; j <
nnodes; j++ )
1709 assert(nodes[j] < propdata->ngenvbounds);
1710 genvboundssorted[sortedindex] = propdata->genvboundstore[nodes[j]];
1715 assert(sortedindex == propdata->ngenvbounds);
1718 for(
i = 0;
i < propdata->ngenvbounds;
i++ )
1722 propdata->genvboundstore[
i] = genvboundssorted[
i];
1723 propdata->genvboundstore[
i]->index =
i;
1736 propdata->issorted =
TRUE;
1740 for(
i = 0;
i < propdata->ncomponents;
i++ )
1746 for( j = propdata->componentsstart[
i]; j < propdata->componentsstart[
i+1]; j++ )
1749 printGenVBound(
scip, propdata->genvboundstore[j]);
1770 int* startingcomponents;
1771 int* startingindices;
1775 SCIPdebugMsg(
scip,
"applying %s genvbound propagation in depth %d\n", global ?
1792 if( !propdata->issorted )
1806 SCIPdebugMsg(
scip,
"applying genvbound with index %d (unsorted mode)\n", j);
1815 startingcomponents = global ? propdata->gstartcomponents : propdata->startcomponents;
1816 startingindices = global ? propdata->gstartindices : propdata->startindices;
1817 nindices = global ? propdata->ngindices : propdata->nindices;
1823 SCIPdebugMsg(
scip,
"starting in component %d at index %d\n", startingcomponents[
i], startingindices[
i]);
1824 for( j = startingindices[
i]; j < propdata->componentsstart[startingcomponents[
i] + 1] &&
1827 assert(j < propdata->ngenvbounds);
1835 SCIPdebugMsg(
scip,
"applying genvbound with index %d, component %d\n", j, startingcomponents[
i]);
1868 propdata->genvboundstoresize = 2 * nprobvars;
1871 propdata->ngenvbounds = 0;
1901 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1902 if( propdata->ngenvbounds == propdata->genvboundstoresize )
1904 int oldsize = propdata->genvboundstoresize;
1905 propdata->genvboundstoresize = 2*propdata->genvboundstoresize + 1;
1911 propdata->genvboundstore[propdata->ngenvbounds] = genvbound;
1912 genvbound->
index = propdata->ngenvbounds;
1913 propdata->ngenvbounds++;
1915 assert(propdata->ngenvbounds <= propdata->genvboundstoresize);
1940 if( !propdata->issorted )
1966 if( propdata->lbevents ==
NULL )
1975 if( propdata->ngindices > 0 )
1994 if( !propdata->issorted || (
SCIPgetCurrentNode(
scip) == propdata->lastnodecaught && propdata->nindices > 0 ) )
2016 assert(propdata->propasconss);
2019 if( propdata->cutoffboundvar ==
NULL )
2045 for(
i = 0;
i < propdata->ngenvbounds; ++
i )
2055 genvbound = propdata->genvboundstore[
i];
2065 for( j = 0; j < genvbound->
ncoefs; j++ )
2068 vals[j] = genvbound->
coefs[j];
2079 vars[genvbound->
ncoefs + 1] = propdata->cutoffboundvar;
2099 if( propdata->ngenvbounds > 0 )
2103 for(
i = propdata->ngenvbounds - 1;
i >= 0;
i-- )
2122 propdata->genvboundstore =
NULL;
2123 propdata->genvboundstoresize = 0;
2124 propdata->ngenvbounds = 0;
2165 assert(coefcutoffbound <= 0.0);
2170 SCIPerrorMessage(
"cannot create generalized variable bound from invalid data\n");
2178 if( propdata->genvboundstore ==
NULL )
2184 newgenvbound = (genvbound ==
NULL);
2189 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2197 if( !newgenvbound && genvbound->
ncoefs < ncoefs )
2208 else if( !newgenvbound && genvbound->
ncoefs == ncoefs )
2211 for(
i = 0;
i < ncoefs;
i++ )
2213 genvbound->
coefs[
i] = coefs[
i];
2217 else if( !newgenvbound && genvbound->
ncoefs > ncoefs )
2228 for(
i = 0;
i < ncoefs;
i++ )
2230 genvbound->
coefs[
i] = coefs[
i];
2234 else if( newgenvbound )
2248 genvbound->
ncoefs = ncoefs;
2253 for(
i = 0;
i < genvbound->
ncoefs; ++
i )
2297 propdata->issorted =
FALSE;
2302#ifdef WITH_DEBUG_SOLUTION
2345 propdata->genvboundstore =
NULL;
2346 propdata->genvboundstoresize = 0;
2347 propdata->lbevents =
NULL;
2348 propdata->ubevents =
NULL;
2349 propdata->lbgenvbounds =
NULL;
2350 propdata->ubgenvbounds =
NULL;
2351 propdata->lbeventsmap =
NULL;
2352 propdata->ubeventsmap =
NULL;
2353 propdata->startmap =
NULL;
2354 propdata->componentsstart =
NULL;
2355 propdata->startindices =
NULL;
2356 propdata->startcomponents =
NULL;
2357 propdata->gstartindices =
NULL;
2358 propdata->gstartcomponents =
NULL;
2360 propdata->lastnodecaught =
NULL;
2361 propdata->cutoffboundvar =
NULL;
2362 propdata->ngenvbounds = -1;
2363 propdata->ncomponents = -1;
2364 propdata->nindices = -1;
2365 propdata->ngindices = -1;
2366 propdata->nlbevents = -1;
2367 propdata->nubevents = -1;
2368 propdata->issorted =
FALSE;
2370 propdata->prop = prop;
2398 if( propdata->ngenvbounds < 1 )
2426 if( propdata->cutoffboundvar !=
NULL )
2428 SCIPdebugMsg(
scip,
"propinitpre in problem <%s>: locking cutoffboundvar (current downlocks=%d, uplocks=%d)\n",
2451 SCIPdebugMsg(
scip,
"propexitpre in problem <%s>: removing fixed, aggregated, negated, and multi-aggregated variables from right-hand side\n",
2465 for(
i = 0;
i < propdata->ngenvbounds; )
2472 genvbound = propdata->genvboundstore[
i];
2486 if( requiredsize > genvbound->
ncoefs )
2489 if( genvbound->
coefssize < requiredsize )
2497 assert(requiredsize <= genvbound->ncoefs);
2501 for( j = 0; j < genvbound->
ncoefs; ++j )
2506 for( j = 0; j <
nvars; ++j )
2532 --(propdata->ngenvbounds);
2537 propdata->genvboundstore[
i] = propdata->genvboundstore[propdata->ngenvbounds];
2538 propdata->genvboundstore[
i]->index =
i;
2541 propdata->issorted =
FALSE;
2594 if( propdata->cutoffboundvar !=
NULL )
2601 assert(propdata->propasconss);
2613 SCIPdebugMsg(
scip,
"tightened UB of cutoffboundvar to %e (old: %e, infeas: %u, tightened: %u)\n",
2614 newub, oldub, infeasible, tightened);
2625 if( propdata->ngenvbounds < 1 )
2633 if( propdata->propasconss )
2674 assert(inferinfo < propdata->ngenvbounds);
2679 if( inferinfo >= propdata->ngenvbounds)
2681 SCIPerrorMessage(
"generalized variable bounds propagator received inferinfo out of range; propagation not resolved, safe to continue\n");
2686 genvbound = propdata->genvboundstore[inferinfo];
2691 if( genvbound->
var != infervar )
2693 SCIPerrorMessage(
"generalized variable bounds propagator received incorrect inferinfo; propagation not resolved, but it's safe to continue\n");
2710 boundval =
MIN(boundval, roundedboundval);
2793 assert(eventdata->nstarts > 0);
2814 for(
i = 0;
i < eventdata->nstarts;
i++ )
2819 component = eventdata->startcomponents[
i];
2821 startidx = eventdata->startindices[
i];
2830 assert(componentidx >= 0);
2831 assert(propdata->startcomponents[componentidx] == component);
2833 if( propdata->startindices[componentidx] > startidx )
2834 propdata->startindices[componentidx] = startidx;
2840 componentidx = propdata->nindices;
2843 propdata->startcomponents[componentidx] = component;
2844 propdata->startindices[componentidx] = startidx;
2850 propdata->nindices++;
2874 propExecGenvbounds, propdata) );
2888 "apply global propagation?",
2892 "apply genvbounds in root node if no new incumbent was found?",
2896 "sort genvbounds and wait for bound change events?",
2900 "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_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 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