251#define CONSHDLR_NAME "indicator"
252#define CONSHDLR_DESC "indicator constraint handler"
253#define CONSHDLR_SEPAPRIORITY 10
254#define CONSHDLR_ENFOPRIORITY -100
255#define CONSHDLR_CHECKPRIORITY -6000000
256#define CONSHDLR_SEPAFREQ 10
257#define CONSHDLR_PROPFREQ 1
258#define CONSHDLR_EAGERFREQ 100
260#define CONSHDLR_MAXPREROUNDS -1
261#define CONSHDLR_DELAYSEPA FALSE
262#define CONSHDLR_DELAYPROP FALSE
263#define CONSHDLR_NEEDSCONS TRUE
265#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST
266#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
270#define EVENTHDLR_BOUND_NAME "indicatorbound"
271#define EVENTHDLR_BOUND_DESC "bound change event handler for indicator constraints"
273#define EVENTHDLR_LINCONSBOUND_NAME "indicatorlinconsbound"
274#define EVENTHDLR_LINCONSBOUND_DESC "bound change event handler for lincons of indicator constraints"
276#define EVENTHDLR_RESTART_NAME "indicatorrestart"
277#define EVENTHDLR_RESTART_DESC "force restart if absolute gap is 1 or enough binary variables have been fixed"
281#define CONFLICTHDLR_NAME "indicatorconflict"
282#define CONFLICTHDLR_DESC "replace slack variables and generate logicor constraints"
283#define CONFLICTHDLR_PRIORITY 200000
286#define LINCONSUPGD_PRIORITY +100000
289#define DEFAULT_BRANCHINDICATORS FALSE
290#define DEFAULT_GENLOGICOR FALSE
291#define DEFAULT_ADDCOUPLING TRUE
292#define DEFAULT_MAXCOUPLINGVALUE 1e4
293#define DEFAULT_ADDCOUPLINGCONS FALSE
294#define DEFAULT_SEPACOUPLINGCUTS TRUE
295#define DEFAULT_SEPACOUPLINGLOCAL FALSE
296#define DEFAULT_SEPACOUPLINGVALUE 1e4
297#define DEFAULT_SEPAALTERNATIVELP FALSE
298#define DEFAULT_SEPAPERSPECTIVE FALSE
299#define DEFAULT_SEPAPERSPLOCAL TRUE
300#define DEFAULT_MAXSEPANONVIOLATED 3
301#define DEFAULT_TRYSOLFROMCOVER FALSE
302#define DEFAULT_UPGRADELINEAR FALSE
303#define DEFAULT_USEOTHERCONSS FALSE
304#define DEFAULT_USEOBJECTIVECUT FALSE
305#define DEFAULT_UPDATEBOUNDS FALSE
306#define DEFAULT_MAXCONDITIONALTLP 0.0
307#define DEFAULT_MAXSEPACUTS 100
308#define DEFAULT_MAXSEPACUTSROOT 2000
309#define DEFAULT_REMOVEINDICATORS FALSE
310#define DEFAULT_GENERATEBILINEAR FALSE
311#define DEFAULT_SCALESLACKVAR FALSE
312#define DEFAULT_NOLINCONSCONT FALSE
313#define DEFAULT_TRYSOLUTIONS TRUE
314#define DEFAULT_ENFORCECUTS FALSE
315#define DEFAULT_DUALREDUCTIONS TRUE
316#define DEFAULT_ADDOPPOSITE FALSE
317#define DEFAULT_CONFLICTSUPGRADE FALSE
318#define DEFAULT_FORCERESTART FALSE
319#define DEFAULT_RESTARTFRAC 0.9
320#define DEFAULT_USESAMESLACKVAR FALSE
324#define OBJEPSILON 0.001
325#define SEPAALTTHRESHOLD 10
326#define MAXROUNDINGROUNDS 1
339 SCIP_Bool lessthanineq;
342 unsigned int linconsactive:1;
343 unsigned int implicationadded:1;
344 unsigned int slacktypechecked:1;
349struct SCIP_ConshdlrData
354 SCIP_Bool boundhaschanged;
355 SCIP_Bool linconsevents;
356 SCIP_Bool linconsboundschanged;
359 SCIP_Bool objindicatoronly;
360 SCIP_Bool objothervarsonly;
376 SCIP_Real objupperbound;
377 SCIP_Real objaltlpbound;
378 int maxroundingrounds;
379 SCIP_Real roundingminthres;
380 SCIP_Real roundingmaxthres;
381 SCIP_Real roundingoffset;
382 SCIP_Bool branchindicators;
383 SCIP_Bool genlogicor;
384 SCIP_Bool addcoupling;
385 SCIP_Bool addcouplingcons;
386 SCIP_Bool sepacouplingcuts;
387 SCIP_Bool sepacouplinglocal;
388 SCIP_Bool sepaperspective;
389 SCIP_Bool sepapersplocal;
390 SCIP_Bool removeindicators;
391 SCIP_Bool updatebounds;
392 SCIP_Bool trysolutions;
393 SCIP_Bool enforcecuts;
394 SCIP_Bool dualreductions;
395 SCIP_Bool addopposite;
396 SCIP_Bool generatebilinear;
397 SCIP_Bool scaleslackvar;
398 SCIP_Bool conflictsupgrade;
399 SCIP_Bool performedrestart;
402 int maxsepanonviolated;
405 SCIP_Real maxcouplingvalue;
406 SCIP_Real sepacouplingvalue;
407 SCIP_Real maxconditionaltlp;
408 SCIP_Real restartfrac;
410 SCIP_Bool addedcouplingcons;
414 SCIP_Bool useotherconss;
415 SCIP_Bool useobjectivecut;
416 SCIP_Bool trysolfromcover;
417 SCIP_Bool upgradelinear;
419 SCIP_Bool usesameslackvar;
421 SCIP_Bool sepaalternativelp;
422 SCIP_Bool sepaalternativelp_;
423 SCIP_Bool nolinconscont;
424 SCIP_Bool nolinconscont_;
425 SCIP_Bool forcerestart;
426 SCIP_Bool forcerestart_;
431struct SCIP_ConflicthdlrData
452#define SCIP_CALL_PARAM(x) do \
454 SCIP_RETCODE _restat_; \
455 if ( (_restat_ = (x)) != SCIP_OKAY && (_restat_ != SCIP_PARAMETERUNKNOWN) ) \
457 SCIPerrorMessage("[%s:%d] Error <%d> in function call\n", __FILE__, __LINE__, _restat_); \
504 lincons = consdata->lincons;
521 for(
i = 0;
i < nvarslincons; ++
i )
524 vals[
i] = linvals[
i];
526 nlocvars = nvarslincons;
548 vars[0] = consdata->binvar;
556 actweight = consdata->activeone ? 1.0 : -1.0;
567 else if( nlocvars == 1 )
588 vars[0] = consdata->slackvar;
604 else if( nlocvars == 1 )
645 assert( 0 <= consdata->nfixednonzero && consdata->nfixednonzero <= 2 );
646 assert( consdata->linconsactive );
663 ++(consdata->nfixednonzero);
664#ifdef SCIP_MORE_DEBUG
665 SCIPdebugMsg(
scip,
"Changed lower bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
675 ++(consdata->nfixednonzero);
676#ifdef SCIP_MORE_DEBUG
677 SCIPdebugMsg(
scip,
"Changed upper bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
687 --(consdata->nfixednonzero);
688#ifdef SCIP_MORE_DEBUG
689 SCIPdebugMsg(
scip,
"Changed lower bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
699 --(consdata->nfixednonzero);
700#ifdef SCIP_MORE_DEBUG
701 SCIPdebugMsg(
scip,
"Changed upper bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
712 assert( 0 <= consdata->nfixednonzero && consdata->nfixednonzero <= 2 );
715 conshdlrdata->boundhaschanged =
TRUE;
735#ifdef SCIP_MORE_DEBUG
743 conshdlrdata->linconsboundschanged =
TRUE;
771 assert( conshdlrdata->forcerestart );
794 if ( conshdlrdata->performedrestart )
798 ++(conshdlrdata->nbinvarszero);
806 if ( conshdlrdata->nbinvarszero > (
int) ((SCIP_Real) conshdlrdata->ninitconss * conshdlrdata->restartfrac) )
809 "Forcing restart, since %d binary variables among %d have been fixed.\n", conshdlrdata->nbinvarszero, conshdlrdata->ninitconss);
813 if ( conshdlrdata->objindicatoronly )
817 conshdlrdata->performedrestart =
TRUE;
829 if ( ! conshdlrdata->objindicatoronly )
846 conshdlrdata->performedrestart =
TRUE;
896 assert( bdchginfos !=
NULL || nbdchginfos == 0 );
919 for (
i = 0;
i < nbdchginfos; ++
i)
951 if ( haveslack &&
i == nbdchginfos )
958 SCIPdebugMsg(
scip,
"Found conflict involving slack variables that can be remodelled.\n");
968 for (
i = 0;
i < nbdchginfos; ++
i)
984 for (j = 0; j < nconss; ++j)
991 if ( slackvar ==
var )
1019 if (
i == nbdchginfos )
1075 if ( *value == newvalue )
1130#ifdef SCIP_ENABLE_IISCHECK
1173 for (
c = 0;
c < nconss; ++
c)
1189 SCIP_Real sign = 1.0;
1200 lincons = consdata->lincons;
1205 slackvar = consdata->slackvar;
1213 SCIP_Real scalar = 1.0;
1214 SCIP_Real constant = 0.0;
1227 linvals[0] = scalar;
1257 for (v = 0; v < nlinvars; ++v)
1264 if (
var == slackvar )
1277 newvars[nnewvars++] =
var;
1295 for (v = 0; v < nnewvars; ++v)
1309 for (v = nnewvars - 1; v >= 0; --v)
1321 for (v = 0; v < nlinvars; ++v)
1328 if (
var == slackvar )
1333 matval[cnt] = sign * linvals[v];
1358 if ( conshdlrdata->useotherconss )
1365 for (
c = 0;
c < nconss; ++
c)
1409 for (v = 0; v < nlinvars; ++v)
1425 newvars[nnewvars++] =
var;
1443 for (v = 0; v < nnewvars; ++v)
1457 for (v = nnewvars - 1; v >= 0; --v)
1468 for (v = 0; v < nlinvars; ++v)
1476 matval[cnt] = linvals[v];
1554 assert( conshdlrdata->naddlincons <= conshdlrdata->maxaddlincons );
1556 if ( num > conshdlrdata->maxaddlincons )
1562 conshdlrdata->maxaddlincons = newsize;
1564 assert( num <= conshdlrdata->maxaddlincons );
1586 SCIP_Real lhs = -1.0;
1587 SCIP_Real rhs = -1.0;
1610 conshdlrdata->nrows = 1;
1652 for (j = 0; j < nCols; ++j)
1657 for (j = 0; j < nconss; ++j)
1665 ind = consdata->colindex;
1670 covered[ind] =
TRUE;
1679 for (j = 0; j < nCols; ++j)
1718 int* indices =
NULL;
1728 for (j = 0; j < nconss; ++j)
1736 if ( consdata->colindex >= 0 )
1742 obj[cnt] = 1.0 - val;
1743 indices[cnt++] = consdata->colindex;
1770 int* indices =
NULL;
1780 for (j = 0; j < nconss; ++j)
1788 if ( consdata->colindex >= 0 )
1791 indices[cnt++] = consdata->colindex;
1817 SCIP_Real* lb =
NULL;
1818 SCIP_Real* ub =
NULL;
1819 int* indices =
NULL;
1832 for (j = 0; j < nconss; ++j)
1840 if ( consdata->colindex >= 0 )
1844 indices[cnt] = consdata->colindex;
1909 SCIP_Real* lb =
NULL;
1910 SCIP_Real* ub =
NULL;
1911 int* indices =
NULL;
1924 for (j = 0; j < nconss; ++j)
1934 if ( consdata->colindex >= 0 )
1936 indices[cnt] = consdata->colindex;
1976 altlp = conshdlrdata->altlp;
1977 lbhash = conshdlrdata->lbhash;
1978 ubhash = conshdlrdata->ubhash;
1986 for (v = 0; v <
nvars; ++v)
2012 conshdlrdata->scaled =
FALSE;
2040 altlp = conshdlrdata->altlp;
2041 lbhash = conshdlrdata->lbhash;
2042 ubhash = conshdlrdata->ubhash;
2050 for (v = 0; v <
nvars; ++v)
2112 lbhash = conshdlrdata->lbhash;
2113 ubhash = conshdlrdata->ubhash;
2121 for (v = 0; v <
nvars; ++v)
2135 assert( 0 <= col && col < nCols );
2153 assert( 0 <= col && col < nCols );
2182 if ( ! conshdlrdata->scaled )
2187 SCIP_Real sum = 0.0;
2193 altlp = conshdlrdata->altlp;
2203 for (j = 0; j < cnt; ++j)
2207 sum = -
REALABS(sum) / ((double) cnt);
2215 conshdlrdata->scaled =
TRUE;
2245 SCIP_Bool* newrowsslack;
2268 if ( conshdlrdata->altlp ==
NULL )
2282 assert( nrows == conshdlrdata->nrows );
2305 matval[cnt++] = sign * rhscoef;
2309 for (v = 0; v <
nvars; ++v)
2320 if (
var != slackvar )
2326 if ( ind < INT_MAX )
2334 matind[cnt] = (conshdlrdata->nrows)++;
2337 newrowsslack[nnewrows++] =
TRUE;
2340 matval[cnt++] = sign * vals[v];
2354 matind[cnt] = (conshdlrdata->nrows)++;
2357 newrowsslack[nnewrows++] =
FALSE;
2358 newvars[nnewvars++] =
var;
2361 matval[cnt++] = sign * vals[v];
2374 for (
i = 0;
i < nnewrows; ++
i)
2376 if ( newrowsslack[
i] )
2406 for (v = 0; v < nnewvars; ++v)
2415 matbeg[nnewcols] = cnt;
2419 matval[cnt++] = -val;
2424 matval[cnt++] = -1.0;
2425 obj[nnewcols] = 0.0;
2428 ++conshdlrdata->nlbbounds;
2432 SCIPdebugMsg(
scip,
"Added column for lower bound (%f) of variable <%s> to alternative polyhedron (col: %d).\n",
2441 matbeg[nnewcols] = cnt;
2445 matval[cnt++] = val;
2450 matval[cnt++] = 1.0;
2451 obj[nnewcols] = 0.0;
2454 ++conshdlrdata->nubbounds;
2458 SCIPdebugMsg(
scip,
"Added column for upper bound (%f) of variable <%s> to alternative polyhedron (col: %d).\n",
2472 assert( cnt == ncols + nnewcols + 1 );
2484 conshdlrdata->scaled =
FALSE;
2531 SCIP_Real scalar = 1.0;
2532 SCIP_Real constant = 0.0;
2538 SCIPdebugMsg(
scip,
"Slack variable is aggregated (scalar: %f, constant: %f).\n", scalar, constant);
2548 linvals[0] = scalar;
2571 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linrhs, objcoef, 1.0,
TRUE, colindex) );
2576 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linrhs, objcoef, 1.0,
FALSE, colindex) );
2582 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linlhs, objcoef, -1.0,
FALSE, colindex) );
2641 for (j = 0; j < nrowcols; ++j)
2651 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowrhs, objcoef, 1.0,
TRUE, colindex) );
2656 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowrhs, objcoef, 1.0,
FALSE, colindex) );
2662 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowlhs, objcoef, -1.0,
FALSE, colindex) );
2694 if ( conshdlrdata->objcutindex >= 0 )
2698 if ( ! conshdlrdata->objothervarsonly )
2702 SCIPdebugMsg(
scip,
"Add objective cut to alternative LP (obj. bound: %g).\n", conshdlrdata->objupperbound);
2709 for (v = 0; v <
nvars; ++v)
2721 objvars[nobjvars] =
var;
2722 objvals[nobjvars++] =
objval;
2727 SCIP_CALL(
addAltLPColumn(
scip, conshdlr, conshdlrdata,
NULL, nobjvars, objvars, objvals, conshdlrdata->objupperbound, 0.0, 1.0,
FALSE, &conshdlrdata->objcutindex) );
2728 assert( conshdlrdata->objcutindex >= 0 );
2729 conshdlrdata->objaltlpbound = conshdlrdata->objupperbound;
2759 if ( conshdlrdata->altlp !=
NULL )
2766 if ( consdata->colindex >= 0 )
2770 consdata->colindex = -1;
2774 conshdlrdata->scaled =
FALSE;
2793 if ( ! conshdlrdata->useobjectivecut )
2796 if ( conshdlrdata->altlp ==
NULL )
2808 if (
SCIPisLT(
scip, objbnd, conshdlrdata->objupperbound) )
2809 conshdlrdata->objupperbound = objbnd;
2816 if (
SCIPisLT(
scip, conshdlrdata->objupperbound, conshdlrdata->objaltlpbound) )
2818 SCIPdebugMsg(
scip,
"Update objective bound to %g.\n", conshdlrdata->objupperbound);
2821 if ( conshdlrdata->objcutindex < 0 )
2835 conshdlrdata->objaltlpbound = conshdlrdata->objupperbound;
2861 SCIP_Real maxcondition,
2863 SCIP_Bool* infeasible,
2868 SCIP_Real condition;
2915 if ( maxcondition > 0.0 )
2919 if ( condition !=
SCIP_INVALID && condition > maxcondition )
2921 SCIPdebugMsg(
scip,
"Estimated condition number of basis matrix (%e) exceeds maximal allowance (%e).\n", condition, maxcondition);
2929 SCIPdebugMsg(
scip,
"Estimated condition number of basis matrix (%e) is below maximal allowance (%e).\n", condition, maxcondition);
2933 SCIPdebugMsg(
scip,
"Estimated condition number of basis matrix not available.\n");
2991 *infeasible =
FALSE;
3012 SCIP_Bool removable,
3013 SCIP_Bool genlogicor,
3028 int nnonviolated = 0;
3048 assert( nconss <= nCols );
3052 SCIP_Bool infeasible;
3053 SCIP_Real sum = 0.0;
3054 SCIP_Real candobj = -1.0;
3055 SCIP_Real candval = 2.0;
3056 SCIP_Real norm = 1.0;
3079 SCIPdebugMsg(
scip,
" size: %4d produced possible cover with indicator variable objective value %f.\n", *size, *value);
3082 if ( conshdlrdata->trysolfromcover )
3092 if ( heurindicator ==
NULL )
3109 for (j = 0; j < nconss; ++j)
3116 ind = consdata->colindex;
3133 if ( val < candval )
3145 if ( candidate < 0 )
3151 assert( candidate >= 0 );
3152 assert( ! S[candidate] );
3156 switch ( conshdlrdata->normtype )
3159 norm = sqrt((SCIP_Real) sizeIIS);
3171 SCIPerrorMessage(
"Invalid efficacy norm parameter '%c'.\n", conshdlrdata->normtype);
3176 SCIPdebugMsg(
scip,
" size: %4d, add var. %4d (obj: %-6g, alt-LP sol: %-8.4f); IIS size: %4d, eff.: %g.\n",
3177 *size, candidate, candobj,
primsol[
SCIPconsGetData(conss[candidate])->colindex], sizeIIS, (sum - (SCIP_Real) (sizeIIS - 1))/norm);
3180 S[candidate] =
TRUE;
3190 SCIP_Bool isLocal =
FALSE;
3192#ifdef SCIP_ENABLE_IISCHECK
3198 if ( conshdlrdata->updatebounds )
3213 for (j = 0; j < nconss; ++j)
3219 ind = consdata->colindex;
3235 assert( cnt == sizeIIS );
3239 SCIP_CALL(
SCIPcreateConsLogicor(
scip, &cons, name, cnt,
vars,
FALSE,
TRUE,
TRUE,
TRUE,
TRUE, isLocal,
FALSE,
TRUE, removable,
FALSE) );
3241 SCIP_CALL(
SCIPcreateConsLogicor(
scip, &cons,
"", cnt,
vars,
FALSE,
TRUE,
TRUE,
TRUE,
TRUE, isLocal,
FALSE,
TRUE, removable,
FALSE) );
3250 switch ( enfosepatype )
3293 for (j = 0; j < nconss; ++j)
3299 ind = consdata->colindex;
3340 if ( nnonviolated > conshdlrdata->maxsepanonviolated )
3342 SCIPdebugMsg(
scip,
"Stop separation after %d non violated IISs.\n", nnonviolated);
3346 while (step < nconss);
3362 const char* consname,
3366 SCIP_Bool activeone,
3367 SCIP_Bool lessthanineq,
3370 SCIP_Bool linconsactive
3383 if ( activeone || binvar ==
NULL )
3385 binvarinternal = binvar;
3394 (*consdata)->nfixednonzero = 0;
3395 (*consdata)->colindex = -1;
3396 (*consdata)->linconsactive = linconsactive;
3397 (*consdata)->binvar = binvarinternal;
3398 (*consdata)->slackvar = slackvar;
3399 (*consdata)->activeone = activeone;
3400 (*consdata)->lessthanineq = lessthanineq;
3401 (*consdata)->lincons = lincons;
3402 (*consdata)->implicationadded =
FALSE;
3403 (*consdata)->slacktypechecked =
FALSE;
3404 (*consdata)->varswithevents =
NULL;
3405 (*consdata)->eventtypes =
NULL;
3406 (*consdata)->nevents = 0;
3414 if ( binvarinternal !=
NULL )
3418 (*consdata)->binvar =
var;
3433 if ( conshdlrdata->forcerestart )
3441 ++((*consdata)->nfixednonzero);
3447 (*consdata)->slackvar =
var;
3450 if ( linconsactive )
3454 ++((*consdata)->nfixednonzero);
3465 SCIPdebugMsg(
scip,
"Added column for <%s> to alternative LP with column index %d.\n", consname, (*consdata)->colindex);
3473 if ( (*consdata)->nfixednonzero > 0 )
3475 SCIPdebugMsg(
scip,
"Constraint <%s> has %d variables fixed to be nonzero.\n", consname, (*consdata)->nfixednonzero);
3504 for (
c = 0;
c < nconss; ++
c)
3516 if ( ub <= conshdlrdata->maxcouplingvalue )
3533 !conshdlrdata->removeindicators, !conshdlrdata->removeindicators,
FALSE) );
3539 if ( conshdlrdata->removeindicators )
3561 SCIP_Bool dualreductions,
3568 SCIP_Bool infeasible;
3592 SCIPdebugMsg(
scip,
"The problem is infeasible: binary and slack variable are fixed to be nonzero.\n");
3633 SCIPdebugMsg(
scip,
"The problem is infeasible: binary and slack variable are fixed to be nonzero.\n");
3639 SCIPdebugMsg(
scip,
"Fix binary variable to 0 and delete indicator constraint.\n");
3657 if ( dualreductions )
3663 binvar = consdata->binvar;
3719 SCIP_Bool negated =
FALSE;
3723 var = consdata->binvar;
3728 if (
var != consdata->binvar && ! negated )
3733 assert( conshdlrdata->eventhdlrbound !=
NULL );
3740 if ( conshdlrdata->forcerestart )
3742 assert( conshdlrdata->eventhdlrrestart !=
NULL );
3744 conshdlrdata->eventhdlrrestart, (
SCIP_EVENTDATA*) conshdlrdata, -1) );
3753 consdata->binvar =
var;
3764 if (
var == consdata->slackvar )
3783 var = consdata->slackvar;
3796 assert( conshdlrdata->eventhdlrbound !=
NULL );
3807 consdata->slackvar =
var;
3809 else if (
var == consdata->binvar )
3817 SCIPdebugMsg(
scip,
"Slack variable <%s> is aggregated to negated indicator variable <%s> -> constraint redundant.\n",
3831 SCIPdebugMsg(
scip,
"Slack variable <%s> is aggregated to the indicator variable <%s> -> fix indicator variable to 0.\n",
3867 SCIP_Bool dualreductions,
3868 SCIP_Bool addopposite,
3873 SCIP_Bool infeasible;
3874 SCIP_Bool tightened;
3886 if ( ! consdata->linconsactive )
3900 if ( consdata->nfixednonzero > 1 )
3902 SCIPdebugMsg(
scip,
"The node is infeasible, both the slack variable and the binary variable are fixed to be nonzero.\n");
3927 if ( consdata->nfixednonzero == 1 )
3937 SCIPdebugMsg(
scip,
"Binary variable <%s> is fixed to be nonzero, fixing slack variable <%s> to 0.\n",
3954 SCIPdebugMsg(
scip,
"Slack variable <%s> is fixed to be nonzero, fixing binary variable <%s> to 0.\n",
3978 if ( addopposite && consdata->linconsactive )
3984 SCIP_Bool allintegral =
TRUE;
4015 slackvar = consdata->slackvar;
4022 for (j = 0; j < nlinvars; ++j)
4024 if ( linvars[j] != slackvar )
4027 allintegral =
FALSE;
4030 vals[
nvars++] = linvals[j];
4074 if ( dualreductions )
4080 binvar = consdata->binvar;
4155 SCIP_Real* consvals;
4156 SCIP_Real maxactivity;
4159 SCIP_Real coeffslack;
4171 for (j = 0; j < nlinconsvars; ++j)
4184 if (
var == consdata->slackvar )
4201 maxactivity += val * ub;
4213 newub = maxactivity - rhs;
4217 newub = newub / (-1.0 * coeffslack);
4262 SCIP_Bool genlogicor,
4270 SCIP_Real value = 0.0;
4288 lp = conshdlrdata->altlp;
4296 if ( conshdlrdata->updatebounds )
4311 for (j = 0; j < nconss; ++j)
4335 SCIP_CALL(
extendToCover(
scip, conshdlr, conshdlrdata, lp,
sol, enfosepatype, conshdlrdata->removable, genlogicor, nconss, conss, S, &size, &value, &error,
cutoff, &nCuts) );
4339 if ( nCuts == 0 && error )
4373 SCIP_Bool genlogicor,
4384 SCIP_Real maxSlack = -1.0;
4385 SCIP_Bool someLinconsNotActive =
FALSE;
4386 SCIP_Bool dualreductions;
4405 for (
c = 0;
c < nconss; ++
c)
4417 if ( ! consdata->linconsactive )
4419 someLinconsNotActive =
TRUE;
4439 binvar = consdata->binvar;
4447 if ( valSlack > maxSlack )
4449 maxSlack = valSlack;
4464 if ( (someLinconsNotActive || conshdlrdata->enforcecuts) && conshdlrdata->sepaalternativelp )
4472 conshdlrdata->niiscutsgen += ngen;
4479 conshdlrdata->niiscutsgen += ngen;
4505 if ( ! conshdlrdata->branchindicators )
4515 binvar = consdata->binvar;
4516 slackvar = consdata->slackvar;
4568 SCIP_Real threshold;
4580 if ( *nGen >= maxsepacuts )
4588 lp = conshdlrdata->altlp;
4598 if ( conshdlrdata->updatebounds )
4616 for (threshold = conshdlrdata->roundingmaxthres;
4617 rounds < conshdlrdata->maxroundingrounds && threshold >= conshdlrdata->roundingminthres && *nGen < maxsepacuts && ! (*
cutoff);
4618 threshold -= conshdlrdata->roundingoffset )
4620 SCIP_Real value = 0.0;
4633 for (j = 0; j < nconss; ++j)
4636 SCIP_Real binvarval;
4665 if ( binvarval > binvarnegval )
4683 if ( size == nconss )
4690 if ( size == oldsize )
4692 SCIPdebugMsg(
scip,
"Skipping computation: size support has not changed.\n");
4698 SCIPdebugMsg(
scip,
" Vars with value 1: %d 0: %d and fractional: %d.\n", nvarsone, nvarszero, nvarsfrac);
4706 nconss, conss, S, &size, &value, &error,
cutoff, &nCuts) );
4786 if ( *nGen >= maxsepacuts )
4797 for (
c = 0;
c < nconss; ++
c)
4808 slackvar = consdata->slackvar;
4810 lincons = consdata->lincons;
4813 binvar = consdata->binvar;
4822 SCIP_Bool finitebound =
TRUE;
4823 SCIP_Real cutrhs = 0.0;
4825 SCIP_Real signfactor = 1.0;
4827 SCIP_Bool islocal =
FALSE;
4848 cutval = binval * ypart;
4850 for (j = 0; j < nlinvars; ++j)
4855 SCIP_Real din = 0.0;
4856 SCIP_Real dout = 0.0;
4860 if ( linvars[j] == slackvar )
4863 if ( conshdlrdata->sepapersplocal )
4882 finitebound =
FALSE;
4887 linval = signfactor * linvals[j];
4891 dout += linval * lb;
4896 dout += linval * ub;
4900 xpart = linval * xval;
4903 if (
SCIPisGT(
scip, binval * din, binval * dout + xpart) )
4906 cutval += binval * din;
4914 cutval += binval * dout + xpart;
4916 cutvars[cnt] = linvars[j];
4917 cutvals[cnt++] = linval;
4921 if ( ! finitebound )
4927 SCIP_Bool infeasible;
4931 cutvars[cnt] = binvar;
4932 cutvals[cnt] = ypart;
4936 (void)
SCIPsnprintf(name, 50,
"persp%d", conshdlrdata->nperspcutsgen + *nGen);
4949 if ( *nGen >= maxsepacuts )
4997 maxsepacuts = conshdlrdata->maxsepacutsroot;
4999 maxsepacuts = conshdlrdata->maxsepacuts;
5002 if ( conshdlrdata->sepacouplingcuts )
5009 for (
c = 0;
c < nusefulconss && ncuts < maxsepacuts; ++
c)
5024 if ( conshdlrdata->sepacouplinglocal )
5035 if ( ub <= conshdlrdata->sepacouplingvalue )
5043 SCIP_Bool infeasible;
5073 SCIPdebugMsg(
scip,
"Number of separated coupling inequalities: %d.\n", ncuts);
5082 SCIPdebugMsg(
scip,
"Separating inequalities for indicator constraints.\n");
5090 SCIPdebugMsg(
scip,
"Separated %d cuts from indicator constraints.\n", ncuts - noldcuts);
5094 else if ( ncuts > noldcuts )
5096 conshdlrdata->niiscutsgen += ncuts;
5099 if ( conshdlrdata->genlogicor )
5111 SCIPdebugMsg(
scip,
"Separating inequalities based on perspective formulation.\n");
5119 SCIPdebugMsg(
scip,
"Separated %d cuts from perspective formulation.\n", ncuts - noldcuts);
5121 if ( ncuts > noldcuts )
5123 conshdlrdata->nperspcutsgen += ncuts;
5143 conshdlrdata->linconsevents =
FALSE;
5144 conshdlrdata->linconsboundschanged =
TRUE;
5145 conshdlrdata->boundhaschanged =
TRUE;
5146 conshdlrdata->removable =
TRUE;
5147 conshdlrdata->scaled =
FALSE;
5148 conshdlrdata->altlp =
NULL;
5149 conshdlrdata->nrows = 0;
5150 conshdlrdata->varhash =
NULL;
5151 conshdlrdata->slackhash =
NULL;
5152 conshdlrdata->lbhash =
NULL;
5153 conshdlrdata->ubhash =
NULL;
5154 conshdlrdata->nlbbounds = 0;
5155 conshdlrdata->nubbounds = 0;
5156 conshdlrdata->nslackvars = 0;
5157 conshdlrdata->objcutindex = -1;
5160 conshdlrdata->roundingminthres = 0.1;
5161 conshdlrdata->roundingmaxthres = 0.6;
5163 conshdlrdata->roundingoffset = 0.1;
5164 conshdlrdata->addedcouplingcons =
FALSE;
5165 conshdlrdata->ninitconss = 0;
5166 conshdlrdata->nbinvarszero = 0;
5167 conshdlrdata->performedrestart =
FALSE;
5168 conshdlrdata->objindicatoronly =
FALSE;
5169 conshdlrdata->objothervarsonly =
FALSE;
5170 conshdlrdata->minabsobj = 0.0;
5171 conshdlrdata->normtype =
'e';
5172 conshdlrdata->niiscutsgen = 0;
5173 conshdlrdata->nperspcutsgen = 0;
5194 SCIP_Real minactivity = 0.0;
5195 SCIP_Real maxactivity = 0.0;
5196 SCIP_Real maxabsval = -1.0;
5197 SCIP_Real secabsval = -1.0;
5198 int maxabsvalidx = -1;
5220 if ( ! conshdlrdata->upgradelinear )
5224 for (j = 0; j <
nvars; ++j)
5240 secabsval = maxabsval;
5264 minactivity += val * lb;
5273 maxactivity += val * ub;
5277 assert( maxabsval >= 0.0 );
5278 assert( 0 <= maxabsvalidx && maxabsvalidx <
nvars );
5293 for (j = 0; j <
nvars; ++j)
5296 SCIP_Real* indconsvals;
5297 SCIP_Bool upgdlhs =
FALSE;
5298 SCIP_Bool upgdrhs =
FALSE;
5299 SCIP_Bool indneglhs =
FALSE;
5300 SCIP_Bool indnegrhs =
FALSE;
5343 if ( upgdlhs || upgdrhs )
5349 assert( ! upgdlhs || ! upgdrhs );
5356 for (l = 0; l <
nvars; ++l)
5358 if (
vars[l] == indvar )
5360 indconsvars[cnt] =
vars[l];
5362 indconsvals[cnt] = -vals[l];
5364 indconsvals[cnt] = vals[l];
5368 if ( indneglhs || indnegrhs )
5451 if ( conshdlrdata->trysolutions && conshdlrdata->heurtrysol ==
NULL )
5475 if ( conshdlrdata->binvarhash !=
NULL )
5478 if ( conshdlrdata->binslackvarhash !=
NULL )
5482 for (
i = 0;
i < nconss;
i++)
5487 if ( consdata->varswithevents !=
NULL )
5492 for (j = 0; j < consdata->nevents; ++j)
5499 consdata->nevents = 0;
5506 conshdlrdata->maxaddlincons = 0;
5507 conshdlrdata->naddlincons = 0;
5508 conshdlrdata->nrows = 0;
5532 if ( conshdlrdata->maxaddlincons > 0 )
5538 conshdlrdata->naddlincons = 0;
5539 conshdlrdata->maxaddlincons = 0;
5568 conshdlrdata->boundhaschanged =
TRUE;
5572 if ( conshdlrdata->sepaalternativelp )
5579 for (
c = 0;
c < nconss; ++
c)
5595 ++conshdlrdata->nslackvars;
5598 if ( conshdlrdata->genlogicor )
5601 int logicorsepafreq;
5606 if ( logicorconshdlr ==
NULL )
5608 SCIPerrorMessage(
"Logicor constraint handler not included, cannot generate constraints.\n");
5613 if ( (sepafreq != -1 || conshdlrdata->enforcecuts) && logicorsepafreq != 1 )
5615 SCIPwarningMessage(
scip,
"For better performance set parameter 'constraints/logicor/sepafreq' to 1 if 'constraints/included/genlogicor' is true.\n");
5621 conshdlrdata->objothervarsonly =
TRUE;
5622 for (
c = 0;
c < nconss; ++
c)
5638 conshdlrdata->objothervarsonly =
FALSE;
5641 if ( ! consdata->linconsactive )
5648 if ( conshdlrdata->sepaalternativelp && consdata->colindex < 0 )
5675 SCIP_CALL(
SCIPcreateNlRow(
scip, &nlrow,
SCIPconsGetName(conss[
c]), 0.0, 0,
NULL,
NULL, quadexpr, 0.0, 0.0,
SCIP_EXPRCURV_UNKNOWN) );
5690 if ( conshdlrdata->sepaalternativelp )
5697 if ( conshdlrdata->naddlincons > 0 )
5699 for (
c = 0;
c < conshdlrdata->naddlincons; ++
c)
5701 cons = conshdlrdata->addlincons[
c];
5720 SCIPdebugMsg(
scip,
"Added %d additional columns to alternative LP.\n", cnt);
5727 if ( conshdlrdata->useotherconss )
5729 const char* conshdlrname;
5737 for (
c = 0;
c < nallconss; ++
c)
5759 SCIPdebugMsg(
scip,
"Added %d additional columns from linear constraints to alternative LP.\n", cnt);
5765 if ( conshdlrdata->forcerestart )
5772 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5778 conshdlrdata->nbinvarszero = 0;
5784 conshdlrdata->objindicatoronly =
FALSE;
5789 for (j = 0; j <
nvars; ++j)
5793 for (
c = 0;
c < nconss; ++
c)
5818 if ( probindex < 0 )
5822 covered[probindex] =
TRUE;
5826 for (j = 0; j <
nvars; ++j)
5837 if (
REALABS(
obj) < conshdlrdata->minabsobj )
5851 conshdlrdata->objindicatoronly =
TRUE;
5853 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5879 if ( conshdlrdata->sepaalternativelp )
5881 if ( conshdlrdata->slackhash !=
NULL )
5890 if ( conshdlrdata->altlp !=
NULL )
5912 for (
c = 0;
c < nconss; ++
c)
5921 consdata->colindex = -1;
5947#ifdef SCIP_MORE_DEBUG
5962 if ( conshdlrdata->binslackvarhash !=
NULL )
5975 if ( conshdlrdata->sepaalternativelp )
5986 if ( (*consdata)->linconsactive )
5988 assert( conshdlrdata->eventhdlrbound !=
NULL );
5994 if ( conshdlrdata->forcerestart )
5996 assert( conshdlrdata->eventhdlrrestart !=
NULL );
6002 if ( conshdlrdata->linconsevents && (*consdata)->linconsactive && (*consdata)->varswithevents !=
NULL )
6009 for (j = 0; j < (*consdata)->nevents; ++j)
6017 (*consdata)->nevents = 0;
6018 assert( (*consdata)->varswithevents ==
NULL );
6062 assert( conshdlrdata->eventhdlrbound !=
NULL );
6064#ifdef SCIP_MORE_DEBUG
6074 if ( sourcedata->slackvar ==
NULL )
6081 if ( sourcedata->lincons ==
NULL )
6093 sourcedata->binvar,
TRUE, sourcedata->lessthanineq, sourcedata->slackvar, sourcedata->lincons, sourcedata->linconsactive) );
6094 consdata->activeone = sourcedata->activeone;
6111 if ( sourcedata->linconsactive )
6119 if ( conshdlrdata->sepaalternativelp )
6121 if ( conshdlrdata->binvarhash ==
NULL )
6155 for (
c = 0;
c < nconss; ++
c)
6180 consdata->lincons = translincons;
6188 conshdlrdata->addedcouplingcons =
FALSE;
6209 SCIP_Bool noReductions;
6210 SCIPdebug(
int oldnfixedvars = *nfixedvars; )
6211 SCIPdebug(
int oldndelconss = *ndelconss; )
6228 if ( nrounds == 0 || nnewfixedvars > 0 || nnewchgbds > 0 || nnewaggrvars > 0 )
6233 for (
c = 0;
c < nconss; ++
c)
6248#ifdef SCIP_MORE_DEBUG
6253 if ( ! consdata->linconsactive )
6262 if ( ! consdata->implicationadded )
6271 consdata->implicationadded =
TRUE;
6280 if ( ! consdata->slacktypechecked )
6282 consdata->slacktypechecked =
TRUE;
6289 SCIP_Bool foundslackvar =
FALSE;
6297 slackvar = consdata->slackvar;
6300 for (j = 0; j <
nvars; ++j)
6302 if (
vars[j] == slackvar )
6303 foundslackvar =
TRUE;
6311 if ( j ==
nvars && foundslackvar )
6313 SCIP_Bool infeasible;
6329 SCIPdebugMsg(
scip,
"Cannot change type of slack variable (<%s>) to IMPLINT, since global bound is non-integral: (%g, %g).\n",
6351 noReductions = nnewfixedvars == 0 && nnewaggrvars == 0 && nnewchgvartypes == 0 && nnewchgbds == 0
6352 && nnewdelconss == 0 && nnewchgcoefs == 0 && nnewchgsides == 0;
6355 if ( noReductions && *
result !=
SCIP_SUCCESS && conshdlrdata->addcouplingcons && ! conshdlrdata->addedcouplingcons )
6365 *nupgdconss += ngen;
6366 if ( conshdlrdata->removeindicators )
6369 conshdlrdata->addedcouplingcons =
TRUE;
6372 SCIPdebug(
SCIPdebugMsg(
scip,
"Presolved %d constraints (fixed %d variables, removed 0 variables, and deleted %d constraints).\n",
6373 nconss, *nfixedvars - oldnfixedvars, *ndelconss - oldndelconss); )
6398 *infeasible =
FALSE;
6401 if ( ! conshdlrdata->addcoupling )
6405 if ( conshdlrdata->addcouplingcons && conshdlrdata->addedcouplingcons )
6408 SCIPdebugMsg(
scip,
"Handle initial rows for %d indicator constraints.\n", nconss);
6411 for (
c = 0;
c < nconss && !(*infeasible); ++
c)
6422 if ( ! consdata->linconsactive )
6430 if ( ub <= conshdlrdata->maxcouplingvalue )
6441 if ( conshdlrdata->addcouplingcons )
6445 assert( ! conshdlrdata->addedcouplingcons );
6526 if ( solinfeasible )
6554 if ( solinfeasible )
6580 if ( solinfeasible )
6586 if ( objinfeasible )
6604 SCIP_Bool someLinconsNotActive;
6605 SCIP_Bool changedSol;
6629 someLinconsNotActive =
FALSE;
6630 for (
c = 0;
c < nconss; ++
c)
6640 if ( ! consdata->linconsactive )
6642 someLinconsNotActive =
TRUE;
6672 if ( trysol !=
NULL )
6676 changedSol = changedSol || changed;
6688 if ( trysol !=
NULL )
6692 changedSol = changedSol || changed;
6698 if ( someLinconsNotActive )
6701 SCIP_Bool infeasible;
6705 lp = conshdlrdata->altlp;
6706 assert( conshdlrdata->sepaalternativelp );
6716 if ( conshdlrdata->updatebounds )
6730 for (
c = 0;
c < nconss; ++
c)
6775 if ( trysol !=
NULL && changedSol )
6782 if ( trysol !=
NULL )
6803 SCIP_Bool dualreductions;
6831 if ( !conshdlrdata->linconsevents )
6833 for (
c = 0;
c < nconss; ++
c)
6846 if ( ! consdata->linconsactive )
6868 for (j = 0; j <
nvars; ++j)
6870 if (
vars[j] == consdata->slackvar )
6874 if ( vals[j] > 0.0 )
6877 consdata->varswithevents[consdata->nevents] =
vars[j];
6879 consdata->nevents++;
6884 consdata->varswithevents[consdata->nevents] =
vars[j];
6886 consdata->nevents++;
6891 conshdlrdata->linconsevents =
TRUE;
6895 conshdlrdata->boundhaschanged =
FALSE;
6896 conshdlrdata->linconsboundschanged =
FALSE;
6901 for (
c = 0;
c < nconss; ++
c)
6915#ifdef SCIP_MORE_DEBUG
6960 assert( inferinfo == 0 || inferinfo == 1 || inferinfo == 2 || inferinfo == 3 );
6961 assert( consdata->linconsactive );
6964 if ( inferinfo == 0 )
6967 assert( infervar != consdata->binvar );
6971 else if ( inferinfo == 1 )
6974 assert( infervar != consdata->slackvar );
6980 else if ( inferinfo == 2 )
6988 assert( inferinfo == 3 );
7017#ifdef SCIP_MORE_DEBUG
7023 if ( consdata->linconsactive )
7047 for (j = 0; j < nlinvars; ++j)
7096 binvar = consdata->binvar;
7124 const char* consname;
7138#ifdef SCIP_MORE_DEBUG
7153 sourcelincons = sourceconsdata->lincons;
7182 sourceconsdata->lincons = translincons;
7183 sourcelincons = translincons;
7197 sourcebinvar = sourceconsdata->binvar;
7208 sourceslackvar = sourceconsdata->slackvar;
7224 initial, separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
7232 if ( targetlincons !=
NULL )
7245 char binvarname[1024];
7246 char slackvarname[1024];
7247 char linconsname[1024];
7258 nargs = sscanf(str,
" <%1023[^>]> = %d -> <%1023[^>]> = 0 (<%1023[^>]>)", binvarname, &zeroone, slackvarname, linconsname);
7261 if ( nargs != 3 && nargs != 4 )
7268 if ( zeroone != 0 && zeroone != 1 )
7277 if ( binvar ==
NULL )
7289 if ( slackvar ==
NULL )
7300 if ( lincons ==
NULL )
7321 posstr = strstr(slackvarname,
"indslack");
7322 if ( posstr ==
NULL )
7330 (void)
SCIPsnprintf(binvarname, 1023,
"indlin%s", posstr+8);
7333 if ( lincons ==
NULL )
7339 if ( lincons ==
NULL )
7342 (void)
SCIPsnprintf(binvarname, 1023,
"%s", posstr+16);
7345 if( lincons ==
NULL )
7348 name, posstr+8, posstr+9, posstr+16);
7367 initial, separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
7385#ifdef SCIP_MORE_DEBUG
7395 if ( conshdlrdata->altlp !=
NULL )
7397 assert( conshdlrdata->sepaalternativelp );
7399 if ( consdata->colindex >= 0 )
7420#ifdef SCIP_MORE_DEBUG
7427 if ( conshdlrdata->altlp !=
NULL )
7433 assert( conshdlrdata->sepaalternativelp );
7435 if ( consdata->colindex >= 0 )
7471 if ( consdata->binvar !=
NULL )
7476 if ( consdata->slackvar !=
NULL )
7515 if ( consdata->binvar !=
NULL )
7517 if ( consdata->slackvar !=
NULL )
7544 SCIP_Bool bestvarroundup =
FALSE;
7555 *infeasible =
FALSE;
7561 for (
c = 0;
c < nindconss; ++
c)
7582 if ( score > bestscore )
7639 conshdlrdata->eventhdlrbound =
NULL;
7641 eventExecIndicatorBound,
NULL) );
7642 assert(conshdlrdata->eventhdlrbound !=
NULL);
7645 conshdlrdata->eventhdlrlinconsbound =
NULL;
7647 eventExecIndicatorLinconsBound,
NULL) );
7648 assert(conshdlrdata->eventhdlrlinconsbound !=
NULL);
7651 conshdlrdata->eventhdlrrestart =
NULL;
7653 eventExecIndicatorRestart,
NULL) );
7654 assert( conshdlrdata->eventhdlrrestart !=
NULL );
7656 conshdlrdata->heurtrysol =
NULL;
7660 conshdlrdata->binvarhash =
NULL;
7661 conshdlrdata->binslackvarhash =
NULL;
7669 conshdlrdata->addlincons =
NULL;
7670 conshdlrdata->naddlincons = 0;
7671 conshdlrdata->maxaddlincons = 0;
7676 consEnfolpIndicator, consEnfopsIndicator, consCheckIndicator, consLockIndicator,
7718 conflicthdlrdata->conshdlrdata = conshdlrdata;
7719 conflicthdlrdata->conshdlr = conshdlr;
7720 assert( conflicthdlrdata->conshdlr !=
NULL );
7724 conflictExecIndicator, conflicthdlrdata) );
7730 "constraints/indicator/branchindicators",
7731 "Branch on indicator constraints in enforcing?",
7735 "constraints/indicator/genlogicor",
7736 "Generate logicor constraints instead of cuts?",
7740 "constraints/indicator/addcoupling",
7741 "Add coupling constraints or rows if big-M is small enough?",
7745 "constraints/indicator/maxcouplingvalue",
7746 "maximum coefficient for binary variable in coupling constraint",
7750 "constraints/indicator/addcouplingcons",
7751 "Add initial variable upper bound constraints, if 'addcoupling' is true?",
7755 "constraints/indicator/sepacouplingcuts",
7756 "Should the coupling inequalities be separated dynamically?",
7760 "constraints/indicator/sepacouplinglocal",
7761 "Allow to use local bounds in order to separate coupling inequalities?",
7765 "constraints/indicator/sepacouplingvalue",
7766 "maximum coefficient for binary variable in separated coupling constraint",
7770 "constraints/indicator/sepaperspective",
7771 "Separate cuts based on perspective formulation?",
7775 "constraints/indicator/sepapersplocal",
7776 "Allow to use local bounds in order to separate perspective cuts?",
7780 "constraints/indicator/maxsepanonviolated",
7781 "maximal number of separated non violated IISs, before separation is stopped",
7785 "constraints/indicator/updatebounds",
7786 "Update bounds of original variables for separation?",
7790 "constraints/indicator/maxconditionaltlp",
7791 "maximum estimated condition of the solution basis matrix of the alternative LP to be trustworthy (0.0 to disable check)",
7795 "constraints/indicator/maxsepacuts",
7796 "maximal number of cuts separated per separation round",
7800 "constraints/indicator/maxsepacutsroot",
7801 "maximal number of cuts separated per separation round in the root node",
7805 "constraints/indicator/removeindicators",
7806 "Remove indicator constraint if corresponding variable bound constraint has been added?",
7810 "constraints/indicator/generatebilinear",
7811 "Do not generate indicator constraint, but a bilinear constraint instead?",
7815 "constraints/indicator/scaleslackvar",
7816 "Scale slack variable coefficient at construction time?",
7820 "constraints/indicator/trysolutions",
7821 "Try to make solutions feasible by setting indicator variables?",
7825 "constraints/indicator/enforcecuts",
7826 "In enforcing try to generate cuts (only if sepaalternativelp is true)?",
7830 "constraints/indicator/dualreductions",
7831 "Should dual reduction steps be performed?",
7835 "constraints/indicator/addopposite",
7836 "Add opposite inequality in nodes in which the binary variable has been fixed to 0?",
7840 "constraints/indicator/conflictsupgrade",
7841 "Try to upgrade bounddisjunction conflicts by replacing slack variables?",
7845 "constraints/indicator/restartfrac",
7846 "fraction of binary variables that need to be fixed before restart occurs (in forcerestart)",
7850 "constraints/indicator/useotherconss",
7851 "Collect other constraints to alternative LP?",
7855 "constraints/indicator/useobjectivecut",
7856 "Use objective cut with current best solution to alternative LP?",
7860 "constraints/indicator/trysolfromcover",
7861 "Try to construct a feasible solution from a cover?",
7865 "constraints/indicator/upgradelinear",
7866 "Try to upgrade linear constraints to indicator constraints?",
7870 "constraints/indicator/usesameslackvar",
7871 "Use same slack variable for indicator constraints with common binary variable?",
7876 "constraints/indicator/sepaalternativelp",
7877 "Separate using the alternative LP?",
7881 "constraints/indicator/forcerestart",
7882 "Force restart if absolute gap is 1 or enough binary variables have been fixed?",
7886 "constraints/indicator/nolinconscont",
7887 "Decompose problem (do not generate linear constraint if all variables are continuous)?",
7923 SCIP_Bool removable,
7925 SCIP_Bool stickingatnode
7930 return SCIPcreateConsIndicatorGeneric(
scip, cons, name, binvar,
nvars,
vars, vals, rhs,
TRUE,
TRUE, initial,
7931 separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode);
7950 SCIP_Bool activeone,
7951 SCIP_Bool lessthanineq,
7966 SCIP_Bool removable,
7968 SCIP_Bool stickingatnode
7979 SCIP_Bool modifiable =
FALSE;
7980 SCIP_Bool linconsactive =
TRUE;
7982 SCIP_Real absvalsum = 0.0;
7984 SCIP_Real* valscopy;
7989 SCIPerrorMessage(
"Indicator constraint <%s> needs nonnegative number of variables in linear constraint.\n", name);
7995 if ( conshdlr ==
NULL )
8004 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
8006 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
8010 if ( conshdlrdata->nolinconscont && conshdlrdata->generatebilinear )
8023 for (j = 0; j <
nvars; ++j)
8024 valscopy[j] = -vals[j];
8031 for (j = 0; j <
nvars; ++j)
8033 if ( conshdlrdata->scaleslackvar )
8034 absvalsum +=
REALABS(valscopy[j]);
8038 if ( ! conshdlrdata->scaleslackvar )
8044 if ( activeone || binvar ==
NULL )
8045 binvarinternal = binvar;
8053 if ( binvarinternal !=
NULL )
8056 if ( conshdlrdata->usesameslackvar && conshdlrdata->binslackvarhash ==
NULL )
8061 if ( conshdlrdata->binslackvarhash !=
NULL &&
SCIPhashmapExists(conshdlrdata->binslackvarhash, (
void*) binvarinternal) )
8063 SCIP_Bool infeasible;
8088 if ( conshdlrdata->binslackvarhash !=
NULL )
8109 if ( conshdlrdata->nolinconscont )
8111 SCIP_Bool onlyCont =
TRUE;
8113 assert( ! conshdlrdata->generatebilinear );
8116 for (j = 0; j <
nvars; ++j)
8129 linconsactive =
FALSE;
8136 if ( linconsactive )
8149 if ( ! lessthanineq )
8157 if ( conshdlrdata->scaleslackvar &&
nvars > 0 )
8173 if ( conshdlrdata->generatebilinear )
8175 SCIP_Real val = 1.0;
8178 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, cons, name, 0,
NULL,
NULL, 1, &binvarinternal, &slackvar, &val, 0.0, 0.0,
8185 binvar, activeone, lessthanineq, slackvar, lincons, linconsactive) );
8190 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
8191 local, modifiable, dynamic, removable, stickingatnode) );
8196 if ( linconsactive )
8203 if ( conshdlrdata->sepaalternativelp )
8205 if ( conshdlrdata->binvarhash ==
NULL )
8271 SCIP_Bool activeone,
8286 SCIP_Bool removable,
8288 SCIP_Bool stickingatnode
8296 SCIP_Bool modifiable =
FALSE;
8297 SCIP_Bool linconsactive =
TRUE;
8314 if ( conshdlr ==
NULL )
8323 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
8325 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
8333 if ( conshdlrdata->nolinconscont )
8335 SCIP_Bool onlyCont =
TRUE;
8344 for (v = 0; v <
nvars; ++v)
8357 linconsactive =
FALSE;
8365 if ( conshdlrdata->generatebilinear )
8367 SCIP_Real val = 1.0;
8373 binvarinternal = binvar;
8381 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, cons, name, 0,
NULL,
NULL, 1, &binvarinternal, &slackvar, &val, 0.0, 0.0,
8388 binvar, activeone,
TRUE, slackvar, lincons, linconsactive) );
8392 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
8393 local, modifiable, dynamic, removable, stickingatnode) );
8441 SCIP_Bool removable,
8443 SCIP_Bool stickingatnode
8449 enforce, check,
propagate, local, dynamic, removable, stickingatnode);
8506 SCIP_Bool activeone,
8521 SCIP_Bool removable,
8523 SCIP_Bool stickingatnode
8532 SCIP_Bool modifiable =
FALSE;
8533 SCIP_Bool linconsactive =
TRUE;
8559 if ( conshdlr ==
NULL )
8568 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
8570 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
8587 for (j = 0; j <
nvars; ++j)
8598 binvarinternal = binvar;
8606 if ( conshdlrdata->usesameslackvar && conshdlrdata->binslackvarhash ==
NULL )
8611 if ( conshdlrdata->binslackvarhash !=
NULL &&
SCIPhashmapExists(conshdlrdata->binslackvarhash, (
void*) binvarinternal) )
8619 SCIP_Bool infeasible;
8638 if ( conshdlrdata->binslackvarhash !=
NULL )
8646 if ( conshdlrdata->nolinconscont )
8648 SCIP_Bool onlyCont =
TRUE;
8654 for (j = 0; j <
nvars; ++j)
8667 linconsactive =
FALSE;
8683 if ( conshdlrdata->generatebilinear )
8685 SCIP_Real val = 1.0;
8688 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, cons, name, 0,
NULL,
NULL, 1, &binvarinternal, &slackvar, &val, 0.0, 0.0,
8695 binvar, activeone,
TRUE, slackvar, lincons, linconsactive) );
8699 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
8700 local, modifiable, dynamic, removable, stickingatnode) );
8746 SCIP_Bool removable,
8748 SCIP_Bool stickingatnode
8754 enforce, check,
propagate, local, dynamic, removable, stickingatnode);
8775 if ( !consdata->lessthanineq )
8783 SCIP_Bool infeasible;
8806 return consdata->lincons;
8843 consdata->lincons = lincons;
8844 consdata->linconsactive =
TRUE;
8848 if ( conshdlrdata->nolinconscont )
8861 for (v = 0; v <
nvars; ++v)
8874 consdata->linconsactive =
FALSE;
8893 return consdata->activeone;
8910 return consdata->binvar;
8926 binvar = consdata->binvar;
8928 if ( ! consdata->activeone )
8959 if ( consdata->binvar !=
NULL )
8977 if ( ! consdata->activeone )
8980 consdata->binvar =
var;
8987 assert( conshdlrdata->eventhdlrbound !=
NULL );
8988 assert( conshdlrdata->eventhdlrrestart !=
NULL );
8991 if ( consdata->linconsactive )
8997 if ( conshdlrdata->forcerestart )
9004 ++(consdata->nfixednonzero);
9008 if ( ! consdata->activeone )
9010 consdata->binvar = binvar;
9029 return consdata->slackvar;
9085 if ( consdata->linconsactive )
9136 SCIP_Real slackcoef;
9159 if ( ! consdata->linconsactive )
9162 lincons = consdata->lincons;
9168 slackvar = consdata->slackvar;
9169 binvar = consdata->binvar;
9180 for (v = 0; v < nlinvars; ++v)
9184 if (
var != slackvar )
9187 slackcoef = linvals[v];
9195 assert( slackcoef != 0.0 );
9208 val = (val - sum)/slackcoef;
9211 if ( slackcoef < 0 )
9323 for (
c = 0;
c < nconss; ++
c)
9326 SCIP_Bool chg =
FALSE;
9333 if ( ! consdata->linconsactive )
9337 *changed = *changed || chg;
9364 assert( conshdlrdata->naddlincons+1 <= conshdlrdata->maxaddlincons );
9366 conshdlrdata->addlincons[conshdlrdata->naddlincons++] = lincons;
9397 if ( ! conshdlrdata->sepaalternativelp )
static SCIP_RETCODE branchCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
#define DEFAULT_FORCERESTART
#define DEFAULT_TRYSOLUTIONS
#define EVENTHDLR_RESTART_NAME
static SCIP_RETCODE addAltLPRow(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row, SCIP_Real objcoef, int *colindex)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONFLICTHDLR_PRIORITY
#define SCIP_CALL_PARAM(x)
#define CONFLICTHDLR_NAME
#define CONSHDLR_CHECKPRIORITY
#define DEFAULT_ADDCOUPLINGCONS
#define MAXROUNDINGROUNDS
#define DEFAULT_ADDOPPOSITE
static SCIP_RETCODE checkLPBoundsClean(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss)
static SCIP_RETCODE propIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool dualreductions, SCIP_Bool addopposite, SCIP_Bool *cutoff, int *nGen)
static SCIP_RETCODE updateFirstRowGlobal(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE fixAltLPVariables(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss, SCIP_Bool *S)
static SCIP_RETCODE createVarUbs(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, int *ngen)
#define CONSHDLR_PROP_TIMING
#define DEFAULT_USEOBJECTIVECUT
static SCIP_RETCODE addAltLPConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Real objcoef, int *colindex)
static SCIP_RETCODE extendToCover(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_LPI *lp, SCIP_SOL *sol, SCIP_ENFOSEPATYPE enfosepatype, SCIP_Bool removable, SCIP_Bool genlogicor, int nconss, SCIP_CONS **conss, SCIP_Bool *S, int *size, SCIP_Real *value, SCIP_Bool *error, SCIP_Bool *cutoff, int *nGen)
#define CONFLICTHDLR_DESC
static SCIP_RETCODE scaleFirstRow(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE separateIISRounding(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_ENFOSEPATYPE enfosepatype, int nconss, SCIP_CONS **conss, int maxsepacuts, SCIP_Bool *cutoff, int *nGen)
static SCIP_Real varGetObjDelta(SCIP_VAR *var)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE addAltLPColumn(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_VAR *slackvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhscoef, SCIP_Real objcoef, SCIP_Real sign, SCIP_Bool colfree, int *colindex)
#define DEFAULT_MAXCONDITIONALTLP
static SCIP_RETCODE presolRoundIndicator(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool dualreductions, SCIP_Bool *cutoff, SCIP_Bool *success, int *ndelconss, int *nfixedvars)
#define DEFAULT_SCALESLACKVAR
static SCIP_RETCODE checkAltLPInfeasible(SCIP *scip, SCIP_LPI *lp, SCIP_Real maxcondition, SCIP_Bool primal, SCIP_Bool *infeasible, SCIP_Bool *error)
#define CONSHDLR_SEPAPRIORITY
static SCIP_RETCODE setAltLPObj(SCIP *scip, SCIP_LPI *lp, SCIP_SOL *sol, int nconss, SCIP_CONS **conss)
static SCIP_RETCODE checkIISlocal(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Real *vector, SCIP_Bool *isLocal)
#define DEFAULT_USESAMESLACKVAR
#define DEFAULT_SEPAPERSPLOCAL
static SCIP_RETCODE unfixAltLPVariables(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss, SCIP_Bool *S)
static SCIP_RETCODE separatePerspective(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, int maxsepacuts, int *nGen)
#define DEFAULT_SEPAPERSPECTIVE
static SCIP_RETCODE enforceCuts(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_ENFOSEPATYPE enfosepatype, SCIP_Bool genlogicor, SCIP_Bool *cutoff, int *nGen)
#define DEFAULT_CONFLICTSUPGRADE
static SCIP_RETCODE initAlternativeLP(SCIP *scip, SCIP_CONSHDLR *conshdlr)
#define DEFAULT_MAXCOUPLINGVALUE
#define DEFAULT_SEPACOUPLINGVALUE
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
#define DEFAULT_REMOVEINDICATORS
#define DEFAULT_UPGRADELINEAR
#define EVENTHDLR_LINCONSBOUND_DESC
#define DEFAULT_MAXSEPACUTSROOT
static SCIP_RETCODE updateObjUpperbound(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE checkTransferBoolParam(SCIP *scip, SCIP_PARAM *param, const char *name, SCIP_Bool newvalue, SCIP_Bool *value)
#define EVENTHDLR_BOUND_DESC
static SCIP_RETCODE separateIndicators(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, int nusefulconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_ENFOSEPATYPE enfosepatype, SCIP_RESULT *result)
static SCIP_RETCODE fixAltLPVariable(SCIP_LPI *lp, int ind)
enum SCIP_enfosepatype SCIP_ENFOSEPATYPE
#define DEFAULT_SEPACOUPLINGLOCAL
#define EVENTHDLR_LINCONSBOUND_NAME
#define DEFAULT_UPDATEBOUNDS
#define DEFAULT_RESTARTFRAC
static SCIP_RETCODE enforceIndicators(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_ENFOSEPATYPE enfosepatype, SCIP_Bool genlogicor, SCIP_RESULT *result)
#define CONSHDLR_PROPFREQ
#define DEFAULT_SEPAALTERNATIVELP
static void initConshdlrData(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define DEFAULT_ENFORCECUTS
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE unfixAltLPVariable(SCIP_LPI *lp, int ind)
static SCIP_RETCODE consdataEnsureAddLinConsSize(SCIP *scip, SCIP_CONSHDLR *conshdlr, int num)
#define DEFAULT_MAXSEPACUTS
static SCIP_RETCODE setAltLPObjZero(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss)
#define EVENTHDLR_BOUND_NAME
#define DEFAULT_BRANCHINDICATORS
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, const char *consname, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlrrestart, SCIP_VAR *binvar, SCIP_Bool activeone, SCIP_Bool lessthanineq, SCIP_VAR *slackvar, SCIP_CONS *lincons, SCIP_Bool linconsactive)
#define DEFAULT_USEOTHERCONSS
#define CONSHDLR_ENFOPRIORITY
#define DEFAULT_DUALREDUCTIONS
static SCIP_RETCODE deleteAltLPConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons)
#define LINCONSUPGD_PRIORITY
#define DEFAULT_GENERATEBILINEAR
#define CONSHDLR_DELAYSEPA
static SCIP_RETCODE addObjcut(SCIP *scip, SCIP_CONSHDLR *conshdlr)
#define DEFAULT_GENLOGICOR
#define DEFAULT_TRYSOLFROMCOVER
#define EVENTHDLR_RESTART_DESC
#define DEFAULT_MAXSEPANONVIOLATED
#define DEFAULT_ADDCOUPLING
#define DEFAULT_SEPACOUPLINGCUTS
static SCIP_RETCODE updateFirstRow(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define CONSHDLR_DELAYPROP
#define DEFAULT_NOLINCONSCONT
constraint handler for indicator constraints
Constraint handler for linear constraints in their most general form, .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for variable bound constraints .
#define SCIP_LONGINT_FORMAT
product expression handler
variable expression handler
SCIP_RETCODE SCIPcreateConsIndicatorGenericLinConsPure(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_Bool activeone, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
SCIP_RETCODE SCIPcreateConsBasicIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs)
SCIP_VAR * SCIPgetBinaryVarIndicatorGeneric(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetSlackVarUb(SCIP *scip, SCIP_CONS *cons, SCIP_Real ub)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsIndicatorGeneric(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool activeone, SCIP_Bool lessthanineq, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
SCIP_RETCODE SCIPcreateConsIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsIndicatorGenericLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool activeone, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar)
SCIP_RETCODE SCIPmakeIndicatorsFeasible(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *changed)
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
#define SCIP_DECL_LINCONSUPGD(x)
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
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 SCIPcreateConsLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, 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 SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
SCIP_RETCODE SCIPcreateConsVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, 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 SCIPcreateConsQuadraticNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, 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_RETCODE SCIPcreateConsIndicatorLinConsPure(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPisViolatedIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_Bool SCIPgetActiveOnIndicator(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, 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_Bool global, SCIP_Bool *valid)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprProduct(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real coefficient, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNIntVars(SCIP *scip)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void SCIPhashmapPrintStatistics(SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr)
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 SCIPhashmapSetImageInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPlpiGetRows(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_RETCODE SCIPheurPassIndicator(SCIP *scip, SCIP_HEUR *heur, int nindconss, SCIP_CONS **indconss, SCIP_Bool *solcand, SCIP_Real obj)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
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 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 SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPchgBoolParam(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
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 SCIPgetCharParam(SCIP *scip, const char *name, char *value)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_BOUNDTYPE SCIPboundtypeOpposite(SCIP_BOUNDTYPE boundtype)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_CONFLICTHDLRDATA * SCIPconflicthdlrGetData(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr,)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPenfopsCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPenfolpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_RETCODE SCIPsepalpCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, 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_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPenforelaxCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPsepasolCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
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)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int 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 SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_RETCODE SCIPgetDivesetScore(SCIP *scip, SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype, SCIP_VAR *divecand, SCIP_Real divecandsol, SCIP_Real divecandfrac, SCIP_Real *candscore, SCIP_Bool *roundup)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPaddDiveBoundChange(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPrestartSolve(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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 SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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 SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPcutoffbounddelta(SCIP *scip)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
int SCIPgetSymgraphVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIPfreeSol(scip, &heurdata->sol))
static SCIP_DIVESET * diveset
handle partial solutions for linear problems with indicators and otherwise continuous variables
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
primal heuristic that tries a given solution
interface methods for specific LP solvers
static const char * paramname[]
memory allocation routines
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
const char * SCIPparamGetName(SCIP_PARAM *param)
SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
public methods for conflict analysis handlers
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
public methods for handling parameter settings
public methods for problem variables
public methods for branching rule plugins and branching
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for primal heuristic plugins and divesets
public methods for the LP relaxation, rows and columns
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 global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
structs for symmetry computations
methods for dealing with symmetry detection graphs
#define SCIP_DECL_CONFLICTEXEC(x)
#define SCIP_DECL_CONFLICTFREE(x)
@ SCIP_CONFTYPE_PROPAGATION
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSEXIT(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSDISABLE(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSENABLE(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
#define SCIP_DECL_CONSINIT(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
#define SCIP_EVENTTYPE_BOUNDCHANGED
#define SCIP_EVENTTYPE_GUBCHANGED
#define SCIP_EVENTTYPE_GBDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_BESTSOLFOUND
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
#define SCIP_DIVETYPE_INTEGRALITY
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_BoundType SCIP_BOUNDTYPE
type definitions for specific LP solvers interface
@ SCIP_LPSOLQUALITY_ESTIMCONDITION
#define SCIP_DECL_PARAMCHGD(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_INITPRESOLVE
@ SCIP_STAGE_TRANSFORMING
enum SYM_Symtype SYM_SYMTYPE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_Vartype SCIP_VARTYPE