54#define PRESOL_NAME "gateextraction"
55#define PRESOL_DESC "presolver extracting gate(and)-constraints"
56#define PRESOL_PRIORITY 1000000
57#define PRESOL_MAXROUNDS -1
58#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
60#define HASHSIZE_LOGICORCONS 500
61#define HASHSIZE_SETPPCCONS 500
63#define DEFAULT_ONLYSETPART FALSE
64#define DEFAULT_SEARCHEQUATIONS TRUE
67#define DEFAULT_SORTING 1
115struct SCIP_PresolData
124 int nsetppchashdatas;
125 int ssetppchashdatas;
127 int firstchangedlogicor;
176 for( v = 1; v >= 0; --v )
179 if( hashdata1->
vars[v] != hashdata2->
vars[v] )
199 unsigned int hashval;
240 for( v = hashdata1->
nvars - 1; v >= 0; --v )
243 if( hashdata1->
vars[v] != hashdata2->
vars[v] )
282 presoldata->usefullogicor =
NULL;
283 presoldata->nusefullogicor = 0;
284 presoldata->susefullogicor = 0;
285 presoldata->firstchangedlogicor = -1;
286 presoldata->maxnvarslogicor = 0;;
287 presoldata->nsetppchashdatas = 0;
288 presoldata->ssetppchashdatas = 0;
289 presoldata->ngates = 0;
290 presoldata->usefulsetppcexist =
FALSE;
291 presoldata->usefullogicorexist =
FALSE;
292 presoldata->newsetppchashdatas =
FALSE;
293 presoldata->initialized =
FALSE;
295 presoldata->hashdatatable =
NULL;
296 presoldata->setppchashtable =
NULL;
297 presoldata->logicorhashtable =
NULL;
310 assert(presoldata->nusefullogicor == 0);
311 assert(presoldata->susefullogicor == 0);
312 assert(presoldata->nsetppchashdatas == 0);
313 assert(presoldata->ssetppchashdatas == 0);
314 assert(presoldata->firstchangedlogicor == -1);
315 assert(presoldata->ngates == 0);
327 SCIPhashGetKeyStandard, hashdataKeyEqCons, hashdataKeyValCons, (
void*)
scip) );
329 SCIPhashGetKeyStandard, SCIPhashKeyEqPtr, SCIPhashKeyValPtr, (
void*)
scip) );
331 SCIPhashGetKeyStandard, SCIPhashKeyEqPtr, SCIPhashKeyValPtr, (
void*)
scip) );
349 int nusefulconss = 0;
362 presoldata->initialized =
TRUE;
364 size =
MAX(nsetppcs, nlogicors);
369 if( !presoldata->usefulsetppcexist )
372 for(
c = 0;
c < nsetppcs; ++
c )
383 usefulconss[nusefulconss] = setppcs[
c];
389 if( nusefulconss > 0 )
394 presoldata->usefulsetppcexist =
TRUE;
395 presoldata->ssetppchashdatas = nusefulconss;
400 for(
c = 0;
c < nusefulconss; ++
c )
418 presoldata->setppchashdatas[
h].nvars = 2;
427 SCIP_VAR* tmp = presoldata->setppchashdatas[
h].vars[0];
428 presoldata->setppchashdatas[
h].vars[0] = presoldata->setppchashdatas[
h].vars[1];
429 presoldata->setppchashdatas[
h].vars[1] = tmp;
432 presoldata->setppchashdatas[
h].cons = usefulconss[
c];
439 presoldata->nsetppchashdatas =
h;
441 if( presoldata->nsetppchashdatas > 0 )
442 presoldata->newsetppchashdatas =
TRUE;
448 if( !presoldata->usefullogicorexist )
451 for(
c = 0;
c < nlogicors; ++
c )
462 usefulconss[nusefulconss] = logicors[
c];
472 if( nusefulconss > 0 )
474 presoldata->firstchangedlogicor = 0;
475 presoldata->usefullogicorexist =
TRUE;
476 presoldata->susefullogicor = nusefulconss;
477 presoldata->nusefullogicor = nusefulconss;
499 if( presoldata->usefulsetppcexist )
503 assert(presoldata->setppchashdatas !=
NULL || presoldata->nsetppchashdatas == 0);
505 for(
c = presoldata->nsetppchashdatas - 1;
c >= 0; --
c )
509 assert(presoldata->setppchashdatas[
c].cons !=
NULL);
529 || presoldata->setppchashdatas[
c].vars[0] !=
vars[0] || presoldata->setppchashdatas[
c].vars[1] !=
vars[1] )
561 presoldata->setppchashdatas[
c].cons = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].cons;
562 presoldata->setppchashdatas[
c].vars = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].vars;
563 presoldata->setppchashdatas[
c].nvars = presoldata->setppchashdatas[presoldata->nsetppchashdatas - 1].nvars;
570 --(presoldata->nsetppchashdatas);
575 for(
c = presoldata->nsetppchashdatas - 1;
c >= 0; --
c )
577 assert(presoldata->setppchashdatas[
c].nvars == 2);
578 assert(presoldata->setppchashdatas[
c].vars !=
NULL);
579 assert(presoldata->setppchashdatas[
c].vars[0] !=
NULL);
580 assert(presoldata->setppchashdatas[
c].vars[1] !=
NULL);
581 assert(presoldata->setppchashdatas[
c].cons !=
NULL);
603 int oldnsetppchashdatas;
612 assert(presoldata->initialized);
617 if( !presoldata->usefulsetppcexist || !presoldata->usefullogicorexist )
619 SCIP_Bool usefullogicorexisted = presoldata->usefullogicorexist;
626 if( usefullogicorexisted && !presoldata->usefulsetppcexist )
629 for(
c = nlogicors - 1;
c >= 0; --
c )
640 if( !presoldata->usefulsetppcexist || !presoldata->usefullogicorexist )
647 oldnsetppchashdatas = presoldata->nsetppchashdatas;
651 for(
c = nsetppcs - 1;
c >= 0; --
c )
666 if( presoldata->nsetppchashdatas == presoldata->ssetppchashdatas )
674 if( newsize <= presoldata->ssetppchashdatas )
681 presoldata->ssetppchashdatas = newsize;
684 for( d = presoldata->nsetppchashdatas - 1; d >= 0; --d )
697 SCIP_CALL(
SCIPgetBinvarRepresentative(
scip, presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0], &(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0]), &(negated[0])) );
698 SCIP_CALL(
SCIPgetBinvarRepresentative(
scip, presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1], &(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1]), &(negated[1])) );
707 presoldata->setppchashdatas[presoldata->nsetppchashdatas].nvars = 2;
714 if(
SCIPvarGetIndex(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0]) >
SCIPvarGetIndex(presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1]) )
716 SCIP_VAR* tmp = presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0];
717 presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[0] = presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1];
718 presoldata->setppchashdatas[presoldata->nsetppchashdatas].vars[1] = tmp;
721 presoldata->setppchashdatas[presoldata->nsetppchashdatas].cons = setppcs[
c];
726 ++(presoldata->nsetppchashdatas);
732 if( oldnsetppchashdatas < presoldata->nsetppchashdatas )
733 presoldata->newsetppchashdatas =
TRUE;
737 while( presoldata->nusefullogicor > 0 && !
SCIPconsIsActive(presoldata->usefullogicor[presoldata->nusefullogicor - 1]) )
742 --(presoldata->nusefullogicor);
746 for(
c = presoldata->nusefullogicor - 1;
c >= 0; --
c )
759 presoldata->usefullogicor[
c] = presoldata->usefullogicor[presoldata->nusefullogicor - 1];
760 --(presoldata->nusefullogicor);
764 presoldata->firstchangedlogicor = presoldata->nusefullogicor;
765 assert(presoldata->firstchangedlogicor >= 0);
768 for(
c = nlogicors - 1;
c >= 0; --
c )
779 if( presoldata->nusefullogicor == presoldata->susefullogicor )
786 if( newsize <= presoldata->susefullogicor )
790 presoldata->susefullogicor = newsize;
797 presoldata->usefullogicor[presoldata->nusefullogicor] = logicors[
c];
798 ++(presoldata->nusefullogicor);
838 assert(0 <= pos && pos < presoldata->nusefullogicor);
850 logicor = presoldata->usefullogicor[pos];
859 assert(nlogicorvars >= 3 && nlogicorvars <= presoldata->maxnvarslogicor);
867 for( d = nlogicorvars - 1; d >= 0; --d )
875 if( activevars[d] ==
NULL )
888 posresultants[nposresultants] = activevars[d];
900 posresultants[nposresultants] = activevars[d];
908 if( nposresultants == 0 )
912 SCIPsortPtr((
void**)activevars, SCIPvarComp, nlogicorvars);
917 for( d = nlogicorvars - 1; d > 0; --d )
921 assert(presoldata->usefullogicor[pos] == logicor);
926 presoldata->usefullogicor[pos] = presoldata->usefullogicor[presoldata->nusefullogicor - 1];
927 --(presoldata->nusefullogicor);
935 for( d = nposresultants - 1; d >= 0; --d )
939 for( v = nlogicorvars - 1; v >= 0; --v )
941 if( activevars[v] == posresultants[d] )
947 hashdata->
vars[0] = activevars[v];
948 hashdata->
vars[1] = posresultants[d];
952 hashdata->
vars[0] = posresultants[d];
953 hashdata->
vars[1] = activevars[v];
960 gateconss[ngateconss] = hashmaphashdata->
cons;
966 if( ngateconss == nlogicorvars - 1 )
972 if( ngateconss == nlogicorvars - 1 && nlogicorvars == 3 )
974 assert(d >= 0 && d < nposresultants);
977 if( activevars[0] == posresultants[d] )
979 hashdata->
vars[0] = activevars[1];
980 hashdata->
vars[1] = activevars[2];
982 else if( activevars[1] == posresultants[d] )
984 hashdata->
vars[0] = activevars[0];
985 hashdata->
vars[1] = activevars[2];
989 assert(activevars[2] == posresultants[d]);
990 hashdata->
vars[0] = activevars[0];
991 hashdata->
vars[1] = activevars[1];
999 gateconss[ngateconss] = hashmaphashdata->
cons;
1007 if( ngateconss == nlogicorvars || (ngateconss >= nlogicorvars - 1 && !presoldata->onlysetpart))
1023 assert(ngateconss <= nlogicorvars);
1024 assert(d >= 0 && d < nposresultants);
1038 if( ngateconss == nlogicorvars )
1040 SCIPdebugMsg(
scip,
"Following constraints form a set-partitioning constraint.\n");
1048 for( v = ngateconss - 1; v >= 0; --v )
1071 if( ngateconss == nlogicorvars - 1 )
1075 assert(!presoldata->onlysetpart);
1081 for( v = nlogicorvars - 1; v >= 0; --v )
1083 if( activevars[v] == posresultants[d] )
1095 local, modifiable, dynamic, removable, stickingatnode) );
1103 ++(presoldata->ngates);
1112 assert(ngateconss == nlogicorvars);
1118 local, modifiable, dynamic, removable, stickingatnode) );
1126 ++(presoldata->ngates);
1168 if( presoldata->hashdatatable !=
NULL )
1171 assert(presoldata->logicorhashtable !=
NULL);
1197 for(
c = presoldata->nusefullogicor - 1;
c >= 0; --
c )
1202 if( presoldata->usefullogicorexist )
1207 if( presoldata->usefulsetppcexist )
1209 assert(presoldata->setppchashdatas !=
NULL || presoldata->nsetppchashdatas == 0);
1210 for(
c = presoldata->nsetppchashdatas - 1;
c >= 0; --
c )
1212 assert(presoldata->setppchashdatas[
c].cons !=
NULL);
1213 assert(presoldata->setppchashdatas[
c].vars !=
NULL);
1236 if( presoldata->hashdatatable !=
NULL )
1239 assert(presoldata->logicorhashtable !=
NULL);
1247 presoldata->nusefullogicor = 0;
1248 presoldata->susefullogicor = 0;
1249 presoldata->nsetppchashdatas = 0;
1250 presoldata->ssetppchashdatas = 0;
1251 presoldata->firstchangedlogicor = -1;
1252 presoldata->ngates = 0;
1253 presoldata->usefullogicorexist =
FALSE;
1254 presoldata->usefulsetppcexist =
FALSE;
1255 presoldata->newsetppchashdatas =
FALSE;
1256 presoldata->initialized =
FALSE;
1305#ifdef SCIP_DISABLED_CODE
1330 assert(nknapsackconss >= 0);
1331 assert(knapsackconss !=
NULL || nknapsackconss == 0);
1333 for(
c = nknapsackconss - 1;
c >= 0; --
c )
1342 if(
nvars > 1 && capacity ==
nvars - 1 && vals[0] == capacity && vals[1] == 1 )
1344 printf(
"possible knapsack for gate extraction\n");
1354 if( conshdlrsetppc ==
NULL || conshdlrlogicor ==
NULL )
1359 assert(nsetppcconss >= 0);
1361 assert(nlogicorconss >= 0);
1363 if( nsetppcconss == 0 || nlogicorconss == 0 )
1373 if( conshdlrand ==
NULL )
1376 if( !presoldata->searchequations )
1387 assert(presoldata->onlysetpart);
1396 SCIPwarningMessage(
scip,
"Gate-presolving is the 'counterpart' of linearizing all and-constraints, so enabling both presolving steps simultaneously does not make sense.\n");
1409 if( presoldata->hashdatatable ==
NULL )
1415 assert(presoldata->logicorhashtable !=
NULL);
1417 presoldata->newsetppchashdatas =
FALSE;
1419 if( !presoldata->initialized )
1431 assert(presoldata->initialized);
1433 if( presoldata->nusefullogicor == 0 )
1438 if( presoldata->sorting != 0 )
1444 for(
c = presoldata->nusefullogicor - 1;
c >= 0; --
c )
1449 if( presoldata->sorting == -1 )
1450 SCIPsortDownIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1452 SCIPsortIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1477 int nsetppchashdatas;
1483 assert(nsetppcconss > 0);
1489 size = presoldata->maxnvarslogicor;
1500 nsetppchashdatas = 0;
1503 for( d = nsetppcconss - 1; d >= 0; --d )
1505 setppc = setppcconss[d];
1520 if( nsetppcvars < 2 || nsetppcvars > size )
1527 for( v = nsetppcvars - 1; v >= 0; --v )
1535 if( activevarssetppc[v] ==
NULL )
1547 SCIPsortPtr((
void**)activevarssetppc, SCIPvarComp, nsetppcvars);
1549 setppchashdatas[nsetppchashdatas] = &(setppchashdatastore[nsetppchashdatas]);
1554 setppchashdatas[nsetppchashdatas]->
nvars = nsetppcvars;
1555 setppchashdatas[nsetppchashdatas]->
cons = setppc;
1567 logicor = logicorconss[
c];
1575 if( nlogicorvars < 2 )
1578 assert(nlogicorvars <= size);
1584 for( v = nlogicorvars - 1; v >= 0; --v )
1593 if( activevarslogicor[v] ==
NULL )
1600 SCIPsortPtr((
void**)activevarslogicor, SCIPvarComp, nlogicorvars);
1602 hashdata.
nvars = nlogicorvars;
1603 hashdata.
vars = activevarslogicor;
1621 setppc = hashmaphashdata->
cons;
1649 SCIPdebugMsg(
scip,
"Following logicor is redundant to the set-partitioning constraint.\n");
1660 SCIPdebugMsg(
scip,
"Following logicor and set-packing constraints form a set-partitioning constraint.\n");
1668 local, modifiable, dynamic, removable, stickingatnode) );
1676 ++(presoldata->ngates);
1691 for( d = nsetppchashdatas - 1; d >= 0; --d )
1710 if( presoldata->nsetppchashdatas == 0 || (presoldata->firstchangedlogicor == presoldata->nusefullogicor && !presoldata->newsetppchashdatas) )
1717 assert(presoldata->nusefullogicor > 0);
1718 assert(presoldata->firstchangedlogicor >= 0);
1719 assert(presoldata->nsetppchashdatas > 0);
1730 if( presoldata->newsetppchashdatas )
1733 endloop =
MAX(presoldata->firstchangedlogicor, 0);
1735 assert(presoldata->maxnvarslogicor >= 3);
1743 hashdata.
vars = tmpvars;
1762 SCIP_CALL(
extractGates(
scip, presoldata,
c, varmap, gateconss, activevars, posresultants, &hashdata, ndelconss, naddconss) );
1813 "should we only try to extract set-partitioning constraints and no and-constraints",
1819 "should we try to extract set-partitioning constraint out of one logicor and one corresponding set-packing constraint",
1825 "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)",
Constraint handler for AND constraints, .
#define HASHSIZE_LOGICORCONS
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
#define HASHSIZE_SETPPCCONS
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIP_STRINGEQ(name, reference, retcode)
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
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)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
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 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_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNBinVars(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)
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)
void SCIPhashtableRemoveAll(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPincludePresolGateextraction(SCIP *scip)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsStickingAtNode(SCIP *scip, SCIP_CONS *cons, SCIP_Bool stickingatnode)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsDynamic(SCIP *scip, SCIP_CONS *cons, SCIP_Bool dynamic)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
SCIP_RETCODE SCIPsetConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_Bool local)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
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_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPsetPresolExit(SCIP *scip, SCIP_PRESOL *presol,)
SCIP_RETCODE SCIPsetPresolExitpre(SCIP *scip, SCIP_PRESOL *presol,)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol,)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
SCIP_RETCODE SCIPsetPresolInitpre(SCIP *scip, SCIP_PRESOL *presol,)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol,)
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)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, 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)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortDownIntPtr(int *intarray, void **ptrarray, int len)
void SCIPsortIntPtr(int *intarray, void **ptrarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
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 presolvers
public methods for problem variables
public methods for constraint handler plugins and constraints
public methods for memory management
public methods for message handling
public methods for SCIP parameter handling
public methods for presolving plugins
public methods for global and local (sub)problems
public methods for SCIP variables
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashTable SCIP_HASHTABLE
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
#define SCIP_DECL_PRESOLINITPRE(x)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLEXITPRE(x)
#define SCIP_DECL_PRESOLEXIT(x)
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARSTATUS_MULTAGGR