208 #define CONSHDLR_NAME "indicator" 209 #define CONSHDLR_DESC "indicator constraint handler" 210 #define CONSHDLR_SEPAPRIORITY 10 211 #define CONSHDLR_ENFOPRIORITY -100 212 #define CONSHDLR_CHECKPRIORITY -1000000 213 #define CONSHDLR_SEPAFREQ 10 214 #define CONSHDLR_PROPFREQ 1 215 #define CONSHDLR_EAGERFREQ 100 217 #define CONSHDLR_MAXPREROUNDS -1 218 #define CONSHDLR_DELAYSEPA FALSE 219 #define CONSHDLR_DELAYPROP FALSE 220 #define CONSHDLR_NEEDSCONS TRUE 222 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST 223 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 227 #define EVENTHDLR_BOUND_NAME "indicatorbound" 228 #define EVENTHDLR_BOUND_DESC "bound change event handler for indicator constraints" 230 #define EVENTHDLR_RESTART_NAME "indicatorrestart" 231 #define EVENTHDLR_RESTART_DESC "force restart if absolute gap is 1 or enough binary variables have been fixed" 235 #define CONFLICTHDLR_NAME "indicatorconflict" 236 #define CONFLICTHDLR_DESC "replace slack variables and generate logicor constraints" 237 #define CONFLICTHDLR_PRIORITY 200000 240 #define LINCONSUPGD_PRIORITY +100000 243 #define DEFAULT_BRANCHINDICATORS FALSE 244 #define DEFAULT_GENLOGICOR FALSE 245 #define DEFAULT_ADDCOUPLING TRUE 246 #define DEFAULT_MAXCOUPLINGVALUE 1e4 247 #define DEFAULT_ADDCOUPLINGCONS FALSE 248 #define DEFAULT_SEPACOUPLINGCUTS TRUE 249 #define DEFAULT_SEPACOUPLINGLOCAL FALSE 250 #define DEFAULT_SEPACOUPLINGVALUE 1e4 251 #define DEFAULT_SEPAALTERNATIVELP FALSE 252 #define DEFAULT_SEPAPERSPECTIVE FALSE 253 #define DEFAULT_SEPAPERSPLOCAL TRUE 254 #define DEFAULT_TRYSOLFROMCOVER FALSE 255 #define DEFAULT_UPGRADELINEAR FALSE 256 #define DEFAULT_USEOTHERCONSS FALSE 257 #define DEFAULT_USEOBJECTIVECUT FALSE 258 #define DEFAULT_UPDATEBOUNDS FALSE 259 #define DEFAULT_MAXCONDITIONALTLP 0.0 260 #define DEFAULT_MAXSEPACUTS 100 261 #define DEFAULT_MAXSEPACUTSROOT 2000 262 #define DEFAULT_REMOVEINDICATORS FALSE 263 #define DEFAULT_GENERATEBILINEAR FALSE 264 #define DEFAULT_SCALESLACKVAR FALSE 265 #define DEFAULT_NOLINCONSCONT FALSE 266 #define DEFAULT_TRYSOLUTIONS TRUE 267 #define DEFAULT_ENFORCECUTS FALSE 268 #define DEFAULT_DUALREDUCTIONS TRUE 269 #define DEFAULT_ADDOPPOSITE FALSE 270 #define DEFAULT_CONFLICTSUPGRADE FALSE 271 #define DEFAULT_FORCERESTART FALSE 272 #define DEFAULT_RESTARTFRAC 0.9 276 #define OBJEPSILON 0.001 277 #define SEPAALTTHRESHOLD 10 278 #define MAXROUNDINGROUNDS 1 289 unsigned int linconsactive:1;
290 unsigned int implicationadded:1;
291 unsigned int slacktypechecked:1;
296 struct SCIP_ConshdlrData
320 int maxroundingrounds;
371 struct SCIP_ConflicthdlrData
379 #define SCIP_CALL_PARAM(x) do \ 381 SCIP_RETCODE _restat_; \ 382 if ( (_restat_ = (x)) != SCIP_OKAY && (_restat_ != SCIP_PARAMETERUNKNOWN) ) \ 384 SCIPerrorMessage("[%s:%d] Error <%d> in function call\n", __FILE__, __LINE__, _restat_); \ 406 assert( eventhdlr !=
NULL );
407 assert( eventdata !=
NULL );
409 assert( event !=
NULL );
412 assert( consdata !=
NULL );
413 assert( 0 <= consdata->nfixednonzero && consdata->nfixednonzero <= 2 );
414 assert( consdata->linconsactive );
425 ++(consdata->nfixednonzero);
426 #ifdef SCIP_MORE_DEBUG 427 SCIPdebugMsg(
scip,
"Changed lower bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
435 ++(consdata->nfixednonzero);
436 #ifdef SCIP_MORE_DEBUG 437 SCIPdebugMsg(
scip,
"Changed upper bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
445 --(consdata->nfixednonzero);
446 #ifdef SCIP_MORE_DEBUG 447 SCIPdebugMsg(
scip,
"Changed lower bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
455 --(consdata->nfixednonzero);
456 #ifdef SCIP_MORE_DEBUG 457 SCIPdebugMsg(
scip,
"Changed upper bound of variable <%s> from %g to %g (nfixednonzero: %d).\n",
467 assert( 0 <= consdata->nfixednonzero && consdata->nfixednonzero <= 2 );
489 assert( eventhdlr !=
NULL );
490 assert( eventdata !=
NULL );
492 assert( event !=
NULL );
495 assert( conshdlrdata !=
NULL );
496 assert( conshdlrdata->forcerestart );
519 if ( conshdlrdata->performedrestart )
523 ++(conshdlrdata->nbinvarszero);
531 if ( conshdlrdata->nbinvarszero > (
int) ((
SCIP_Real) conshdlrdata->ninitconss * conshdlrdata->restartfrac) )
534 "Forcing restart, since %d binary variables among %d have been fixed.\n", conshdlrdata->nbinvarszero, conshdlrdata->ninitconss);
538 if ( conshdlrdata->objindicatoronly )
542 conshdlrdata->performedrestart =
TRUE;
549 assert(
SCIPisGE(
scip, conshdlrdata->minabsobj, 1.0 ) );
554 if ( ! conshdlrdata->objindicatoronly )
571 conshdlrdata->performedrestart =
TRUE;
594 assert( conflicthdlr !=
NULL );
619 assert( conflicthdlr !=
NULL );
621 assert( bdchginfos !=
NULL || nbdchginfos == 0 );
622 assert( result !=
NULL );
634 assert( conflicthdlrdata !=
NULL );
644 for (i = 0; i < nbdchginfos; ++i)
646 assert( bdchginfos !=
NULL );
647 assert( bdchginfos[i] !=
NULL );
676 if ( haveslack && i == nbdchginfos )
683 SCIPdebugMsg(
scip,
"Found conflict involving slack variables that can be remodelled.\n");
685 assert( conflicthdlrdata->conshdlr !=
NULL );
693 for (i = 0; i < nbdchginfos; ++i)
695 assert( bdchginfos !=
NULL );
696 assert( bdchginfos[i] !=
NULL );
709 for (j = 0; j < nconss; ++j)
711 assert( conss[j] !=
NULL );
713 assert( slackvar !=
NULL );
716 if ( slackvar == var )
744 if ( i == nbdchginfos )
792 assert( scip !=
NULL );
793 assert( param !=
NULL );
794 assert( name !=
NULL );
795 assert( value !=
NULL );
800 if ( *value == newvalue )
812 SCIPwarningMessage(scip,
"Cannot change parameter <%s> stage %d - reset to old value %s.\n", name,
SCIPgetStage(scip), *value ?
"true" :
"false");
834 assert( scip !=
NULL );
835 assert( param !=
NULL );
839 assert( conshdlr !=
NULL );
843 assert( conshdlrdata !=
NULL );
845 SCIP_CALL(
checkTransferBoolParam(scip, param,
"constraints/indicator/sepaalternativelp", conshdlrdata->sepaalternativelp_, &conshdlrdata->sepaalternativelp) );
855 #ifdef SCIP_ENABLE_IISCHECK 876 assert( scip !=
NULL );
877 assert( vector !=
NULL );
883 assert( conshdlr !=
NULL );
886 assert( conshdlrdata !=
NULL );
898 for (c = 0; c < nconss; ++c)
902 assert( consdata !=
NULL );
925 lincons = consdata->lincons;
926 assert( lincons !=
NULL );
930 slackvar = consdata->slackvar;
931 assert( slackvar !=
NULL );
982 for (v = 0; v < nlinvars; ++v)
986 assert( var !=
NULL );
989 if ( var == slackvar )
1002 newvars[nnewvars++] = var;
1020 for (v = 0; v < nnewvars; ++v)
1034 for (v = nnewvars - 1; v >= 0; --v)
1046 for (v = 0; v < nlinvars; ++v)
1050 assert( var !=
NULL );
1053 if ( var == slackvar )
1058 matval[cnt] = sign * linvals[v];
1073 assert( slackvar !=
NULL );
1083 if ( conshdlrdata->useotherconss )
1090 for (c = 0; c < nconss; ++c)
1107 assert( cons !=
NULL );
1134 for (v = 0; v < nlinvars; ++v)
1138 assert( var !=
NULL );
1150 newvars[nnewvars++] = var;
1168 for (v = 0; v < nnewvars; ++v)
1182 for (v = nnewvars - 1; v >= 0; --v)
1193 for (v = 0; v < nlinvars; ++v)
1197 assert( var !=
NULL );
1201 matval[cnt] = linvals[v];
1273 assert( scip !=
NULL );
1274 assert( conshdlr !=
NULL );
1278 assert( conshdlrdata !=
NULL );
1279 assert( conshdlrdata->naddlincons <= conshdlrdata->maxaddlincons );
1281 if ( num > conshdlrdata->maxaddlincons )
1287 conshdlrdata->maxaddlincons = newsize;
1289 assert( num <= conshdlrdata->maxaddlincons );
1314 assert( scip !=
NULL );
1318 assert( conshdlrdata !=
NULL );
1319 assert( conshdlrdata->altlp ==
NULL );
1320 assert( conshdlrdata->varhash ==
NULL );
1321 assert( conshdlrdata->lbhash ==
NULL );
1322 assert( conshdlrdata->ubhash ==
NULL );
1323 assert( conshdlrdata->slackhash !=
NULL );
1335 conshdlrdata->nrows = 1;
1368 assert( scip !=
NULL );
1369 assert( lp !=
NULL );
1377 for (j = 0; j < nCols; ++j)
1382 for (j = 0; j < nconss; ++j)
1387 assert( conss[j] !=
NULL );
1389 assert( consdata !=
NULL );
1390 ind = consdata->colindex;
1394 assert( ind < nCols );
1395 covered[ind] =
TRUE;
1404 for (j = 0; j < nCols; ++j)
1443 int* indices =
NULL;
1446 assert( scip !=
NULL );
1447 assert( lp !=
NULL );
1448 assert( conss !=
NULL );
1453 for (j = 0; j < nconss; ++j)
1457 assert( conss[j] !=
NULL );
1459 assert( consdata !=
NULL );
1461 if ( consdata->colindex >= 0 )
1467 obj[cnt] = 1.0 - val;
1468 indices[cnt++] = consdata->colindex;
1495 int* indices =
NULL;
1498 assert( scip !=
NULL );
1499 assert( lp !=
NULL );
1500 assert( conss !=
NULL );
1505 for (j = 0; j < nconss; ++j)
1509 assert( conss[j] !=
NULL );
1511 assert( consdata !=
NULL );
1513 if ( consdata->colindex >= 0 )
1516 indices[cnt++] = consdata->colindex;
1544 int* indices =
NULL;
1548 assert( scip !=
NULL );
1549 assert( lp !=
NULL );
1550 assert( conss !=
NULL );
1557 for (j = 0; j < nconss; ++j)
1561 assert( conss[j] !=
NULL );
1563 assert( consdata !=
NULL );
1565 if ( consdata->colindex >= 0 )
1569 indices[cnt] = consdata->colindex;
1636 int* indices =
NULL;
1640 assert( scip !=
NULL );
1641 assert( lp !=
NULL );
1642 assert( conss !=
NULL );
1649 for (j = 0; j < nconss; ++j)
1655 assert( conss[j] !=
NULL );
1657 assert( consdata !=
NULL );
1659 if ( consdata->colindex >= 0 )
1661 indices[cnt] = consdata->colindex;
1698 assert( scip !=
NULL );
1699 assert( conshdlrdata !=
NULL );
1701 altlp = conshdlrdata->altlp;
1702 lbhash = conshdlrdata->lbhash;
1703 ubhash = conshdlrdata->ubhash;
1704 assert( lbhash !=
NULL && ubhash !=
NULL );
1711 for (v = 0; v < nvars; ++v)
1737 conshdlrdata->scaled =
FALSE;
1740 SCIPdebugMsg(scip,
"Updated bounds of original variables: %d.\n", cnt);
1762 assert( scip !=
NULL );
1763 assert( conshdlrdata !=
NULL );
1765 altlp = conshdlrdata->altlp;
1766 lbhash = conshdlrdata->lbhash;
1767 ubhash = conshdlrdata->ubhash;
1768 assert( lbhash !=
NULL && ubhash !=
NULL );
1775 for (v = 0; v < nvars; ++v)
1798 SCIPdebugMsg(scip,
"Updated bounds of original variables: %d.\n", cnt);
1826 assert( scip !=
NULL );
1827 assert( conshdlrdata !=
NULL );
1828 assert( vector !=
NULL );
1829 assert( isLocal !=
NULL );
1837 lbhash = conshdlrdata->lbhash;
1838 ubhash = conshdlrdata->ubhash;
1839 assert( lbhash !=
NULL && ubhash !=
NULL );
1846 for (v = 0; v < nvars; ++v)
1860 assert( 0 <= col && col < nCols );
1878 assert( 0 <= col && col < nCols );
1913 assert( scip !=
NULL );
1914 assert( conshdlrdata !=
NULL );
1916 if ( ! conshdlrdata->scaled )
1918 altlp = conshdlrdata->altlp;
1928 for (j = 0; j < cnt; ++j)
1932 sum = -
REALABS(sum) / ((double) cnt);
1940 conshdlrdata->scaled =
TRUE;
1983 assert( scip !=
NULL );
1984 assert( conshdlrdata !=
NULL );
1985 assert( vars !=
NULL );
1986 assert( vals !=
NULL );
1989 assert( colindex !=
NULL );
1993 if ( conshdlrdata->altlp ==
NULL )
1997 assert( conshdlrdata->varhash !=
NULL );
1998 assert( conshdlrdata->lbhash !=
NULL );
1999 assert( conshdlrdata->ubhash !=
NULL );
2000 assert( conshdlrdata->slackhash !=
NULL );
2006 assert( nrows == conshdlrdata->nrows );
2028 matval[cnt++] =
sign * rhscoef;
2032 for (v = 0; v < nvars; ++v)
2037 assert( var !=
NULL );
2043 if ( var != slackvar )
2049 if ( ind < INT_MAX )
2055 assert( conshdlrdata->nrows == (
int) (
size_t)
SCIPhashmapGetImage(conshdlrdata->slackhash, var) );
2057 matind[cnt] = (conshdlrdata->nrows)++;
2060 newrowsslack[nnewrows++] =
TRUE;
2062 assert( conshdlrdata->nrows >= (
int) (
size_t)
SCIPhashmapGetImage(conshdlrdata->slackhash, var) );
2063 matval[cnt++] =
sign * vals[v];
2075 assert( conshdlrdata->nrows == (
int) (
size_t)
SCIPhashmapGetImage(conshdlrdata->varhash, var) );
2077 matind[cnt] = (conshdlrdata->nrows)++;
2080 newrowsslack[nnewrows++] =
FALSE;
2081 newvars[nnewvars++] = var;
2084 matval[cnt++] =
sign * vals[v];
2097 for (i = 0; i < nnewrows; ++i)
2099 if ( newrowsslack[i] )
2117 assert( slackvar ==
NULL );
2129 for (v = 0; v < nnewvars; ++v)
2132 assert( var !=
NULL );
2138 matbeg[nnewcols] = cnt;
2142 matval[cnt++] = -val;
2147 matval[cnt++] = -1.0;
2148 obj[nnewcols] = 0.0;
2151 ++conshdlrdata->nlbbounds;
2155 SCIPdebugMsg(scip,
"Added column for lower bound (%f) of variable <%s> to alternative polyhedron (col: %d).\n",
2164 matbeg[nnewcols] = cnt;
2168 matval[cnt++] = val;
2173 matval[cnt++] = 1.0;
2174 obj[nnewcols] = 0.0;
2177 ++conshdlrdata->nubbounds;
2181 SCIPdebugMsg(scip,
"Added column for upper bound (%f) of variable <%s> to alternative polyhedron (col: %d).\n",
2195 assert( cnt == ncols + nnewcols + 1 );
2207 conshdlrdata->scaled =
FALSE;
2238 assert( scip !=
NULL );
2239 assert( conshdlr !=
NULL );
2240 assert( lincons !=
NULL );
2241 assert( colindex !=
NULL );
2247 assert( conshdlrdata !=
NULL );
2261 SCIPdebugMsg(scip,
"Slack variable is aggregated (scalar: %f, constant: %f).\n", scalar, constant);
2271 linvals[0] = scalar;
2291 if (
SCIPisEQ(scip, linlhs, linrhs) )
2294 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linrhs, objcoef, 1.0,
TRUE, colindex) );
2299 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linrhs, objcoef, 1.0,
FALSE, colindex) );
2305 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata, slackvar, nlinvars, linvars, linvals, linlhs, objcoef, -1.0,
FALSE, colindex) );
2340 assert( scip !=
NULL );
2341 assert( conshdlr !=
NULL );
2342 assert( row !=
NULL );
2343 assert( colindex !=
NULL );
2354 assert( conshdlrdata !=
NULL );
2364 for (j = 0; j < nrowcols; ++j)
2367 assert( rowvars[j] !=
NULL );
2371 if (
SCIPisEQ(scip, rowlhs, rowrhs) )
2374 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowrhs, objcoef, 1.0,
TRUE, colindex) );
2379 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowrhs, objcoef, 1.0,
FALSE, colindex) );
2385 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata,
NULL, nrowcols, rowvars, rowvals, rowlhs, objcoef, -1.0,
FALSE, colindex) );
2409 assert( scip !=
NULL );
2410 assert( conshdlr !=
NULL );
2414 assert( conshdlrdata !=
NULL );
2417 if ( conshdlrdata->objcutindex >= 0 )
2421 if ( ! conshdlrdata->objothervarsonly )
2425 SCIPdebugMsg(scip,
"Add objective cut to alternative LP (obj. bound: %g).\n", conshdlrdata->objupperbound);
2432 for (v = 0; v < nvars; ++v)
2438 assert( var !=
NULL );
2444 objvars[nobjvars] = var;
2445 objvals[nobjvars++] = objval;
2450 SCIP_CALL(
addAltLPColumn(scip, conshdlr, conshdlrdata,
NULL, nobjvars, objvars, objvals, conshdlrdata->objupperbound, 0.0, 1.0,
FALSE, &conshdlrdata->objcutindex) );
2451 assert( conshdlrdata->objcutindex >= 0 );
2452 conshdlrdata->objaltlpbound = conshdlrdata->objupperbound;
2474 assert( scip !=
NULL );
2475 assert( conshdlr !=
NULL );
2476 assert( cons !=
NULL );
2480 assert( conshdlrdata !=
NULL );
2482 if ( conshdlrdata->altlp !=
NULL )
2487 assert( consdata !=
NULL );
2489 if ( consdata->colindex >= 0 )
2493 consdata->colindex = -1;
2495 SCIPdebugMsg(scip,
"Fixed variable for column %d (constraint: <%s>) from alternative LP to 0.\n", consdata->colindex,
SCIPconsGetName(cons));
2497 conshdlrdata->scaled =
FALSE;
2513 assert( scip !=
NULL );
2514 assert( conshdlrdata !=
NULL );
2516 if ( ! conshdlrdata->useobjectivecut )
2519 if ( conshdlrdata->altlp ==
NULL )
2531 if (
SCIPisLT(scip, objbnd, conshdlrdata->objupperbound) )
2532 conshdlrdata->objupperbound = objbnd;
2539 if (
SCIPisLT(scip, conshdlrdata->objupperbound, conshdlrdata->objaltlpbound) )
2541 SCIPdebugMsg(scip,
"Update objective bound to %g.\n", conshdlrdata->objupperbound);
2544 if ( conshdlrdata->objcutindex < 0 )
2553 assert(
SCIPisEQ(scip, oldbnd, conshdlrdata->objaltlpbound) );
2558 conshdlrdata->objaltlpbound = conshdlrdata->objupperbound;
2593 assert( scip !=
NULL );
2594 assert( lp !=
NULL );
2595 assert( infeasible !=
NULL );
2596 assert( error !=
NULL );
2638 if ( maxcondition > 0.0 )
2642 if ( condition !=
SCIP_INVALID && condition > maxcondition )
2644 SCIPdebugMsg(scip,
"Estimated condition number of basis matrix (%e) exceeds maximal allowance (%e).\n", condition, maxcondition);
2652 SCIPdebugMsg(scip,
"Estimated condition number of basis matrix (%e) is below maximal allowance (%e).\n", condition, maxcondition);
2656 SCIPdebugMsg(scip,
"Estimated condition number of basis matrix not available.\n");
2671 SCIPwarningMessage(scip,
"The dual simplex produced a primal ray. Retrying with primal ...\n");
2714 *infeasible =
FALSE;
2755 assert( scip !=
NULL );
2756 assert( lp !=
NULL );
2757 assert( conss !=
NULL );
2758 assert( S !=
NULL );
2759 assert( size !=
NULL );
2760 assert( value !=
NULL );
2761 assert( error !=
NULL );
2762 assert( cutoff !=
NULL );
2763 assert( nGen !=
NULL );
2771 assert( nconss <= nCols );
2801 SCIPdebugMsg(scip,
" size: %4d produced possible cover with indicator variable objective value %f.\n", *size, *value);
2804 if ( conshdlrdata->trysolfromcover )
2814 if ( heurindicator ==
NULL )
2821 SCIPdebugMsg(scip,
"Passed feasible solution to indicator heuristic.\n");
2831 for (j = 0; j < nconss; ++j)
2837 assert( consdata !=
NULL );
2838 ind = consdata->colindex;
2842 assert( ind < nCols );
2852 if ( candidate < 0 )
2863 if ( candidate < 0 )
2869 assert( candidate >= 0 );
2870 assert( ! S[candidate] );
2871 assert( sizeIIS > 0 );
2874 switch ( conshdlrdata->normtype )
2889 SCIPerrorMessage(
"Invalid efficacy norm parameter '%c'.\n", conshdlrdata->normtype);
2894 SCIPdebugMsg(scip,
" size: %4d, add var. %4d (obj: %-6g, alt-LP sol: %-8.4f); IIS size: %4d, eff.: %g.\n",
2895 *size, candidate, candObj, primsol[
SCIPconsGetData(conss[candidate])->colindex], sizeIIS, (sum - (
SCIP_Real) (sizeIIS - 1))/norm);
2898 S[candidate] =
TRUE;
2910 #ifdef SCIP_ENABLE_IISCHECK 2912 SCIP_CALL( checkIIS(scip, nconss, conss, primsol) );
2916 if ( conshdlrdata->updatebounds )
2930 for (j = 0; j < nconss; ++j)
2936 ind = consdata->colindex;
2940 assert( ind < nCols );
2941 assert( consdata->binvar !=
NULL );
2952 assert( cnt == sizeIIS );
2956 SCIP_CALL(
SCIPcreateConsLogicor(scip, &cons, name, cnt, vars,
FALSE,
TRUE,
TRUE,
TRUE,
TRUE, isLocal,
FALSE,
TRUE, removable,
FALSE) );
2958 SCIP_CALL(
SCIPcreateConsLogicor(scip, &cons,
"", cnt, vars,
FALSE,
TRUE,
TRUE,
TRUE,
TRUE, isLocal,
FALSE,
TRUE, removable,
FALSE) );
2986 for (j = 0; j < nconss; ++j)
2992 ind = consdata->colindex;
2996 assert( ind < nCols );
2997 assert( consdata->binvar !=
NULL );
3030 while (step < nconss);
3046 const char* consname,
3056 assert( scip !=
NULL );
3057 assert( conshdlr !=
NULL );
3058 assert( conshdlrdata !=
NULL );
3059 assert( consdata !=
NULL );
3060 assert( slackvar !=
NULL );
3061 assert( eventhdlrbound !=
NULL );
3062 assert( eventhdlrrestart !=
NULL );
3066 (*consdata)->nfixednonzero = 0;
3067 (*consdata)->colindex = -1;
3068 (*consdata)->linconsactive = linconsactive;
3069 (*consdata)->binvar = binvar;
3070 (*consdata)->slackvar = slackvar;
3071 (*consdata)->lincons = lincons;
3072 (*consdata)->implicationadded =
FALSE;
3073 (*consdata)->slacktypechecked =
FALSE;
3081 if ( binvar !=
NULL )
3084 assert( var !=
NULL );
3085 (*consdata)->binvar = var;
3095 if ( linconsactive )
3101 if ( conshdlrdata->forcerestart )
3109 ++((*consdata)->nfixednonzero);
3114 assert( var !=
NULL );
3115 (*consdata)->slackvar = var;
3118 if ( linconsactive )
3124 ++((*consdata)->nfixednonzero);
3130 assert( lincons !=
NULL );
3131 assert( consname !=
NULL );
3135 SCIPdebugMsg(scip,
"Added column for <%s> to alternative LP with column index %d.\n", consname, (*consdata)->colindex);
3143 if ( (*consdata)->nfixednonzero > 0 )
3145 SCIPdebugMsg(scip,
"Constraint <%s> has %d variables fixed to be nonzero.\n", consname, (*consdata)->nfixednonzero);
3171 assert( scip !=
NULL );
3172 assert( conshdlrdata !=
NULL );
3173 assert( ngen !=
NULL );
3178 for (c = 0; c < nconss; ++c)
3184 assert( consdata !=
NULL );
3190 if ( ub <= conshdlrdata->maxcouplingvalue )
3200 SCIPdebugMsg(scip,
"Insert coupling varbound constraint for indicator constraint <%s> (coeff: %f).\n",
SCIPconsGetName(conss[c]), ub);
3209 !conshdlrdata->removeindicators, !conshdlrdata->removeindicators,
FALSE) );
3215 if ( conshdlrdata->removeindicators )
3255 assert( scip !=
NULL );
3256 assert( cons !=
NULL );
3257 assert( consdata !=
NULL );
3258 assert( cutoff !=
NULL );
3259 assert( success !=
NULL );
3260 assert( ndelconss !=
NULL );
3261 assert( nfixedvars !=
NULL );
3262 assert( consdata->binvar !=
NULL );
3263 assert( consdata->slackvar !=
NULL );
3276 SCIPdebugMsg(scip,
"The problem is infeasible: binary and slack variable are fixed to be nonzero.\n");
3282 SCIPdebugMsg(scip,
"Fix slack variable to 0 and delete constraint.\n");
3284 assert( ! infeasible );
3331 SCIPdebugMsg(scip,
"The problem is infeasible: binary and slack variable are fixed to be nonzero.\n");
3337 SCIPdebugMsg(scip,
"Fix binary variable to 0 and delete indicator constraint.\n");
3339 assert( ! infeasible );
3362 if ( dualreductions )
3368 binvar = consdata->binvar;
3382 SCIPdebugMsg(scip,
"Presolving <%s> - dual reduction: Slack variable fixed to 0, fix binary variable to 1.\n",
SCIPconsGetName(cons));
3384 assert( ! infeasible );
3400 SCIPdebugMsg(scip,
"Presolving <%s> - dual reduction: Slack variable fixed to 0, fix binary variable to 0.\n",
SCIPconsGetName(cons));
3402 assert( ! infeasible );
3410 SCIPdebugMsg(scip,
"Presolving <%s>: Slack variable fixed to zero, delete redundant indicator constraint.\n",
SCIPconsGetName(cons));
3434 var = consdata->binvar;
3439 if ( var != consdata->binvar && ! negated )
3444 assert( conshdlrdata->eventhdlrbound !=
NULL );
3452 consdata->binvar = var;
3460 assert( var !=
NULL );
3463 if ( var == consdata->slackvar )
3482 var = consdata->slackvar;
3486 assert( var != consdata->slackvar );
3495 assert( conshdlrdata->eventhdlrbound !=
NULL );
3506 consdata->slackvar = var;
3508 else if ( var == consdata->binvar )
3516 SCIPdebugMsg(scip,
"Slack variable <%s> is aggregated to negated indicator variable <%s> -> constraint redundant.\n",
3518 assert(
SCIPisEQ(scip, bound, 1.0) );
3530 SCIPdebugMsg(scip,
"Slack variable <%s> is aggregated to the indicator variable <%s> -> fix indicator variable to 0.\n",
3533 assert(
SCIPisEQ(scip, bound, 0.0) );
3536 assert( ! infeasible );
3574 assert( scip !=
NULL );
3575 assert( cons !=
NULL );
3576 assert( consdata !=
NULL );
3577 assert( cutoff !=
NULL );
3578 assert( nGen !=
NULL );
3584 if ( ! consdata->linconsactive )
3587 assert( consdata->slackvar !=
NULL );
3588 assert( consdata->binvar !=
NULL );
3592 if ( consdata->nfixednonzero > 1 )
3594 SCIPdebugMsg(scip,
"The node is infeasible, both the slack variable and the binary variable are fixed to be nonzero.\n");
3619 if ( consdata->nfixednonzero == 1 )
3633 SCIPdebugMsg(scip,
"Binary variable <%s> is fixed to be nonzero, fixing slack variable <%s> to 0.\n",
3638 assert( ! infeasible );
3650 SCIPdebugMsg(scip,
"Slack variable <%s> is fixed to be nonzero, fixing binary variable <%s> to 0.\n",
3655 assert( ! infeasible );
3681 if ( addopposite && consdata->linconsactive )
3714 assert( consdata->lincons !=
NULL );
3718 slackvar = consdata->slackvar;
3719 assert( slackvar !=
NULL );
3725 for (j = 0; j < nlinvars; ++j)
3727 if ( linvars[j] != slackvar )
3730 allintegral =
FALSE;
3732 vars[nvars] = linvars[j];
3733 vals[nvars++] = linvals[j];
3736 assert( nlinvars == nvars + 1 );
3752 SCIPdebugMsg(scip,
"Binary variable <%s> fixed to 0. Adding opposite linear inequality.\n",
SCIPvarGetName(consdata->binvar));
3772 if ( dualreductions )
3778 binvar = consdata->binvar;
3792 SCIPdebugMsg(scip,
"Propagating <%s> - dual reduction: Slack variable fixed to 0, fix binary variable to 1.\n",
SCIPconsGetName(cons));
3794 assert( ! infeasible );
3810 SCIPdebugMsg(scip,
"Propagating <%s> - dual reduction: Slack variable fixed to 0, fix binary variable to 0.\n",
SCIPconsGetName(cons));
3812 assert( ! infeasible );
3873 assert( scip !=
NULL );
3874 assert( conshdlr !=
NULL );
3875 assert( conss !=
NULL );
3876 assert( cutoff !=
NULL );
3877 assert( nGen !=
NULL );
3884 assert( conshdlrdata !=
NULL );
3885 lp = conshdlrdata->altlp;
3886 assert( lp !=
NULL );
3893 if ( conshdlrdata->updatebounds )
3908 for (j = 0; j < nconss; ++j)
3912 assert( conss[j] !=
NULL );
3914 assert( consdata !=
NULL );
3932 SCIP_CALL(
extendToCover(scip, conshdlr, conshdlrdata, lp, sol, conshdlrdata->removable, genlogicor, nconss, conss, S, &size, &value, &error, cutoff, &nCuts) );
3936 if ( nCuts == 0 && error )
3984 assert( scip !=
NULL );
3985 assert( conshdlr !=
NULL );
3986 assert( conss !=
NULL );
3987 assert( result !=
NULL );
3995 assert( conshdlrdata !=
NULL );
4002 for (c = 0; c < nconss; ++c)
4008 assert( conss[c] !=
NULL );
4010 assert( consdata !=
NULL );
4011 assert( consdata->lincons !=
NULL );
4014 if ( ! consdata->linconsactive )
4016 someLinconsNotActive =
TRUE;
4022 conshdlrdata->dualreductions &&
SCIPallowDualReds(scip), conshdlrdata->addopposite,
4038 binvar = consdata->binvar;
4046 if ( valSlack > maxSlack )
4048 maxSlack = valSlack;
4049 branchCons = conss[c];
4063 if ( (someLinconsNotActive || conshdlrdata->enforcecuts) && conshdlrdata->sepaalternativelp )
4071 conshdlrdata->niiscutsgen += ngen;
4078 conshdlrdata->niiscutsgen += ngen;
4081 SCIPdebugMsg(scip,
"Generated %d constraints.\n", ngen);
4093 assert( ! someLinconsNotActive || branchCons ==
NULL );
4097 if ( branchCons ==
NULL )
4099 SCIPdebugMsg(scip,
"All indicator constraints are feasible.\n");
4104 if ( ! conshdlrdata->branchindicators )
4113 assert( consdata !=
NULL );
4114 binvar = consdata->binvar;
4115 slackvar = consdata->slackvar;
4173 assert( scip !=
NULL );
4174 assert( conshdlr !=
NULL );
4175 assert( conss !=
NULL );
4176 assert( cutoff !=
NULL );
4177 assert( nGen !=
NULL );
4179 if ( *nGen >= maxsepacuts )
4186 assert( conshdlrdata !=
NULL );
4187 lp = conshdlrdata->altlp;
4188 assert( lp !=
NULL );
4191 SCIPdebugMsg(scip,
"Separating IIS-cuts by rounding ...\n");
4198 if ( conshdlrdata->updatebounds )
4216 for (threshold = conshdlrdata->roundingmaxthres;
4217 rounds < conshdlrdata->maxroundingrounds && threshold >= conshdlrdata->roundingminthres && *nGen < maxsepacuts && ! (*cutoff);
4218 threshold -= conshdlrdata->roundingoffset )
4233 for (j = 0; j < nconss; ++j)
4239 assert( conss[j] !=
NULL );
4241 assert( consdata !=
NULL );
4256 assert( binvarneg !=
NULL );
4259 assert( conshdlrdata->binvarhash !=
NULL );
4265 if ( binvarval > binvarnegval )
4283 if ( size == nconss )
4285 SCIPdebugMsg(scip,
"All variables in the set. Continue ...\n");
4290 if ( size == oldsize )
4292 SCIPdebugMsg(scip,
"Skipping computation: size support has not changed.\n");
4298 SCIPdebugMsg(scip,
" Vars with value 1: %d 0: %d and fractional: %d.\n", nvarsone, nvarszero, nvarsfrac);
4305 SCIP_CALL(
extendToCover(scip, conshdlr, conshdlrdata, lp, sol, conshdlrdata->removable, conshdlrdata->genlogicor, nconss, conss, S, &size, &value, &error, cutoff, &nCuts) );
4322 SCIPdebugMsg(scip,
"Generated %d IISs.\n", *nGen - nGenOld);
4380 assert( scip !=
NULL );
4381 assert( conshdlr !=
NULL );
4382 assert( conss !=
NULL );
4383 assert( nGen !=
NULL );
4385 if ( *nGen >= maxsepacuts )
4393 assert( conshdlrdata !=
NULL );
4396 for (c = 0; c < nconss; ++c)
4404 assert( conss[c] !=
NULL );
4406 assert( consdata !=
NULL );
4407 slackvar = consdata->slackvar;
4409 lincons = consdata->lincons;
4410 assert( lincons !=
NULL );
4412 binvar = consdata->binvar;
4413 assert( binvar !=
NULL );
4447 cutval = binval * ypart;
4449 for (j = 0; j < nlinvars; ++j)
4459 if ( linvars[j] == slackvar )
4462 if ( conshdlrdata->sepapersplocal )
4481 finitebound =
FALSE;
4486 linval = signfactor * linvals[j];
4490 dout += linval * lb;
4495 dout += linval * ub;
4499 xpart = linval * xval;
4502 if (
SCIPisGT(scip, binval * din, binval * dout + xpart) )
4505 cutval += binval * din;
4513 cutval += binval * dout + xpart;
4515 cutvars[cnt] = linvars[j];
4516 cutvals[cnt++] = linval;
4520 if ( ! finitebound )
4530 cutvars[cnt] = binvar;
4531 cutvals[cnt] = ypart;
4534 SCIPdebugMsg(scip,
"Found cut of lhs value %f > %f.\n", cutval, cutrhs);
4535 (void)
SCIPsnprintf(name, 50,
"persp%d", conshdlrdata->nperspcutsgen + *nGen);
4542 assert( ! infeasible );
4548 if ( *nGen >= maxsepacuts )
4579 assert( scip !=
NULL );
4580 assert( conshdlr !=
NULL );
4581 assert( conss !=
NULL );
4582 assert( result !=
NULL );
4590 assert( conshdlrdata !=
NULL );
4595 maxsepacuts = conshdlrdata->maxsepacutsroot;
4597 maxsepacuts = conshdlrdata->maxsepacuts;
4600 if ( conshdlrdata->sepacouplingcuts )
4607 for (c = 0; c < nusefulconss && ncuts < maxsepacuts; ++c)
4613 assert( conss !=
NULL );
4614 assert( conss[c] !=
NULL );
4616 assert( consdata !=
NULL );
4617 assert( consdata->slackvar !=
NULL );
4618 assert( consdata->binvar !=
NULL );
4622 if ( conshdlrdata->sepacouplinglocal )
4633 if ( ub <= conshdlrdata->sepacouplingvalue )
4661 assert( ! infeasible );
4671 SCIPdebugMsg(scip,
"Number of separated coupling inequalities: %d.\n", ncuts);
4680 SCIPdebugMsg(scip,
"Separating inequalities for indicator constraints.\n");
4688 SCIPdebugMsg(scip,
"Separated %d cuts from indicator constraints.\n", ncuts - noldcuts);
4692 else if ( ncuts > noldcuts )
4694 conshdlrdata->niiscutsgen += ncuts;
4697 if ( conshdlrdata->genlogicor )
4709 SCIPdebugMsg(scip,
"Separating inequalities based on perspective formulation.\n");
4717 SCIPdebugMsg(scip,
"Separated %d cuts from perspective formulation.\n", ncuts - noldcuts);
4719 if ( ncuts > noldcuts )
4721 conshdlrdata->nperspcutsgen += ncuts;
4739 assert( conshdlrdata !=
NULL );
4741 conshdlrdata->removable =
TRUE;
4742 conshdlrdata->scaled =
FALSE;
4743 conshdlrdata->altlp =
NULL;
4744 conshdlrdata->nrows = 0;
4745 conshdlrdata->varhash =
NULL;
4746 conshdlrdata->slackhash =
NULL;
4747 conshdlrdata->lbhash =
NULL;
4748 conshdlrdata->ubhash =
NULL;
4749 conshdlrdata->nlbbounds = 0;
4750 conshdlrdata->nubbounds = 0;
4751 conshdlrdata->nslackvars = 0;
4752 conshdlrdata->objcutindex = -1;
4755 conshdlrdata->roundingminthres = 0.1;
4756 conshdlrdata->roundingmaxthres = 0.6;
4758 conshdlrdata->roundingoffset = 0.1;
4759 conshdlrdata->addedcouplingcons =
FALSE;
4760 conshdlrdata->ninitconss = 0;
4761 conshdlrdata->nbinvarszero = 0;
4762 conshdlrdata->performedrestart =
FALSE;
4763 conshdlrdata->objindicatoronly =
FALSE;
4764 conshdlrdata->objothervarsonly =
FALSE;
4765 conshdlrdata->minabsobj = 0.0;
4766 conshdlrdata->normtype =
'e';
4767 conshdlrdata->niiscutsgen = 0;
4768 conshdlrdata->nperspcutsgen = 0;
4793 int maxabsvalidx = -1;
4796 assert( scip !=
NULL );
4797 assert( upgdcons !=
NULL );
4811 assert( conshdlr !=
NULL );
4813 assert( conshdlrdata !=
NULL );
4815 if ( ! conshdlrdata->upgradelinear )
4819 for (j = 0; j < nvars; ++j)
4830 assert( var !=
NULL );
4835 secabsval = maxabsval;
4857 minactivity += val * lb;
4866 maxactivity += val * ub;
4869 assert( maxabsval >= 0.0 );
4870 assert( 0 <= maxabsvalidx && maxabsvalidx < nvars );
4877 if (
SCIPisEQ(scip, secabsval, maxabsval) )
4885 for (j = 0; j < nvars; ++j)
4908 if (
SCIPisGE(scip, minactivity, lhs) )
4912 if (
SCIPisGE(scip, minactivity + indval, lhs) )
4923 if (
SCIPisLE(scip, maxactivity, rhs) )
4930 if (
SCIPisLE(scip, maxactivity - indval, rhs) )
4935 if ( upgdlhs || upgdrhs )
4941 assert( ! upgdlhs || ! upgdrhs );
4948 for (l = 0; l < nvars; ++l)
4950 if ( vars[l] == indvar )
4952 indconsvars[cnt] = vars[l];
4954 indconsvals[cnt] = -vals[l];
4956 indconsvals[cnt] = vals[l];
4960 if ( indneglhs || indnegrhs )
5013 assert( scip !=
NULL );
5014 assert( conshdlr !=
NULL );
5016 assert( valid !=
NULL );
5033 assert( scip !=
NULL );
5034 assert( conshdlr !=
NULL );
5038 assert( conshdlrdata !=
NULL );
5043 if ( conshdlrdata->trysolutions && conshdlrdata->heurtrysol ==
NULL )
5045 conshdlrdata->heurtrysol =
SCIPfindHeur(scip,
"trysol");
5058 assert( scip !=
NULL );
5059 assert( conshdlr !=
NULL );
5064 if ( conshdlrdata->binvarhash !=
NULL )
5068 conshdlrdata->maxaddlincons = 0;
5069 conshdlrdata->naddlincons = 0;
5070 conshdlrdata->nrows = 0;
5082 assert( scip !=
NULL );
5083 assert( conshdlr !=
NULL );
5087 assert( conshdlrdata !=
NULL );
5088 assert( conshdlrdata->altlp ==
NULL );
5089 assert( conshdlrdata->varhash ==
NULL );
5090 assert( conshdlrdata->lbhash ==
NULL );
5091 assert( conshdlrdata->ubhash ==
NULL );
5092 assert( conshdlrdata->slackhash ==
NULL );
5094 if ( conshdlrdata->maxaddlincons > 0 )
5099 assert( conshdlrdata->addlincons ==
NULL );
5100 conshdlrdata->naddlincons = 0;
5101 conshdlrdata->maxaddlincons = 0;
5116 assert( scip !=
NULL );
5117 assert( conshdlr !=
NULL );
5124 SCIPdebugMsg(scip,
"Initsol for indicator constraints.\n");
5127 assert( conshdlrdata !=
NULL );
5128 assert( conshdlrdata->slackhash ==
NULL );
5132 if ( conshdlrdata->sepaalternativelp )
5136 assert( conshdlrdata->slackhash !=
NULL );
5139 for (c = 0; c < nconss; ++c)
5143 assert( conss !=
NULL );
5144 assert( conss[c] !=
NULL );
5148 assert( consdata !=
NULL );
5150 assert( consdata->slackvar !=
NULL );
5155 ++conshdlrdata->nslackvars;
5158 if ( conshdlrdata->genlogicor )
5161 int logicorsepafreq;
5166 if ( logicorconshdlr ==
NULL )
5168 SCIPerrorMessage(
"Logicor constraint handler not included, cannot generate constraints.\n");
5173 if ( sepafreq != -1 && ((logicorsepafreq == 0 && sepafreq > 0) || sepafreq < logicorsepafreq) )
5182 conshdlrdata->objothervarsonly =
TRUE;
5183 for (c = 0; c < nconss; ++c)
5187 assert( conss !=
NULL );
5188 assert( conss[c] !=
NULL );
5192 assert( consdata !=
NULL );
5193 assert( consdata->binvar !=
NULL );
5194 assert( consdata->slackvar !=
NULL );
5199 conshdlrdata->objothervarsonly =
FALSE;
5202 if ( ! consdata->linconsactive )
5209 if ( conshdlrdata->sepaalternativelp && consdata->colindex < 0 )
5212 SCIPdebugMsg(scip,
"Added column for <%s> to alternative LP with column index %d.\n",
SCIPconsGetName(conss[c]),consdata->colindex);
5232 quadvars[0] = consdata->binvar;
5233 quadvars[1] = consdata->slackvar;
5236 quadelem.
coef = 1.0;
5238 SCIP_CALL(
SCIPcreateNlRow(scip, &nlrow,
SCIPconsGetName(conss[c]), 0.0, 0,
NULL,
NULL, 2, quadvars, 1,
5247 SCIPdebugMsg(scip,
"Initialized %d indicator constraints.\n", nconss);
5250 if ( conshdlrdata->sepaalternativelp )
5257 if ( conshdlrdata->naddlincons > 0 )
5259 for (c = 0; c < conshdlrdata->naddlincons; ++c)
5261 cons = conshdlrdata->addlincons[c];
5280 SCIPdebugMsg(scip,
"Added %d additional columns to alternative LP.\n", cnt);
5287 if ( conshdlrdata->useotherconss )
5289 const char* conshdlrname;
5297 for (c = 0; c < nallconss; ++c)
5301 assert( cons !=
NULL );
5308 if ( strcmp(conshdlrname,
"linear") == 0 )
5314 SCIPdebugMsg(scip,
"Added column for linear constraint <%s> to alternative LP with column index %d.\n",
SCIPconsGetName(cons), colindex);
5319 SCIPdebugMsg(scip,
"Added %d additional columns from linear constraints to alternative LP.\n", cnt);
5325 if ( conshdlrdata->forcerestart )
5332 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5338 conshdlrdata->nbinvarszero = 0;
5344 conshdlrdata->objindicatoronly =
FALSE;
5349 for (j = 0; j < nvars; ++j)
5353 for (c = 0; c < nconss; ++c)
5358 assert( conss !=
NULL );
5359 assert( conss[c] !=
NULL );
5366 assert( consdata !=
NULL );
5367 assert( consdata->binvar !=
NULL );
5378 if ( probindex < 0 )
5381 assert( 0 <= probindex && probindex < nvars );
5382 covered[probindex] =
TRUE;
5386 for (j = 0; j < nvars; ++j)
5397 if (
REALABS(obj) < conshdlrdata->minabsobj )
5398 conshdlrdata->minabsobj =
REALABS(obj);
5409 assert(
SCIPisGE(scip, conshdlrdata->minabsobj, 1.0) );
5411 conshdlrdata->objindicatoronly =
TRUE;
5413 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5432 assert( scip !=
NULL );
5433 assert( conshdlr !=
NULL );
5437 assert( conshdlrdata !=
NULL );
5439 if ( conshdlrdata->sepaalternativelp )
5441 if ( conshdlrdata->slackhash !=
NULL )
5450 if ( conshdlrdata->altlp !=
NULL )
5452 assert( conshdlrdata->varhash !=
NULL );
5453 assert( conshdlrdata->lbhash !=
NULL );
5454 assert( conshdlrdata->ubhash !=
NULL );
5472 for (c = 0; c < nconss; ++c)
5476 assert( conss !=
NULL );
5477 assert( conss[c] !=
NULL );
5480 assert( consdata !=
NULL );
5481 consdata->colindex = -1;
5487 assert( conshdlrdata->slackhash ==
NULL );
5488 assert( conshdlrdata->varhash ==
NULL );
5489 assert( conshdlrdata->lbhash ==
NULL );
5490 assert( conshdlrdata->ubhash ==
NULL );
5501 assert( scip !=
NULL );
5502 assert( conshdlr !=
NULL );
5503 assert( cons !=
NULL );
5504 assert( consdata !=
NULL );
5507 #ifdef SCIP_MORE_DEBUG 5518 assert( conshdlrdata !=
NULL );
5520 if ( conshdlrdata->sepaalternativelp )
5525 assert( (*consdata)->slackvar !=
NULL );
5526 assert( (*consdata)->binvar !=
NULL );
5531 if ( (*consdata)->linconsactive )
5533 assert( conshdlrdata->eventhdlrbound !=
NULL );
5539 if ( conshdlrdata->forcerestart )
5541 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5549 assert( (*consdata)->lincons !=
NULL );
5570 assert( scip !=
NULL );
5571 assert( conshdlr !=
NULL );
5573 assert( sourcecons !=
NULL );
5574 assert( targetcons !=
NULL );
5578 assert( conshdlrdata !=
NULL );
5579 assert( conshdlrdata->eventhdlrbound !=
NULL );
5581 #ifdef SCIP_MORE_DEBUG 5587 assert( sourcedata !=
NULL );
5588 assert( sourcedata->binvar !=
NULL );
5591 if ( sourcedata->slackvar ==
NULL )
5598 if ( sourcedata->lincons ==
NULL )
5603 assert( sourcedata->lincons !=
NULL );
5604 assert( sourcedata->slackvar !=
NULL );
5609 conshdlrdata->eventhdlrrestart, sourcedata->binvar, sourcedata->slackvar, sourcedata->lincons, sourcedata->linconsactive) );
5610 assert( consdata !=
NULL );
5622 if ( conshdlrdata->sepaalternativelp )
5624 if ( conshdlrdata->binvarhash ==
NULL )
5630 assert( conshdlrdata->binvarhash !=
NULL );
5648 assert( scip !=
NULL );
5649 assert( conshdlr !=
NULL );
5655 SCIPdebugMsg(scip,
"Initpre method for indicator constraints.\n");
5658 for (c = 0; c < nconss; ++c)
5662 assert( conss !=
NULL );
5663 assert( conss[c] !=
NULL );
5667 assert( consdata !=
NULL );
5670 assert( consdata->lincons !=
NULL );
5679 assert( translincons !=
NULL );
5683 consdata->lincons = translincons;
5688 assert( conshdlrdata !=
NULL );
5691 conshdlrdata->addedcouplingcons =
FALSE;
5715 int removedvars = 0;
5718 assert( scip !=
NULL );
5719 assert( conshdlr !=
NULL );
5721 assert( result !=
NULL );
5724 SCIPdebug( oldnfixedvars = *nfixedvars; )
5728 assert( conshdlrdata !=
NULL );
5730 SCIPdebugMsg(scip,
"Presolving indicator constraints.\n");
5733 if ( nrounds == 0 || nnewfixedvars > 0 || nnewchgbds > 0 || nnewaggrvars > 0 )
5738 for (c = 0; c < nconss; ++c)
5745 assert( conss !=
NULL );
5746 assert( conss[c] !=
NULL );
5749 assert( consdata !=
NULL );
5750 assert( consdata->binvar !=
NULL );
5753 #ifdef SCIP_MORE_DEBUG 5758 if ( ! consdata->linconsactive )
5761 assert( consdata->lincons !=
NULL );
5762 assert( consdata->slackvar !=
NULL );
5767 if ( ! consdata->implicationadded )
5776 consdata->implicationadded =
TRUE;
5785 if ( ! consdata->slacktypechecked )
5787 consdata->slacktypechecked =
TRUE;
5798 assert( consdata->lincons !=
NULL );
5802 slackvar = consdata->slackvar;
5803 assert( slackvar !=
NULL );
5805 for (j = 0; j < nvars; ++j)
5807 if ( vars[j] == slackvar )
5808 foundslackvar =
TRUE;
5816 if ( j == nvars && foundslackvar )
5834 SCIPdebugMsg(scip,
"Cannot change type of slack variable (<%s>) to IMPLINT, since global bound is non-integral: (%g, %g).\n",
5843 conshdlrdata->dualreductions &&
SCIPallowDualReds(scip), &cutoff, &success, ndelconss, nfixedvars) );
5856 noReductions = nnewfixedvars == 0 && nnewaggrvars == 0 && nnewchgvartypes == 0 && nnewchgbds == 0
5857 && nnewdelconss == 0 && nnewchgcoefs == 0 && nnewchgsides == 0;
5860 if ( noReductions && *result !=
SCIP_SUCCESS && conshdlrdata->addcouplingcons && ! conshdlrdata->addedcouplingcons )
5870 *nupgdconss += ngen;
5871 if ( conshdlrdata->removeindicators )
5874 conshdlrdata->addedcouplingcons =
TRUE;
5877 SCIPdebugMsg(scip,
"Presolved %d constraints (fixed %d variables, removed %d variables, and deleted %d constraints).\n",
5878 nconss, *nfixedvars - oldnfixedvars, removedvars, *ndelconss - oldndelconss);
5896 assert( scip !=
NULL );
5897 assert( conshdlr !=
NULL );
5901 assert( conshdlrdata !=
NULL );
5903 *infeasible =
FALSE;
5906 if ( ! conshdlrdata->addcoupling )
5910 if ( conshdlrdata->addcouplingcons && conshdlrdata->addedcouplingcons )
5913 SCIPdebugMsg(scip,
"Handle initial rows for %d indicator constraints.\n", nconss);
5916 for (c = 0; c < nconss && !(*infeasible); ++c)
5921 assert( conss !=
NULL );
5922 assert( conss[c] !=
NULL );
5924 assert( consdata !=
NULL );
5927 if ( ! consdata->linconsactive )
5935 if ( ub <= conshdlrdata->maxcouplingvalue )
5946 if ( conshdlrdata->addcouplingcons )
5950 assert( ! conshdlrdata->addedcouplingcons );
5952 SCIPdebugMsg(scip,
"Insert coupling varbound constraint for indicator constraint <%s> (coeff: %f).\n",
SCIPconsGetName(conss[c]), ub);
5989 assert( scip !=
NULL );
5990 assert( conshdlr !=
NULL );
5991 assert( conss !=
NULL );
5993 assert( result !=
NULL );
6006 assert( scip !=
NULL );
6007 assert( conshdlr !=
NULL );
6008 assert( conss !=
NULL );
6010 assert( result !=
NULL );
6025 assert( scip !=
NULL );
6026 assert( conshdlr !=
NULL );
6027 assert( conss !=
NULL );
6029 assert( result !=
NULL );
6031 if ( solinfeasible )
6039 assert( conshdlrdata !=
NULL );
6053 assert( scip !=
NULL );
6054 assert( conshdlr !=
NULL );
6055 assert( conss !=
NULL );
6057 assert( result !=
NULL );
6059 if ( solinfeasible )
6067 assert( conshdlrdata !=
NULL );
6079 assert( scip !=
NULL );
6080 assert( conshdlr !=
NULL );
6081 assert( conss !=
NULL );
6083 assert( result !=
NULL );
6085 if ( solinfeasible )
6091 if ( objinfeasible )
6113 assert( scip !=
NULL );
6114 assert( conshdlr !=
NULL );
6115 assert( conss !=
NULL );
6117 assert( result !=
NULL );
6122 assert( conshdlrdata !=
NULL );
6128 assert( trysol !=
NULL );
6134 someLinconsNotActive =
FALSE;
6135 for (c = 0; c < nconss; ++c)
6139 assert( conss[c] !=
NULL );
6141 assert( consdata !=
NULL );
6142 assert( consdata->binvar !=
NULL );
6145 if ( ! consdata->linconsactive )
6147 someLinconsNotActive =
TRUE;
6151 assert( consdata->slackvar !=
NULL );
6171 if ( trysol !=
NULL )
6175 changedSol = changedSol || changed;
6187 if ( trysol !=
NULL )
6191 changedSol = changedSol || changed;
6197 if ( someLinconsNotActive )
6204 lp = conshdlrdata->altlp;
6205 assert( conshdlrdata->sepaalternativelp );
6215 if ( conshdlrdata->updatebounds )
6229 for (c = 0; c < nconss; ++c)
6233 assert( conss[c] !=
NULL );
6235 assert( consdata !=
NULL );
6274 if ( trysol !=
NULL && changedSol )
6276 assert( conshdlrdata->heurtrysol !=
NULL );
6281 if ( trysol !=
NULL )
6286 SCIPdebugMsg(scip,
"Indicator constraints are not feasible.\n");
6291 SCIPdebugMsg(scip,
"Indicator constraints are feasible.\n");
6305 assert( scip !=
NULL );
6306 assert( conshdlr !=
NULL );
6307 assert( conss !=
NULL );
6309 assert( result !=
NULL );
6319 assert( conshdlrdata !=
NULL );
6322 for (c = 0; c < nconss; ++c)
6330 assert( conss[c] !=
NULL );
6333 assert( consdata !=
NULL );
6335 #ifdef SCIP_MORE_DEBUG 6342 conshdlrdata->addopposite, &cutoff, &cnt) );
6370 assert( scip !=
NULL );
6371 assert( cons !=
NULL );
6373 assert( infervar !=
NULL );
6374 assert( bdchgidx !=
NULL );
6375 assert( result !=
NULL );
6381 assert( consdata !=
NULL );
6382 assert( inferinfo == 0 || inferinfo == 1 || inferinfo == 2 );
6383 assert( consdata->linconsactive );
6386 if ( inferinfo == 0 )
6389 assert( infervar != consdata->binvar );
6393 else if ( inferinfo == 1 )
6396 assert( infervar != consdata->slackvar );
6404 assert( inferinfo == 2 );
6426 assert( scip !=
NULL );
6427 assert( conshdlr !=
NULL );
6428 assert( cons !=
NULL );
6431 assert( consdata !=
NULL );
6432 assert( consdata->binvar !=
NULL );
6434 #ifdef SCIP_MORE_DEBUG 6440 if ( consdata->linconsactive )
6442 assert( consdata->slackvar !=
NULL );
6454 assert( consdata->lincons !=
NULL );
6455 assert( consdata->slackvar ==
NULL );
6463 for (j = 0; j < nlinvars; ++j)
6503 assert( scip !=
NULL );
6504 assert( conshdlr !=
NULL );
6505 assert( cons !=
NULL );
6509 assert( consdata !=
NULL );
6510 assert( consdata->binvar !=
NULL );
6512 binvar = consdata->binvar;
6521 assert( consdata->slackvar !=
NULL );
6522 assert( consdata->lincons !=
NULL );
6539 const char* consname;
6541 assert( scip !=
NULL );
6542 assert( sourcescip !=
NULL );
6543 assert( sourcecons !=
NULL );
6553 #ifdef SCIP_MORE_DEBUG 6554 SCIPdebugMsg(scip,
"Copying indicator constraint <%s> ...\n", consname);
6565 assert( sourceconsdata !=
NULL );
6568 sourcelincons = sourceconsdata->lincons;
6573 SCIPdebugMsg(scip,
"Linear constraint <%s> deleted! Create empty linear constraint.\n",
SCIPconsGetName(sourceconsdata->lincons));
6582 assert( sourcelincons !=
NULL );
6584 assert( conshdlrlinear !=
NULL );
6594 assert( translincons !=
NULL );
6597 sourceconsdata->lincons = translincons;
6598 sourcelincons = translincons;
6612 sourcebinvar = sourceconsdata->binvar;
6613 assert( sourcebinvar !=
NULL );
6623 sourceslackvar = sourceconsdata->slackvar;
6624 assert( sourceslackvar !=
NULL );
6626 SCIP_CALL(
SCIPgetVarCopy(sourcescip, scip, sourceslackvar, &targetslackvar, varmap, consmap, global, valid) );
6632 assert( targetlincons !=
NULL );
6633 assert( targetbinvar !=
NULL );
6634 assert( targetslackvar !=
NULL );
6638 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
6646 if ( targetlincons !=
NULL )
6659 char binvarname[1024];
6660 char slackvarname[1024];
6671 nargs = sscanf(str,
" <%1023[^>]> = %d -> <%1023[^>]> = 0", binvarname, &zeroone, slackvarname);
6680 if ( zeroone != 0 && zeroone != 1 )
6689 if ( binvar ==
NULL )
6701 if ( slackvar ==
NULL )
6709 posstr = strstr(slackvarname,
"indslack");
6710 if ( posstr ==
NULL )
6718 (void)
SCIPsnprintf(binvarname, 1023,
"indlin%s", posstr+8);
6721 if ( lincons ==
NULL )
6727 if ( lincons ==
NULL )
6730 name, binvarname, binvarname);
6746 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
6759 assert( scip !=
NULL );
6760 assert( conshdlr !=
NULL );
6761 assert( cons !=
NULL );
6764 #ifdef SCIP_MORE_DEBUG 6769 assert( conshdlrdata !=
NULL );
6772 assert( consdata !=
NULL );
6774 if ( conshdlrdata->altlp !=
NULL )
6776 assert( conshdlrdata->sepaalternativelp );
6778 if ( consdata->colindex >= 0 )
6794 assert( scip !=
NULL );
6795 assert( conshdlr !=
NULL );
6796 assert( cons !=
NULL );
6799 #ifdef SCIP_MORE_DEBUG 6804 assert( conshdlrdata !=
NULL );
6806 if ( conshdlrdata->altlp !=
NULL )
6811 assert( consdata !=
NULL );
6812 assert( conshdlrdata->sepaalternativelp );
6814 if ( consdata->colindex >= 0 )
6831 assert( scip !=
NULL );
6832 assert( cons !=
NULL );
6833 assert( vars !=
NULL );
6834 assert( varssize >= 0 );
6835 assert( success !=
NULL );
6847 assert( consdata !=
NULL );
6848 assert( consdata->lincons !=
NULL );
6850 if ( consdata->binvar !=
NULL )
6852 assert( varssize > 0 );
6853 vars[nvars++] = consdata->binvar;
6855 if ( consdata->slackvar !=
NULL )
6857 assert( varssize > nvars );
6858 vars[nvars++] = consdata->slackvar;
6878 assert( scip !=
NULL );
6879 assert( cons !=
NULL );
6880 assert( nvars !=
NULL );
6881 assert( success !=
NULL );
6891 assert( consdata !=
NULL );
6892 assert( consdata->lincons !=
NULL );
6894 if ( consdata->binvar !=
NULL )
6896 if ( consdata->slackvar !=
NULL )
6907 assert( nlinvars >= 0 );
6926 assert(scip !=
NULL);
6927 assert(conshdlr !=
NULL);
6929 assert(diveset !=
NULL);
6930 assert(success !=
NULL);
6931 assert(infeasible !=
NULL);
6934 *infeasible =
FALSE;
6940 for (c = 0; c < nindconss; ++c)
6958 &score, &roundup) );
6961 if( score > bestscore )
6966 bestvarroundup = roundup;
6972 assert(! *success || bestvar !=
NULL);
7000 conshdlrdata->eventhdlrbound =
NULL;
7002 eventExecIndicatorBound,
NULL) );
7003 assert(conshdlrdata->eventhdlrbound !=
NULL);
7006 conshdlrdata->eventhdlrrestart =
NULL;
7008 eventExecIndicatorRestart,
NULL) );
7009 assert( conshdlrdata->eventhdlrrestart !=
NULL );
7011 conshdlrdata->heurtrysol =
NULL;
7015 conshdlrdata->binvarhash =
NULL;
7023 conshdlrdata->addlincons =
NULL;
7024 conshdlrdata->naddlincons = 0;
7025 conshdlrdata->maxaddlincons = 0;
7030 consEnfolpIndicator, consEnfopsIndicator, consCheckIndicator, consLockIndicator,
7033 assert( conshdlr !=
NULL );
7070 conflicthdlrdata->conshdlrdata = conshdlrdata;
7071 conflicthdlrdata->conshdlr = conshdlr;
7072 assert( conflicthdlrdata->conshdlr !=
NULL );
7076 conflictExecIndicator, conflicthdlrdata) );
7082 "constraints/indicator/branchindicators",
7083 "Branch on indicator constraints in enforcing?",
7087 "constraints/indicator/genlogicor",
7088 "Generate logicor constraints instead of cuts?",
7092 "constraints/indicator/addcoupling",
7093 "Add coupling constraints or rows if big-M is small enough?",
7097 "constraints/indicator/maxcouplingvalue",
7098 "maximum coefficient for binary variable in coupling constraint",
7102 "constraints/indicator/addcouplingcons",
7103 "Add initial variable upper bound constraints, if 'addcoupling' is true?",
7107 "constraints/indicator/sepacouplingcuts",
7108 "Should the coupling inequalities be separated dynamically?",
7112 "constraints/indicator/sepacouplinglocal",
7113 "Allow to use local bounds in order to separate coupling inequalities?",
7117 "constraints/indicator/sepacouplingvalue",
7118 "maximum coefficient for binary variable in separated coupling constraint",
7122 "constraints/indicator/sepaperspective",
7123 "Separate cuts based on perspective formulation?",
7127 "constraints/indicator/sepapersplocal",
7128 "Allow to use local bounds in order to separate perspective cuts?",
7132 "constraints/indicator/updatebounds",
7133 "Update bounds of original variables for separation?",
7137 "constraints/indicator/maxconditionaltlp",
7138 "maximum estimated condition of the solution basis matrix of the alternative LP to be trustworthy (0.0 to disable check)",
7142 "constraints/indicator/maxsepacuts",
7143 "maximal number of cuts separated per separation round",
7147 "constraints/indicator/maxsepacutsroot",
7148 "maximal number of cuts separated per separation round in the root node",
7152 "constraints/indicator/removeindicators",
7153 "Remove indicator constraint if corresponding variable bound constraint has been added?",
7157 "constraints/indicator/generatebilinear",
7158 "Do not generate indicator constraint, but a bilinear constraint instead?",
7162 "constraints/indicator/scaleslackvar",
7163 "Scale slack variable coefficient at construction time?",
7167 "constraints/indicator/trysolutions",
7168 "Try to make solutions feasible by setting indicator variables?",
7172 "constraints/indicator/enforcecuts",
7173 "In enforcing try to generate cuts (only if sepaalternativelp is true)?",
7177 "constraints/indicator/dualreductions",
7178 "Should dual reduction steps be performed?",
7182 "constraints/indicator/addopposite",
7183 "Add opposite inequality in nodes in which the binary variable has been fixed to 0?",
7187 "constraints/indicator/conflictsupgrade",
7188 "Try to upgrade bounddisjunction conflicts by replacing slack variables?",
7192 "constraints/indicator/restartfrac",
7193 "fraction of binary variables that need to be fixed before restart occurs (in forcerestart)",
7197 "constraints/indicator/useotherconss",
7198 "Collect other constraints to alternative LP?",
7202 "constraints/indicator/useobjectivecut",
7203 "Use objective cut with current best solution to alternative LP?",
7207 "constraints/indicator/trysolfromcover",
7208 "Try to construct a feasible solution from a cover?",
7212 "constraints/indicator/upgradelinear",
7213 "Try to upgrade linear constraints to indicator constraints?",
7218 "constraints/indicator/sepaalternativelp",
7219 "Separate using the alternative LP?",
7223 "constraints/indicator/forcerestart",
7224 "Force restart if absolute gap is 1 or enough binary variables have been fixed?",
7228 "constraints/indicator/nolinconscont",
7229 "Decompose problem (do not generate linear constraint if all variables are continuous)?",
7287 SCIPerrorMessage(
"Indicator constraint <%s> needs nonnegative number of variables in linear constraint.\n", name);
7293 if ( conshdlr ==
NULL )
7300 assert( conshdlrdata !=
NULL );
7302 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
7304 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
7308 if ( conshdlrdata->nolinconscont && conshdlrdata->generatebilinear )
7316 for (j = 0; j < nvars; ++j)
7318 if ( conshdlrdata->scaleslackvar )
7319 absvalsum +=
REALABS(vals[j]);
7323 if ( ! conshdlrdata->scaleslackvar )
7339 linconsactive =
TRUE;
7340 if ( conshdlrdata->nolinconscont )
7344 assert( ! conshdlrdata->generatebilinear );
7347 for (j = 0; j < nvars; ++j)
7360 linconsactive =
FALSE;
7367 if ( linconsactive )
7385 if ( conshdlrdata->scaleslackvar && nvars > 0 )
7387 absvalsum = absvalsum/((
SCIP_Real) nvars);
7389 absvalsum =
SCIPceil(scip, absvalsum);
7401 if ( conshdlrdata->generatebilinear )
7406 SCIP_CALL(
SCIPcreateConsQuadratic(scip, cons, name, 0,
NULL,
NULL, 1, &binvar, &slackvar, &val, 0.0, 0.0,
7413 SCIP_CALL(
consdataCreate(scip, conshdlr, conshdlrdata, name, &consdata, conshdlrdata->eventhdlrbound, conshdlrdata->eventhdlrrestart,
7414 binvar, slackvar, lincons, linconsactive) );
7415 assert( consdata !=
NULL );
7418 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
7419 local, modifiable, dynamic, removable, stickingatnode) );
7424 if ( conshdlrdata->sepaalternativelp )
7426 if ( conshdlrdata->binvarhash ==
NULL )
7432 assert( conshdlrdata->binvarhash !=
NULL );
7467 assert( scip !=
NULL );
7519 assert( scip !=
NULL );
7520 assert( lincons !=
NULL );
7521 assert( slackvar !=
NULL );
7533 if ( conshdlr ==
NULL )
7540 assert( conshdlrdata !=
NULL );
7542 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
7544 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
7552 if ( conshdlrdata->nolinconscont )
7563 for (v = 0; v < nvars; ++v)
7576 linconsactive =
FALSE;
7584 if ( conshdlrdata->generatebilinear )
7589 SCIP_CALL(
SCIPcreateConsQuadratic(scip, cons, name, 0,
NULL,
NULL, 1, &binvar, &slackvar, &val, 0.0, 0.0,
7595 SCIP_CALL(
consdataCreate(scip, conshdlr, conshdlrdata, name, &consdata, conshdlrdata->eventhdlrbound, conshdlrdata->eventhdlrrestart,
7596 binvar, slackvar, lincons, linconsactive) );
7597 assert( consdata !=
NULL );
7600 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
7601 local, modifiable, dynamic, removable, stickingatnode) );
7632 assert( scip !=
NULL );
7651 assert( cons !=
NULL );
7655 assert( consdata !=
NULL );
7665 assert( ! infeasible );
7679 assert( cons !=
NULL );
7683 assert( consdata !=
NULL );
7685 return consdata->lincons;
7706 assert( cons !=
NULL );
7711 assert( conshdlrdata !=
NULL );
7714 assert( consdata !=
NULL );
7717 assert( consdata->lincons !=
NULL );
7721 assert( lincons !=
NULL );
7722 consdata->lincons = lincons;
7723 consdata->linconsactive =
TRUE;
7727 if ( conshdlrdata->nolinconscont )
7737 assert( vars !=
NULL );
7740 for (v = 0; v < nvars; ++v)
7753 consdata->linconsactive =
FALSE;
7767 assert( cons !=
NULL );
7771 assert( consdata !=
NULL );
7773 return consdata->binvar;
7786 assert( cons !=
NULL );
7787 assert( binvar !=
NULL );
7791 assert( consdata !=
NULL );
7801 if ( consdata->binvar !=
NULL )
7817 assert( var !=
NULL );
7818 consdata->binvar = var;
7821 assert( conshdlr !=
NULL );
7824 assert( conshdlrdata !=
NULL );
7825 assert( conshdlrdata->eventhdlrbound !=
NULL );
7826 assert( conshdlrdata->eventhdlrrestart !=
NULL );
7829 if ( consdata->linconsactive )
7835 if ( conshdlrdata->forcerestart )
7842 ++(consdata->nfixednonzero);
7845 consdata->binvar = binvar;
7858 assert( cons !=
NULL );
7862 assert( consdata !=
NULL );
7864 return consdata->slackvar;
7877 assert( cons !=
NULL );
7884 assert( consdata !=
NULL );
7886 if ( consdata->linconsactive )
7888 assert( consdata->slackvar !=
NULL );
7889 assert( consdata->binvar !=
NULL );
7944 assert( cons !=
NULL );
7946 assert( sol !=
NULL );
7947 assert( changed !=
NULL );
7955 assert( cons !=
NULL );
7957 assert( consdata !=
NULL );
7960 if ( ! consdata->linconsactive )
7963 lincons = consdata->lincons;
7964 assert( lincons !=
NULL );
7969 slackvar = consdata->slackvar;
7970 binvar = consdata->binvar;
7971 assert( slackvar !=
NULL );
7972 assert( binvar !=
NULL );
7981 for (v = 0; v < nlinvars; ++v)
7985 if ( var != slackvar )
7988 slackcoef = linvals[v];
7996 assert( slackcoef != 0.0 );
8009 val = (val - sum)/slackcoef;
8012 if ( slackcoef < 0 )
8109 assert( conshdlr !=
NULL );
8111 assert( sol !=
NULL );
8112 assert( changed !=
NULL );
8123 for (c = 0; c < nconss; ++c)
8127 assert( conss[c] !=
NULL );
8130 assert( consdata !=
NULL );
8133 if ( ! consdata->linconsactive )
8137 *changed = *changed || chg;
8151 assert( scip !=
NULL );
8153 assert( lincons !=
NULL );
8161 assert( conshdlrdata !=
NULL );
8164 assert( conshdlrdata->naddlincons+1 <= conshdlrdata->maxaddlincons );
8166 conshdlrdata->addlincons[conshdlrdata->naddlincons++] = lincons;
8183 assert( scip !=
NULL );
8185 assert( row !=
NULL );
8194 assert( conshdlrdata !=
NULL );
8197 if ( ! conshdlrdata->sepaalternativelp )
enum SCIP_Result SCIP_RESULT
static SCIP_RETCODE checkLPBoundsClean(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss)
#define EVENTHDLR_BOUND_DESC
SCIP_RETCODE SCIPheurPassIndicator(SCIP *scip, SCIP_HEUR *heur, int nindconss, SCIP_CONS **indconss, SCIP_Bool *solcand)
enum SCIP_BoundType SCIP_BOUNDTYPE
int SCIPgetNIntVars(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisViolatedIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_RETCODE SCIPgetCharParam(SCIP *scip, const char *name, char *value)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
SCIP_Bool SCIPinRepropagation(SCIP *scip)
#define DEFAULT_UPGRADELINEAR
static SCIP_DECL_CONSRESPROP(consRespropIndicator)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
primal heuristic that tries a given solution
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
static SCIP_DECL_CONSINITLP(consInitlpIndicator)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
#define DEFAULT_SEPACOUPLINGCUTS
#define CONFLICTHDLR_DESC
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Constraint handler for variable bound constraints .
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
static SCIP_DECL_CONSINIT(consInitIndicator)
static SCIP_RETCODE consdataEnsureAddLinConsSize(SCIP *scip, SCIP_CONSHDLR *conshdlr, int num)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
#define DEFAULT_TRYSOLUTIONS
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
static SCIP_DECL_CONSINITPRE(consInitpreIndicator)
#define DEFAULT_SEPAPERSPLOCAL
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
#define CONSHDLR_CHECKPRIORITY
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPaddVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE addAltLPRow(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row, SCIP_Real objcoef, int *colindex)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
int SCIPgetNOrigVars(SCIP *scip)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
static SCIP_DECL_EVENTEXEC(eventExecIndicatorBound)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
constraint handler for indicator constraints
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
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)
#define DEFAULT_MAXCONDITIONALTLP
static SCIP_RETCODE unfixAltLPVariable(SCIP_LPI *lp, int ind)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define CONSHDLR_PRESOLTIMING
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE addObjcut(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)
#define MAXROUNDINGROUNDS
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
static SCIP_DECL_CONFLICTEXEC(conflictExecIndicator)
#define EVENTHDLR_RESTART_DESC
SCIP_Real SCIPinfinity(SCIP *scip)
static SCIP_RETCODE separateIndicators(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, int nusefulconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
static SCIP_RETCODE checkAltLPInfeasible(SCIP *scip, SCIP_LPI *lp, SCIP_Real maxcondition, SCIP_Bool primal, SCIP_Bool *infeasible, SCIP_Bool *error)
SCIP_RETCODE SCIPsetLinearConsIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONS *lincons)
static SCIP_RETCODE updateFirstRow(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_RETCODE SCIPmakeIndicatorFeasible(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *changed)
int SCIPvarGetProbindex(SCIP_VAR *var)
#define CONSHDLR_NEEDSCONS
const char * SCIPparamGetName(SCIP_PARAM *param)
#define SCIP_EVENTTYPE_GLBCHANGED
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
static SCIP_DECL_CONSEXITSOL(consExitsolIndicator)
SCIP_RETCODE SCIPaddDiveBoundChange(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
#define SCIPfreeBlockMemory(scip, ptr)
#define CONSHDLR_PROP_TIMING
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
static SCIP_RETCODE propIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool dualreductions, SCIP_Bool addopposite, SCIP_Bool *cutoff, int *nGen)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
#define DEFAULT_ENFORCECUTS
static SCIP_DECL_CONSSEPASOL(consSepasolIndicator)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSGETNVARS(consGetNVarsIndicator)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE checkIISlocal(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Real *vector, SCIP_Bool *isLocal)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
#define DEFAULT_SEPAALTERNATIVELP
#define SCIPallocBlockMemory(scip, ptr)
static SCIP_RETCODE setAltLPObjZero(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPisTransformed(SCIP *scip)
#define DEFAULT_DUALREDUCTIONS
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIP_EVENTTYPE_BOUNDCHANGED
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
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_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
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)
static SCIP_DECL_CONSCHECK(consCheckIndicator)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
#define DEFAULT_BRANCHINDICATORS
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsQuadratic(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)
#define CONSHDLR_SEPAFREQ
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)
#define DEFAULT_ADDOPPOSITE
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
#define DEFAULT_CONFLICTSUPGRADE
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
#define SCIP_EVENTTYPE_LBRELAXED
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
static SCIP_DECL_CONSENABLE(consEnableIndicator)
static SCIP_DECL_CONSCOPY(consCopyIndicator)
static SCIP_DECL_CONSINITSOL(consInitsolIndicator)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
static SCIP_DECL_CONSENFORELAX(consEnforelaxIndicator)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_RETCODE SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
static SCIP_DECL_CONSGETDIVEBDCHGS(consGetDiveBdChgsIndicator)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
#define CONFLICTHDLR_NAME
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
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_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
static SCIP_DECL_CONSPROP(consPropIndicator)
SCIP_BOUNDTYPE SCIPboundtypeOpposite(SCIP_BOUNDTYPE boundtype)
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)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
void SCIPhashmapPrintStatistics(SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
static SCIP_DECL_CONSPRESOL(consPresolIndicator)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIPInterval sqrt(const SCIPInterval &x)
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)
static SCIP_DECL_CONSFREE(consFreeIndicator)
#define CONFLICTHDLR_PRIORITY
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define DEFAULT_NOLINCONSCONT
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIPInterval sign(const SCIPInterval &x)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
static SCIP_DECL_CONSPARSE(consParseIndicator)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
#define DEFAULT_MAXCOUPLINGVALUE
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
constraint handler for quadratic constraints
#define DEFAULT_FORCERESTART
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
#define DEFAULT_SEPACOUPLINGLOCAL
static SCIP_RETCODE setAltLPObj(SCIP *scip, SCIP_LPI *lp, SCIP_SOL *sol, int nconss, SCIP_CONS **conss)
#define SCIP_EVENTTYPE_UBRELAXED
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
handle partial solutions for linear problems with indicators and otherwise continuous variables ...
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
#define SCIP_EVENTTYPE_LBTIGHTENED
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
#define DEFAULT_USEOBJECTIVECUT
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
static SCIP_DECL_CONSDELETE(consDeleteIndicator)
static SCIP_RETCODE enforceIndicators(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_Bool genlogicor, SCIP_RESULT *result)
static SCIP_DECL_CONSDISABLE(consDisableIndicator)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
struct SCIP_ConsData SCIP_CONSDATA
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE separateIISRounding(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, int maxsepacuts, SCIP_Bool *cutoff, int *nGen)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
static SCIP_RETCODE fixAltLPVariable(SCIP_LPI *lp, int ind)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSENFOLP(consEnfolpIndicator)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
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)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
public data structures and miscellaneous methods
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_RETCODE SCIPaddLinearConsIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
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)
#define DEFAULT_ADDCOUPLING
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
static const char * paramname[]
static SCIP_RETCODE deleteAltLPConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateEmptyRowCons(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)
int SCIPgetDepth(SCIP *scip)
static SCIP_DECL_CONSPRINT(consPrintIndicator)
static SCIP_RETCODE unfixAltLPVariables(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss, SCIP_Bool *S)
#define DEFAULT_SEPACOUPLINGVALUE
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
#define DEFAULT_SEPAPERSPECTIVE
int SCIPvarGetNLocksUp(SCIP_VAR *var)
static SCIP_RETCODE createVarUbs(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, int *ngen)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
static SCIP_DECL_CONFLICTFREE(conflictFreeIndicator)
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
#define DEFAULT_MAXSEPACUTS
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_VAR * SCIPvarGetAggrVar(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)
static SCIP_DECL_LINCONSUPGD(linconsUpgdIndicator)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
#define DEFAULT_REMOVEINDICATORS
#define DEFAULT_TRYSOLFROMCOVER
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyIndicator)
int SCIPgetNRuns(SCIP *scip)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
#define SCIP_EVENTTYPE_UBTIGHTENED
Constraint handler for linear constraints in their most general form, .
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
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_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
#define DEFAULT_RESTARTFRAC
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_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
#define SCIP_EVENTTYPE_GBDCHANGED
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
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_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
SCIP_Real SCIPcalcChildEstimate(SCIP *scip, SCIP_VAR *var, SCIP_Real targetvalue)
#define DEFAULT_ADDCOUPLINGCONS
int SCIPgetNBinVars(SCIP *scip)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
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)
int SCIPgetNVars(SCIP *scip)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeConshdlrIndicator(SCIP *scip)
SCIP_RETCODE SCIPsetBinaryVarIndicator(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar)
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)
static SCIP_RETCODE scaleFirstRow(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *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)
#define DEFAULT_UPDATEBOUNDS
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
#define SCIP_EVENTTYPE_BESTSOLFOUND
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define CONSHDLR_ENFOPRIORITY
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
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 SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
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)
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 SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
#define CONSHDLR_DELAYSEPA
SCIP_RETCODE SCIPrestartSolve(SCIP *scip)
static SCIP_RETCODE extendToCover(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_LPI *lp, SCIP_SOL *sol, 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)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
int SCIPgetNConss(SCIP *scip)
static SCIP_DECL_CONSLOCK(consLockIndicator)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define LINCONSUPGD_PRIORITY
static SCIP_DECL_CONSENFOPS(consEnfopsIndicator)
#define DEFAULT_SCALESLACKVAR
SCIP_Bool SCIPallowDualReds(SCIP *scip)
static void initConshdlrData(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
static SCIP_RETCODE branchCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
#define EVENTHDLR_BOUND_NAME
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
#define DEFAULT_GENLOGICOR
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
static SCIP_RETCODE initAlternativeLP(SCIP *scip, SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPaddRowIndicator(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_ROW *row)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
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_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_Real SCIPcutoffbounddelta(SCIP *scip)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
static SCIP_RETCODE addAltLPConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Real objcoef, int *colindex)
static SCIP_DECL_PARAMCHGD(paramChangedIndicator)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
static SCIP_DECL_CONSSEPALP(consSepalpIndicator)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_SEPAPRIORITY
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
enum SCIP_Vartype SCIP_VARTYPE
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define CONSHDLR_EAGERFREQ
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 SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
#define DEFAULT_GENERATEBILINEAR
#define EVENTHDLR_RESTART_NAME
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
#define CONSHDLR_PROPFREQ
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
static SCIP_DECL_CONSTRANS(consTransIndicator)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *expression, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE updateObjUpperbound(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
#define SCIP_EVENTTYPE_GUBCHANGED
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
#define DEFAULT_USEOTHERCONSS
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
#define SCIP_DIVETYPE_INTEGRALITY
SCIP_CONFLICTHDLRDATA * SCIPconflicthdlrGetData(SCIP_CONFLICTHDLR *conflicthdlr)
static SCIP_DECL_CONSGETVARS(consGetVarsIndicator)
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
static SCIP_DECL_CONSEXIT(consExitIndicator)
static SCIP_RETCODE separatePerspective(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int nconss, SCIP_CONS **conss, int maxsepacuts, int *nGen)
static SCIP_RETCODE checkTransferBoolParam(SCIP *scip, SCIP_PARAM *param, const char *name, SCIP_Bool newvalue, SCIP_Bool *value)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, const char *consname, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlrbound, SCIP_EVENTHDLR *eventhdlrrestart, SCIP_VAR *binvar, SCIP_VAR *slackvar, SCIP_CONS *lincons, SCIP_Bool linconsactive)
SCIP_RETCODE SCIPchgBoolParam(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
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)
#define SCIP_CALL_PARAM(x)
static SCIP_RETCODE updateFirstRowGlobal(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define CONSHDLR_DELAYPROP
SCIP_Bool SCIPallowObjProp(SCIP *scip)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
static SCIP_RETCODE fixAltLPVariables(SCIP *scip, SCIP_LPI *lp, int nconss, SCIP_CONS **conss, SCIP_Bool *S)
static SCIP_RETCODE enforceCuts(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_Bool genlogicor, SCIP_Bool *cutoff, int *nGen)
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_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
#define DEFAULT_MAXSEPACUTSROOT
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
static SCIP_Real varGetObjDelta(SCIP_VAR *var)