80#define PRESOL_NAME "dualsparsify"
81#define PRESOL_DESC "eliminate non-zero coefficients"
83#define PRESOL_PRIORITY -240000
84#define PRESOL_MAXROUNDS -1
85#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
87#define DEFAULT_ENABLECOPY TRUE
88#define DEFAULT_PRESERVEINTCOEFS FALSE
89#define DEFAULT_PRESERVEGOODLOCKS FALSE
90#define DEFAULT_MAX_CONT_FILLIN 1
91#define DEFAULT_MAX_BIN_FILLIN 1
92#define DEFAULT_MAX_INT_FILLIN 1
93#define DEFAULT_MAXCONSIDEREDNONZEROS 70
94#define DEFAULT_MINELIMINATEDNONZEROS 100
95#define DEFAULT_MAXRETRIEVEFAC 100.0
96#define DEFAULT_WAITINGFAC 2.0
98#define MAXSCALE 1000.0
106struct SCIP_PresolData
114 int maxconsiderednonzeros;
115 int mineliminatednonzeros;
116 SCIP_Real maxretrievefac;
117 SCIP_Real waitingfac;
118 SCIP_Bool enablecopy;
119 SCIP_Bool preserveintcoefs;
120 SCIP_Bool preservegoodlocks;
188 SCIP_Real maxactivity;
203 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
216 maxactivity += val * ub;
223 maxactivity += val * lb;
242 SCIP_Real minactivity;
257 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
270 minactivity += val * lb;
277 minactivity += val * ub;
292 SCIP_Real* minresactivity,
293 SCIP_Real* maxresactivity,
294 SCIP_Bool* isminsettoinfinity,
295 SCIP_Bool* ismaxsettoinfinity
304 SCIP_Real maxactivity;
305 SCIP_Real minactivity;
317 *isminsettoinfinity =
FALSE;
318 *ismaxsettoinfinity =
FALSE;
332 assert(nmaxactposinf >= 1);
333 if( nmaxactposinf == 1 && nmaxactneginf == 0 )
338 *ismaxsettoinfinity =
TRUE;
343 if( (nmaxactneginf + nmaxactposinf) > 0 )
346 *ismaxsettoinfinity =
TRUE;
349 *maxresactivity = maxactivity - val * ub;
354 assert(nminactneginf >= 1);
355 if( nminactneginf == 1 && nminactposinf == 0 )
360 *isminsettoinfinity =
TRUE;
365 if( (nminactneginf + nminactposinf) > 0 )
368 *isminsettoinfinity =
TRUE;
371 *minresactivity = minactivity - val * lb;
378 assert(nmaxactneginf >= 1);
379 if( nmaxactneginf == 1 && nmaxactposinf == 0 )
384 *ismaxsettoinfinity =
TRUE;
389 if( (nmaxactneginf + nmaxactposinf) > 0 )
392 *ismaxsettoinfinity =
TRUE;
395 *maxresactivity = maxactivity - val * lb;
400 assert(nminactposinf >= 1);
401 if( nminactposinf == 1 && nminactneginf == 0 )
406 *isminsettoinfinity =
TRUE;
411 if( (nminactneginf + nminactposinf) > 0 )
414 *isminsettoinfinity =
TRUE;
417 *minresactivity = minactivity - val * ub;
436 SCIP_Bool isminsettoinfinity;
437 SCIP_Bool ismaxsettoinfinity;
438 SCIP_Real minresactivity;
439 SCIP_Real maxresactivity;
454 &minresactivity, &maxresactivity,
455 &isminsettoinfinity, &ismaxsettoinfinity);
464 *rowub = (rhs - minresactivity) / val;
470 *rowlb = (lhs - maxresactivity) / val;
478 *rowub = (lhs - maxresactivity) / val;
484 *rowlb = (rhs - minresactivity) / val;
496 SCIP_Bool* ubimplied,
525 for( ; (colpnt < colend); colpnt++, valpnt++ )
534 if( ubfound && (rowub < impliedub) )
537 if( lbfound && (rowlb > impliedlb) )
560 SCIP_Bool isimpliedfree,
577 SCIP_Bool infeasible;
578 SCIP_Bool aggregated;
586 assert(lbimplied && ubimplied);
592 presoldata->naggregated += 1;
593 aggregatedvar =
vars[colidx2];
654#ifdef WITH_DEBUG_SOLUTION
655 if( SCIPdebugIsMainscip(
scip) )
668 tmpvars[0] =
vars[colidx1];
678 vars[colidx2] = newvar;
691 lhs, rhs,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE) );
711 SCIP_Bool* ishashingcols,
713 SCIP_Bool* isblockedvar,
718 int maxconsiderednonzeros,
719 SCIP_Bool preserveintcoefs,
720 SCIP_Longint* nuseless,
724 SCIP_Bool isaddedcons
728 SCIP_Real* cancelcolvals;
729 SCIP_Real* colvalptr;
735 SCIP_Real bestcancelrate;
738 SCIP_Bool colishashing;
739 SCIP_Bool swapped =
FALSE;
748 colishashing = ishashingcols[colidx];
752 cancelvar =
vars[colidx];
757 maxfillin = maxbinfillin;
759 maxfillin = maxintfillin;
762 maxfillin = maxcontfillin;
782 bestcancelrate = 0.0;
787 for(
i = 0;
i < cancelcollen; ++
i )
794 maxlen = cancelcollen;
795 if( maxconsiderednonzeros >= 0 )
796 maxlen =
MIN(cancelcollen, maxconsiderednonzeros);
798 for(
i = 0;
i < maxlen; ++
i )
800 for( j =
i + 1; j < maxlen; ++j )
804 SCIP_Real* hashingcolvals;
806 SCIP_Real hashingcollb;
807 SCIP_Real hashingcolub;
808 SCIP_Real cancelrate;
812 SCIP_Bool hashingcolisbin;
823 assert(cancelcolinds[
i] < cancelcolinds[j]);
825 if( cancelcolinds[i1] < cancelcolinds[i2] )
829 colconspair.
conscoef1 = cancelcolvals[i1];
830 colconspair.
conscoef2 = cancelcolvals[i2];
836 colconspair.
conscoef1 = cancelcolvals[i2];
837 colconspair.
conscoef2 = cancelcolvals[i1];
843 if( hashingcolconspair ==
NULL ||
844 hashingcolconspair->
colindex == colidx || isblockedvar[hashingcolconspair->
colindex] )
852 if( colishashing && (cancelcollen < hashingcollen ||
853 (cancelcollen == hashingcollen && colidx < hashingcolconspair->
colindex)) )
875 if( hashingcolisbin )
893 scale = floor(scale + 0.5);
906 while(
a < cancelcollen &&
b < hashingcollen )
908 if( cancelcolinds[
a] == hashingcolinds[
b] )
912 newcoef = cancelcolvals[
a] + scale * hashingcolvals[
b];
966 else if( cancelcolinds[
a] < hashingcolinds[
b] )
974 newcoef = scale * hashingcolvals[
b];
1002 if( ++ntotfillin > maxfillin )
1013 while(
b < hashingcollen )
1017 if( ++ntotfillin > maxfillin )
1021 if( ntotfillin > maxfillin || ntotfillin >= ncancel )
1024 cancelrate = (ncancel - ntotfillin) / (SCIP_Real) cancelcollen;
1027 if( isaddedcons && (ncancel - ntotfillin < presoldata->mineliminatednonzeros) )
1030 if( cancelrate > bestcancelrate )
1032 if( ishashingcols[hashingcolconspair->
colindex] )
1034 SCIP_Bool lbimplied;
1035 SCIP_Bool ubimplied;
1043 if( !lbimplied || !ubimplied )
1047 goto CHECKFILLINAGAIN;
1051 bestnfillin = ntotfillin;
1054 bestcancelrate = cancelrate;
1057 if( cancelrate == 1.0 )
1062 if(
bestcand != -1 && bestcancelrate == 1.0 )
1069 SCIP_Real* hashingcolvals;
1070 int* hashingcolinds;
1076 SCIPdebugMsg(
scip,
"cancelcol %d (%s) candidate column %d (%s) (bestcancelrate = %g, bestscale = %g)\n",
1087 while(
a < cancelcollen &&
b < hashingcollen )
1089 if( cancelcolinds[
a] == hashingcolinds[
b] )
1091 SCIP_Real val = cancelcolvals[
a] + bestscale * hashingcolvals[
b];
1095 tmpinds[tmpcollen] = cancelcolinds[
a];
1096 tmpvals[tmpcollen] = val;
1104 else if( cancelcolinds[
a] < hashingcolinds[
b] )
1106 tmpinds[tmpcollen] = cancelcolinds[
a];
1107 tmpvals[tmpcollen] = cancelcolvals[
a];
1113 tmpinds[tmpcollen] = hashingcolinds[
b];
1114 tmpvals[tmpcollen] = hashingcolvals[
b] * bestscale;
1121 while(
a < cancelcollen )
1123 tmpinds[tmpcollen] = cancelcolinds[
a];
1124 tmpvals[tmpcollen] = cancelcolvals[
a];
1129 while(
b < hashingcollen )
1131 tmpinds[tmpcollen] = hashingcolinds[
b];
1132 tmpvals[tmpcollen] = hashingcolvals[
b] * bestscale;
1139 *nfillin += bestnfillin;
1146 swapped = ! swapped;
1147 cancelcollen = tmpcollen;
1164 *nchgcoefs += nchgcoef;
1167 isblockedvar[colidx] =
TRUE;
1174 *nuseless -= nretrieves;
1175 *nuseless =
MAX(*nuseless, 0);
1180 *nuseless += nretrieves;
1213 presoldata->nfailures = 0;
1214 presoldata->nwaitingcalls = 0;
1218 presoldata->nfailures++;
1219 presoldata->nwaitingcalls = (int)(presoldata->waitingfac*(SCIP_Real)presoldata->nfailures);
1240 if( presoldata->enablecopy )
1261 SCIP_Bool* ishashingcols;
1262 SCIP_Bool* isblockedvar;
1264 SCIP_Longint maxuseless;
1265 SCIP_Longint nuseless;
1266 SCIP_Bool initialized;
1268 SCIP_Bool infeasible;
1294 if( presoldata->nwaitingcalls > 0 )
1296 presoldata->nwaitingcalls--;
1297 SCIPdebugMsg(
scip,
"skipping dualsparsify: nfailures=%d, nwaitingcalls=%d\n", presoldata->nfailures,
1298 presoldata->nwaitingcalls);
1307 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
1312 if( infeasible || !complete )
1329 for(
i = 0;
i < ncols;
i++ )
1347 SCIPhashGetKeyStandard, consPairsEqual, consPairHashval, (
void*)
scip) );
1350 for(
c = 0;
c < ncols;
c++ )
1352 SCIP_Bool lbimplied;
1353 SCIP_Bool ubimplied;
1361 isblockedvar[
c] =
TRUE;
1362 ishashingcols[
c] =
FALSE;
1369 isblockedvar[
c] =
TRUE;
1370 ishashingcols[
c] =
FALSE;
1378 ishashingcols[
c] =
FALSE;
1380 if( lbimplied && ubimplied )
1381 ishashingcols[
c] =
TRUE;
1389 if( nnonz >= 2 && (lbimplied && ubimplied) )
1402 for(
i = 0;
i < nnonz; ++
i )
1409 if( presoldata->maxconsiderednonzeros >= 0 )
1410 nnonz =
MIN(nnonz, presoldata->maxconsiderednonzeros);
1412 npairs = (nnonz * (nnonz - 1)) / 2;
1413 if( nconspairs + npairs > conspairssize )
1417 conspairssize = newsize;
1425 failshift = presoldata->nfailures*presoldata->maxconsiderednonzeros;
1427 for(
i = 0;
i < nnonz; ++
i )
1429 for( j =
i + 1; j < nnonz; ++j )
1434 assert(nconspairs < conspairssize);
1437 i1 = perm[(
i + failshift) % nnonz];
1438 i2 = perm[(j + failshift) % nnonz];
1442 if( colinds[i1] < colinds[i2])
1444 conspairs[nconspairs].
consindex1 = colinds[i1];
1445 conspairs[nconspairs].
consindex2 = colinds[i2];
1446 conspairs[nconspairs].
conscoef1 = colvals[i1];
1447 conspairs[nconspairs].
conscoef2 = colvals[i2];
1451 conspairs[nconspairs].
consindex1 = colinds[i2];
1452 conspairs[nconspairs].
consindex2 = colinds[i1];
1453 conspairs[nconspairs].
conscoef1 = colvals[i2];
1454 conspairs[nconspairs].
conscoef2 = colvals[i1];
1463 for(
c = 0;
c < nconspairs; ++
c )
1500 for(
c = 0;
c < ncols; ++
c )
1502 colidxsorted[
c] =
c;
1508 maxuseless = (
SCIP_Longint)(presoldata->maxretrievefac * (SCIP_Real)ncols);
1516 colidx = colidxsorted[
c];
1518 if( isblockedvar[colidx] )
1524 presoldata->maxcontfillin == -1 ? INT_MAX : presoldata->maxcontfillin, \
1525 presoldata->maxintfillin == -1 ? INT_MAX : presoldata->maxintfillin, \
1526 presoldata->maxbinfillin == -1 ? INT_MAX : presoldata->maxbinfillin, \
1527 presoldata->maxconsiderednonzeros, presoldata->preserveintcoefs, \
1528 &nuseless, nchgcoefs, &numcancel, &nfillin,
FALSE) );
1543 for(
c = 0;
c < ncols;
c++ )
1555 isblockedvar[
c] =
TRUE;
1556 ishashingcols[
c] =
FALSE;
1567 if( nnonz >= presoldata->mineliminatednonzeros && !ishashingcols[
c] )
1574 ishashingcols[
c] =
TRUE;
1581 for(
i = 0;
i < nnonz; ++
i )
1588 if( presoldata->maxconsiderednonzeros >= 0 )
1589 nnonz =
MIN(nnonz, presoldata->maxconsiderednonzeros);
1591 npairs = (nnonz * (nnonz - 1)) / 2;
1592 if( nconspairs + npairs > conspairssize )
1596 conspairssize = newsize;
1604 failshift = presoldata->nfailures*presoldata->maxconsiderednonzeros;
1606 for(
i = 0;
i < nnonz; ++
i )
1608 for( j =
i + 1; j < nnonz; ++j )
1613 assert(nconspairs < conspairssize);
1616 i1 = perm[(
i + failshift) % nnonz];
1617 i2 = perm[(j + failshift) % nnonz];
1620 if( colinds[i1] < colinds[i2])
1622 conspairs[nconspairs].
consindex1 = colinds[i1];
1623 conspairs[nconspairs].
consindex2 = colinds[i2];
1624 conspairs[nconspairs].
conscoef1 = colvals[i1];
1625 conspairs[nconspairs].
conscoef2 = colvals[i2];
1629 conspairs[nconspairs].
consindex1 = colinds[i2];
1630 conspairs[nconspairs].
consindex2 = colinds[i1];
1631 conspairs[nconspairs].
conscoef1 = colvals[i2];
1632 conspairs[nconspairs].
conscoef2 = colvals[i1];
1640 ishashingcols[
c] =
FALSE;
1645 for(
c = 0;
c < nconspairs; ++
c )
1682 for(
c = 0;
c < ncols; ++
c )
1684 colidxsorted[
c] =
c;
1690 maxuseless = (
SCIP_Longint)(presoldata->maxretrievefac * (SCIP_Real)ncols);
1692 for(
c = 0;
c < ncols && nuseless <= maxuseless;
c++ )
1697 colidx = colidxsorted[
c];
1700 if( isblockedvar[colidx] || nnonz < presoldata->mineliminatednonzeros )
1706 presoldata->maxcontfillin == -1 ? INT_MAX : presoldata->maxcontfillin, \
1707 presoldata->maxintfillin == -1 ? INT_MAX : presoldata->maxintfillin, \
1708 presoldata->maxbinfillin == -1 ? INT_MAX : presoldata->maxbinfillin, \
1709 presoldata->maxconsiderednonzeros, presoldata->preserveintcoefs, \
1710 &nuseless, nchgcoefs, &numcancel, &nfillin,
TRUE) );
1768 presoldata->nfailures = 0;
1769 presoldata->nwaitingcalls = 0;
1770 presoldata->naggregated = 0;
1795 "presolving/dualsparsify/enablecopy",
1796 "should dualsparsify presolver be copied to sub-SCIPs?",
1800 "presolving/dualsparsify/preserveintcoefs",
1801 "should we forbid cancellations that destroy integer coefficients?",
1805 "presolving/dualsparsify/preservegoodlocks",
1806 "should we preserve good locked properties of variables (at most one lock in one direction)?",
1810 "presolving/dualsparsify/maxcontfillin",
1811 "maximal fillin for continuous variables (-1: unlimited)",
1815 "presolving/dualsparsify/maxbinfillin",
1816 "maximal fillin for binary variables (-1: unlimited)",
1820 "presolving/dualsparsify/maxintfillin",
1821 "maximal fillin for integer variables including binaries (-1: unlimited)",
1825 "presolving/dualsparsify/maxconsiderednonzeros",
1826 "maximal number of considered nonzeros within one column (-1: no limit)",
1830 "presolving/dualsparsify/mineliminatednonzeros",
1831 "minimal eliminated nonzeros within one column if we need to add a constraint to the problem",
1835 "presolving/dualsparsify/maxretrievefac",
1836 "limit on the number of useless vs. useful hashtable retrieves as a multiple of the number of constraints",
1840 "presolving/dualsparsify/waitingfac",
1841 "number of calls to wait until next execution as a multiple of the number of useless calls",
Constraint handler for linear constraints in their most general form, .
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugAddSolVal(scip, var, val)
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_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashThree(a, b, c)
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)
static INLINE uint32_t SCIPrealHashCode(double x)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, 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_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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 SCIPswapPointers(void **pointer1, void **pointer2)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
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 SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol,)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_PRESOLDATA * SCIPpresolGetData(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)
SCIP_RETCODE SCIPsetPresolInit(SCIP *scip, SCIP_PRESOL *presol,)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
int SCIPgetNRuns(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Bool SCIPvarIsRemovable(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_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortIntReal(int *intarray, SCIP_Real *realarray, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_Bool SCIPmatrixUplockConflict(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNMinActNegInf(SCIP_MATRIX *matrix, int row)
int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNDownlocks(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetColNUplocks(SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetRowMaxActivity(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetColLb(SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row)
SCIP_Bool SCIPmatrixDownlockConflict(SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetRowRhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetColValPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNMinActPosInf(SCIP_MATRIX *matrix, int row)
SCIP_RETCODE SCIPmatrixCreate(SCIP *scip, SCIP_MATRIX **matrixptr, SCIP_Bool onlyifcomplete, SCIP_Bool *initialized, SCIP_Bool *complete, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nchgbds, int *nfixedvars)
int SCIPmatrixGetNColumns(SCIP_MATRIX *matrix)
SCIP_Real SCIPmatrixGetRowMinActivity(SCIP_MATRIX *matrix, int row)
void SCIPmatrixFree(SCIP *scip, SCIP_MATRIX **matrix)
int SCIPmatrixGetRowNMaxActPosInf(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetRowNMaxActNegInf(SCIP_MATRIX *matrix, int row)
SCIP_VAR * SCIPmatrixGetVar(SCIP_MATRIX *matrix, int col)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
void SCIPmatrixRemoveColumnBounds(SCIP *scip, SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetColUb(SCIP_MATRIX *matrix, int col)
memory allocation routines
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
static SCIP_RETCODE cancelCol(SCIP *scip, SCIP_MATRIX *matrix, SCIP_PRESOLDATA *presoldata, SCIP_HASHTABLE *pairtable, SCIP_Bool *ishashingcols, SCIP_VAR **vars, SCIP_Bool *isblockedvar, int colidx, int maxcontfillin, int maxintfillin, int maxbinfillin, int maxconsiderednonzeros, SCIP_Bool preserveintcoefs, SCIP_Longint *nuseless, int *nchgcoefs, int *ncanceled, int *nfillin, SCIP_Bool isaddedcons)
#define DEFAULT_MAXCONSIDEREDNONZEROS
SCIP_RETCODE SCIPincludePresolDualsparsify(SCIP *scip)
#define DEFAULT_MAX_INT_FILLIN
static void getVarBoundsOfRow(SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Real *rowub, SCIP_Bool *ubfound, SCIP_Real *rowlb, SCIP_Bool *lbfound)
static SCIP_RETCODE aggregation(SCIP *scip, SCIP_MATRIX *matrix, SCIP_PRESOLDATA *presoldata, SCIP_VAR **vars, int colidx1, int colidx2, SCIP_Bool isimpliedfree, SCIP_Real weight1)
static void updateFailureStatistic(SCIP_PRESOLDATA *presoldata, SCIP_Bool success)
#define DEFAULT_PRESERVEGOODLOCKS
#define DEFAULT_MINELIMINATEDNONZEROS
static SCIP_Real getMinActivitySingleRowWithoutCol(SCIP *scip, SCIP_MATRIX *matrix, int row, int col)
#define DEFAULT_ENABLECOPY
#define DEFAULT_MAX_CONT_FILLIN
#define DEFAULT_WAITINGFAC
static void getImpliedBounds(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Bool *ubimplied, SCIP_Bool *lbimplied)
#define DEFAULT_MAXRETRIEVEFAC
#define DEFAULT_MAX_BIN_FILLIN
static SCIP_Real getMaxActivitySingleRowWithoutCol(SCIP *scip, SCIP_MATRIX *matrix, int row, int col)
static void getMinMaxActivityResiduals(SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
#define DEFAULT_PRESERVEINTCOEFS
cancel nonzeros of the constraint matrix based on the columns
public methods for managing constraints
public methods for matrix
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 nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for presolving plugins
public methods for variable pricer plugins
public methods for global and local (sub)problems
public methods for the probing mode
public methods for querying solving statistics
public methods for timing
public methods for SCIP variables
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHKEYVAL(x)
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
#define SCIP_DECL_PRESOLINIT(x)
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE