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;
203 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
216 maxactivity += val * ub;
223 maxactivity += val * lb;
257 for( ; (rowpnt < rowend); rowpnt++, valpnt++ )
270 minactivity += val * lb;
277 minactivity += val * ub;
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;
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;
525 for( ; (colpnt < colend); colpnt++, valpnt++ )
534 if( ubfound && (rowub < impliedub) )
537 if( lbfound && (rowlb > impliedlb) )
587 assert(lbimplied && ubimplied);
594 presoldata->naggregated += 1;
595 aggregatedvar =
vars[colidx2];
653#ifdef WITH_DEBUG_SOLUTION
654 if( SCIPdebugIsMainscip(
scip) )
667 tmpvars[0] =
vars[colidx1];
677 vars[colidx2] = newvar;
690 lhs, rhs,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE) );
717 int maxconsiderednonzeros,
747 colishashing = ishashingcols[colidx];
751 cancelvar =
vars[colidx];
756 maxfillin = maxbinfillin;
758 maxfillin = maxintfillin;
761 maxfillin = maxcontfillin;
781 bestcancelrate = 0.0;
786 for(
i = 0;
i < cancelcollen; ++
i )
793 maxlen = cancelcollen;
794 if( maxconsiderednonzeros >= 0 )
795 maxlen =
MIN(cancelcollen, maxconsiderednonzeros);
797 for(
i = 0;
i < maxlen; ++
i )
799 for( j =
i + 1; j < maxlen; ++j )
820 assert(cancelcolinds[
i] < cancelcolinds[j]);
822 if( cancelcolinds[i1] < cancelcolinds[i2] )
826 colconspair.
conscoef1 = cancelcolvals[i1];
827 colconspair.
conscoef2 = cancelcolvals[i2];
833 colconspair.
conscoef1 = cancelcolvals[i2];
834 colconspair.
conscoef2 = cancelcolvals[i1];
840 if( hashingcolconspair ==
NULL ||
841 hashingcolconspair->
colindex == colidx || isblockedvar[hashingcolconspair->
colindex] )
849 if( colishashing && (cancelcollen < hashingcollen ||
850 (cancelcollen == hashingcollen && colidx < hashingcolconspair->
colindex)) )
861 if( hashingcolisbin )
864 scale = -colconspair.conscoef1 / hashingcolconspair->
conscoef1;
888 scale = floor(scale + 0.5);
901 while(
a < cancelcollen &&
b < hashingcollen )
903 if( cancelcolinds[
a] == hashingcolinds[
b] )
907 newcoef = cancelcolvals[
a] + scale * hashingcolvals[
b];
961 else if( cancelcolinds[
a] < hashingcolinds[
b] )
969 newcoef = scale * hashingcolvals[
b];
997 if( ++ntotfillin > maxfillin )
1008 while(
b < hashingcollen )
1012 if( ++ntotfillin > maxfillin )
1016 if( ntotfillin > maxfillin || ntotfillin >= ncancel )
1019 cancelrate = (ncancel - ntotfillin) / (
SCIP_Real) cancelcollen;
1022 if( isaddedcons && (ncancel - ntotfillin < presoldata->mineliminatednonzeros) )
1025 if( cancelrate > bestcancelrate )
1027 if( ishashingcols[hashingcolconspair->
colindex] )
1038 if( !lbimplied || !ubimplied )
1042 goto CHECKFILLINAGAIN;
1046 bestnfillin = ntotfillin;
1049 bestcancelrate = cancelrate;
1052 if( cancelrate == 1.0 )
1057 if(
bestcand != -1 && bestcancelrate == 1.0 )
1065 int* hashingcolinds;
1071 SCIPdebugMsg(
scip,
"cancelcol %d (%s) candidate column %d (%s) (bestcancelrate = %g, bestscale = %g)\n",
1082 while(
a < cancelcollen &&
b < hashingcollen )
1084 if( cancelcolinds[
a] == hashingcolinds[
b] )
1086 SCIP_Real val = cancelcolvals[
a] + bestscale * hashingcolvals[
b];
1090 tmpinds[tmpcollen] = cancelcolinds[
a];
1091 tmpvals[tmpcollen] = val;
1099 else if( cancelcolinds[
a] < hashingcolinds[
b] )
1101 tmpinds[tmpcollen] = cancelcolinds[
a];
1102 tmpvals[tmpcollen] = cancelcolvals[
a];
1108 tmpinds[tmpcollen] = hashingcolinds[
b];
1109 tmpvals[tmpcollen] = hashingcolvals[
b] * bestscale;
1116 while(
a < cancelcollen )
1118 tmpinds[tmpcollen] = cancelcolinds[
a];
1119 tmpvals[tmpcollen] = cancelcolvals[
a];
1124 while(
b < hashingcollen )
1126 tmpinds[tmpcollen] = hashingcolinds[
b];
1127 tmpvals[tmpcollen] = hashingcolvals[
b] * bestscale;
1134 *nfillin += bestnfillin;
1141 swapped = ! swapped;
1142 cancelcollen = tmpcollen;
1159 *nchgcoefs += nchgcoef;
1162 isblockedvar[colidx] =
TRUE;
1169 *nuseless -= nretrieves;
1170 *nuseless =
MAX(*nuseless, 0);
1175 *nuseless += nretrieves;
1208 presoldata->nfailures = 0;
1209 presoldata->nwaitingcalls = 0;
1213 presoldata->nfailures++;
1214 presoldata->nwaitingcalls = (int)(presoldata->waitingfac*(
SCIP_Real)presoldata->nfailures);
1235 if( presoldata->enablecopy )
1289 if( presoldata->nwaitingcalls > 0 )
1291 presoldata->nwaitingcalls--;
1292 SCIPdebugMsg(
scip,
"skipping dualsparsify: nfailures=%d, nwaitingcalls=%d\n", presoldata->nfailures,
1293 presoldata->nwaitingcalls);
1302 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
1307 if( infeasible || !complete )
1324 for(
i = 0;
i < ncols;
i++ )
1342 SCIPhashGetKeyStandard, consPairsEqual, consPairHashval, (
void*)
scip) );
1345 for(
c = 0;
c < ncols;
c++ )
1356 isblockedvar[
c] =
TRUE;
1357 ishashingcols[
c] =
FALSE;
1364 isblockedvar[
c] =
TRUE;
1365 ishashingcols[
c] =
FALSE;
1373 ishashingcols[
c] =
FALSE;
1375 if( lbimplied && ubimplied )
1376 ishashingcols[
c] =
TRUE;
1384 if( nnonz >= 2 && (lbimplied && ubimplied) )
1397 for(
i = 0;
i < nnonz; ++
i )
1404 if( presoldata->maxconsiderednonzeros >= 0 )
1405 nnonz =
MIN(nnonz, presoldata->maxconsiderednonzeros);
1407 npairs = (nnonz * (nnonz - 1)) / 2;
1408 if( nconspairs + npairs > conspairssize )
1412 conspairssize = newsize;
1420 failshift = presoldata->nfailures*presoldata->maxconsiderednonzeros;
1422 for(
i = 0;
i < nnonz; ++
i )
1424 for( j =
i + 1; j < nnonz; ++j )
1429 assert(nconspairs < conspairssize);
1432 i1 = perm[(
i + failshift) % nnonz];
1433 i2 = perm[(j + failshift) % nnonz];
1437 if( colinds[i1] < colinds[i2])
1439 conspairs[nconspairs].
consindex1 = colinds[i1];
1440 conspairs[nconspairs].
consindex2 = colinds[i2];
1441 conspairs[nconspairs].
conscoef1 = colvals[i1];
1442 conspairs[nconspairs].
conscoef2 = colvals[i2];
1446 conspairs[nconspairs].
consindex1 = colinds[i2];
1447 conspairs[nconspairs].
consindex2 = colinds[i1];
1448 conspairs[nconspairs].
conscoef1 = colvals[i2];
1449 conspairs[nconspairs].
conscoef2 = colvals[i1];
1458 for(
c = 0;
c < nconspairs; ++
c )
1495 for(
c = 0;
c < ncols; ++
c )
1497 colidxsorted[
c] =
c;
1511 colidx = colidxsorted[
c];
1513 if( isblockedvar[colidx] )
1519 presoldata->maxcontfillin == -1 ? INT_MAX : presoldata->maxcontfillin, \
1520 presoldata->maxintfillin == -1 ? INT_MAX : presoldata->maxintfillin, \
1521 presoldata->maxbinfillin == -1 ? INT_MAX : presoldata->maxbinfillin, \
1522 presoldata->maxconsiderednonzeros, presoldata->preserveintcoefs, \
1523 &nuseless, nchgcoefs, &numcancel, &nfillin,
FALSE) );
1538 for(
c = 0;
c < ncols;
c++ )
1550 isblockedvar[
c] =
TRUE;
1551 ishashingcols[
c] =
FALSE;
1562 if( nnonz >= presoldata->mineliminatednonzeros && !ishashingcols[
c] )
1569 ishashingcols[
c] =
TRUE;
1576 for(
i = 0;
i < nnonz; ++
i )
1583 if( presoldata->maxconsiderednonzeros >= 0 )
1584 nnonz =
MIN(nnonz, presoldata->maxconsiderednonzeros);
1586 npairs = (nnonz * (nnonz - 1)) / 2;
1587 if( nconspairs + npairs > conspairssize )
1591 conspairssize = newsize;
1599 failshift = presoldata->nfailures*presoldata->maxconsiderednonzeros;
1601 for(
i = 0;
i < nnonz; ++
i )
1603 for( j =
i + 1; j < nnonz; ++j )
1608 assert(nconspairs < conspairssize);
1611 i1 = perm[(
i + failshift) % nnonz];
1612 i2 = perm[(j + failshift) % nnonz];
1615 if( colinds[i1] < colinds[i2])
1617 conspairs[nconspairs].
consindex1 = colinds[i1];
1618 conspairs[nconspairs].
consindex2 = colinds[i2];
1619 conspairs[nconspairs].
conscoef1 = colvals[i1];
1620 conspairs[nconspairs].
conscoef2 = colvals[i2];
1624 conspairs[nconspairs].
consindex1 = colinds[i2];
1625 conspairs[nconspairs].
consindex2 = colinds[i1];
1626 conspairs[nconspairs].
conscoef1 = colvals[i2];
1627 conspairs[nconspairs].
conscoef2 = colvals[i1];
1635 ishashingcols[
c] =
FALSE;
1640 for(
c = 0;
c < nconspairs; ++
c )
1677 for(
c = 0;
c < ncols; ++
c )
1679 colidxsorted[
c] =
c;
1687 for(
c = 0;
c < ncols && nuseless <= maxuseless;
c++ )
1692 colidx = colidxsorted[
c];
1695 if( isblockedvar[colidx] || nnonz < presoldata->mineliminatednonzeros )
1701 presoldata->maxcontfillin == -1 ? INT_MAX : presoldata->maxcontfillin, \
1702 presoldata->maxintfillin == -1 ? INT_MAX : presoldata->maxintfillin, \
1703 presoldata->maxbinfillin == -1 ? INT_MAX : presoldata->maxbinfillin, \
1704 presoldata->maxconsiderednonzeros, presoldata->preserveintcoefs, \
1705 &nuseless, nchgcoefs, &numcancel, &nfillin,
TRUE) );
1763 presoldata->nfailures = 0;
1764 presoldata->nwaitingcalls = 0;
1765 presoldata->naggregated = 0;
1790 "presolving/dualsparsify/enablecopy",
1791 "should dualsparsify presolver be copied to sub-SCIPs?",
1795 "presolving/dualsparsify/preserveintcoefs",
1796 "should we forbid cancellations that destroy integer coefficients?",
1800 "presolving/dualsparsify/preservegoodlocks",
1801 "should we preserve good locked properties of variables (at most one lock in one direction)?",
1805 "presolving/dualsparsify/maxcontfillin",
1806 "maximal fillin for continuous variables (-1: unlimited)",
1810 "presolving/dualsparsify/maxbinfillin",
1811 "maximal fillin for binary variables (-1: unlimited)",
1815 "presolving/dualsparsify/maxintfillin",
1816 "maximal fillin for integer variables including binaries (-1: unlimited)",
1820 "presolving/dualsparsify/maxconsiderednonzeros",
1821 "maximal number of considered nonzeros within one column (-1: no limit)",
1825 "presolving/dualsparsify/mineliminatednonzeros",
1826 "minimal eliminated nonzeros within one column if we need to add a constraint to the problem",
1830 "presolving/dualsparsify/maxretrievefac",
1831 "limit on the number of useless vs. useful hashtable retrieves as a multiple of the number of constraints",
1835 "presolving/dualsparsify/waitingfac",
1836 "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)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
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 SCIPisSumZero(SCIP *scip, SCIP_Real val)
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 SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVarImpl(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_IMPLINTTYPE impltype, 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)
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_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPisVarAggrCoefAcceptable(SCIP *scip, SCIP_VAR *var, SCIP_Real scalar)
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
#define DEFAULT_MAXCONSIDEREDNONZEROS
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)
SCIP_RETCODE SCIPincludePresolDualsparsify(SCIP *scip)
struct ColConsPair COLCONSPAIR
#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
struct SCIP_Cons SCIP_CONS
struct SCIP_Matrix SCIP_MATRIX
#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)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLINIT(x)
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
enum SCIP_ImplintType SCIP_IMPLINTTYPE
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE