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;
4172 assert( scip !=
NULL );
4173 assert( conshdlr !=
NULL );
4174 assert( conss !=
NULL );
4175 assert( cutoff !=
NULL );
4176 assert( nGen !=
NULL );
4178 if ( *nGen >= maxsepacuts )
4185 assert( conshdlrdata !=
NULL );
4186 lp = conshdlrdata->altlp;
4187 assert( lp !=
NULL );
4190 SCIPdebugMsg(scip,
"Separating IIS-cuts by rounding ...\n");
4197 if ( conshdlrdata->updatebounds )
4215 for (threshold = conshdlrdata->roundingmaxthres;
4216 rounds < conshdlrdata->maxroundingrounds && threshold >= conshdlrdata->roundingminthres && *nGen < maxsepacuts && ! (*cutoff);
4217 threshold -= conshdlrdata->roundingoffset )
4232 for (j = 0; j < nconss; ++j)
4238 assert( conss[j] !=
NULL );
4240 assert( consdata !=
NULL );
4255 assert( binvarneg !=
NULL );
4258 assert( conshdlrdata->binvarhash !=
NULL );
4264 if ( binvarval > binvarnegval )
4282 if ( size == nconss )
4284 SCIPdebugMsg(scip,
"All variables in the set. Continue ...\n");
4289 if ( size == oldsize )
4291 SCIPdebugMsg(scip,
"Skipping computation: size support has not changed.\n");
4297 SCIPdebugMsg(scip,
" Vars with value 1: %d 0: %d and fractional: %d.\n", nvarsone, nvarszero, nvarsfrac);
4304 SCIP_CALL(
extendToCover(scip, conshdlr, conshdlrdata, lp, sol, conshdlrdata->removable, conshdlrdata->genlogicor, nconss, conss, S, &size, &value, &error, cutoff, &nCuts) );
4321 SCIPdebugMsg(scip,
"Generated %d IISs.\n", *nGen - nGenOld);
4379 assert( scip !=
NULL );
4380 assert( conshdlr !=
NULL );
4381 assert( conss !=
NULL );
4382 assert( nGen !=
NULL );
4384 if ( *nGen >= maxsepacuts )
4392 assert( conshdlrdata !=
NULL );
4395 for (c = 0; c < nconss; ++c)
4403 assert( conss[c] !=
NULL );
4405 assert( consdata !=
NULL );
4406 slackvar = consdata->slackvar;
4408 lincons = consdata->lincons;
4409 assert( lincons !=
NULL );
4411 binvar = consdata->binvar;
4412 assert( binvar !=
NULL );
4446 cutval = binval * ypart;
4448 for (j = 0; j < nlinvars; ++j)
4458 if ( linvars[j] == slackvar )
4461 if ( conshdlrdata->sepapersplocal )
4480 finitebound =
FALSE;
4485 linval = signfactor * linvals[j];
4489 dout += linval * lb;
4494 dout += linval * ub;
4498 xpart = linval * xval;
4501 if (
SCIPisGT(scip, binval * din, binval * dout + xpart) )
4504 cutval += binval * din;
4512 cutval += binval * dout + xpart;
4514 cutvars[cnt] = linvars[j];
4515 cutvals[cnt++] = linval;
4519 if ( ! finitebound )
4529 cutvars[cnt] = binvar;
4530 cutvals[cnt] = ypart;
4533 SCIPdebugMsg(scip,
"Found cut of lhs value %f > %f.\n", cutval, cutrhs);
4534 (void)
SCIPsnprintf(name, 50,
"persp%d", conshdlrdata->nperspcutsgen + *nGen);
4541 assert( ! infeasible );
4547 if ( *nGen >= maxsepacuts )
4578 assert( scip !=
NULL );
4579 assert( conshdlr !=
NULL );
4580 assert( conss !=
NULL );
4581 assert( result !=
NULL );
4589 assert( conshdlrdata !=
NULL );
4594 maxsepacuts = conshdlrdata->maxsepacutsroot;
4596 maxsepacuts = conshdlrdata->maxsepacuts;
4599 if ( conshdlrdata->sepacouplingcuts )
4606 for (c = 0; c < nusefulconss && ncuts < maxsepacuts; ++c)
4612 assert( conss !=
NULL );
4613 assert( conss[c] !=
NULL );
4615 assert( consdata !=
NULL );
4616 assert( consdata->slackvar !=
NULL );
4617 assert( consdata->binvar !=
NULL );
4621 if ( conshdlrdata->sepacouplinglocal )
4632 if ( ub <= conshdlrdata->sepacouplingvalue )
4660 assert( ! infeasible );
4670 SCIPdebugMsg(scip,
"Number of separated coupling inequalities: %d.\n", ncuts);
4679 SCIPdebugMsg(scip,
"Separating inequalities for indicator constraints.\n");
4687 SCIPdebugMsg(scip,
"Separated %d cuts from indicator constraints.\n", ncuts - noldcuts);
4691 else if ( ncuts > noldcuts )
4693 conshdlrdata->niiscutsgen += ncuts;
4696 if ( conshdlrdata->genlogicor )
4708 SCIPdebugMsg(scip,
"Separating inequalities based on perspective formulation.\n");
4716 SCIPdebugMsg(scip,
"Separated %d cuts from perspective formulation.\n", ncuts - noldcuts);
4718 if ( ncuts > noldcuts )
4720 conshdlrdata->nperspcutsgen += ncuts;
4738 assert( conshdlrdata !=
NULL );
4740 conshdlrdata->removable =
TRUE;
4741 conshdlrdata->scaled =
FALSE;
4742 conshdlrdata->altlp =
NULL;
4743 conshdlrdata->nrows = 0;
4744 conshdlrdata->varhash =
NULL;
4745 conshdlrdata->slackhash =
NULL;
4746 conshdlrdata->lbhash =
NULL;
4747 conshdlrdata->ubhash =
NULL;
4748 conshdlrdata->nlbbounds = 0;
4749 conshdlrdata->nubbounds = 0;
4750 conshdlrdata->nslackvars = 0;
4751 conshdlrdata->objcutindex = -1;
4754 conshdlrdata->roundingminthres = 0.1;
4755 conshdlrdata->roundingmaxthres = 0.6;
4757 conshdlrdata->roundingoffset = 0.1;
4758 conshdlrdata->addedcouplingcons =
FALSE;
4759 conshdlrdata->ninitconss = 0;
4760 conshdlrdata->nbinvarszero = 0;
4761 conshdlrdata->performedrestart =
FALSE;
4762 conshdlrdata->objindicatoronly =
FALSE;
4763 conshdlrdata->objothervarsonly =
FALSE;
4764 conshdlrdata->minabsobj = 0.0;
4765 conshdlrdata->normtype =
'e';
4766 conshdlrdata->niiscutsgen = 0;
4767 conshdlrdata->nperspcutsgen = 0;
4792 int maxabsvalidx = -1;
4795 assert( scip !=
NULL );
4796 assert( upgdcons !=
NULL );
4810 assert( conshdlr !=
NULL );
4812 assert( conshdlrdata !=
NULL );
4814 if ( ! conshdlrdata->upgradelinear )
4818 for (j = 0; j < nvars; ++j)
4829 assert( var !=
NULL );
4834 secabsval = maxabsval;
4856 minactivity += val * lb;
4865 maxactivity += val * ub;
4868 assert( maxabsval >= 0.0 );
4869 assert( 0 <= maxabsvalidx && maxabsvalidx < nvars );
4876 if (
SCIPisEQ(scip, secabsval, maxabsval) )
4884 for (j = 0; j < nvars; ++j)
4907 if (
SCIPisGE(scip, minactivity, lhs) )
4911 if (
SCIPisGE(scip, minactivity + indval, lhs) )
4922 if (
SCIPisLE(scip, maxactivity, rhs) )
4929 if (
SCIPisLE(scip, maxactivity - indval, rhs) )
4934 if ( upgdlhs || upgdrhs )
4940 assert( ! upgdlhs || ! upgdrhs );
4947 for (l = 0; l < nvars; ++l)
4949 if ( vars[l] == indvar )
4951 indconsvars[cnt] = vars[l];
4953 indconsvals[cnt] = -vals[l];
4955 indconsvals[cnt] = vals[l];
4959 if ( indneglhs || indnegrhs )
5012 assert( scip !=
NULL );
5013 assert( conshdlr !=
NULL );
5015 assert( valid !=
NULL );
5032 assert( scip !=
NULL );
5033 assert( conshdlr !=
NULL );
5037 assert( conshdlrdata !=
NULL );
5042 if ( conshdlrdata->trysolutions && conshdlrdata->heurtrysol ==
NULL )
5044 conshdlrdata->heurtrysol =
SCIPfindHeur(scip,
"trysol");
5057 assert( scip !=
NULL );
5058 assert( conshdlr !=
NULL );
5063 if ( conshdlrdata->binvarhash !=
NULL )
5067 conshdlrdata->maxaddlincons = 0;
5068 conshdlrdata->naddlincons = 0;
5069 conshdlrdata->nrows = 0;
5081 assert( scip !=
NULL );
5082 assert( conshdlr !=
NULL );
5086 assert( conshdlrdata !=
NULL );
5087 assert( conshdlrdata->altlp ==
NULL );
5088 assert( conshdlrdata->varhash ==
NULL );
5089 assert( conshdlrdata->lbhash ==
NULL );
5090 assert( conshdlrdata->ubhash ==
NULL );
5091 assert( conshdlrdata->slackhash ==
NULL );
5093 if ( conshdlrdata->maxaddlincons > 0 )
5098 assert( conshdlrdata->addlincons ==
NULL );
5099 conshdlrdata->naddlincons = 0;
5100 conshdlrdata->maxaddlincons = 0;
5115 assert( scip !=
NULL );
5116 assert( conshdlr !=
NULL );
5123 SCIPdebugMsg(scip,
"Initsol for indicator constraints.\n");
5126 assert( conshdlrdata !=
NULL );
5127 assert( conshdlrdata->slackhash ==
NULL );
5131 if ( conshdlrdata->sepaalternativelp )
5135 assert( conshdlrdata->slackhash !=
NULL );
5138 for (c = 0; c < nconss; ++c)
5142 assert( conss !=
NULL );
5143 assert( conss[c] !=
NULL );
5147 assert( consdata !=
NULL );
5149 assert( consdata->slackvar !=
NULL );
5154 ++conshdlrdata->nslackvars;
5157 if ( conshdlrdata->genlogicor )
5160 int logicorsepafreq;
5165 if ( logicorconshdlr ==
NULL )
5167 SCIPerrorMessage(
"Logicor constraint handler not included, cannot generate constraints.\n");
5172 if ( sepafreq != -1 && ((logicorsepafreq == 0 && sepafreq > 0) || sepafreq < logicorsepafreq) )
5181 conshdlrdata->objothervarsonly =
TRUE;
5182 for (c = 0; c < nconss; ++c)
5186 assert( conss !=
NULL );
5187 assert( conss[c] !=
NULL );
5191 assert( consdata !=
NULL );
5192 assert( consdata->binvar !=
NULL );
5193 assert( consdata->slackvar !=
NULL );
5198 conshdlrdata->objothervarsonly =
FALSE;
5201 if ( ! consdata->linconsactive )
5208 if ( conshdlrdata->sepaalternativelp && consdata->colindex < 0 )
5211 SCIPdebugMsg(scip,
"Added column for <%s> to alternative LP with column index %d.\n",
SCIPconsGetName(conss[c]),consdata->colindex);
5231 quadvars[0] = consdata->binvar;
5232 quadvars[1] = consdata->slackvar;
5235 quadelem.
coef = 1.0;
5237 SCIP_CALL(
SCIPcreateNlRow(scip, &nlrow,
SCIPconsGetName(conss[c]), 0.0, 0,
NULL,
NULL, 2, quadvars, 1,
5246 SCIPdebugMsg(scip,
"Initialized %d indicator constraints.\n", nconss);
5249 if ( conshdlrdata->sepaalternativelp )
5256 if ( conshdlrdata->naddlincons > 0 )
5258 for (c = 0; c < conshdlrdata->naddlincons; ++c)
5260 cons = conshdlrdata->addlincons[c];
5279 SCIPdebugMsg(scip,
"Added %d additional columns to alternative LP.\n", cnt);
5286 if ( conshdlrdata->useotherconss )
5288 const char* conshdlrname;
5296 for (c = 0; c < nallconss; ++c)
5300 assert( cons !=
NULL );
5307 if ( strcmp(conshdlrname,
"linear") == 0 )
5313 SCIPdebugMsg(scip,
"Added column for linear constraint <%s> to alternative LP with column index %d.\n",
SCIPconsGetName(cons), colindex);
5318 SCIPdebugMsg(scip,
"Added %d additional columns from linear constraints to alternative LP.\n", cnt);
5324 if ( conshdlrdata->forcerestart )
5331 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5337 conshdlrdata->nbinvarszero = 0;
5343 conshdlrdata->objindicatoronly =
FALSE;
5348 for (j = 0; j < nvars; ++j)
5352 for (c = 0; c < nconss; ++c)
5357 assert( conss !=
NULL );
5358 assert( conss[c] !=
NULL );
5365 assert( consdata !=
NULL );
5366 assert( consdata->binvar !=
NULL );
5377 if ( probindex < 0 )
5380 assert( 0 <= probindex && probindex < nvars );
5381 covered[probindex] =
TRUE;
5385 for (j = 0; j < nvars; ++j)
5396 if (
REALABS(obj) < conshdlrdata->minabsobj )
5397 conshdlrdata->minabsobj =
REALABS(obj);
5408 assert(
SCIPisGE(scip, conshdlrdata->minabsobj, 1.0) );
5410 conshdlrdata->objindicatoronly =
TRUE;
5412 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5431 assert( scip !=
NULL );
5432 assert( conshdlr !=
NULL );
5436 assert( conshdlrdata !=
NULL );
5438 if ( conshdlrdata->sepaalternativelp )
5440 if ( conshdlrdata->slackhash !=
NULL )
5449 if ( conshdlrdata->altlp !=
NULL )
5451 assert( conshdlrdata->varhash !=
NULL );
5452 assert( conshdlrdata->lbhash !=
NULL );
5453 assert( conshdlrdata->ubhash !=
NULL );
5471 for (c = 0; c < nconss; ++c)
5475 assert( conss !=
NULL );
5476 assert( conss[c] !=
NULL );
5479 assert( consdata !=
NULL );
5480 consdata->colindex = -1;
5486 assert( conshdlrdata->slackhash ==
NULL );
5487 assert( conshdlrdata->varhash ==
NULL );
5488 assert( conshdlrdata->lbhash ==
NULL );
5489 assert( conshdlrdata->ubhash ==
NULL );
5500 assert( scip !=
NULL );
5501 assert( conshdlr !=
NULL );
5502 assert( cons !=
NULL );
5503 assert( consdata !=
NULL );
5506 #ifdef SCIP_MORE_DEBUG 5517 assert( conshdlrdata !=
NULL );
5519 if ( conshdlrdata->sepaalternativelp )
5524 assert( (*consdata)->slackvar !=
NULL );
5525 assert( (*consdata)->binvar !=
NULL );
5530 if ( (*consdata)->linconsactive )
5532 assert( conshdlrdata->eventhdlrbound !=
NULL );
5538 if ( conshdlrdata->forcerestart )
5540 assert( conshdlrdata->eventhdlrrestart !=
NULL );
5548 assert( (*consdata)->lincons !=
NULL );
5569 assert( scip !=
NULL );
5570 assert( conshdlr !=
NULL );
5572 assert( sourcecons !=
NULL );
5573 assert( targetcons !=
NULL );
5577 assert( conshdlrdata !=
NULL );
5578 assert( conshdlrdata->eventhdlrbound !=
NULL );
5580 #ifdef SCIP_MORE_DEBUG 5586 assert( sourcedata !=
NULL );
5587 assert( sourcedata->binvar !=
NULL );
5590 if ( sourcedata->slackvar ==
NULL )
5597 if ( sourcedata->lincons ==
NULL )
5602 assert( sourcedata->lincons !=
NULL );
5603 assert( sourcedata->slackvar !=
NULL );
5608 conshdlrdata->eventhdlrrestart, sourcedata->binvar, sourcedata->slackvar, sourcedata->lincons, sourcedata->linconsactive) );
5609 assert( consdata !=
NULL );
5621 if ( conshdlrdata->sepaalternativelp )
5623 if ( conshdlrdata->binvarhash ==
NULL )
5629 assert( conshdlrdata->binvarhash !=
NULL );
5647 assert( scip !=
NULL );
5648 assert( conshdlr !=
NULL );
5654 SCIPdebugMsg(scip,
"Initpre method for indicator constraints.\n");
5657 for (c = 0; c < nconss; ++c)
5661 assert( conss !=
NULL );
5662 assert( conss[c] !=
NULL );
5666 assert( consdata !=
NULL );
5669 assert( consdata->lincons !=
NULL );
5678 assert( translincons !=
NULL );
5682 consdata->lincons = translincons;
5687 assert( conshdlrdata !=
NULL );
5690 conshdlrdata->addedcouplingcons =
FALSE;
5714 int removedvars = 0;
5717 assert( scip !=
NULL );
5718 assert( conshdlr !=
NULL );
5720 assert( result !=
NULL );
5723 SCIPdebug( oldnfixedvars = *nfixedvars; )
5727 assert( conshdlrdata !=
NULL );
5729 SCIPdebugMsg(scip,
"Presolving indicator constraints.\n");
5732 if ( nrounds == 0 || nnewfixedvars > 0 || nnewchgbds > 0 || nnewaggrvars > 0 )
5737 for (c = 0; c < nconss; ++c)
5744 assert( conss !=
NULL );
5745 assert( conss[c] !=
NULL );
5748 assert( consdata !=
NULL );
5749 assert( consdata->binvar !=
NULL );
5752 #ifdef SCIP_MORE_DEBUG 5757 if ( ! consdata->linconsactive )
5760 assert( consdata->lincons !=
NULL );
5761 assert( consdata->slackvar !=
NULL );
5766 if ( ! consdata->implicationadded )
5775 consdata->implicationadded =
TRUE;
5784 if ( ! consdata->slacktypechecked )
5786 consdata->slacktypechecked =
TRUE;
5797 assert( consdata->lincons !=
NULL );
5801 slackvar = consdata->slackvar;
5802 assert( slackvar !=
NULL );
5804 for (j = 0; j < nvars; ++j)
5806 if ( vars[j] == slackvar )
5807 foundslackvar =
TRUE;
5815 if ( j == nvars && foundslackvar )
5833 SCIPdebugMsg(scip,
"Cannot change type of slack variable (<%s>) to IMPLINT, since global bound is non-integral: (%g, %g).\n",
5842 conshdlrdata->dualreductions &&
SCIPallowDualReds(scip), &cutoff, &success, ndelconss, nfixedvars) );
5855 noReductions = nnewfixedvars == 0 && nnewaggrvars == 0 && nnewchgvartypes == 0 && nnewchgbds == 0
5856 && nnewdelconss == 0 && nnewchgcoefs == 0 && nnewchgsides == 0;
5859 if ( noReductions && *result !=
SCIP_SUCCESS && conshdlrdata->addcouplingcons && ! conshdlrdata->addedcouplingcons )
5869 *nupgdconss += ngen;
5870 if ( conshdlrdata->removeindicators )
5873 conshdlrdata->addedcouplingcons =
TRUE;
5876 SCIPdebugMsg(scip,
"Presolved %d constraints (fixed %d variables, removed %d variables, and deleted %d constraints).\n",
5877 nconss, *nfixedvars - oldnfixedvars, removedvars, *ndelconss - oldndelconss);
5895 assert( scip !=
NULL );
5896 assert( conshdlr !=
NULL );
5900 assert( conshdlrdata !=
NULL );
5902 *infeasible =
FALSE;
5905 if ( ! conshdlrdata->addcoupling )
5909 if ( conshdlrdata->addcouplingcons && conshdlrdata->addedcouplingcons )
5912 SCIPdebugMsg(scip,
"Handle initial rows for %d indicator constraints.\n", nconss);
5915 for (c = 0; c < nconss && !(*infeasible); ++c)
5920 assert( conss !=
NULL );
5921 assert( conss[c] !=
NULL );
5923 assert( consdata !=
NULL );
5926 if ( ! consdata->linconsactive )
5934 if ( ub <= conshdlrdata->maxcouplingvalue )
5945 if ( conshdlrdata->addcouplingcons )
5949 assert( ! conshdlrdata->addedcouplingcons );
5951 SCIPdebugMsg(scip,
"Insert coupling varbound constraint for indicator constraint <%s> (coeff: %f).\n",
SCIPconsGetName(conss[c]), ub);
5988 assert( scip !=
NULL );
5989 assert( conshdlr !=
NULL );
5990 assert( conss !=
NULL );
5992 assert( result !=
NULL );
6005 assert( scip !=
NULL );
6006 assert( conshdlr !=
NULL );
6007 assert( conss !=
NULL );
6009 assert( result !=
NULL );
6024 assert( scip !=
NULL );
6025 assert( conshdlr !=
NULL );
6026 assert( conss !=
NULL );
6028 assert( result !=
NULL );
6030 if ( solinfeasible )
6038 assert( conshdlrdata !=
NULL );
6052 assert( scip !=
NULL );
6053 assert( conshdlr !=
NULL );
6054 assert( conss !=
NULL );
6056 assert( result !=
NULL );
6058 if ( solinfeasible )
6066 assert( conshdlrdata !=
NULL );
6078 assert( scip !=
NULL );
6079 assert( conshdlr !=
NULL );
6080 assert( conss !=
NULL );
6082 assert( result !=
NULL );
6084 if ( solinfeasible )
6090 if ( objinfeasible )
6112 assert( scip !=
NULL );
6113 assert( conshdlr !=
NULL );
6114 assert( conss !=
NULL );
6116 assert( result !=
NULL );
6121 assert( conshdlrdata !=
NULL );
6127 assert( trysol !=
NULL );
6133 someLinconsNotActive =
FALSE;
6134 for (c = 0; c < nconss; ++c)
6138 assert( conss[c] !=
NULL );
6140 assert( consdata !=
NULL );
6141 assert( consdata->binvar !=
NULL );
6144 if ( ! consdata->linconsactive )
6146 someLinconsNotActive =
TRUE;
6150 assert( consdata->slackvar !=
NULL );
6170 if ( trysol !=
NULL )
6174 changedSol = changedSol || changed;
6186 if ( trysol !=
NULL )
6190 changedSol = changedSol || changed;
6196 if ( someLinconsNotActive )
6203 lp = conshdlrdata->altlp;
6204 assert( conshdlrdata->sepaalternativelp );
6214 if ( conshdlrdata->updatebounds )
6228 for (c = 0; c < nconss; ++c)
6232 assert( conss[c] !=
NULL );
6234 assert( consdata !=
NULL );
6273 if ( trysol !=
NULL && changedSol )
6275 assert( conshdlrdata->heurtrysol !=
NULL );
6280 if ( trysol !=
NULL )
6285 SCIPdebugMsg(scip,
"Indicator constraints are not feasible.\n");
6290 SCIPdebugMsg(scip,
"Indicator constraints are feasible.\n");
6304 assert( scip !=
NULL );
6305 assert( conshdlr !=
NULL );
6306 assert( conss !=
NULL );
6308 assert( result !=
NULL );
6318 assert( conshdlrdata !=
NULL );
6321 for (c = 0; c < nconss; ++c)
6329 assert( conss[c] !=
NULL );
6332 assert( consdata !=
NULL );
6334 #ifdef SCIP_MORE_DEBUG 6341 conshdlrdata->addopposite, &cutoff, &cnt) );
6369 assert( scip !=
NULL );
6370 assert( cons !=
NULL );
6372 assert( infervar !=
NULL );
6373 assert( bdchgidx !=
NULL );
6374 assert( result !=
NULL );
6380 assert( consdata !=
NULL );
6381 assert( inferinfo == 0 || inferinfo == 1 || inferinfo == 2 );
6382 assert( consdata->linconsactive );
6385 if ( inferinfo == 0 )
6388 assert( infervar != consdata->binvar );
6392 else if ( inferinfo == 1 )
6395 assert( infervar != consdata->slackvar );
6403 assert( inferinfo == 2 );
6425 assert( scip !=
NULL );
6426 assert( conshdlr !=
NULL );
6427 assert( cons !=
NULL );
6430 assert( consdata !=
NULL );
6431 assert( consdata->binvar !=
NULL );
6433 #ifdef SCIP_MORE_DEBUG 6439 if ( consdata->linconsactive )
6441 assert( consdata->slackvar !=
NULL );
6453 assert( consdata->lincons !=
NULL );
6454 assert( consdata->slackvar ==
NULL );
6462 for (j = 0; j < nlinvars; ++j)
6502 assert( scip !=
NULL );
6503 assert( conshdlr !=
NULL );
6504 assert( cons !=
NULL );
6508 assert( consdata !=
NULL );
6509 assert( consdata->binvar !=
NULL );
6511 binvar = consdata->binvar;
6520 assert( consdata->slackvar !=
NULL );
6521 assert( consdata->lincons !=
NULL );
6538 const char* consname;
6540 assert( scip !=
NULL );
6541 assert( sourcescip !=
NULL );
6542 assert( sourcecons !=
NULL );
6552 #ifdef SCIP_MORE_DEBUG 6553 SCIPdebugMsg(scip,
"Copying indicator constraint <%s> ...\n", consname);
6564 assert( sourceconsdata !=
NULL );
6567 sourcelincons = sourceconsdata->lincons;
6572 SCIPdebugMsg(scip,
"Linear constraint <%s> deleted! Create empty linear constraint.\n",
SCIPconsGetName(sourceconsdata->lincons));
6581 assert( sourcelincons !=
NULL );
6583 assert( conshdlrlinear !=
NULL );
6593 assert( translincons !=
NULL );
6596 sourceconsdata->lincons = translincons;
6597 sourcelincons = translincons;
6611 sourcebinvar = sourceconsdata->binvar;
6612 assert( sourcebinvar !=
NULL );
6622 sourceslackvar = sourceconsdata->slackvar;
6623 assert( sourceslackvar !=
NULL );
6625 SCIP_CALL(
SCIPgetVarCopy(sourcescip, scip, sourceslackvar, &targetslackvar, varmap, consmap, global, valid) );
6631 assert( targetlincons !=
NULL );
6632 assert( targetbinvar !=
NULL );
6633 assert( targetslackvar !=
NULL );
6637 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
6645 if ( targetlincons !=
NULL )
6658 char binvarname[1024];
6659 char slackvarname[1024];
6670 nargs = sscanf(str,
" <%1023[^>]> = %d -> <%1023[^>]> = 0", binvarname, &zeroone, slackvarname);
6679 if ( zeroone != 0 && zeroone != 1 )
6688 if ( binvar ==
NULL )
6700 if ( slackvar ==
NULL )
6708 posstr = strstr(slackvarname,
"indslack");
6709 if ( posstr ==
NULL )
6717 (void)
SCIPsnprintf(binvarname, 1023,
"indlin%s", posstr+8);
6720 if ( lincons ==
NULL )
6726 if ( lincons ==
NULL )
6729 name, binvarname, binvarname);
6745 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
6758 assert( scip !=
NULL );
6759 assert( conshdlr !=
NULL );
6760 assert( cons !=
NULL );
6763 #ifdef SCIP_MORE_DEBUG 6768 assert( conshdlrdata !=
NULL );
6771 assert( consdata !=
NULL );
6773 if ( conshdlrdata->altlp !=
NULL )
6775 assert( conshdlrdata->sepaalternativelp );
6777 if ( consdata->colindex >= 0 )
6793 assert( scip !=
NULL );
6794 assert( conshdlr !=
NULL );
6795 assert( cons !=
NULL );
6798 #ifdef SCIP_MORE_DEBUG 6803 assert( conshdlrdata !=
NULL );
6805 if ( conshdlrdata->altlp !=
NULL )
6810 assert( consdata !=
NULL );
6811 assert( conshdlrdata->sepaalternativelp );
6813 if ( consdata->colindex >= 0 )
6830 assert( scip !=
NULL );
6831 assert( cons !=
NULL );
6832 assert( vars !=
NULL );
6833 assert( varssize >= 0 );
6834 assert( success !=
NULL );
6846 assert( consdata !=
NULL );
6847 assert( consdata->lincons !=
NULL );
6849 if ( consdata->binvar !=
NULL )
6851 assert( varssize > 0 );
6852 vars[nvars++] = consdata->binvar;
6854 if ( consdata->slackvar !=
NULL )
6856 assert( varssize > nvars );
6857 vars[nvars++] = consdata->slackvar;
6877 assert( scip !=
NULL );
6878 assert( cons !=
NULL );
6879 assert( nvars !=
NULL );
6880 assert( success !=
NULL );
6890 assert( consdata !=
NULL );
6891 assert( consdata->lincons !=
NULL );
6893 if ( consdata->binvar !=
NULL )
6895 if ( consdata->slackvar !=
NULL )
6906 assert( nlinvars >= 0 );
6925 assert(scip !=
NULL);
6926 assert(conshdlr !=
NULL);
6928 assert(diveset !=
NULL);
6929 assert(success !=
NULL);
6930 assert(infeasible !=
NULL);
6933 *infeasible =
FALSE;
6939 for (c = 0; c < nindconss; ++c)
6957 &score, &roundup) );
6960 if( score > bestscore )
6965 bestvarroundup = roundup;
6971 assert(! *success || bestvar !=
NULL);
6999 conshdlrdata->eventhdlrbound =
NULL;
7001 eventExecIndicatorBound,
NULL) );
7002 assert(conshdlrdata->eventhdlrbound !=
NULL);
7005 conshdlrdata->eventhdlrrestart =
NULL;
7007 eventExecIndicatorRestart,
NULL) );
7008 assert( conshdlrdata->eventhdlrrestart !=
NULL );
7010 conshdlrdata->heurtrysol =
NULL;
7014 conshdlrdata->binvarhash =
NULL;
7022 conshdlrdata->addlincons =
NULL;
7023 conshdlrdata->naddlincons = 0;
7024 conshdlrdata->maxaddlincons = 0;
7029 consEnfolpIndicator, consEnfopsIndicator, consCheckIndicator, consLockIndicator,
7032 assert( conshdlr !=
NULL );
7069 conflicthdlrdata->conshdlrdata = conshdlrdata;
7070 conflicthdlrdata->conshdlr = conshdlr;
7071 assert( conflicthdlrdata->conshdlr !=
NULL );
7075 conflictExecIndicator, conflicthdlrdata) );
7081 "constraints/indicator/branchindicators",
7082 "Branch on indicator constraints in enforcing?",
7086 "constraints/indicator/genlogicor",
7087 "Generate logicor constraints instead of cuts?",
7091 "constraints/indicator/addcoupling",
7092 "Add coupling constraints or rows if big-M is small enough?",
7096 "constraints/indicator/maxcouplingvalue",
7097 "maximum coefficient for binary variable in coupling constraint",
7101 "constraints/indicator/addcouplingcons",
7102 "Add initial variable upper bound constraints, if 'addcoupling' is true?",
7106 "constraints/indicator/sepacouplingcuts",
7107 "Should the coupling inequalities be separated dynamically?",
7111 "constraints/indicator/sepacouplinglocal",
7112 "Allow to use local bounds in order to separate coupling inequalities?",
7116 "constraints/indicator/sepacouplingvalue",
7117 "maximum coefficient for binary variable in separated coupling constraint",
7121 "constraints/indicator/sepaperspective",
7122 "Separate cuts based on perspective formulation?",
7126 "constraints/indicator/sepapersplocal",
7127 "Allow to use local bounds in order to separate perspective cuts?",
7131 "constraints/indicator/updatebounds",
7132 "Update bounds of original variables for separation?",
7136 "constraints/indicator/maxconditionaltlp",
7137 "maximum estimated condition of the solution basis matrix of the alternative LP to be trustworthy (0.0 to disable check)",
7141 "constraints/indicator/maxsepacuts",
7142 "maximal number of cuts separated per separation round",
7146 "constraints/indicator/maxsepacutsroot",
7147 "maximal number of cuts separated per separation round in the root node",
7151 "constraints/indicator/removeindicators",
7152 "Remove indicator constraint if corresponding variable bound constraint has been added?",
7156 "constraints/indicator/generatebilinear",
7157 "Do not generate indicator constraint, but a bilinear constraint instead?",
7161 "constraints/indicator/scaleslackvar",
7162 "Scale slack variable coefficient at construction time?",
7166 "constraints/indicator/trysolutions",
7167 "Try to make solutions feasible by setting indicator variables?",
7171 "constraints/indicator/enforcecuts",
7172 "In enforcing try to generate cuts (only if sepaalternativelp is true)?",
7176 "constraints/indicator/dualreductions",
7177 "Should dual reduction steps be performed?",
7181 "constraints/indicator/addopposite",
7182 "Add opposite inequality in nodes in which the binary variable has been fixed to 0?",
7186 "constraints/indicator/conflictsupgrade",
7187 "Try to upgrade bounddisjunction conflicts by replacing slack variables?",
7191 "constraints/indicator/restartfrac",
7192 "fraction of binary variables that need to be fixed before restart occurs (in forcerestart)",
7196 "constraints/indicator/useotherconss",
7197 "Collect other constraints to alternative LP?",
7201 "constraints/indicator/useobjectivecut",
7202 "Use objective cut with current best solution to alternative LP?",
7206 "constraints/indicator/trysolfromcover",
7207 "Try to construct a feasible solution from a cover?",
7211 "constraints/indicator/upgradelinear",
7212 "Try to upgrade linear constraints to indicator constraints?",
7217 "constraints/indicator/sepaalternativelp",
7218 "Separate using the alternative LP?",
7222 "constraints/indicator/forcerestart",
7223 "Force restart if absolute gap is 1 or enough binary variables have been fixed?",
7227 "constraints/indicator/nolinconscont",
7228 "Decompose problem (do not generate linear constraint if all variables are continuous)?",
7286 SCIPerrorMessage(
"Indicator constraint <%s> needs nonnegative number of variables in linear constraint.\n", name);
7292 if ( conshdlr ==
NULL )
7299 assert( conshdlrdata !=
NULL );
7301 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
7303 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
7307 if ( conshdlrdata->nolinconscont && conshdlrdata->generatebilinear )
7315 for (j = 0; j < nvars; ++j)
7317 if ( conshdlrdata->scaleslackvar )
7318 absvalsum +=
REALABS(vals[j]);
7322 if ( ! conshdlrdata->scaleslackvar )
7338 linconsactive =
TRUE;
7339 if ( conshdlrdata->nolinconscont )
7343 assert( ! conshdlrdata->generatebilinear );
7346 for (j = 0; j < nvars; ++j)
7359 linconsactive =
FALSE;
7366 if ( linconsactive )
7384 if ( conshdlrdata->scaleslackvar && nvars > 0 )
7386 absvalsum = absvalsum/((
SCIP_Real) nvars);
7388 absvalsum =
SCIPceil(scip, absvalsum);
7400 if ( conshdlrdata->generatebilinear )
7405 SCIP_CALL(
SCIPcreateConsQuadratic(scip, cons, name, 0,
NULL,
NULL, 1, &binvar, &slackvar, &val, 0.0, 0.0,
7412 SCIP_CALL(
consdataCreate(scip, conshdlr, conshdlrdata, name, &consdata, conshdlrdata->eventhdlrbound, conshdlrdata->eventhdlrrestart,
7413 binvar, slackvar, lincons, linconsactive) );
7414 assert( consdata !=
NULL );
7417 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
7418 local, modifiable, dynamic, removable, stickingatnode) );
7423 if ( conshdlrdata->sepaalternativelp )
7425 if ( conshdlrdata->binvarhash ==
NULL )
7431 assert( conshdlrdata->binvarhash !=
NULL );
7466 assert( scip !=
NULL );
7518 assert( scip !=
NULL );
7519 assert( lincons !=
NULL );
7520 assert( slackvar !=
NULL );
7532 if ( conshdlr ==
NULL )
7539 assert( conshdlrdata !=
NULL );
7541 if ( conshdlrdata->nolinconscont && ! conshdlrdata->sepaalternativelp )
7543 SCIPerrorMessage(
"constraint handler <%s>: need parameter <sepaalternativelp> to be true if parameter <nolinconscont> is true.\n",
CONSHDLR_NAME);
7551 if ( conshdlrdata->nolinconscont )
7562 for (v = 0; v < nvars; ++v)
7575 linconsactive =
FALSE;
7583 if ( conshdlrdata->generatebilinear )
7588 SCIP_CALL(
SCIPcreateConsQuadratic(scip, cons, name, 0,
NULL,
NULL, 1, &binvar, &slackvar, &val, 0.0, 0.0,
7594 SCIP_CALL(
consdataCreate(scip, conshdlr, conshdlrdata, name, &consdata, conshdlrdata->eventhdlrbound, conshdlrdata->eventhdlrrestart,
7595 binvar, slackvar, lincons, linconsactive) );
7596 assert( consdata !=
NULL );
7599 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
7600 local, modifiable, dynamic, removable, stickingatnode) );
7631 assert( scip !=
NULL );
7650 assert( cons !=
NULL );
7654 assert( consdata !=
NULL );
7664 assert( ! infeasible );
7678 assert( cons !=
NULL );
7682 assert( consdata !=
NULL );
7684 return consdata->lincons;
7705 assert( cons !=
NULL );
7710 assert( conshdlrdata !=
NULL );
7713 assert( consdata !=
NULL );
7716 assert( consdata->lincons !=
NULL );
7720 assert( lincons !=
NULL );
7721 consdata->lincons = lincons;
7722 consdata->linconsactive =
TRUE;
7726 if ( conshdlrdata->nolinconscont )
7736 assert( vars !=
NULL );
7739 for (v = 0; v < nvars; ++v)
7752 consdata->linconsactive =
FALSE;
7766 assert( cons !=
NULL );
7770 assert( consdata !=
NULL );
7772 return consdata->binvar;
7785 assert( cons !=
NULL );
7786 assert( binvar !=
NULL );
7790 assert( consdata !=
NULL );
7800 if ( consdata->binvar !=
NULL )
7816 assert( var !=
NULL );
7817 consdata->binvar = var;
7820 assert( conshdlr !=
NULL );
7823 assert( conshdlrdata !=
NULL );
7824 assert( conshdlrdata->eventhdlrbound !=
NULL );
7825 assert( conshdlrdata->eventhdlrrestart !=
NULL );
7828 if ( consdata->linconsactive )
7834 if ( conshdlrdata->forcerestart )
7841 ++(consdata->nfixednonzero);
7844 consdata->binvar = binvar;
7857 assert( cons !=
NULL );
7861 assert( consdata !=
NULL );
7863 return consdata->slackvar;
7876 assert( cons !=
NULL );
7883 assert( consdata !=
NULL );
7885 if ( consdata->linconsactive )
7887 assert( consdata->slackvar !=
NULL );
7888 assert( consdata->binvar !=
NULL );
7943 assert( cons !=
NULL );
7945 assert( sol !=
NULL );
7946 assert( changed !=
NULL );
7954 assert( cons !=
NULL );
7956 assert( consdata !=
NULL );
7959 if ( ! consdata->linconsactive )
7962 lincons = consdata->lincons;
7963 assert( lincons !=
NULL );
7968 slackvar = consdata->slackvar;
7969 binvar = consdata->binvar;
7970 assert( slackvar !=
NULL );
7971 assert( binvar !=
NULL );
7980 for (v = 0; v < nlinvars; ++v)
7984 if ( var != slackvar )
7987 slackcoef = linvals[v];
7995 assert( slackcoef != 0.0 );
8008 val = (val - sum)/slackcoef;
8011 if ( slackcoef < 0 )
8108 assert( conshdlr !=
NULL );
8110 assert( sol !=
NULL );
8111 assert( changed !=
NULL );
8122 for (c = 0; c < nconss; ++c)
8126 assert( conss[c] !=
NULL );
8129 assert( consdata !=
NULL );
8132 if ( ! consdata->linconsactive )
8136 *changed = *changed || chg;
8150 assert( scip !=
NULL );
8152 assert( lincons !=
NULL );
8160 assert( conshdlrdata !=
NULL );
8163 assert( conshdlrdata->naddlincons+1 <= conshdlrdata->maxaddlincons );
8165 conshdlrdata->addlincons[conshdlrdata->naddlincons++] = lincons;
8182 assert( scip !=
NULL );
8184 assert( row !=
NULL );
8193 assert( conshdlrdata !=
NULL );
8196 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_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)