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);
1167 if( presoldata->hashdatatable !=
NULL )
1170 assert(presoldata->logicorhashtable !=
NULL);
1196 for(
c = presoldata->nusefullogicor - 1;
c >= 0; --
c )
1201 if( presoldata->usefullogicorexist )
1206 if( presoldata->usefulsetppcexist )
1208 assert(presoldata->setppchashdatas !=
NULL || presoldata->nsetppchashdatas == 0);
1209 for(
c = presoldata->nsetppchashdatas - 1;
c >= 0; --
c )
1211 assert(presoldata->setppchashdatas[
c].cons !=
NULL);
1212 assert(presoldata->setppchashdatas[
c].vars !=
NULL);
1235 if( presoldata->hashdatatable !=
NULL )
1238 assert(presoldata->logicorhashtable !=
NULL);
1246 presoldata->nusefullogicor = 0;
1247 presoldata->susefullogicor = 0;
1248 presoldata->nsetppchashdatas = 0;
1249 presoldata->ssetppchashdatas = 0;
1250 presoldata->firstchangedlogicor = -1;
1251 presoldata->ngates = 0;
1252 presoldata->usefullogicorexist =
FALSE;
1253 presoldata->usefulsetppcexist =
FALSE;
1254 presoldata->newsetppchashdatas =
FALSE;
1255 presoldata->initialized =
FALSE;
1303#ifdef SCIP_DISABLED_CODE
1328 assert(nknapsackconss >= 0);
1329 assert(knapsackconss !=
NULL || nknapsackconss == 0);
1331 for(
c = nknapsackconss - 1;
c >= 0; --
c )
1340 if(
nvars > 1 && capacity ==
nvars - 1 && vals[0] == capacity && vals[1] == 1 )
1342 printf(
"possible knapsack for gate extraction\n");
1352 if( conshdlrsetppc ==
NULL || conshdlrlogicor ==
NULL )
1357 assert(nsetppcconss >= 0);
1359 assert(nlogicorconss >= 0);
1361 if( nsetppcconss == 0 || nlogicorconss == 0 )
1371 if( conshdlrand ==
NULL )
1374 if( !presoldata->searchequations )
1385 assert(presoldata->onlysetpart);
1394 SCIPwarningMessage(
scip,
"Gate-presolving is the 'counterpart' of linearizing all and-constraints, so enabling both presolving steps simultaneously does not make sense.\n");
1407 if( presoldata->hashdatatable ==
NULL )
1413 assert(presoldata->logicorhashtable !=
NULL);
1415 presoldata->newsetppchashdatas =
FALSE;
1417 if( !presoldata->initialized )
1429 assert(presoldata->initialized);
1431 if( presoldata->nusefullogicor == 0 )
1436 if( presoldata->sorting != 0 )
1442 for(
c = presoldata->nusefullogicor - 1;
c >= 0; --
c )
1447 if( presoldata->sorting == -1 )
1448 SCIPsortDownIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1450 SCIPsortIntPtr(lengths, (
void**)presoldata->usefullogicor, presoldata->nusefullogicor);
1475 int nsetppchashdatas;
1481 assert(nsetppcconss > 0);
1487 size = presoldata->maxnvarslogicor;
1498 nsetppchashdatas = 0;
1501 for( d = nsetppcconss - 1; d >= 0; --d )
1503 setppc = setppcconss[d];
1518 if( nsetppcvars < 2 || nsetppcvars > size )
1525 for( v = nsetppcvars - 1; v >= 0; --v )
1533 if( activevarssetppc[v] ==
NULL )
1545 SCIPsortPtr((
void**)activevarssetppc, SCIPvarComp, nsetppcvars);
1547 setppchashdatas[nsetppchashdatas] = &(setppchashdatastore[nsetppchashdatas]);
1552 setppchashdatas[nsetppchashdatas]->
nvars = nsetppcvars;
1553 setppchashdatas[nsetppchashdatas]->
cons = setppc;
1565 logicor = logicorconss[
c];
1573 if( nlogicorvars < 2 )
1576 assert(nlogicorvars <= size);
1582 for( v = nlogicorvars - 1; v >= 0; --v )
1591 if( activevarslogicor[v] ==
NULL )
1598 SCIPsortPtr((
void**)activevarslogicor, SCIPvarComp, nlogicorvars);
1600 hashdata.
nvars = nlogicorvars;
1601 hashdata.
vars = activevarslogicor;
1619 setppc = hashmaphashdata->
cons;
1647 SCIPdebugMsg(
scip,
"Following logicor is redundant to the set-partitioning constraint.\n");
1658 SCIPdebugMsg(
scip,
"Following logicor and set-packing constraints form a set-partitioning constraint.\n");
1666 local, modifiable, dynamic, removable, stickingatnode) );
1674 ++(presoldata->ngates);
1689 for( d = nsetppchashdatas - 1; d >= 0; --d )
1708 if( presoldata->nsetppchashdatas == 0 || (presoldata->firstchangedlogicor == presoldata->nusefullogicor && !presoldata->newsetppchashdatas) )
1715 assert(presoldata->nusefullogicor > 0);
1716 assert(presoldata->firstchangedlogicor >= 0);
1717 assert(presoldata->nsetppchashdatas > 0);
1728 if( presoldata->newsetppchashdatas )
1731 endloop =
MAX(presoldata->firstchangedlogicor, 0);
1733 assert(presoldata->maxnvarslogicor >= 3);
1741 hashdata.
vars = tmpvars;
1760 SCIP_CALL(
extractGates(
scip, presoldata,
c, varmap, gateconss, activevars, posresultants, &hashdata, ndelconss, naddconss) );
1811 "should we only try to extract set-partitioning constraints and no and-constraints",
1817 "should we try to extract set-partitioning constraint out of one logicor and one corresponding set-packing constraint",
1823 "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 .
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