74#include "scip/cons_eqknapsack.h"
78#define CONSHDLR_NAME "pseudoboolean"
79#define CONSHDLR_DESC "constraint handler dealing with pseudo Boolean constraints"
80#define CONSHDLR_ENFOPRIORITY -1000000
81#define CONSHDLR_CHECKPRIORITY -5000000
82#define CONSHDLR_EAGERFREQ 100
84#define CONSHDLR_MAXPREROUNDS -1
85#define CONSHDLR_NEEDSCONS TRUE
87#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM
89#define DEFAULT_DECOMPOSENORMALPBCONS FALSE
90#define DEFAULT_DECOMPOSEINDICATORPBCONS TRUE
92#define DEFAULT_SEPARATENONLINEAR TRUE
93#define DEFAULT_PROPAGATENONLINEAR TRUE
94#define DEFAULT_REMOVABLENONLINEAR TRUE
95#define USEINDICATOR TRUE
96#define NONLINCONSUPGD_PRIORITY 60000
99#undef NONLINCONSUPGD_PRIORITY
104#define HASHSIZE_PSEUDOBOOLEANNONLINEARTERMS 500
203 unsigned int issoftcons:1;
204 unsigned int changed:1;
205 unsigned int propagated:1;
206 unsigned int presolved:1;
207 unsigned int cliquesadded:1;
208 unsigned int upgradetried:1;
212struct SCIP_ConshdlrData
216 int nallconsanddatas;
218 int sallconsanddatas;
226 SCIP_Bool decomposenormalpbcons;
227 SCIP_Bool decomposeindicatorpbcons;
338 for( v = cdata1->
nvars - 1; v > 0; --v )
341 for( v = cdata2->
nvars - 1; v > 0; --v )
354 for( v = cdata1->
nvars - 1; v >= 0; --v )
360 if( cdata1->
vars[v] != cdata2->
vars[v] )
390 for( v = cdata->
nvars - 1; v > 0; --v )
398 assert(minidx >= 0 && minidx <= maxidx);
412 if( ((*conshdlrdata)->inithashmapandtable) )
426 hashGetKeyAndConsDatas, hashKeyEqAndConsDatas, hashKeyValAndConsDatas, (
void*)
scip) );
432 (*conshdlrdata)->inithashmapandtable =
TRUE;
449 (*conshdlrdata)->allconsanddatas =
NULL;
450 (*conshdlrdata)->nallconsanddatas = 0;
451 (*conshdlrdata)->sallconsanddatas = 10;
456 (*conshdlrdata)->inithashmapandtable =
FALSE;
457 (*conshdlrdata)->hashtable =
NULL;
458 (*conshdlrdata)->hashtablesize = 0;
459 (*conshdlrdata)->hashmap =
NULL;
460 (*conshdlrdata)->hashmapsize = 0;
463 (*conshdlrdata)->nlinconss = 0;
466 (*conshdlrdata)->noriguses = 0;
482 assert((*conshdlrdata)->nallconsanddatas == 0);
485 if( (*conshdlrdata)->inithashmapandtable )
488 (*conshdlrdata)->hashmapsize = 0;
490 (*conshdlrdata)->hashtablesize = 0;
497 (*conshdlrdata)->inithashmapandtable =
FALSE;
502 (*conshdlrdata)->allconsanddatas =
NULL;
503 (*conshdlrdata)->nallconsanddatas = 0;
504 (*conshdlrdata)->sallconsanddatas = 0;
540 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
541 *
nvars = SCIPgetNVarsEQKnapsack(
scip, cons);
603 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
604 *lhs = SCIPgetCapacityEQKnapsack(
scip, cons);
624 SCIP_Real*
const coefs,
650 for( v = 0; v < *
nvars; ++v )
652 vars[v] = linvars[v];
653 coefs[v] = lincoefs[v];
658 for( v = 0; v < *
nvars; ++v )
659 vars[v] = linvars[v];
671 for( v = 0; v < *
nvars; ++v )
673 vars[v] = linvars[v];
679 for( v = 0; v < *
nvars; ++v )
680 vars[v] = linvars[v];
686 SCIP_Longint* weights;
696 for( v = 0; v < *
nvars; ++v )
698 vars[v] = linvars[v];
704 for( v = 0; v < *
nvars; ++v )
705 vars[v] = linvars[v];
717 for( v = 0; v < *
nvars; ++v )
719 vars[v] = linvars[v];
725 for( v = 0; v < *
nvars; ++v )
726 vars[v] = linvars[v];
731 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
733 SCIP_Longint* weights;
735 *
nvars = SCIPgetNVarsEQKnapsack(
scip, cons);
736 linvars = SCIPgetVarsEQKnapsack(
scip, cons);
741 weights = SCIPgetWeightsEQKnapsack(
scip, cons);
743 for( v = 0; v < *
nvars; ++v )
745 vars[v] = linvars[v];
751 for( v = 0; v < *
nvars; ++v )
752 vars[v] = linvars[v];
786 SCIP_Real*
const coefs,
789 SCIP_Real*
const lincoefs,
793 SCIP_Real*
const andcoefs,
795 SCIP_Bool*
const andnegs,
813 if( nlinvars !=
NULL )
815 if( nandress !=
NULL )
830 for( v =
nvars - 1; v > 0; --v )
835 for( v = 0; v <
nvars; ++v )
837 SCIP_Bool hashmapentryexists;
847 hashmapentryexists =
SCIPhashmapExists(conshdlrdata->hashmap, (
void*)(hashmapvar));
850 hashmapvar =
vars[v];
855 if( hashmapentryexists )
864 if( hashmapentryexists )
872 if( !hashmapentryexists && linvars !=
NULL && nlinvars !=
NULL )
874 linvars[*nlinvars] =
vars[v];
875 if( lincoefs !=
NULL )
878 lincoefs[*nlinvars] = coefs[v];
882 else if( hashmapentryexists && nandress !=
NULL )
884 if( andress !=
NULL )
886 andress[*nandress] = hashmapvar;
888 if( andcoefs !=
NULL )
892 andcoefs[*nandress] = coefs[v];
893 andnegs[*nandress] = (
vars[v] != hashmapvar);
901 if( andress !=
NULL && nandress !=
NULL )
904 if( andcoefs !=
NULL )
911 SCIPsortPtr((
void**)andress, SCIPvarComp, *nandress);
919#ifdef CHECK_CONSISTENCY
938 SCIP_Bool* alreadyfound;
959 assert(consdata->nconsanddatas > 0);
960 assert(consdata->nconsanddatas <= consdata->sconsanddatas);
972 assert(
nvars == consdata->nlinvars + consdata->nconsanddatas);
990 andress, andcoefs, andnegs, &nandress) );
991 assert(nlinvars == consdata->nlinvars);
992 assert(nandress == consdata->nconsanddatas);
994 for( v = nandress - 1; v >= 0; --v )
996 SCIP_VAR* andresultant = andress[v];
999 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
1002 if( consdata->consanddatas[
c]->cons !=
NULL )
1007 if( res == andresultant && consdata->andnegs[
c] == andnegs[v] && consdata->andcoefs[
c] == andcoefs[v] )
1014 alreadyfound[
c] =
TRUE;
1023 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
1039#define checkConsConsistency(scip, cons)
1064 tmpvars = consanddata->
vars;
1065 ntmpvars = consanddata->
nvars;
1068 for( v = ntmpvars - 1; v >= 0; --v )
1078 tmpvars = consanddata->
newvars;
1082 for( v = ntmpvars - 1; v >= 0; --v )
1093 if( !origdata || consanddata->
nvars == 0 )
1098 consanddata->
nuses = 0;
1099 consanddata->
nvars = 0;
1100 consanddata->
svars = 0;
1115 if( consanddata->
nvars > 0 )
1126 if( conshdlrdata->inithashmapandtable )
1158 if( conshdlrdata->inithashmapandtable )
1185 SCIP_Real*
const andcoefs,
1186 SCIP_Bool*
const andnegs,
1187 int const nandconss,
1189 SCIP_Real
const weight,
1190 SCIP_Bool
const issoftcons,
1197 SCIP_Bool transforming
1200 SCIP_Bool transformed;
1207 assert(nandconss == 0 || (andconss !=
NULL && andcoefs !=
NULL));
1225 SCIPerrorMessage(
"left hand side of pseudo boolean constraint greater than right hand side\n");
1236 (*consdata)->issoftcons = issoftcons;
1239 (*consdata)->weight = weight;
1245 (*consdata)->indvar = indvar;
1248 (*consdata)->indvar =
NULL;
1251 if( intvar !=
NULL )
1258 (*consdata)->intvar = intvar;
1261 (*consdata)->intvar =
NULL;
1264 (*consdata)->lincons = lincons;
1265 (*consdata)->linconstype = linconstype;
1277 if( transforming || transformed )
1287 (*consdata)->nlinvars =
nvars - nandconss;
1298 if( andnegs !=
NULL )
1306 (*consdata)->nconsanddatas = nandconss;
1307 (*consdata)->sconsanddatas = nandconss;
1317 for(
c = nandconss - 1;
c >= 0; --
c )
1326 assert((*consdata)->consanddatas[
c]->origcons == andconss[
c] || (*consdata)->consanddatas[
c]->cons == andconss[
c]);
1331 if( (*consdata)->consanddatas[
c]->origcons !=
NULL && (*consdata)->consanddatas[
c]->cons ==
NULL )
1341 assert((*consdata)->consanddatas[
c]->cons !=
NULL);
1342 assert((*consdata)->consanddatas[
c]->newvars ==
NULL);
1343 assert((*consdata)->consanddatas[
c]->isoriginal);
1345 (*consdata)->consanddatas[
c]->istransformed =
TRUE;
1347 vars = (*consdata)->consanddatas[
c]->vars;
1348 ncvars = (*consdata)->consanddatas[
c]->nvars;
1358 for( v = ncvars - 1; v >= 0; --v )
1363 else if( (*consdata)->consanddatas[
c]->cons !=
NULL )
1364 assert((*consdata)->consanddatas[
c]->istransformed);
1366 ++((*consdata)->consanddatas[
c]->nuses);
1368 else if( transformed )
1370 assert((*consdata)->consanddatas[
c]->cons == andconss[
c]);
1372 assert((*consdata)->consanddatas[
c]->istransformed);
1377 SCIPsortPtrPtrRealBool((
void**)andress, (
void**)((*consdata)->consanddatas), (*consdata)->andcoefs, (*consdata)->andnegs, SCIPvarComp, nandconss);
1384 (*consdata)->consanddatas =
NULL;
1385 (*consdata)->andcoefs =
NULL;
1386 (*consdata)->andnegs =
NULL;
1387 (*consdata)->nconsanddatas = 0;
1388 (*consdata)->sconsanddatas = 0;
1392 (*consdata)->lhs = lhs;
1393 (*consdata)->rhs = rhs;
1395 (*consdata)->changed =
TRUE;
1396 (*consdata)->propagated =
FALSE;
1397 (*consdata)->presolved =
FALSE;
1398 (*consdata)->cliquesadded =
FALSE;
1399 (*consdata)->upgradetried =
TRUE;
1408 conshdlrdata->noriguses += (*consdata)->nconsanddatas;
1430 assert((*consdata)->nconsanddatas == 0 || (*consdata)->consanddatas !=
NULL);
1434 if( (*consdata)->lincons !=
NULL )
1439 nconsanddatas = (*consdata)->nconsanddatas;
1440 consanddatas = (*consdata)->consanddatas;
1443 for(
c = nconsanddatas - 1;
c >= 0; --
c )
1445 assert((consanddatas[
c]->origcons ==
NULL) == (consanddatas[
c]->noriguses == 0));
1446 assert((consanddatas[
c]->cons ==
NULL) == (consanddatas[
c]->nuses == 0));
1447 assert(consanddatas[
c]->nuses >= 0);
1448 assert(consanddatas[
c]->noriguses >= 0);
1452 if( !isorig && consanddatas[
c]->cons !=
NULL )
1456 --(consanddatas[
c]->
nuses);
1459 if( consanddatas[
c]->nuses == 0 )
1461 if( conshdlrdata->inithashmapandtable )
1467 if( consanddatas[
c]->origcons ==
NULL )
1479 if( consanddatas[
c]->origcons ==
NULL )
1483 assert(conshdlrdata->nallconsanddatas > 0);
1485 for( d = conshdlrdata->nallconsanddatas - 1; d >= 0; --d )
1487 if( conshdlrdata->allconsanddatas[d] == consanddatas[
c] )
1489 --conshdlrdata->nallconsanddatas;
1493 conshdlrdata->allconsanddatas[d] = conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas];
1503 else if( isorig && consanddatas[
c]->origcons !=
NULL )
1506 assert(consanddatas[
c]->nuses == 0);
1507 assert(consanddatas[
c]->nnewvars == 0);
1508 assert(consanddatas[
c]->snewvars == 0);
1514 if( consanddatas[
c]->noriguses == 0 )
1518 if( conshdlrdata->inithashmapandtable )
1533 assert(consanddatas[
c]->svars > 0);
1537 consanddatas[
c]->
nvars = 0;
1538 consanddatas[
c]->
svars = 0;
1543 assert(consanddatas[
c]->svars == 0);
1550 assert(conshdlrdata->nallconsanddatas > 0);
1551 for( d = conshdlrdata->nallconsanddatas - 1; d >= 0; --d )
1553 if( conshdlrdata->allconsanddatas[d] == consanddatas[
c] )
1555 --conshdlrdata->nallconsanddatas;
1559 conshdlrdata->allconsanddatas[d] = conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas];
1570 assert(!consanddatas[
c]->istransformed);
1575 if( consanddatas[
c]->nuses == 0 && consanddatas[
c]->istransformed )
1580 else if( consanddatas[
c]->nuses == 0 )
1586 assert(consanddatas[
c]->nnewvars == 0);
1587 assert(consanddatas[
c]->snewvars == 0);
1590 tmpvars = consanddatas[
c]->
vars;
1591 ntmpvars = consanddatas[
c]->
nvars;
1594 for( v = ntmpvars - 1; v >= 0; --v )
1603 if( !consanddatas[
c]->istransformed && consanddatas[
c]->noriguses > 0 )
1606 assert(consanddatas[
c]->nuses == 0);
1607 assert(consanddatas[
c]->nnewvars == 0);
1608 assert(consanddatas[
c]->snewvars == 0);
1611 assert(consanddatas[
c]->svars > 0);
1614 assert(consanddatas[
c]->isoriginal);
1620 if( conshdlrdata->inithashmapandtable )
1669 SCIP_Real
const coef,
1670 SCIP_Real
const lhs,
1714 for( v =
nvars - 1; v >= 0; --v )
1721 for( v =
nvars - 1; v >= 0; --v )
1738 SCIP_Real
const coef,
1739 SCIP_Real
const lhs,
1777 for( v =
nvars - 1; v >= 0; --v )
1784 for( v =
nvars - 1; v >= 0; --v )
1820 SCIP_Real* lincoefs;
1825 SCIP_Real* andcoefs;
1834#ifdef WITHEQKNAPSACK
1843 assert(consdata->nconsanddatas >= 0);
1872 andress, andcoefs, andnegs, &nandress) );
1873 assert(consdata->nconsanddatas == nandress);
1878 assert(consdata->nlinvars + consdata->nconsanddatas ==
nvars);
1902 for( v = nandress - 1; v >= 0; --v )
1943 andcons = consanddata->
cons;
1997 SCIP_Bool
const initial,
1999 SCIP_Bool
const enforce,
2002 SCIP_Bool
const check,
2005 SCIP_Bool
const local,
2008 SCIP_Bool
const modifiable,
2011 SCIP_Bool
const dynamic,
2014 SCIP_Bool
const stickingatnode,
2027 SCIP_Bool removable;
2028 SCIP_Bool transformed;
2064 if( tmpdata !=
NULL )
2072 *andcons = tmpdata->
cons;
2118#ifdef WITH_DEBUG_SOLUTION
2119 if( SCIPdebugIsMainscip(
scip) )
2122 SCIP_Real debugsolval;
2125 for( v =
nvars - 1; v >= 0; --v )
2133 val = ((val < 0.5) ? 0.0 : 1.0);
2138 SCIPerrorMessage(
"computed solution value %g for resultant <%s> violates debug solution value %g\n", val,
SCIPvarGetName(resultant), debugsolval);
2160 local, modifiable, dynamic, removable, stickingatnode) );
2172 if( conshdlrdata->nallconsanddatas == conshdlrdata->sallconsanddatas )
2178 conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas] = newdata;
2179 ++(conshdlrdata->nallconsanddatas);
2185 newdata->
cons = newcons;
2192 for( v = newdata->
nvars - 1; v >= 0; --v )
2267 if( consdata->nconsanddatas == consdata->sconsanddatas )
2277 ++(consdata->nconsanddatas);
2280 switch( consdata->linconstype )
2303#ifdef WITHEQKNAPSACK
2304 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
2308 SCIP_CALL( SCIPaddCoefEQKnapsack(
scip, consdata->lincons, res, (SCIP_Longint) val) );
2321 consdata->changed =
TRUE;
2322 consdata->propagated =
FALSE;
2323 consdata->presolved =
FALSE;
2324 consdata->cliquesadded =
FALSE;
2325 consdata->upgradetried =
FALSE;
2347 SCIPerrorMessage(
"changing left hand side only allowed on standard lienar constraint \n");
2349#ifdef WITHEQKNAPSACK
2350 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
2378 SCIPerrorMessage(
"changing left hand side only allowed on standard lienar constraint \n");
2380#ifdef WITHEQKNAPSACK
2381 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
2405 SCIP_Real* lincoefs;
2408 SCIP_Real* andcoefs;
2456 SCIP_CALL(
getLinVarsAndAndRess(
scip, cons,
vars, coefs,
nvars, linvars, lincoefs, &nlinvars, andress, andcoefs, andnegs, &nandress) );
2457 assert(consdata->nconsanddatas == nandress);
2473 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
2478 consanddata = consdata->consanddatas[
c];
2481 andcons = consanddata->
cons;
2486 val = andnegs[
c] ? -andcoefs[
c] : andcoefs[
c];
2491 for( v = nandvars - 1; v >= 0; --v )
2498 for( v = nandvars - 1; v >= 0; --v )
2508 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
2513 consanddata = consdata->consanddatas[
c];
2516 andcons = consanddata->
cons;
2521 val = andnegs[
c] ? -andcoefs[
c] : andcoefs[
c];
2526 for( v = nandvars - 1; v >= 0; --v )
2533 for( v = nandvars - 1; v >= 0; --v )
2545 consdata->propagated =
FALSE;
2550 consdata->lhs = lhs;
2551 consdata->presolved =
FALSE;
2552 consdata->changed =
TRUE;
2579 SCIP_Real* lincoefs;
2582 SCIP_Real* andcoefs;
2630 SCIP_CALL(
getLinVarsAndAndRess(
scip, cons,
vars, coefs,
nvars, linvars, lincoefs, &nlinvars, andress, andcoefs, andnegs, &nandress) );
2631 assert(consdata->nconsanddatas == nandress);
2647 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
2652 consanddata = consdata->consanddatas[
c];
2655 andcons = consanddata->
cons;
2660 val = andnegs[
c] ? -andcoefs[
c] : andcoefs[
c];
2665 for( v = nandvars - 1; v >= 0; --v )
2672 for( v = nandvars - 1; v >= 0; --v )
2682 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
2687 consanddata = consdata->consanddatas[
c];
2690 andcons = consanddata->
cons;
2695 val = andnegs[
c] ? -andcoefs[
c] : andcoefs[
c];
2700 for( v = nandvars - 1; v >= 0; --v )
2707 for( v = nandvars - 1; v >= 0; --v )
2719 consdata->propagated =
FALSE;
2724 consdata->rhs = rhs;
2725 consdata->presolved =
FALSE;
2726 consdata->changed =
TRUE;
2746 SCIP_Real*
const termcoefs,
2748 int const*
const ntermvars,
2749 SCIP_Bool
const initial,
2751 SCIP_Bool
const enforce,
2754 SCIP_Bool
const check,
2757 SCIP_Bool
const local,
2760 SCIP_Bool
const modifiable,
2763 SCIP_Bool
const dynamic,
2766 SCIP_Bool
const stickingatnode,
2771 SCIP_Real*
const andvals,
2772 SCIP_Bool*
const andnegs,
2791 for( t = 0; t <
nterms; ++t )
2796 initial, enforce, check, local, modifiable, dynamic, stickingatnode,
2797 &(andconss[*nandconss])) );
2799 andvals[*nandconss] = termcoefs[t];
2800 andnegs[*nandconss] =
FALSE;
2815 SCIP_Real*
const linvals,
2818 SCIP_Real
const*
const andvals,
2819 SCIP_Bool*
const andnegs,
2820 SCIP_Real*
const lhs,
2821 SCIP_Real*
const rhs,
2822 SCIP_Bool
const initial,
2824 SCIP_Bool
const separate,
2826 SCIP_Bool
const enforce,
2829 SCIP_Bool
const check,
2834 SCIP_Bool
const local,
2837 SCIP_Bool
const modifiable,
2840 SCIP_Bool
const dynamic,
2843 SCIP_Bool
const removable,
2846 SCIP_Bool
const stickingatnode,
2875 assert(nlinvars > 0 || nandress > 0);
2885 ++(conshdlrdata->nlinconss);
2901 nvars = nlinvars + nandress;
2904 for( v = nlinvars - 1; v >= 0; --v )
2934 for( v = nandress - 1; v >= 0; --v )
2962 SCIPdebugMsg(
scip,
"While creating the linear constraint of the pseudoboolean constraint we found %d zero coefficients that were removed\n", nzero);
2980 if( upgrconshdlr !=
NULL &&
nvars > 2 && ncoeffspone + ncoeffsnone ==
nvars
2996 for( v = 0; v < nlinvars; ++v )
2998 if( mult * linvals[v] > 0.0 )
2999 transvars[v] = linvars[v];
3008 for( v = 0; v < nandress; ++v )
3010 if( mult * andvals[v] > 0.0 )
3011 transvars[nlinvars + v] = andress[v];
3023 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3052 if( upgrconshdlr !=
NULL && !created && ncoeffspone + ncoeffsnone ==
nvars )
3059 SCIPdebugMsg(
scip,
"linear pseudoboolean constraint will be a set partitioning constraint\n");
3062 mult =
SCIPisEQ(
scip, *lhs, 1.0 - ncoeffsnone) ? +1 : -1;
3068 for( v = 0; v < nlinvars; ++v )
3070 if( mult * linvals[v] > 0.0 )
3071 transvars[v] = linvars[v];
3080 for( v = 0; v < nandress; ++v )
3082 if( mult * andvals[v] > 0.0 )
3083 transvars[nlinvars + v] = andress[v];
3095 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3109 SCIPdebugMsg(
scip,
"linear pseudoboolean constraint will be a set packing constraint\n");
3118 for( v = 0; v < nlinvars; ++v )
3120 if( mult * linvals[v] > 0.0 )
3121 transvars[v] = linvars[v];
3130 for( v = 0; v < nandress; ++v )
3132 if( mult * andvals[v] > 0.0 )
3133 transvars[nlinvars + v] = andress[v];
3145 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3163 SCIPwarningMessage(
scip,
"Does not expect this, because this constraint should be a set packing constraint.\n");
3167 SCIPwarningMessage(
scip,
"Does not expect this, because this constraint should be a logicor constraint.\n");
3170 SCIPdebugMsg(
scip,
"linear pseudoboolean constraint will be a set covering constraint\n");
3179 for( v = 0; v < nlinvars; ++v )
3181 if( mult * linvals[v] > 0.0 )
3182 transvars[v] = linvars[v];
3191 for( v = 0; v < nandress; ++v )
3193 if( mult * andvals[v] > 0.0 )
3194 transvars[nlinvars + v] = andress[v];
3206 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3229 SCIP_Longint* weights;
3230 SCIP_Longint capacity;
3231 SCIP_Longint weight;
3234 SCIPdebugMsg(
scip,
"linear pseudoboolean constraint will be a knapsack constraint\n");
3255 for( v = 0; v < nlinvars; ++v )
3261 transvars[v] = linvars[v];
3262 weights[v] = weight;
3267 weights[v] = -weight;
3273 for( v = 0; v < nandress; ++v )
3279 transvars[nlinvars + v] = andress[v];
3280 weights[nlinvars + v] = weight;
3286 weights[nlinvars + v] = -weight;
3294 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3306#ifdef WITHEQKNAPSACK
3315 if( upgrconshdlr !=
NULL && !created && (ncoeffspone + ncoeffsnone + ncoeffspint + ncoeffsnint ==
nvars) &&
SCIPisEQ(
scip, *lhs, *rhs) )
3318 SCIP_Longint* weights;
3319 SCIP_Longint capacity;
3320 SCIP_Longint weight;
3325 SCIPdebugMsg(
scip,
"linear pseudoboolean constraint will be a equality-knapsack constraint\n");
3343 for( v = 0; v < nlinvars; ++v )
3349 transvars[v] = linvars[v];
3350 weights[v] = weight;
3355 weights[v] = -weight;
3361 for( v = 0; v < nandress; ++v )
3367 transvars[nlinvars + v] = andress[v];
3368 weights[nlinvars + v] = weight;
3374 weights[nlinvars + v] = -weight;
3381 SCIP_CALL( SCIPcreateConsEqKnapsack(
scip, &cons, name,
nvars, transvars, weights, capacity,
3382 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3385 (*linconstype) = SCIP_LINEARCONSTYPE_EQKNAPSACK;
3404 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3409 for( v = 0; v < nandress; ++v )
3440 SCIP_Bool*
const violated,
3441 SCIP_Bool
const printreason
3455 SCIP_Real* lincoefs;
3460 SCIP_Real* andcoefs;
3513 assert(consdata->nlinvars + consdata->nconsanddatas ==
nvars);
3530 for( v = 0; v <
nvars; ++v )
3545 hashmapvar =
vars[v];
3556 linvars[nlinvars] =
vars[v];
3557 lincoefs[nlinvars] = coefs[v];
3563 andress[nandress] = hashmapvar;
3570 andcoefs[nandress] = -coefs[v];
3573 andcoefs[nandress] = coefs[v];
3577 assert(nandress == consdata->nconsanddatas);
3585 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
3592 andcons = consdata->consanddatas[
c]->origcons;
3597 if( andcons ==
NULL )
3599 andcons = consdata->consanddatas[
c]->cons;
3614 for( v = nandvars - 1; v >= 0; --v )
3620 activity += andvalue * andcoefs[
c];
3622 SCIPdebugMsg(
scip,
"lhs = %g, overall activity = %g, rhs = %g\n", lhs, activity, rhs);
3625 lhsviol = lhs - activity;
3626 rhsviol = activity - rhs;
3628 if(lhsviol > rhsviol)
3691 SCIP_Bool*
const violated
3711 for(
c = conshdlrdata->nallconsanddatas - 1;
c >= 0; --
c )
3714 SCIP_Real minsolval;
3715 SCIP_Real sumsolval;
3718 if( !conshdlrdata->allconsanddatas[
c]->istransformed )
3721 andcons = conshdlrdata->allconsanddatas[
c]->cons;
3724 if( andcons ==
NULL )
3735 for( v =
nvars - 1; v >= 0; --v )
3739 if( solval < minsolval )
3742 sumsolval += solval;
3749 viol =
MAX3(0.0, solval - minsolval, sumsolval - (
nvars - 1.0 + solval));
3774 SCIP*
const targetscip,
3776 SCIP*
const sourcescip,
3783 SCIP_Bool
const initial,
3784 SCIP_Bool
const separate,
3785 SCIP_Bool
const enforce,
3786 SCIP_Bool
const check,
3788 SCIP_Bool
const local,
3789 SCIP_Bool
const modifiable,
3790 SCIP_Bool
const dynamic,
3791 SCIP_Bool
const removable,
3792 SCIP_Bool
const stickingatnode,
3794 SCIP_Bool
const global,
3795 SCIP_Bool*
const valid
3814 sourcelincons = sourceconsdata->lincons;
3823 SCIP_Real* targetandcoefs;
3824 int ntargetandconss;
3827 targetlinconstype = sourceconsdata->linconstype;
3829 switch( targetlinconstype )
3847#ifdef WITHEQKNAPSACK
3848 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
3859 if( conshdlrlinear ==
NULL )
3865 targetlincons =
NULL;
3885 targetandconss =
NULL;
3886 targetandcoefs =
NULL;
3887 ntargetandconss = 0;
3893 int nsourceandconss;
3896 SCIP_Real* targetlincoefs;
3902 nsourceandconss = sourceconsdata->nconsanddatas;
3917 targetlinvars, targetlincoefs, &ntargetlinvars) );
3924 SCIPvarIsHashkeyEq, SCIPvarGetHashkeyVal,
NULL) );
3926 for(
c = 0 ;
c < ntargetlinvars; ++
c )
3935 for(
c = 0 ;
c < nsourceandconss; ++
c )
3942 consanddata = sourceconsdata->consanddatas[
c];
3945 oldcons = consanddata->
cons;
3959 targetandconss[ntargetandconss] =
NULL;
3971 targetandcoefs[ntargetandconss] = sourceconsdata->andcoefs[
c];
3977 assert(ntargetandconss <= ntargetlinvars);
3982 SCIP_Real targetrhs;
3983 SCIP_Real targetlhs;
3987 const char* consname;
3990 assert(sourceconsdata->issoftcons == (sourceconsdata->indvar !=
NULL));
3991 indvar = sourceconsdata->indvar;
3992 intvar = sourceconsdata->intvar;
3995 if( indvar !=
NULL )
4025 targetlincons, targetlinconstype, targetandconss, targetandcoefs, ntargetandconss,
4026 indvar, sourceconsdata->weight, sourceconsdata->issoftcons, intvar, targetlhs, targetrhs,
4027 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
4037 if( targetlincons !=
NULL )
4043 if( targetandconss !=
NULL )
4047 assert(ntargetandconss <= sourceconsdata->nconsanddatas);
4049 for(
c = 0 ;
c < ntargetandconss; ++
c )
4051 if( targetandconss[
c] !=
NULL )
4082 allconsanddatas = conshdlrdata->allconsanddatas;
4084 assert(conshdlrdata->nallconsanddatas > 0);
4085 assert(conshdlrdata->nallconsanddatas <= conshdlrdata->sallconsanddatas);
4087 for(
c = conshdlrdata->nallconsanddatas - 1;
c >= 0; --
c )
4096 consanddata = allconsanddatas[
c];
4101 if( consanddata->
nuses == 0 )
4119 cons = consanddata->
cons;
4142 for( v =
nvars - 1; v > 0; --v )
4145 for( v = nnewvars - 1; v > 0; --v )
4150 if(
nvars == nnewvars )
4157 for( v =
nvars - 1; v >= 0; --v )
4159 if(
vars[v] != newvars[v] )
4171 if( nnewvars > consanddata->
snewvars )
4181 for( v = consanddata->
nnewvars - 1; v >= 0; --v )
4199 SCIP_Real
const coef,
4200 SCIP_Real
const lhs,
4227 SCIP_Real
const coef,
4228 SCIP_Real
const lhs,
4254 SCIP_Real
const newlhs,
4255 SCIP_Real
const newrhs,
4257 SCIP_Real*
const andcoefs,
4258 SCIP_Bool*
const andnegs,
4263 int nnewconsanddatas;
4264 int snewconsanddatas;
4265 SCIP_Real* newandcoefs;
4266 SCIP_Real* oldandcoefs;
4267 SCIP_Bool* newandnegs;
4268 SCIP_Bool* oldandnegs;
4289 SCIPsortPtrRealBool((
void**)(consdata->consanddatas), consdata->andcoefs, consdata->andnegs, resvarCompWithInactive, consdata->nconsanddatas);
4291 consanddatas = consdata->consanddatas;
4292 oldandcoefs = consdata->andcoefs;
4293 oldandnegs = consdata->andnegs;
4294 nconsanddatas = consdata->nconsanddatas;
4295 assert(nconsanddatas == 0 || (consanddatas !=
NULL && oldandcoefs !=
NULL));
4299 for(
c = nandress - 1;
c > 0; --
c )
4307 for(
c = nconsanddatas - 1;
c > 0; --
c )
4314 if( !consanddatas[
c]->istransformed )
4320 if( !consanddatas[
c - 1]->istransformed )
4339 snewconsanddatas = nconsanddatas + nandress;
4346 nnewconsanddatas = 0;
4349 for(
c = 0, c1 = 0;
c < nconsanddatas && c1 < nandress; )
4358 if( !consanddatas[
c]->istransformed )
4361 consdata->changed =
TRUE;
4362 consdata->upgradetried =
FALSE;
4366 andcons = consanddatas[
c]->
cons;
4369 if( andcons ==
NULL )
4372 consdata->changed =
TRUE;
4373 consdata->upgradetried =
FALSE;
4380 oldandnegs[
c] ? -oldandcoefs[
c] : oldandcoefs[
c], consdata->lhs, consdata->rhs) );
4382 consdata->changed =
TRUE;
4383 consdata->upgradetried =
FALSE;
4401 assert(consanddatas[
c]->nuses > 0);
4402 --(consanddatas[
c]->
nuses);
4406 consdata->lhs, consdata->rhs) );
4408 consdata->changed =
TRUE;
4409 consdata->upgradetried =
FALSE;
4410 consdata->propagated =
FALSE;
4411 consdata->presolved =
FALSE;
4417 newandcoefs[nnewconsanddatas] = andcoefs[c1];
4418 newandnegs[nnewconsanddatas] = andnegs[c1];
4419 ++(newconsanddatas[nnewconsanddatas]->
nuses);
4423 -newandcoefs[nnewconsanddatas] : newandcoefs[nnewconsanddatas], newlhs, newrhs) );
4425 consdata->changed =
TRUE;
4426 consdata->upgradetried =
FALSE;
4427 consdata->cliquesadded =
FALSE;
4428 consdata->propagated =
FALSE;
4429 consdata->presolved =
FALSE;
4435 SCIP_Bool coefsignchanged;
4436 SCIP_Bool lhschanged;
4437 SCIP_Bool rhschanged;
4442 newconsanddatas[nnewconsanddatas] = consanddatas[
c];
4444 newandcoefs[nnewconsanddatas] = andcoefs[c1];
4445 newandnegs[nnewconsanddatas] = andnegs[c1];
4447 if( ((oldandnegs[
c] == andnegs[c1]) && !
SCIPisEQ(
scip, oldandcoefs[
c], newandcoefs[c1]))
4448 || ((oldandnegs[
c] != newandnegs[c1]) && !
SCIPisEQ(
scip, oldandcoefs[
c], -newandcoefs[c1])) )
4449 consdata->upgradetried =
FALSE;
4451 coefsignchanged = (oldandnegs[
c] == andnegs[c1]) &&
4452 ((oldandcoefs[
c] < 0 && andcoefs[c1] > 0) || (oldandcoefs[
c] > 0 && andcoefs[c1] < 0));
4453 coefsignchanged = coefsignchanged || ((oldandnegs[
c] != andnegs[c1]) &&
4454 ((oldandcoefs[
c] < 0 && andcoefs[c1] < 0) || (oldandcoefs[
c] > 0 && andcoefs[c1] > 0)));
4456 || (consdata->lhs < 0 && newlhs > 0) || (consdata->lhs > 0 && newlhs < 0);
4458 || (consdata->rhs < 0 && newrhs > 0) || (consdata->rhs > 0 && newrhs < 0);
4461 if( coefsignchanged || lhschanged || rhschanged || newconsanddatas[nnewconsanddatas]->nnewvars > 0)
4465 -oldandcoefs[
c] : oldandcoefs[
c], consdata->lhs, consdata->rhs) );
4467 -newandcoefs[nnewconsanddatas] : newandcoefs[nnewconsanddatas], newlhs, newrhs) );
4469 consdata->changed =
TRUE;
4470 consdata->upgradetried =
FALSE;
4471 consdata->cliquesadded =
FALSE;
4472 consdata->propagated =
FALSE;
4473 consdata->presolved =
FALSE;
4483 if(
c < nconsanddatas )
4487 for( ;
c < nconsanddatas; ++
c )
4495 andcons = consanddatas[
c]->
cons;
4497 if( andcons !=
NULL )
4504 if( andcons ==
NULL )
4506 consdata->changed =
TRUE;
4507 consdata->upgradetried =
FALSE;
4511 assert(consanddatas[
c]->nuses > 0);
4512 --(consanddatas[
c]->
nuses);
4516 consdata->lhs, consdata->rhs) );
4517 consdata->changed =
TRUE;
4518 consdata->upgradetried =
FALSE;
4519 consdata->propagated =
FALSE;
4520 consdata->presolved =
FALSE;
4523 else if( c1 < nandress )
4525 for( ; c1 < nandress; ++c1 )
4533 newandcoefs[nnewconsanddatas] = andcoefs[c1];
4534 newandnegs[nnewconsanddatas] = andnegs[c1];
4535 ++(newconsanddatas[nnewconsanddatas]->
nuses);
4539 -newandcoefs[nnewconsanddatas] : newandcoefs[nnewconsanddatas], newlhs, newrhs) );
4542 consdata->changed =
TRUE;
4543 consdata->upgradetried =
FALSE;
4544 consdata->cliquesadded =
FALSE;
4545 consdata->propagated =
FALSE;
4546 consdata->presolved =
FALSE;
4549 assert(
c == nconsanddatas && c1 == nandress);
4558 consdata->upgradetried =
FALSE;
4559 consdata->lhs = newlhs;
4560 consdata->rhs = newrhs;
4563 consdata->consanddatas = newconsanddatas;
4564 consdata->andcoefs = newandcoefs;
4565 consdata->andnegs = newandnegs;
4566 consdata->nconsanddatas = nnewconsanddatas;
4567 consdata->sconsanddatas = snewconsanddatas;
4569 oldnvars = consdata->nlinvars;
4572 consdata->nlinvars -= nnewconsanddatas;
4574 if( oldnvars != consdata->nlinvars )
4576 consdata->changed =
TRUE;
4577 consdata->upgradetried =
FALSE;
4578 consdata->cliquesadded =
FALSE;
4579 consdata->propagated =
FALSE;
4580 consdata->presolved =
FALSE;
4586 SCIPsortPtrRealBool((
void**)(consdata->consanddatas), consdata->andcoefs, consdata->andnegs, resvarCompWithInactive, consdata->nconsanddatas);
4589 consanddatas = consdata->consanddatas;
4590 nconsanddatas = consdata->nconsanddatas;
4591 assert(nconsanddatas == 0 || consanddatas !=
NULL);
4594 for(
c = nconsanddatas - 1;
c > 0; --
c )
4621 int*
const naggrvars,
4650 assert(consdata->nconsanddatas > 0);
4653 if( consdata->cliquesadded )
4656 consdata->cliquesadded =
TRUE;
4665 assert(consdata->nconsanddatas > 0);
4666 assert(consdata->nconsanddatas <= consdata->sconsanddatas);
4670 assert(
nvars == consdata->nlinvars + consdata->nconsanddatas);
4687 assert(nandress == consdata->nconsanddatas);
4691 for(
c = nandress - 1;
c >= 0; --
c )
4697 consanddata = consdata->consanddatas[
c];
4705 andvars = consanddata->
newvars;
4710 andvars = consanddata->
vars;
4711 nandvars = consanddata->
nvars;
4714 for( v1 = nandvars - 1; v1 >= 0; --v1 )
4717 SCIP_Bool values[2];
4732 for( v2 = nlinvars - 1; v2 >= 0; --v2 )
4762 if( values[0] != values[1] && var1 == var2 )
4768 clqvars[0] = andres;
4779 *nchgbds += nchgbdslocal;
4811 clqvars[0] = andres;
4822 *nchgbds += nchgbdslocal;
4842 for(
c = nandress - 1;
c > 0; --
c )
4851 consanddata1 = consdata->consanddatas[
c];
4853 consanddata2 = consdata->consanddatas[
c - 1];
4862 andvars1 = consanddata1->
newvars;
4863 nandvars1 = consanddata1->
nnewvars;
4867 andvars1 = consanddata1->
vars;
4868 nandvars1 = consanddata1->
nvars;
4874 andvars2 = consanddata2->
newvars;
4875 nandvars2 = consanddata2->
nnewvars;
4879 andvars2 = consanddata2->
vars;
4880 nandvars2 = consanddata2->
nvars;
4884 for( v1 = nandvars1 - 1; v1 >= 0; --v1 )
4887 SCIP_Bool values[2];
4889 var1 = andvars1[v1];
4902 for( v2 = nandvars2 - 1; v2 >= 0; --v2 )
4906 var2 = andvars2[v2];
4932 if( values[0] != values[1] && var1 == var2 )
4938 clqvars[0] = andres;
4939 clqvars[1] = andres2;
4948 *nchgbds += nchgbdslocal;
4981 clqvars[0] = andres;
4992 *nchgbds += nchgbdslocal;
5049 if( consdata->propagated )
5053 consdata->propagated =
TRUE;
5076 consanddatas = consdata->consanddatas;
5077 nconsanddatas = consdata->nconsanddatas;
5078 assert(nconsanddatas == 0 || consanddatas !=
NULL);
5084 for(
c = nconsanddatas - 1;
c >= 0; --
c )
5090 if( !consanddatas[
c]->istransformed )
5093 andcons = consanddatas[
c]->
cons;
5118 allconsanddatas = conshdlrdata->allconsanddatas;
5120 assert(conshdlrdata->nallconsanddatas > 0);
5121 assert(conshdlrdata->nallconsanddatas <= conshdlrdata->sallconsanddatas);
5123 for(
c = conshdlrdata->nallconsanddatas - 1;
c >= 0; --
c )
5130 consanddata = allconsanddatas[
c];
5148 if( consanddata->
nvars == 0 )
5165 consanddata->
nuses = 0;
5180 if( consanddata->
nuses == 0 )
5182 SCIP_Bool looseorcolumn;
5211 SCIP_Bool del =
TRUE;
5214 if( nfixedvars > 0 )
5219 SCIP_Real* activescalars =
NULL;
5220 SCIP_Real activeconstant;
5235 for(
w = nfixedvars - 1;
w >= 0; --
w )
5239 if( activevars ==
NULL )
5247 activevars[0] = fixedvars[
w];
5248 activescalars[0] = 1.0;
5249 activeconstant = 0.0;
5253 &activeconstant, &requiredsize,
TRUE) );
5256 if( nactivevars == 0 )
5259 fixedvars[
w] = fixedvars[nfixedvars];
5263 fixedvars[
w] = activevars[0];
5265 if( nactivevars > 1 )
5270 for(
i = 1;
i < nactivevars; ++
i )
5273 fixedvars[nfixedvars] = activevars[
i];
5283 if( activevars !=
NULL )
5289 SCIPsortPtr((
void**)fixedvars, SCIPvarComp, nfixedvars);
5307 if( !looseorcolumn )
5332 cons = consanddata->
cons;
5347 consanddata->
nuses = 0;
5365 tmpvars = consanddata->
vars;
5367 for( v = consanddata->
nvars - 1; v >= 0; --v )
5375 tmpvars = consanddata->
vars;
5376 stmpvars = consanddata->
svars;
5380 consanddata->
newvars = tmpvars;
5416 consanddatas = consdata->consanddatas;
5417 nconsanddatas = consdata->nconsanddatas;
5418 assert(nconsanddatas > 0 && consanddatas !=
NULL);
5422 for(
c = nconsanddatas - 1;
c >= 0; --
c )
5426 consanddata = consanddatas[
c];
5436 for(
c = nconsanddatas - 1;
c >= 0; --
c )
5440 consanddata = consanddatas[
c];
5442 assert(consanddatas[
c]->istransformed);
5446 if( consanddata->
nuses > 0 )
5447 --(consanddata->
nuses);
5450 if( consanddata->
nuses == 0 )
5454 SCIP_Bool looseorcolumn;
5471 SCIP_Bool delcons =
TRUE;
5475 if( nfixedvars > 0 )
5478 SCIP_Bool foundmultiaggrvar =
FALSE;
5492 for(
w = nfixedvars - 1;
w >= 0; --
w )
5495 foundmultiaggrvar =
TRUE;
5500 SCIPsortPtr((
void**)fixedvars, SCIPvarComp, nfixedvars);
5502 if( foundmultiaggrvar )
5544 if( !looseorcolumn )
5568 consdata->nconsanddatas = 0;
5587 SCIP_Bool*
const values,
5591 SCIP_Real*
const lincoefs,
5593 SCIP_Real
const constant,
5594 SCIP_Real
const side,
5596 SCIP_Real*
const consanddatacoefs,
5597 SCIP_Bool*
const consanddatanegs,
5598 int const nconsanddatas,
5625 assert(nconsanddatas > 0);
5626 assert(*xortype >= -1 && *xortype <= 1);
5629 SCIPsortPtr((
void**)linvars, SCIPvarCompActiveAndNegated, nlinvars);
5633 for( v = nlinvars - 1; v >= 0; --v )
5638 value += lincoefs[v];
5653 for(
c = nconsanddatas - 1;
c >= 0; --
c )
5655 SCIP_Bool val =
TRUE;
5657 consanddata = consanddatas[
c];
5664 termvars = consanddata->
newvars;
5669 termvars = consanddata->
vars;
5670 ntermvars = consanddata->
nvars;
5678 SCIPsortPtrBool((
void**)repvars, negated, SCIPvarCompActiveAndNegated, ntermvars);
5680 for( v = ntermvars - 1; v >= 0; --v )
5689 if( (negated[v] && values[pos]) || (!negated[v] && !values[pos]) )
5705 if( val != consanddatanegs[
c] )
5706 value += consanddatacoefs[
c];
5712 if( *xortype == -1 )
5720 else if( *xortype == 1 && cnt % 2 == 0 )
5722 else if( *xortype == 0 && cnt % 2 == 1 )
5728 if( *xortype == -1 )
5736 else if( *xortype == 1 && cnt % 2 == 1 )
5738 else if( *xortype == 0 && cnt % 2 == 0 )
5759 int*
const ndelconss,
5760 int*
const naddconss,
5761 int*
const nfixedvars,
5762 int*
const nchgcoefs,
5763 int*
const nchgsides,
5772 SCIP_Real* allcoefs;
5775 SCIP_Real* lincoefs;
5777 SCIP_Real* andcoefs;
5811 consanddatas = consdata->consanddatas;
5812 andcoefs = consdata->andcoefs;
5813 andnegs = consdata->andnegs;
5814 nconsanddatas = consdata->nconsanddatas;
5815 assert(nconsanddatas > 0 && consanddatas !=
NULL);
5827 lincons = consdata->lincons;
5831 assert(nallvars - nconsanddatas == consdata->nlinvars);
5832 nlinvars = consdata->nlinvars;
5854 assert(nlinvars == consdata->nlinvars);
5855 assert(nandress == nallvars-nlinvars);
5866 firstnlinvars = nlinvars;
5869 SCIPsortPtr((
void**)linvars, SCIPvarCompActiveAndNegated, nlinvars);
5871 for(
c = nconsanddatas - 1;
c >= 0; --
c )
5873 consanddata = consanddatas[
c];
5899 oldnlinvars = nlinvars;
5902 for( v =
nvars - 1, v1 = nlinvars - 1; v >= 0 && v1 >= 0; )
5922 linvars[nlinvars] =
var;
5944 for( ; v >= 0; --v )
5959 linvars[nlinvars] =
var;
5968 if( nlinvars > oldnlinvars )
5971 SCIPsortPtr((
void**)linvars, SCIPvarCompActiveAndNegated, nlinvars);
5979 for( v = (1 << nlinvars) - 1; v >= 0; --v )
5982 for( v1 = nlinvars - 1; v1 >= 0; --v1 )
5995 consdata->lhs, consanddatas, andcoefs, andnegs, nconsanddatas, cnt, &xortype) );
6002 assert(xortype >= -1 && xortype <= 1);
6050 int*
const ndelconss,
6051 int*
const naddconss,
6052 int*
const nfixedvars,
6053 int*
const nchgcoefs,
6054 int*
const nchgsides,
6082 consanddatas = consdata->consanddatas;
6083 nconsanddatas = consdata->nconsanddatas;
6084 assert(nconsanddatas > 0 && consanddatas !=
NULL);
6092 if( nconsanddatas == 1 )
6096 SCIP_Real* allcoefs;
6099 SCIP_Real* lincoefs;
6112 if( consdata->nlinvars == 0 )
6124 lincons = consdata->lincons;
6126 consanddata = consanddatas[0];
6155 assert(nallvars == consdata->nlinvars + 1);
6157 nlinvars = consdata->nlinvars;
6172 assert(nlinvars == consdata->nlinvars);
6175 for( v = 0; v < nlinvars; ++v )
6181 for( v = 0; v <
nvars; ++v )
6213 c = nconsanddatas - 1;
6214 assert(consanddatas[
c]->istransformed);
6217 if( consanddatas[
c]->nnewvars > 0 )
6225 neqvars = consanddatas[
c]->
nvars;
6235 for( v = neqvars - 1; v > 0; --v )
6239 for( --
c ;
c >= 0; --
c )
6246 consanddata = consanddatas[
c];
6248 assert(consanddatas[
c]->istransformed);
6265 for( v =
nvars - 1; v > 0; --v )
6270 if(
nvars < nminvars )
6273 else if(
nvars > nmaxvars )
6276 assert(nminvars <= nmaxvars);
6279 for( v = 0, v2 = 0; v < neqvars && v2 <
nvars; )
6290 if( index1 < index2 )
6292 else if( index1 > index2 )
6296 assert(index1 == index2);
6299 if( nneweqvars < v )
6300 eqvars[nneweqvars] = eqvars[v];
6306 neqvars = nneweqvars;
6311 if( nminvars > neqvars + 1 )
6353 if( neqvars > 0 && consdata->nlinvars == 0 )
6355 SCIP_Bool infeasible;
6359 for( v = 0; v < neqvars; ++v )
6376 if( nminvars == neqvars )
6388 if( neqvars > 0 && nminvars == nmaxvars && nminvars == neqvars + 1 )
6399 lincons = consdata->lincons;
6411 for(
c = nconsanddatas - 1;
c >= 0; --
c )
6417 consanddata = consanddatas[
c];
6419 assert(consanddatas[
c]->istransformed);
6434 for( v = 0, v2 = 0; v < neqvars && v2 <
nvars; )
6445 assert(index1 >= index2);
6447 if( index1 > index2 )
6454 assert(index1 == index2);
6464 for( ; v2 <
nvars; ++v2)
6476 if( consdata->nlinvars > 0 )
6482 SCIP_Real* lincoefs;
6486 for( v = 0; v < neqvars; ++v )
6493 assert(
nvars == consdata->nlinvars + consdata->nconsanddatas);
6507 for( v = 0; v <
nvars; ++v )
6513 assert(nlinvars == consdata->nlinvars);
6516 for( v = 0; v < nlinvars; ++v )
6562 int*
const ndelconss,
6563 int*
const naddconss,
6564 int*
const nfixedvars,
6565 int*
const nchgcoefs,
6566 int*
const nchgsides,
6595 consanddatas = consdata->consanddatas;
6596 nconsanddatas = consdata->nconsanddatas;
6597 assert(nconsanddatas > 0 && consanddatas !=
NULL);
6619 if( nconsanddatas == 1 )
6622 if( consdata->nlinvars == 0 )
6651 if( consdata->nlinvars > 0 )
6656 assert(consdata->nlinvars == 0 && nconsanddatas > 1);
6658 c = nconsanddatas - 1;
6659 assert(consanddatas[
c]->istransformed);
6662 if( consanddatas[
c]->nnewvars > 0 )
6670 neqvars = consanddatas[
c]->
nvars;
6680 for( v = neqvars - 1; v > 0; --v )
6684 for( --
c ;
c >= 0; --
c )
6691 consanddata = consanddatas[
c];
6693 assert(consanddatas[
c]->istransformed);
6710 for( v =
nvars - 1; v > 0; --v )
6715 if(
nvars < nminvars )
6718 else if(
nvars > nmaxvars )
6721 assert(nminvars <= nmaxvars);
6724 for( v = 0, v2 = 0; v < neqvars && v2 <
nvars; )
6735 if( index1 < index2 )
6737 else if( index1 > index2 )
6741 assert(index1 == index2);
6744 if( nneweqvars < v )
6745 eqvars[nneweqvars] = eqvars[v];
6751 neqvars = nneweqvars;
6793 if( neqvars > 0 && ((nminvars == nmaxvars && nminvars == neqvars + 1) || (nminvars == neqvars) || (type ==
SCIP_SETPPCTYPE_PARTITIONING)) )
6800 SCIP_Bool infeasible;
6802 SCIP_Bool createcons;
6803 SCIP_Bool deletecons;
6823 if( neqvars == nminvars )
6826 createcons = (
SCIPisLE(
scip, lhs, rhs) && ((nminvars == nmaxvars && nminvars == neqvars + 1) || (nminvars == neqvars)));
6831 lincons = consdata->lincons;
6849 for(
c = nconsanddatas - 1;
c >= 0; --
c )
6855 consanddata = consanddatas[
c];
6857 assert(consanddatas[
c]->istransformed);
6873 if( deletecons && neqvars + 1 <
nvars )
6892 for( v = 0, v2 = 0; v < neqvars && v2 <
nvars; )
6903 assert(index1 >= index2);
6905 if( index1 > index2 )
6912 else if( deletecons )
6929 assert(index1 == index2);
6940 for( ; v2 <
nvars; ++v2)
6946 else if( deletecons )
6967 for( v = 0; v < neqvars; ++v )
7038 int*
const ndelconss,
7039 int*
const naddconss,
7040 int*
const nfixedvars,
7041 int*
const nchgcoefs,
7042 int*
const nchgsides,
7067 consanddatas = consdata->consanddatas;
7068 assert(consdata->nconsanddatas == 0 || consanddatas !=
NULL);
7072 if( consdata->nconsanddatas == 0 )
7088 assert(consdata->nlinvars + consdata->nconsanddatas ==
nvars);
7090 switch( consdata->linconstype )
7107#ifdef WITHEQKNAPSACK
7108 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
7125 consdata->upgradetried =
TRUE;
7136 int*
const ndelconss,
7137 int*
const naggrvars,
7173 consanddatas = consdata->consanddatas;
7174 nconsanddatas = consdata->nconsanddatas;
7175 assert(nconsanddatas == 0 || consanddatas !=
NULL);
7184 if( nconsanddatas < 2 || nconsanddatas > 3 )
7190 assert(consdata->nlinvars + nconsanddatas ==
nvars);
7193 if( consdata->nlinvars != 1 )
7197 if( consanddatas[0]->nnewvars > 0 )
7202 if( consanddatas[1]->nnewvars > 0 )
7204 if(
nvars != consanddatas[1]->nnewvars )
7222 if( consanddatas[nconsanddatas - 1]->nnewvars > 0 )
7225 vars = consanddatas[nconsanddatas - 1]->
vars;
7233 for( v = 1; v <
nvars; ++v )
7258 for( v =
nvars - 1; v >= 0; --v )
7269 ++(varcount[negated[v]][v]);
7272 for(
c = nconsanddatas - 2;
c >= 0; --
c )
7277 if( consanddatas[nconsanddatas - 1]->nnewvars > 0 )
7291 for( v = 1; v <
nvars; ++v )
7316 for( v =
nvars - 1; v >= 0; --v )
7330 ++(varcount[negated[v]][pos]);
7343 for(
i = 1;
i >= 0; --
i )
7345 for( v =
nvars - 1; v >= 0; --v )
7349 if( varcount[
i][v] == 0 )
7351 else if( varcount[
i][v] == 1 )
7353 else if( varcount[
i][v] == 2 )
7361 if( othercount == 0 )
7366 if( nconsanddatas == 2 && twocount ==
nvars - 1 && onecount == 2 && zerocount == 1 )
7369 SCIP_Real* conscoefs;
7381 assert(nconsvars == consdata->nlinvars + nconsanddatas);
7386 for( v = 0; v < nconsvars; ++v )
7405 SCIP_Bool redundant;
7406 SCIP_Bool infeasible;
7407 SCIP_Bool aggregated;
7413 for(
i = 1;
i >= 0; --
i )
7415 for( v =
nvars - 1; v >= 0; --v )
7418 if( varcount[
i][v] == 2 )
7474 else if(
nvars == 2 && nconsanddatas == 3 && twocount == 2 && onecount == 2 && zerocount == 0)
7477 SCIP_Real* conscoefs;
7493 assert(nconsvars == consdata->nlinvars + nconsanddatas);
7498 for( v = 0; v < nconsvars; ++v )
7512 newandvars[0] =
NULL;
7513 newandvars[1] =
NULL;
7517 for(
i = 1;
i >= 0; --
i )
7519 for( v =
nvars - 1; v >= 0; --v )
7522 if( varcount[
i][v] == 1 )
7524 if( newandvars[0] ==
NULL )
7590 SCIP_Real* tmpvals =
NULL;
7592 SCIP_Real constant = 0.0;
7635 if( consdata->intvar !=
NULL )
7637 vars[0] = consdata->intvar;
7661 for(
i = 0;
i < tmpnvars; ++
i )
7662 vals[
i] = tmpvals[
i];
7667 for(
i = 0;
i < tmpnvars; ++
i )
7673 for(
i = 0;
i < tmpnvars; ++
i )
7679 for(
i = 0;
i < tmpnvars; ++
i )
7691 for(
i = 0;
i < tmpnvars; ++
i )
7704 for(
c = 0;
c < consdata->nconsanddatas; ++
c )
7711 tmpnvars = consdata->consanddatas[
c]->nvars;
7712 for(
i = 0;
i < tmpnvars; ++
i )
7713 vars[
i] = consdata->consanddatas[
c]->vars[
i];
7714 for(
i = 0;
i < tmpnvars; ++
i )
7736#ifdef NONLINCONSUPGD_PRIORITY
7742 SCIP_EXPRGRAPH* exprgraph;
7743 SCIP_EXPRGRAPHNODE* node;
7753 SCIP_Real* termvals;
7762 node = SCIPgetExprgraphNodeNonlinear(
scip, cons);
7768 switch( SCIPexprgraphGetNodeOperator(node) )
7770 case SCIP_EXPR_VARIDX:
7771 case SCIP_EXPR_CONST:
7772 case SCIP_EXPR_PLUS:
7773 case SCIP_EXPR_MINUS:
7775 case SCIP_EXPR_LINEAR:
7781 case SCIP_EXPR_SQUARE:
7782 case SCIP_EXPR_SQRT:
7783 case SCIP_EXPR_REALPOWER:
7784 case SCIP_EXPR_INTPOWER:
7785 case SCIP_EXPR_SIGNPOWER:
7796 case SCIP_EXPR_SIGN:
7797 case SCIP_EXPR_PRODUCT:
7798 case SCIP_EXPR_USER:
7802 case SCIP_EXPR_QUADRATIC:
7805 case SCIP_EXPR_POLYNOMIAL:
7809 case SCIP_EXPR_PARAM:
7810 case SCIP_EXPR_LAST:
7820 for(
i = 0;
i < SCIPgetNLinearVarsNonlinear(
scip, cons); ++
i )
7822 var = SCIPgetLinearVarsNonlinear(
scip, cons)[
i];
7828#ifdef SCIP_DISABLED_CODE
7830 if( objvar ==
NULL && SCIPgetLinearCoefsNonlinear(
scip, cons)[
i] == -1.0 &&
7847 for(
i = 0;
i < SCIPexprgraphGetNodeNChildren(node); ++
i )
7849 SCIP_EXPRGRAPHNODE* child;
7851 child = SCIPexprgraphGetNodeChildren(node)[
i];
7853 if( SCIPexprgraphGetNodeOperator(child) != SCIP_EXPR_VARIDX )
7855 SCIPdebugMsg(
scip,
"not pseudoboolean because child %d is not a variable\n",
i);
7859 var = (
SCIP_VAR*)SCIPexprgraphGetNodeVar(exprgraph, child);
7870 if( upgdconsssize < 1 )
7880 lhs -= SCIPexprgraphGetNodePolynomialConstant(node);
7882 rhs -= SCIPexprgraphGetNodePolynomialConstant(node);
7885 if( objvar !=
NULL )
7889 for(
i = 0;
i < SCIPgetNLinearVarsNonlinear(
scip, cons); ++
i )
7891 var = SCIPgetLinearVarsNonlinear(
scip, cons)[
i];
7893 linvars[nlinvars++] =
var;
7897 nlinvars = SCIPgetNLinearVarsNonlinear(
scip, cons);
7900 nterms = SCIPexprgraphGetNodePolynomialNMonomials(node);
7907 SCIP_EXPRDATA_MONOMIAL* monomial;
7909 monomial = SCIPexprgraphGetNodePolynomialMonomials(node)[
i];
7912 ntermvars[
i] = SCIPexprGetMonomialNFactors(monomial);
7915 for( j = 0; j < SCIPexprGetMonomialNFactors(monomial); ++j )
7917 terms[
i][j] = (
SCIP_VAR*)SCIPexprgraphGetNodeVar(exprgraph, SCIPexprgraphGetNodeChildren(node)[SCIPexprGetMonomialChildIndices(monomial)[j]]);
7918 assert(SCIPexprGetMonomialExponents(monomial)[j] > 0.0);
7921 termvals[
i] = SCIPexprGetMonomialCoef(monomial);
7926 objvar !=
NULL ? linvars : SCIPgetLinearVarsNonlinear(
scip, cons), nlinvars, SCIPgetLinearCoefsNonlinear(
scip, cons),
7998 for(
c = conshdlrdata->nallconsanddatas - 1;
c >= 0; --
c )
8008 assert(conshdlrdata->allconsanddatas[
c]->newvars ==
NULL);
8010 vars = conshdlrdata->allconsanddatas[
c]->vars;
8011 nvars = conshdlrdata->allconsanddatas[
c]->nvars;
8015 for( v =
nvars - 1; v > 0; --v )
8023 andcons = conshdlrdata->allconsanddatas[
c]->cons;
8034 SCIPconsGetName(conshdlrdata->allconsanddatas[
c]->cons), (
void*)(conshdlrdata->allconsanddatas[
c]),
8035 (
void*)(conshdlrdata->allconsanddatas[
c]->cons));
8056 if( conshdlrdata->decomposeindicatorpbcons || conshdlrdata->decomposenormalpbcons )
8058 for(
c = 0;
c < nconss; ++
c )
8087 if( consdata->issoftcons && conshdlrdata->decomposeindicatorpbcons )
8094 SCIP_Bool updateandconss;
8096#if USEINDICATOR == FALSE
8106 assert(consdata->weight != 0);
8122 updateandconss =
FALSE;
8124#if USEINDICATOR == FALSE
8129 for( v =
nvars - 1; v >= 0; --v )
8163 updateandconss =
TRUE;
8175 ub = lhs - maxact - 1;
8206 if( !updateandconss )
8222 lb = rhs - minact + 1;
8257 updateandconss =
TRUE;
8270 for( v =
nvars - 1; v >= 0; --v )
8280 if( !updateandconss )
8298 else if( !consdata->issoftcons && conshdlrdata->decomposenormalpbcons )
8309 if( consdata->intvar !=
NULL )
8354 for(
c = (*consdata)->nconsanddatas - 1;
c >= 0; --
c )
8356 assert((*consdata)->consanddatas[
c]->nuses == 0);
8357 assert((*consdata)->consanddatas[
c]->cons ==
NULL);
8358 assert((*consdata)->consanddatas[
c]->noriguses == 0 || ((*consdata)->consanddatas[
c]->origcons !=
NULL &&
SCIPconsIsOriginal((*consdata)->consanddatas[
c]->origcons)));
8361 conshdlrdata->noriguses -= (*consdata)->nconsanddatas;
8363 assert(conshdlrdata->noriguses >= 0);
8390 assert(sourcedata->nconsanddatas == 0 || sourcedata->consanddatas !=
NULL);
8396 for(
c = sourcedata->nconsanddatas - 1;
c >= 0; --
c )
8399 andconss[
c] = sourcedata->consanddatas[
c]->origcons;
8406 andconss, sourcedata->andcoefs, sourcedata->andnegs, sourcedata->nconsanddatas, sourcedata->indvar, sourcedata->weight,
8407 sourcedata->issoftcons, sourcedata->intvar, sourcedata->lhs, sourcedata->rhs,
SCIPconsIsChecked(sourcecons),
8524 if( consdata->issoftcons )
8557 int firstupgradetry;
8573 oldnfixedvars = *nfixedvars;
8574 oldnaggrvars = *naggrvars;
8575 oldnchgbds = *nchgbds;
8576 oldndelconss = *ndelconss;
8577 oldnupgdconss = *nupgdconss;
8578 oldnchgcoefs = *nchgcoefs;
8579 oldnchgsides = *nchgsides;
8587 firstchange = INT_MAX;
8588 firstupgradetry = INT_MAX;
8599 SCIP_Real* lincoefs;
8602 SCIP_Real* andcoefs;
8654 andress, andcoefs, andnegs, &nandress) );
8667 if( firstchange == INT_MAX && consdata->changed )
8680 if( consdata->changed )
8693 if( firstupgradetry == INT_MAX && !consdata->upgradetried )
8694 firstupgradetry =
c;
8699 consdata->presolved =
TRUE;
8717 consdata->changed =
FALSE;
8736 else if( *nfixedvars > oldnfixedvars || *naggrvars > oldnaggrvars || *nchgbds > oldnchgbds || *ndelconss > oldndelconss
8737 || *nupgdconss > oldnupgdconss || *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides )
8766 lhs = consdata->lhs;
8767 rhs = consdata->rhs;
8775 SCIPdebugMsg(
scip,
"%socking constraint <%s> by [%d;%d].\n", (nlocksneg < 0) || (nlockspos < 0) ?
"Unl" :
"L",
SCIPconsGetName(cons), nlocksneg, nlockspos);
8778 for(
c = consdata->nconsanddatas - 1;
c >= 0; --
c )
8787 consanddata = consdata->consanddatas[
c];
8793 andcons = consanddata->
cons;
8795 if( andcons ==
NULL )
8804 consanddata->
nvars = 0;
8805 consanddata->
svars = 0;
8815 andvars = consanddata->
newvars;
8820 andvars = consanddata->
vars;
8821 nandvars = consanddata->
nvars;
8828 val = consdata->andnegs[
c] ? -consdata->andcoefs[
c] : consdata->andcoefs[
c];
8835 for( v = nandvars - 1; v >= 0; --v )
8845 for( v = nandvars - 1; v >= 0; --v )
8862 for( v = nandvars - 1; v >= 0; --v )
8872 for( v = nandvars - 1; v >= 0; --v )
8908 const char* consname;
8920 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
8940 SCIP_Bool transformed;
8978 assert(nlinconsvars >= 0);
8981 if( nlinconsvars == 0 )
8988 else if( varssize < nlinconsvars )
9009 assert(nlinconsvars == nlinvars + nandress);
9031 for(
r = nandress - 1;
r >= 0; --
r )
9043 andcons = consanddata->
cons;
9050 if( varssize <=
nvars )
9069 if( varssize <
nvars + noperands )
9109 SCIP_Bool transformed;
9142 assert(nlinconsvars >= 0);
9145 if( nlinconsvars == 0 )
9166 assert(nlinconsvars == nlinvars + nandress);
9182 for(
r = nandress - 1;
r >= 0; --
r )
9194 andcons = consanddata->
cons;
9257 consEnfolpPseudoboolean, consEnfopsPseudoboolean, consCheckPseudoboolean, consLockPseudoboolean,
9280 "decompose all normal pseudo boolean constraint into a \"linear\" constraint and \"and\" constraints",
9284 "decompose all indicator pseudo boolean constraint into a \"linear\" constraint and \"and\" constraints",
9287 "constraints/" CONSHDLR_NAME "/nlcseparate",
"should the nonlinear constraints be separated during LP processing?",
9290 "constraints/" CONSHDLR_NAME "/nlcpropagate",
"should the nonlinear constraints be propagated during node processing?",
9293 "constraints/" CONSHDLR_NAME "/nlcremovable",
"should the nonlinear constraints be removable?",
9296#ifdef NONLINCONSUPGD_PRIORITY
9315 SCIP_Real* andcoefs,
9319 SCIP_Bool issoftcons,
9337 SCIP_Bool modifiable,
9343 SCIP_Bool removable,
9345 SCIP_Bool stickingatnode
9357 SCIP_Bool memisinvalid;
9358 SCIP_Bool transformed;
9366 assert(nandconss == 0 || (andconss !=
NULL && andcoefs !=
NULL));
9369 if( intvar !=
NULL )
9372 SCIPerrorMessage(
"intvar currently not supported by pseudo boolean constraint handler\n");
9378 if( conshdlr ==
NULL )
9393 assert(conshdlrdata->allconsanddatas !=
NULL);
9394 assert(conshdlrdata->nallconsanddatas <= conshdlrdata->sallconsanddatas);
9396 memisinvalid =
TRUE;
9402 for(
c = nandconss - 1;
c >= 0; --
c )
9457 newdata->
cons = andconss[
c];
9460 for( v = newdata->
nvars - 1; v >= 0; --v )
9476 if( tmpdata ==
NULL || (tmpdata->
cons != andconss[
c] && tmpdata->
origcons != andconss[
c]))
9480 SCIPwarningMessage(
scip,
"Another and-constraint with the same variables but different and-resultant is added to the global and-constraint hashtable of pseudoboolean constraint handler.\n");
9484 if( conshdlrdata->nallconsanddatas == conshdlrdata->sallconsanddatas )
9489 conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas] = newdata;
9490 ++(conshdlrdata->nallconsanddatas);
9496 memisinvalid =
TRUE;
9512 newdata->noriguses = 1;
9522 memisinvalid =
FALSE;
9566 indvar, weight, issoftcons, intvar, lhs, rhs, check,
FALSE) );
9570 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
9571 local, modifiable, dynamic, removable, stickingatnode) );
9595 SCIP_Real* termvals,
9598 SCIP_Bool issoftcons,
9616 SCIP_Bool modifiable,
9622 SCIP_Bool removable,
9624 SCIP_Bool stickingatnode
9634 SCIP_Real* andcoefs;
9647 if( intvar !=
NULL )
9650 SCIPerrorMessage(
"intvar currently not supported by pseudo boolean constraint handler\n");
9656 if( conshdlr ==
NULL )
9662#if USEINDICATOR == TRUE
9663 if( issoftcons && modifiable )
9665 SCIPerrorMessage(
"Indicator constraint handler can't work with modifiable constraints\n");
9686 initial, enforce, check, local, modifiable, dynamic, stickingatnode,
9687 andconss, andcoefs, andnegs, &nandconss) );
9691 for(
c = nandconss - 1;
c >= 0; --
c )
9710 &lhs, &rhs, initial, separate, enforce,
FALSE,
propagate, local, modifiable, dynamic, removable,
9711 stickingatnode, &lincons, &linconstype) );
9718 indvar, weight, issoftcons, intvar, lhs, rhs, check,
FALSE) );
9728 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
9729 local, modifiable, dynamic, removable, stickingatnode) );
9751 SCIP_Real* termvals,
9754 SCIP_Bool issoftcons,
9763 terms,
nterms, ntermvars, termvals, indvar, weight, issoftcons, intvar, lhs, rhs,
9802 switch( consdata->linconstype )
9825#ifdef WITHEQKNAPSACK
9826 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
9830 SCIP_CALL( SCIPaddCoefEQKnapsack(
scip, consdata->lincons,
var, (SCIP_Longint) val) );
9839 consdata->propagated =
FALSE;
9840 consdata->presolved =
FALSE;
9841 consdata->cliquesadded =
FALSE;
9898 return consdata->indvar;
9922 return consdata->lincons;
9946 return consdata->linconstype;
9972 return consdata->nlinvars;
9980 SCIP_Real*
const lincoefs,
10008 if( *nlinvars < consdata->nlinvars )
10010 *nlinvars = consdata->nlinvars;
10025 SCIP_CALL(
getLinVarsAndAndRess(
scip, cons,
vars, coefs,
nvars, linvars, lincoefs, nlinvars,
NULL,
NULL,
NULL,
NULL) );
10040 SCIP_Real*
const andcoefs,
10041 int*
const nandconss
10052 assert(*nandconss == 0 || andconss !=
NULL);
10053 assert(*nandconss == 0 || andcoefs !=
NULL);
10067 if( *nandconss < consdata->nconsanddatas )
10069 *nandconss = consdata->nconsanddatas;
10073 *nandconss = consdata->nconsanddatas;
10074 assert(*nandconss == 0 || consdata->consanddatas !=
NULL);
10078 for(
c = *nandconss - 1;
c >= 0; --
c )
10081 assert(consdata->consanddatas[
c]->istransformed ? (consdata->consanddatas[
c]->cons !=
NULL) :
TRUE);
10082 assert(consdata->consanddatas[
c]->isoriginal ? (consdata->consanddatas[
c]->origcons !=
NULL) :
TRUE);
10083 assert(consdata->consanddatas[
c]->cons !=
NULL || consdata->consanddatas[
c]->origcons !=
NULL);
10084 assert(isorig ? consdata->consanddatas[
c]->origcons !=
NULL : consdata->consanddatas[
c]->cons !=
NULL);
10086 andconss[
c] = (isorig ? consdata->consanddatas[
c]->origcons : consdata->consanddatas[
c]->cons);
10089 andcoefs[
c] = consdata->andcoefs[
c];
10118 return consdata->nconsanddatas;
10131 SCIP_Real
const lhs
10150 switch( consdata->linconstype )
10158#ifdef WITHEQKNAPSACK
10159 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
10161 SCIPerrorMessage(
"changing left hand side only allowed on standard linear constraint \n");
10182 SCIP_Real
const rhs
10198 switch( consdata->linconstype )
10206#ifdef WITHEQKNAPSACK
10207 case SCIP_LINEARCONSTYPE_EQKNAPSACK:
10209 SCIPerrorMessage(
"changing right hand side only allowed on standard linear constraint \n");
10242 return consdata->lhs;
10267 return consdata->rhs;
Constraint handler for AND constraints, .
constraint handler for indicator constraints
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for linear constraints in their most general form, .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
constraint handler for nonlinear constraints specified by algebraic expressions
static SCIP_RETCODE createAndAddLinearCons(SCIP *const scip, SCIP_CONSHDLR *const conshdlr, SCIP_VAR **const linvars, int const nlinvars, SCIP_Real *const linvals, SCIP_VAR **const andress, int const nandress, SCIP_Real const *const andvals, SCIP_Bool *const andnegs, SCIP_Real *const lhs, SCIP_Real *const rhs, SCIP_Bool const initial, SCIP_Bool const separate, SCIP_Bool const enforce, SCIP_Bool const check, SCIP_Bool const propagate, SCIP_Bool const local, SCIP_Bool const modifiable, SCIP_Bool const dynamic, SCIP_Bool const removable, SCIP_Bool const stickingatnode, SCIP_CONS **const lincons, SCIP_LINEARCONSTYPE *const linconstype)
#define CONSHDLR_NEEDSCONS
static SCIP_RETCODE checkAndConss(SCIP *const scip, SCIP_CONSHDLR *const conshdlr, SCIP_SOL *const sol, SCIP_Bool *const violated)
static SCIP_RETCODE getLinVarsAndAndRess(SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const vars, SCIP_Real *const coefs, int const nvars, SCIP_VAR **const linvars, SCIP_Real *const lincoefs, int *const nlinvars, SCIP_VAR **const andress, SCIP_Real *const andcoefs, SCIP_Bool *const andnegs, int *const nandress)
#define HASHSIZE_PSEUDOBOOLEANNONLINEARTERMS
static SCIP_RETCODE conshdlrdataCreate(SCIP *const scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE lockRoundingAndCons(SCIP *const scip, SCIP_CONS *const cons, CONSANDDATA *const consanddata, SCIP_Real const coef, SCIP_Real const lhs, SCIP_Real const rhs)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE copyConsPseudoboolean(SCIP *const targetscip, SCIP_CONS **targetcons, SCIP *const sourcescip, SCIP_CONS *const sourcecons, const char *name, SCIP_HASHMAP *const varmap, SCIP_HASHMAP *const consmap, SCIP_Bool const initial, SCIP_Bool const separate, SCIP_Bool const enforce, SCIP_Bool const check, SCIP_Bool const propagate, SCIP_Bool const local, SCIP_Bool const modifiable, SCIP_Bool const dynamic, SCIP_Bool const removable, SCIP_Bool const stickingatnode, SCIP_Bool const global, SCIP_Bool *const valid)
static SCIP_RETCODE getLinearConsNVars(SCIP *const scip, SCIP_CONS *const cons, SCIP_LINEARCONSTYPE const constype, int *const nvars)
static SCIP_RETCODE checkLocksAndRes(SCIP *const scip, SCIP_VAR *res)
static SCIP_RETCODE propagateCons(SCIP *const scip, SCIP_CONS *const cons, SCIP_Bool *const cutoff, int *const ndelconss)
static SCIP_RETCODE getLinearConsSides(SCIP *const scip, SCIP_CONS *const cons, SCIP_LINEARCONSTYPE const constype, SCIP_Real *const lhs, SCIP_Real *const rhs)
#define DEFAULT_DECOMPOSEINDICATORPBCONS
static SCIP_RETCODE conshdlrdataFree(SCIP *const scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE chgRhsLinearCons(SCIP *const scip, SCIP_CONS *const cons, SCIP_LINEARCONSTYPE const constype, SCIP_Real const rhs)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE computeConsAndDataChanges(SCIP *const scip, SCIP_CONSHDLRDATA *const conshdlrdata)
static SCIP_RETCODE getLinearConsVarsData(SCIP *const scip, SCIP_CONS *const cons, SCIP_LINEARCONSTYPE const constype, SCIP_VAR **const vars, SCIP_Real *const coefs, int *const nvars)
#define checkConsConsistency(scip, cons)
static SCIP_RETCODE tryUpgradingLogicor(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss, int *const naddconss, int *const nfixedvars, int *const nchgcoefs, int *const nchgsides, SCIP_Bool *const cutoff)
static SCIP_RETCODE unlockRoundingAndCons(SCIP *const scip, SCIP_CONS *const cons, CONSANDDATA *const consanddata, SCIP_Real const coef, SCIP_Real const lhs, SCIP_Real const rhs)
static SCIP_RETCODE addCoefTerm(SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const vars, int const nvars, SCIP_Real const val)
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
#define DEFAULT_PROPAGATENONLINEAR
static SCIP_RETCODE inithashmapandtable(SCIP *const scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE createAndAddAndCons(SCIP *const scip, SCIP_CONSHDLR *const conshdlr, SCIP_VAR **const vars, int const nvars, SCIP_Bool const initial, SCIP_Bool const enforce, SCIP_Bool const check, SCIP_Bool const local, SCIP_Bool const modifiable, SCIP_Bool const dynamic, SCIP_Bool const stickingatnode, SCIP_CONS **const andcons)
static SCIP_RETCODE consdataPrint(SCIP *const scip, SCIP_CONS *const cons, FILE *const file)
#define NONLINCONSUPGD_PRIORITY
static SCIP_RETCODE addNewLocks(SCIP *const scip, SCIP_CONS *const cons, CONSANDDATA *const consanddata, SCIP_Real const coef, SCIP_Real const lhs, SCIP_Real const rhs)
static SCIP_RETCODE consdataCreate(SCIP *const scip, SCIP_CONSHDLR *const conshdlr, SCIP_CONSDATA **consdata, SCIP_CONS *const lincons, SCIP_LINEARCONSTYPE const linconstype, SCIP_CONS **const andconss, SCIP_Real *const andcoefs, SCIP_Bool *const andnegs, int const nandconss, SCIP_VAR *const indvar, SCIP_Real const weight, SCIP_Bool const issoftcons, SCIP_VAR *const intvar, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool check, SCIP_Bool transforming)
static SCIP_RETCODE transformToOrig(SCIP *const scip, CONSANDDATA *consanddata, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE addCliques(SCIP *const scip, SCIP_CONS *const cons, SCIP_Bool *const cutoff, int *const naggrvars, int *const nchgbds)
static SCIP_RETCODE chgLhs(SCIP *const scip, SCIP_CONS *const cons, SCIP_Real lhs)
#define DEFAULT_REMOVABLENONLINEAR
static SCIP_RETCODE updateConsanddataUses(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss)
#define DEFAULT_SEPARATENONLINEAR
static SCIP_RETCODE findAggregation(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss, int *const naggrvars, SCIP_Bool *const cutoff)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE createAndAddAnds(SCIP *const scip, SCIP_CONSHDLR *const conshdlr, SCIP_VAR **const *const terms, SCIP_Real *const termcoefs, int const nterms, int const *const ntermvars, SCIP_Bool const initial, SCIP_Bool const enforce, SCIP_Bool const check, SCIP_Bool const local, SCIP_Bool const modifiable, SCIP_Bool const dynamic, SCIP_Bool const stickingatnode, SCIP_CONS **const andconss, SCIP_Real *const andvals, SCIP_Bool *const andnegs, int *const nandconss)
static SCIP_RETCODE tryUpgrading(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss, int *const naddconss, int *const nfixedvars, int *const nchgcoefs, int *const nchgsides, SCIP_Bool *const cutoff)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE chgLhsLinearCons(SCIP *const scip, SCIP_CONS *const cons, SCIP_LINEARCONSTYPE const constype, SCIP_Real const lhs)
#define CONSHDLR_ENFOPRIORITY
#define DEFAULT_DECOMPOSENORMALPBCONS
static SCIP_RETCODE correctConshdlrdata(SCIP *const scip, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss)
static SCIP_RETCODE tryUpgradingSetppc(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss, int *const naddconss, int *const nfixedvars, int *const nchgcoefs, int *const nchgsides, SCIP_Bool *const cutoff)
static SCIP_RETCODE checkSolution(SCIP *const scip, SCIP_VAR **const vars, int const nvars, SCIP_Bool *const values, SCIP_VAR **const linvars, SCIP_Real *const lincoefs, int const nlinvars, SCIP_Real const constant, SCIP_Real const side, CONSANDDATA **const consanddatas, SCIP_Real *const consanddatacoefs, SCIP_Bool *const consanddatanegs, int const nconsanddatas, int const cnt, int *const xortype)
static SCIP_RETCODE checkOrigPbCons(SCIP *const scip, SCIP_CONS *const cons, SCIP_SOL *const sol, SCIP_Bool *const violated, SCIP_Bool const printreason)
static SCIP_RETCODE tryUpgradingXor(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, int *const ndelconss, int *const naddconss, int *const nfixedvars, int *const nchgcoefs, int *const nchgsides, SCIP_Bool *const cutoff)
static SCIP_RETCODE chgRhs(SCIP *const scip, SCIP_CONS *const cons, SCIP_Real rhs)
static SCIP_RETCODE updateAndConss(SCIP *const scip, SCIP_CONS *const cons)
static SCIP_RETCODE consdataFree(SCIP *const scip, SCIP_CONSDATA **consdata, SCIP_Bool isorig, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE removeOldLocks(SCIP *const scip, SCIP_CONS *const cons, CONSANDDATA *const consanddata, SCIP_Real const coef, SCIP_Real const lhs, SCIP_Real const rhs)
static SCIP_RETCODE correctLocksAndCaptures(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONSHDLRDATA *const conshdlrdata, SCIP_Real const newlhs, SCIP_Real const newrhs, SCIP_VAR **const andress, SCIP_Real *const andcoefs, SCIP_Bool *const andnegs, int const nandress)
constraint handler for pseudoboolean constraints
#define ARTIFICIALVARNAMEPREFIX
Constraint handler for the set partitioning / packing / covering constraints .
Constraint handler for XOR constraints, .
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIP_CALL_ABORT(x)
SCIP_RETCODE SCIPchgLhsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const lhs)
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIP_DECL_NONLINCONSUPGD(x)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_LINEARCONSTYPE SCIPgetLinearConsTypePseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
SCIP_RETCODE SCIPaddCoefPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR *const var, SCIP_Real const val)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPaddCoefKnapsack(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Longint weight)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr(SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
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)
int SCIPgetNAndsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
int SCIPgetNLinVarsWithoutAndPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetLinDatasWithoutAndPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const linvars, SCIP_Real *const lincoefs, int *const nlinvars)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr(SCIP *scip, SCIP_CONS *cons, SCIP_Bool flag)
SCIP_Real SCIPgetLhsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSetpack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, 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_VAR * SCIPgetIndVarPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsortAndCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisAndConsSorted(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddTermPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_VAR **const vars, int const nvars, SCIP_Real const val)
SCIP_RETCODE SCIPchgRhsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_Real const rhs)
SCIP_RETCODE SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
enum SCIP_SetppcType SCIP_SETPPCTYPE
SCIP_RETCODE SCIPcreateConsKnapsack(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Longint *weights, SCIP_Longint capacity, 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_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsSetpart(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_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicPseudoboolean(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **linvars, int nlinvars, SCIP_Real *linvals, SCIP_VAR ***terms, int nterms, int *ntermvars, SCIP_Real *termvals, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPgetAndDatasPseudoboolean(SCIP *const scip, SCIP_CONS *const cons, SCIP_CONS **const andconss, SCIP_Real *const andcoefs, int *const nandconss)
SCIP_CONS * SCIPgetLinearConsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
enum SCIP_LinearConsType SCIP_LINEARCONSTYPE
SCIP_RETCODE SCIPcreateConsPseudobooleanWithConss(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONS *lincons, SCIP_LINEARCONSTYPE linconstype, SCIP_CONS **andconss, SCIP_Real *andcoefs, int nandconss, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPcreateConsPseudoboolean(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **linvars, int nlinvars, SCIP_Real *linvals, SCIP_VAR ***terms, int nterms, int *ntermvars, SCIP_Real *termvals, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
SCIP_Real SCIPgetRhsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
SCIP_RETCODE SCIPaddCoefLogicor(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
@ SCIP_LINEARCONSTYPE_LINEAR
@ SCIP_LINEARCONSTYPE_INVALIDCONS
@ SCIP_LINEARCONSTYPE_LOGICOR
@ SCIP_LINEARCONSTYPE_KNAPSACK
@ SCIP_LINEARCONSTYPE_SETPPC
@ SCIP_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
SCIP_RETCODE SCIPincludeConshdlrPseudoboolean(SCIP *scip)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
SCIP_Bool SCIPisConsCompressionEnabled(SCIP *scip)
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_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNFixedVars(SCIP *scip)
SCIP_VAR ** SCIPgetFixedVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashFour(a, b, c, d)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
#define SCIPallocClearBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBufferArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_RETCODE SCIPremoveVarFromGlobalStructures(SCIP *scip, SCIP_VAR *var)
void SCIPvarsGetProbvar(SCIP_VAR **vars, int nvars)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetBinvarRepresentatives(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsTransformedOrigvar(SCIP_VAR *var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrBool(void **ptrarray, SCIP_Bool *boolarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrRealBool(void **ptrarray, SCIP_Real *realarray, SCIP_Bool *boolarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrReal(void **ptrarray, SCIP_Real *realarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrPtrRealBool(void **ptrarray1, void **ptrarray2, SCIP_Real *realarray, SCIP_Bool *boolarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
static volatile int nterms
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing constraints
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for SCIP variables
unsigned int istransformed
structs for symmetry computations
methods for dealing with symmetry detection graphs
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
#define SCIP_DECL_CONSINIT(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
enum SYM_Symtype SYM_SYMTYPE
@ SYM_CONSOPTYPE_PB_LINEAR
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_Varstatus SCIP_VARSTATUS