32 #define PRESOL_NAME "gateextraction" 33 #define PRESOL_DESC "presolver extracting gate(and)-constraints" 34 #define PRESOL_PRIORITY 1000000 35 #define PRESOL_MAXROUNDS -1 36 #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE 38 #define HASHSIZE_LOGICORCONS 500 39 #define HASHSIZE_SETPPCCONS 500 41 #define DEFAULT_ONLYSETPART FALSE 42 #define DEFAULT_SEARCHEQUATIONS TRUE 45 #define DEFAULT_SORTING 1 93 struct SCIP_PresolData
102 int nsetppchashdatas;
103 int ssetppchashdatas;
105 int firstchangedlogicor;
142 scip = (
SCIP*)userptr;
143 assert(scip !=
NULL);
147 assert(hashdata1->
nvars == 2);
148 assert(hashdata2->
nvars == 2);
154 for( v = 1; v >= 0; --v )
157 if( hashdata1->
vars[v] != hashdata2->
vars[v] )
177 unsigned int hashval;
180 assert(hashdata !=
NULL);
182 assert(hashdata->
nvars == 2);
205 scip = (
SCIP*)userptr;
206 assert(scip !=
NULL);
210 assert(hashdata1->
nvars >= 2);
211 assert(hashdata2->
nvars >= 2);
218 for( v = hashdata1->
nvars - 1; v >= 0; --v )
221 if( hashdata1->
vars[v] != hashdata2->
vars[v] )
243 assert(hashdata !=
NULL);
245 assert(hashdata->
nvars >= 2);
260 presoldata->usefullogicor =
NULL;
261 presoldata->nusefullogicor = 0;
262 presoldata->susefullogicor = 0;
263 presoldata->firstchangedlogicor = -1;
264 presoldata->maxnvarslogicor = 0;;
265 presoldata->nsetppchashdatas = 0;
266 presoldata->ssetppchashdatas = 0;
267 presoldata->ngates = 0;
268 presoldata->usefulsetppcexist =
FALSE;
269 presoldata->usefullogicorexist =
FALSE;
270 presoldata->newsetppchashdatas =
FALSE;
271 presoldata->initialized =
FALSE;
273 presoldata->hashdatatable =
NULL;
274 presoldata->setppchashtable =
NULL;
275 presoldata->logicorhashtable =
NULL;
285 assert(scip !=
NULL);
286 assert(presoldata !=
NULL);
288 assert(presoldata->nusefullogicor == 0);
289 assert(presoldata->susefullogicor == 0);
290 assert(presoldata->nsetppchashdatas == 0);
291 assert(presoldata->ssetppchashdatas == 0);
292 assert(presoldata->firstchangedlogicor == -1);
293 assert(presoldata->ngates == 0);
294 assert(presoldata->usefullogicorexist ==
FALSE);
295 assert(presoldata->usefulsetppcexist ==
FALSE);
296 assert(presoldata->newsetppchashdatas ==
FALSE);
297 assert(presoldata->initialized ==
FALSE);
299 assert(presoldata->hashdatatable ==
NULL);
300 assert(presoldata->setppchashtable ==
NULL);
301 assert(presoldata->logicorhashtable ==
NULL);
305 SCIPhashGetKeyStandard, hashdataKeyEqCons, hashdataKeyValCons, (
void*) scip) );
307 SCIPhashGetKeyStandard, SCIPhashKeyEqPtr, SCIPhashKeyValPtr, (
void*) scip) );
309 SCIPhashGetKeyStandard, SCIPhashKeyEqPtr, SCIPhashKeyValPtr, (
void*) scip) );
327 int nusefulconss = 0;
331 assert(scip !=
NULL);
332 assert(presoldata !=
NULL);
333 assert(setppcs !=
NULL);
334 assert(nsetppcs > 0);
335 assert(logicors !=
NULL);
336 assert(nlogicors > 0);
337 assert(presoldata->setppchashtable !=
NULL);
338 assert(presoldata->logicorhashtable !=
NULL);
340 presoldata->initialized =
TRUE;
342 size =
MAX(nsetppcs, nlogicors);
347 if( !presoldata->usefulsetppcexist )
350 for( c = 0; c < nsetppcs; ++c )
359 usefulconss[nusefulconss] = setppcs[c];
365 if( nusefulconss > 0 )
370 presoldata->usefulsetppcexist =
TRUE;
371 presoldata->ssetppchashdatas = nusefulconss;
376 for( c = 0; c < nusefulconss; ++c )
393 presoldata->setppchashdatas[h].nvars = 2;
402 SCIP_VAR* tmp = presoldata->setppchashdatas[h].vars[0];
403 presoldata->setppchashdatas[h].vars[0] = presoldata->setppchashdatas[h].vars[1];
404 presoldata->setppchashdatas[h].vars[1] = tmp;
407 presoldata->setppchashdatas[h].cons = usefulconss[c];
414 presoldata->nsetppchashdatas = h;
416 if( presoldata->nsetppchashdatas > 0 )
417 presoldata->newsetppchashdatas =
TRUE;
423 if( !presoldata->usefullogicorexist )
426 for( c = 0; c < nlogicors; ++c )
436 usefulconss[nusefulconss] = logicors[c];
446 if( nusefulconss > 0 )
448 presoldata->firstchangedlogicor = 0;
449 presoldata->usefullogicorexist =
TRUE;
450 presoldata->susefullogicor = nusefulconss;
451 presoldata->nusefullogicor = nusefulconss;
470 assert(scip !=
NULL);
471 assert(presoldata !=
NULL);
473 if( presoldata->usefulsetppcexist )
477 assert(presoldata->setppchashdatas !=
NULL || presoldata->nsetppchashdatas == 0);
479 for( c = presoldata->nsetppchashdatas - 1; c >= 0; --c )
483 assert(presoldata->setppchashdatas[c].cons !=
NULL);
500 || presoldata->setppchashdatas[c].vars[0] != vars[0] || presoldata->setppchashdatas[c].vars[1] != vars[1] )
509 assert(
SCIPhashtableExists(presoldata->setppchashtable, (
void*) presoldata->setppchashdatas[c].cons));
525 if( c < presoldata->nsetppchashdatas - 1 )
532 presoldata->setppchashdatas[c].cons = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].cons;
533 presoldata->setppchashdatas[c].vars = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].vars;
534 presoldata->setppchashdatas[c].nvars = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].nvars;
536 if( c < presoldata->nsetppchashdatas - 1 )
541 --(presoldata->nsetppchashdatas);
546 for( c = presoldata->nsetppchashdatas - 1; c >= 0; --c )
548 assert(presoldata->setppchashdatas[c].nvars == 2);
549 assert(presoldata->setppchashdatas[c].vars !=
NULL);
550 assert(presoldata->setppchashdatas[c].vars[0] !=
NULL);
551 assert(presoldata->setppchashdatas[c].vars[1] !=
NULL);
552 assert(presoldata->setppchashdatas[c].cons !=
NULL);
554 assert(
SCIPhashtableExists(presoldata->hashdatatable, (
void*) &presoldata->setppchashdatas[c]));
555 assert(
SCIPhashtableExists(presoldata->setppchashtable, (
void*) presoldata->setppchashdatas[c].cons));
574 int oldnsetppchashdatas;
577 assert(scip !=
NULL);
578 assert(presoldata !=
NULL);
579 assert(setppcs !=
NULL);
580 assert(nsetppcs > 0);
581 assert(logicors !=
NULL);
582 assert(nlogicors > 0);
583 assert(presoldata->initialized);
584 assert(presoldata->setppchashtable !=
NULL);
585 assert(presoldata->logicorhashtable !=
NULL);
588 if( !presoldata->usefulsetppcexist || !presoldata->usefullogicorexist )
590 SCIP_Bool usefullogicorexisted = presoldata->usefullogicorexist;
597 if( usefullogicorexisted && !presoldata->usefulsetppcexist )
600 for( c = nlogicors - 1; c >= 0; --c )
611 if( !presoldata->usefulsetppcexist || !presoldata->usefullogicorexist )
618 oldnsetppchashdatas = presoldata->nsetppchashdatas;
622 for( c = nsetppcs - 1; c >= 0; --c )
634 if( presoldata->nsetppchashdatas == presoldata->ssetppchashdatas )
642 if( newsize <= presoldata->ssetppchashdatas )
649 presoldata->ssetppchashdatas = newsize;
652 for( d = presoldata->nsetppchashdatas - 1; d >= 0; --d )
664 SCIP_CALL(
SCIPgetBinvarRepresentative(scip, presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0], &(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0]), &(negated[0])) );
665 SCIP_CALL(
SCIPgetBinvarRepresentative(scip, presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1], &(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1]), &(negated[1])) );
674 presoldata->setppchashdatas[presoldata->nsetppchashdatas].nvars = 2;
681 if(
SCIPvarGetIndex(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0]) >
SCIPvarGetIndex(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1]) )
683 SCIP_VAR* tmp = presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0];
684 presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0] = presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1];
685 presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1] = tmp;
688 presoldata->setppchashdatas[presoldata->nsetppchashdatas].cons = setppcs[c];
693 ++(presoldata->nsetppchashdatas);
699 if( oldnsetppchashdatas < presoldata->nsetppchashdatas )
700 presoldata->newsetppchashdatas =
TRUE;
704 while( presoldata->nusefullogicor > 0 && !
SCIPconsIsActive(presoldata->usefullogicor[presoldata->nusefullogicor - 1]) )
709 --(presoldata->nusefullogicor);
713 for( c = presoldata->nusefullogicor - 1; c >= 0; --c )
716 if( presoldata->maxnvarslogicor <
SCIPgetNVarsLogicor(scip, presoldata->usefullogicor[c]) )
724 presoldata->usefullogicor[c] = presoldata->usefullogicor[presoldata->nusefullogicor - 1];
725 --(presoldata->nusefullogicor);
729 presoldata->firstchangedlogicor = presoldata->nusefullogicor;
730 assert(presoldata->firstchangedlogicor >= 0);
733 for( c = nlogicors - 1; c >= 0; --c )
743 if( presoldata->nusefullogicor == presoldata->susefullogicor )
750 if( newsize <= presoldata->susefullogicor )
754 presoldata->susefullogicor = newsize;
761 presoldata->usefullogicor[presoldata->nusefullogicor] = logicors[c];
762 ++(presoldata->nusefullogicor);
800 assert(scip !=
NULL);
801 assert(presoldata !=
NULL);
802 assert(0 <= pos && pos < presoldata->nusefullogicor);
803 assert(gateconss !=
NULL);
804 assert(activevars !=
NULL);
805 assert(posresultants !=
NULL);
806 assert(hashdata !=
NULL);
808 assert(hashdata->
nvars == 2);
810 assert(ndelconss !=
NULL);
811 assert(naddconss !=
NULL);
813 assert(presoldata->usefullogicor !=
NULL);
814 logicor = presoldata->usefullogicor[pos];
815 assert(logicor !=
NULL);
823 assert(nlogicorvars >= 3 && nlogicorvars <= presoldata->maxnvarslogicor);
826 assert(logicorvars !=
NULL);
831 for( d = nlogicorvars - 1; d >= 0; --d )
839 if( activevars[d] ==
NULL )
852 posresultants[nposresultants] = activevars[d];
864 posresultants[nposresultants] = activevars[d];
872 if( nposresultants == 0 )
876 SCIPsortPtr((
void**)activevars, SCIPvarComp, nlogicorvars);
881 for( d = nlogicorvars - 1; d > 0; --d )
885 assert(presoldata->usefullogicor[pos] == logicor);
890 presoldata->usefullogicor[pos] = presoldata->usefullogicor[presoldata->nusefullogicor - 1];
891 --(presoldata->nusefullogicor);
899 for( d = nposresultants - 1; d >= 0; --d )
903 for( v = nlogicorvars - 1; v >= 0; --v )
905 if( activevars[v] == posresultants[d] )
911 hashdata->
vars[0] = activevars[v];
912 hashdata->
vars[1] = posresultants[d];
916 hashdata->
vars[0] = posresultants[d];
917 hashdata->
vars[1] = activevars[v];
924 gateconss[ngateconss] = hashmaphashdata->
cons;
930 if( ngateconss == nlogicorvars - 1 )
936 if( ngateconss == nlogicorvars - 1 && nlogicorvars == 3 )
938 assert(d >= 0 && d < nposresultants);
939 assert(ngateconss >= 2);
941 if( activevars[0] == posresultants[d] )
943 hashdata->
vars[0] = activevars[1];
944 hashdata->
vars[1] = activevars[2];
946 else if( activevars[1] == posresultants[d] )
948 hashdata->
vars[0] = activevars[0];
949 hashdata->
vars[1] = activevars[2];
953 assert(activevars[2] == posresultants[d]);
954 hashdata->
vars[0] = activevars[0];
955 hashdata->
vars[1] = activevars[1];
959 assert(hashmaphashdata ==
NULL || hashmaphashdata->
cons !=
NULL);
963 gateconss[ngateconss] = hashmaphashdata->
cons;
971 if( ngateconss == nlogicorvars || (ngateconss >= nlogicorvars - 1 && !presoldata->onlysetpart))
987 assert(ngateconss <= nlogicorvars);
988 assert(d >= 0 && d < nposresultants);
1002 if( ngateconss == nlogicorvars )
1004 SCIPdebugMsg(scip,
"Following constraints form a set-partitioning constraint.\n");
1008 SCIPdebugMsg(scip,
"Following constraints form an and-constraint.\n");
1012 for( v = ngateconss - 1; v >= 0; --v )
1014 assert(gateconss[v] !=
NULL);
1035 if( ngateconss == nlogicorvars - 1 )
1039 assert(!presoldata->onlysetpart);
1045 for( v = nlogicorvars - 1; v >= 0; --v )
1047 if( activevars[v] == posresultants[d] )
1053 assert(i == ngateconss);
1058 initial, separate, enforce, check, propagate,
1059 local, modifiable, dynamic, removable, stickingatnode) );
1066 ++(presoldata->ngates);
1077 assert(ngateconss == nlogicorvars);
1082 initial, separate, enforce, check, propagate,
1083 local, modifiable, dynamic, removable, stickingatnode) );
1090 ++(presoldata->ngates);
1112 assert(scip !=
NULL);
1113 assert(presol !=
NULL);
1131 assert(presoldata !=
NULL);
1133 if( presoldata->hashdatatable !=
NULL )
1135 assert(presoldata->setppchashtable !=
NULL);
1136 assert(presoldata->logicorhashtable !=
NULL);
1159 assert(presoldata !=
NULL);
1162 for( c = presoldata->nusefullogicor - 1; c >= 0; --c )
1167 if( presoldata->usefullogicorexist )
1172 if( presoldata->usefulsetppcexist )
1174 assert(presoldata->setppchashdatas !=
NULL || presoldata->nsetppchashdatas == 0);
1175 for( c = presoldata->nsetppchashdatas - 1; c >= 0; --c )
1177 assert(presoldata->setppchashdatas[c].cons !=
NULL);
1178 assert(presoldata->setppchashdatas[c].vars !=
NULL);
1181 assert(
SCIPhashtableExists(presoldata->setppchashtable, (
void*) presoldata->setppchashdatas[c].cons));
1202 if( presoldata->hashdatatable !=
NULL )
1204 assert(presoldata->setppchashtable !=
NULL);
1205 assert(presoldata->logicorhashtable !=
NULL);
1213 presoldata->nusefullogicor = 0;
1214 presoldata->susefullogicor = 0;
1215 presoldata->nsetppchashdatas = 0;
1216 presoldata->ssetppchashdatas = 0;
1217 presoldata->firstchangedlogicor = -1;
1218 presoldata->ngates = 0;
1219 presoldata->usefullogicorexist =
FALSE;
1220 presoldata->usefulsetppcexist =
FALSE;
1221 presoldata->newsetppchashdatas =
FALSE;
1222 presoldata->initialized =
FALSE;
1263 assert(scip !=
NULL);
1264 assert(presol !=
NULL);
1266 assert(result !=
NULL);
1295 assert(nknapsackconss >= 0);
1296 assert(knapsackconss !=
NULL || nknapsackconss == 0);
1298 for( c = nknapsackconss - 1; c >= 0; --c )
1308 if( nvars > 1 && capacity == nvars - 1 && vals[0] == capacity && vals[1] == 1 )
1310 printf(
"possible knapsack for gate extraction\n");
1320 if( conshdlrsetppc ==
NULL || conshdlrlogicor ==
NULL )
1325 assert(nsetppcconss >= 0);
1327 assert(nlogicorconss >= 0);
1329 if( nsetppcconss == 0 || nlogicorconss == 0 )
1334 assert(presoldata !=
NULL);
1339 if( conshdlrand ==
NULL )
1342 if( !presoldata->searchequations )
1353 assert(presoldata->onlysetpart);
1362 SCIPwarningMessage(scip,
"Gate-presolving is the 'counterpart' of linearizing all and-constraints, so enabling both presolving steps at ones does not make sense.\n");
1370 assert(setppcconss !=
NULL);
1372 assert(logicorconss !=
NULL);
1375 if( presoldata->hashdatatable ==
NULL )
1379 assert(presoldata->hashdatatable !=
NULL);
1380 assert(presoldata->setppchashtable !=
NULL);
1381 assert(presoldata->logicorhashtable !=
NULL);
1383 presoldata->newsetppchashdatas =
FALSE;
1385 if( !presoldata->initialized )
1387 assert(presoldata->usefullogicor ==
NULL);
1397 assert(presoldata->initialized);
1399 if( presoldata->nusefullogicor == 0 )
1404 if( presoldata->sorting != 0 )
1410 for( c = presoldata->nusefullogicor - 1; c >= 0; --c )
1415 if( presoldata->sorting == -1 )
1416 SCIPsortDownIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1418 SCIPsortIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1443 int nsetppchashdatas;
1449 assert(nsetppcconss > 0);
1455 size = presoldata->maxnvarslogicor;
1466 nsetppchashdatas = 0;
1469 for( d = nsetppcconss - 1; d >= 0; --d )
1471 setppc = setppcconss[d];
1472 assert(setppc !=
NULL);
1485 if( nsetppcvars < 2 )
1492 if( nsetppcvars > size )
1496 assert(setppcvars !=
NULL);
1499 for( v = nsetppcvars - 1; v >= 0; --v )
1507 if( activevarssetppc[v] ==
NULL )
1519 SCIPsortPtr((
void**)activevarssetppc, SCIPvarComp, nsetppcvars);
1521 setppchashdatas[nsetppchashdatas] = &(setppchashdatastore[nsetppchashdatas]);
1526 setppchashdatas[nsetppchashdatas]->
nvars = nsetppcvars;
1527 setppchashdatas[nsetppchashdatas]->
cons = setppc;
1537 for( c = nlogicorconss - 1; c >= 0 && !
SCIPisStopped(scip); --c )
1539 logicor = logicorconss[c];
1540 assert(logicor !=
NULL);
1547 if( nlogicorvars < 2 )
1553 assert(nlogicorvars <= size);
1556 assert(logicorvars !=
NULL);
1559 for( v = nlogicorvars - 1; v >= 0; --v )
1568 if( activevarslogicor[v] ==
NULL )
1575 SCIPsortPtr((
void**)activevarslogicor, SCIPvarComp, nlogicorvars);
1577 hashdata.
nvars = nlogicorvars;
1578 hashdata.
vars = activevarslogicor;
1581 assert(hashmaphashdata ==
NULL || hashmaphashdata->
cons !=
NULL);
1596 setppc = hashmaphashdata->
cons;
1624 SCIPdebugMsg(scip,
"Following logicor is redundant to the set-partitioning constraint.\n");
1635 SCIPdebugMsg(scip,
"Following logicor and set-packing constraints form a set-partitioning constraint.\n");
1642 initial, separate, enforce, check, propagate,
1643 local, modifiable, dynamic, removable, stickingatnode) );
1650 ++(presoldata->ngates);
1667 for( d = nsetppchashdatas - 1; d >= 0; --d )
1686 if( presoldata->nsetppchashdatas == 0 || (presoldata->firstchangedlogicor == presoldata->nusefullogicor && !presoldata->newsetppchashdatas) )
1692 assert(presoldata->usefullogicor !=
NULL);
1693 assert(presoldata->nusefullogicor > 0);
1694 assert(presoldata->firstchangedlogicor >= 0);
1695 assert(presoldata->nsetppchashdatas > 0);
1698 if( presoldata->nsetppchashdatas > 0 && !
SCIPisStopped(scip) )
1706 if( presoldata->newsetppchashdatas )
1709 endloop =
MAX(presoldata->firstchangedlogicor, 0);
1711 assert(presoldata->maxnvarslogicor >= 3);
1719 hashdata.
vars = tmpvars;
1724 for( c = presoldata->nusefullogicor - 1; c >= endloop && !
SCIPisStopped(scip); --c )
1726 assert(presoldata->usefullogicor[c] !=
NULL);
1738 SCIP_CALL(
extractGates(scip, presoldata, c, varmap, gateconss, activevars, posresultants, &hashdata, ndelconss, naddconss) );
1789 "should we only try to extract set-partitioning constraints and no and-constraints",
1795 "should we try to extract set-partitioning constraint out of one logicor and one corresponding set-packing constraint",
1801 "order logicor contraints to extract big-gates before smaller ones (-1), do not order them (0) or order them to extract smaller gates at first (1)",
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLFREE((*presolfree)))
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetPresolExit(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLEXIT((*presolexit)))
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIPfreeBlockMemory(scip, ptr)
void SCIPsortDownIntPtr(int *intarray, void **ptrarray, int len)
Constraint handler for AND constraints, .
#define SCIPduplicateBufferArray(scip, ptr, source, num)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPdebugPrintCons(x, y, z)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
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_Bool SCIPconsIsActive(SCIP_CONS *cons)
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)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
void SCIPsortIntPtr(int *intarray, void **ptrarray, int len)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
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_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
SCIP_RETCODE SCIPsetConsDynamic(SCIP *scip, SCIP_CONS *cons, SCIP_Bool dynamic)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
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)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
#define SCIPhashTwo(a, b)
void SCIPhashtableRemoveAll(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetPresolInitpre(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLINITPRE((*presolinitpre)))
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_Bool local)
int SCIPgetNImplVars(SCIP *scip)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
int SCIPgetNBinVars(SCIP *scip)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_RETCODE SCIPsetConsStickingAtNode(SCIP *scip, SCIP_CONS *cons, SCIP_Bool stickingatnode)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPincludePresolGateextraction(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIPcombineTwoInt(a, b)
SCIP_RETCODE SCIPsetPresolExitpre(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLEXITPRE((*presolexitpre)))
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
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)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)