70#define PRESOL_NAME "dualinfer"
71#define PRESOL_DESC "exploit dual information for fixings and side changes"
72#define PRESOL_PRIORITY (-3000)
73#define PRESOL_MAXROUNDS 0
74#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
76#define DEFAULT_TWOCOLUMN_COMBINE TRUE
77#define DEFAULT_MAXLOOPS_DUALBNDSTR 12
78#define DEFAULT_MAXCONSIDEREDNONZEROS 100
79#define DEFAULT_MAXRETRIEVEFAILS 1000
80#define DEFAULT_MAXCOMBINEFAILS 1000
81#define DEFAULT_MAXHASHFAC 10
82#define DEFAULT_MAXPAIRFAC 1
83#define DEFAULT_MAXROWSUPPORT 3
99 int maxconsiderednonzeros;
154 a = (uint64_t)(
long)colpair->
col1idx;
155 b = (uint64_t)(
long)colpair->
col2idx;
156 return (
void*)((
a << 32) |
b);
168 return (
int)(hash>>1);
183 if( (*pos) >= (*listsize) )
188 (*listsize) = newsize;
191 (*hashlist)[(*pos)] = hash;
192 (*colidxlist)[(*pos)] = colidx;
215 while(
i < len && list[
i] == list[
i - 1] )
276 for(
i = 0;
i < row1len;
i++ )
277 row1coefs[row1idxptr[
i]] = -row1valptr[
i];
282 for(
i = 0;
i < row1len;
i++ )
283 row1coefs[row1idxptr[
i]] = row1valptr[
i];
288 for(
i = 0;
i < row2len;
i++ )
289 row2coefs[row2idxptr[
i]] = -row2valptr[
i];
294 for(
i = 0;
i < row2len;
i++ )
295 row2coefs[row2idxptr[
i]] = row2valptr[
i];
307 while(
i < row1len && j < row2len )
309 assert(
i + 1 == row1len || row1idxptr[
i] < row1idxptr[
i + 1]);
310 assert(j + 1 == row2len || row2idxptr[j] < row2idxptr[j + 1]);
312 idx1 = row1idxptr[
i];
313 idx2 = row2idxptr[j];
317 breakpoints[
nvars] = 2.0;
329 breakpoints[
nvars] = row2coefs[idx2] / (row2coefs[idx2] - row1coefs[idx1]);
337 varinds[
nvars] = idx1;
341 else if( idx1 < idx2 )
349 row2coefs[idx1] = 0.0;
351 varinds[
nvars] = idx1;
363 row1coefs[idx2] = 0.0;
365 varinds[
nvars] = idx2;
373 idx1 = row1idxptr[
i];
381 row2coefs[idx1] = 0.0;
383 varinds[
nvars] = idx1;
384 breakpoints[
nvars] = 2.0;
391 idx2 = row2idxptr[j];
399 row1coefs[idx2] = 0.0;
401 varinds[
nvars] = idx2;
402 breakpoints[
nvars] = 2.0;
410 if( nbreakpoints >= 1 )
418 newlbs[
i] = lbs[idx];
419 newubs[
i] = ubs[idx];
436 l1 -= row1coefs[idx] * lbs[idx];
437 l2 -= row2coefs[idx] * lbs[idx];
447 l1 -= row1coefs[idx] * ubs[idx];
448 l2 -= row2coefs[idx] * ubs[idx];
461 l1 -= row1coefs[idx] * lbs[idx];
469 l1 -= row1coefs[idx] * ubs[idx];
477#ifdef SCIP_MORE_DEBUG
478 SCIPdebugMsg(
scip,
"lambda = 0, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
483#ifdef SCIP_MORE_DEBUG
489#ifdef SCIP_MORE_DEBUG
497 newlbs[
i] =
MAX(newlbs[
i], (l2 + row2coefs[idx] * ubs[idx]) / row2coefs[idx]);
499 newlbs[
i] =
MAX(newlbs[
i], l2 / row2coefs[idx]);
504 newubs[
i] =
MIN(newubs[
i], (l2 + row2coefs[idx] * lbs[idx]) / row2coefs[idx]);
506 newubs[
i] =
MIN(newubs[
i], l2 / row2coefs[idx]);
508#ifdef SCIP_MORE_DEBUG
510 SCIPdebugMsg(
scip,
"%g <= %g <= var_%d <= %g <= %g\n", oldlb, newlbs[
i],
i, newubs[
i], oldub);
518 while(
i < nbreakpoints )
536 if( signs[idx] ==
UP )
543 l1update += sign * row1coefs[idx] * lbs[idx];
544 l2update += sign * row2coefs[idx] * lbs[idx];
548 if( signs[idx] ==
UP )
556 l1update -= sign * row1coefs[idx] * ubs[idx];
557 l2update -= sign * row2coefs[idx] * ubs[idx];
561 if( signs[idx] ==
UP )
567 if( signs[idx] ==
UP )
572 if( j + 1 >= nbreakpoints || !
SCIPisEQ(
scip, breakpoints[j], breakpoints[j + 1]) )
579#ifdef SCIP_MORE_DEBUG
580 SCIPdebugMsg(
scip,
"lambda_%d = %g, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
589 for( j = 0; j <
nvars; j++ )
591#ifdef SCIP_MORE_DEBUG
600#ifdef SCIP_MORE_DEBUG
606 coef = breakpoints[
i] * row1coefs[idx] + (1 - breakpoints[
i]) * row2coefs[idx];
613 if( signs[idx] ==
POS || signs[idx] ==
DN )
616 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * ubs[idx]) / coef);
618 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
620 else if ( signs[idx] ==
NEG || signs[idx] ==
UP )
623 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * lbs[idx]) / coef);
625 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
627#ifdef SCIP_MORE_DEBUG
629 SCIPdebugMsg(
scip,
"%g <= %g <= var_%d <= %g <= %g\n", oldlb, newlbs[j], j, newubs[j], oldub);
651#ifdef SCIP_MORE_DEBUG
652 SCIPdebugMsg(
scip,
"lambda = 1, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
656#ifdef SCIP_MORE_DEBUG
662#ifdef SCIP_MORE_DEBUG
670 newlbs[
i] =
MAX(newlbs[
i], (l1 + row1coefs[idx] * ubs[idx]) / row1coefs[idx]);
672 newlbs[
i] =
MAX(newlbs[
i], l1 / row1coefs[idx]);
677 newubs[
i] =
MIN(newubs[
i], (l1 + row1coefs[idx] * lbs[idx]) / row1coefs[idx]);
679 newubs[
i] =
MIN(newubs[
i], l1 / row1coefs[idx]);
681#ifdef SCIP_MORE_DEBUG
683 SCIPdebugMsg(
scip,
"%g <= %g <= var_%i <= %g <= %g\n", oldlb, newlbs[
i],
i, newubs[
i], oldub);
700 lbs[idx] = newlbs[
i];
701 ubs[idx] = newubs[
i];
751 *isminsettoinfinity =
FALSE;
752 *ismaxsettoinfinity =
FALSE;
765 for( ; rowpnt < rowend; rowpnt++, valpnt++ )
769 if( col == withoutcol )
780 maxresact += coef * ubs[col];
785 minresact += coef * lbs[col];
792 maxresact += coef * lbs[col];
797 minresact += coef * ubs[col];
801 if( (nmaxactneginf + nmaxactposinf) > 0 )
802 *ismaxsettoinfinity =
TRUE;
804 *maxresactivity = maxresact;
806 if( (nminactneginf + nminactposinf) > 0 )
807 *isminsettoinfinity =
TRUE;
809 *minresactivity = minresact;
846 &minresactivity, &maxresactivity,
847 &isminsettoinfinity, &ismaxsettoinfinity);
856 *rowub = (rhs - minresactivity) / val;
862 *rowlb = (lhs - maxresactivity) / val;
870 *rowub = (lhs - maxresactivity) / val;
876 *rowlb = (rhs - minresactivity) / val;
917 for( ; (colpnt < colend); colpnt++, valpnt++ )
925 &rowub, &ubfound, &rowlb, &lbfound);
927 if( ubfound && (rowub < impliedub) )
930 if( lbfound && (rowlb > impliedlb) )
974 for( ; colpnt < colend; colpnt++, valpnt++ )
979 if( row == withoutrow )
985 mincolactivity += val * lbdual[row];
990 mincolactivity += val * ubdual[row];
994 return mincolactivity;
1012 const int* mincolactinf,
1030 assert(mincolactinf[col] >= 1);
1031 if( mincolactinf[col] == 1 )
1038 if( mincolactinf[col] > 0 )
1041 *mincolresact = mincolact[col] - val * lbdual[row];
1044 else if( val < 0.0 )
1048 assert(mincolactinf[col] >= 1);
1049 if( mincolactinf[col] == 1 )
1056 if( mincolactinf[col] > 0 )
1059 *mincolresact = mincolact[col] - val * ubdual[row];
1090 mincolact[col] = 0.0;
1091 mincolactinf[col] = 0;
1098 for( ; colpnt < colend; colpnt++, valpnt++ )
1106 mincolactinf[col]++;
1108 mincolact[col] += val * lbdual[row];
1110 else if( val < 0.0 )
1113 mincolactinf[col]++;
1115 mincolact[col] += val * ubdual[row];
1120 if( mincolactinf[col] > 0 )
1150 maxcolact[col] = 0.0;
1151 maxcolactinf[col] = 0;
1158 for( ; colpnt < colend; colpnt++, valpnt++ )
1166 maxcolactinf[col]++;
1168 maxcolact[col] += val * ubdual[row];
1170 else if( val < 0.0 )
1173 maxcolactinf[col]++;
1175 maxcolact[col] += val * lbdual[row];
1180 if( maxcolactinf[col] > 0 )
1215 for(; (rowpnt < rowend); rowpnt++, valpnt++ )
1220 if( isubimplied[col] )
1226 assert(mincolactinf[col] > 0);
1227 mincolactinf[col]--;
1234 assert(mincolactinf[col] > 0);
1235 mincolactinf[col]--;
1239 if( mincolactinf[col] == 0 )
1280 assert(0 <= row && row < nrows);
1294 for(
i = 0;
i < ncols;
i++)
1299 colmap[
i] = numberconvars;
1305 numDualVars = nrows + 2 * numberconvars;
1309 for(
i = 0;
i < nrows;
i++ )
1311 variables[
i] =
NULL;
1332 for(
i = 0;
i < numberconvars;
i++ )
1348 assert(numDualVars == fillcnt);
1354 for(
i = 0;
i <numberconvars;
i++)
1355 constraints[
i] =
NULL;
1357 for(
i = 0;
i < ncols;
i++)
1363 int cidx = colmap[
i];
1364 assert(0 <= cidx && cidx < numberconvars);
1370 for( ; colpnt < colend; colpnt++, valpnt++ )
1372 assert(0 <= *colpnt && *colpnt < nrows);
1374 tmpvars[fillcnt] = variables[*colpnt];
1375 tmpcoef[fillcnt] = *valpnt;
1383 tmpvars[fillcnt] = variables[nrows + 2 * cidx];
1384 tmpcoef[fillcnt] = 1.0;
1391 assert(variables[nrows + 2 * cidx + 1] !=
NULL);
1392 tmpvars[fillcnt] = variables[nrows + 2 * cidx + 1];
1393 tmpcoef[fillcnt] = -1.0;
1459 for(
i = 0;
i < numDualVars;
i++ )
1461 if(variables[
i] !=
NULL)
1464 for(
i = 0;
i < numberconvars;
i++ )
1466 if(constraints[
i] !=
NULL)
1508 *ubinfchange =
FALSE;
1509 *lbinfchange =
FALSE;
1515 newubdual = (
objval - mincolresact) / val;
1517 if( newubdual < ubdual[row] )
1523 *ubinfchange =
TRUE;
1525 ubdual[row] = newubdual;
1532 newlbdual = (
objval - mincolresact) / val;
1534 if( newlbdual > lbdual[row] )
1540 *lbinfchange =
TRUE;
1542 lbdual[row] = newlbdual;
1557 int* npossiblefixings,
1559 int* npossiblesidechanges
1628 for(
i = 0;
i < ncols;
i++ )
1640 for(
i = 0;
i < ncols;
i++ )
1661 if( isubimplied[
i] )
1663 implubvars[nimplubvars] =
i;
1668 if( isubimplied[
i] )
1671 if( islbimplied[
i] )
1679 for(
i = 0;
i < nrows;
i++ )
1696 if( nimplubvars >= 2 && presoldata->usetwocolcombine )
1718 for(
i = 0;
i < nimplubvars;
i++)
1720 if( ((
SCIP_Longint)pospp) + posmm + pospm + posmp > maxhashes )
1726 for( j = 0; j < maxlen; j++)
1728 for( k = j + 1; k < maxlen; k++)
1759#ifdef SCIP_MORE_DEBUG
1760 SCIPdebugMsg(
scip,
"hashlist sizes: pp %d, mm %d, pm %d, mp %d \n", pospp, posmm, pospm, posmp);
1770 if( pospp > 0 && posmm > 0 )
1793#ifdef SCIP_MORE_DEBUG
1801 if( hashlistpp[block1start] == hashlistmm[block2start] )
1803 for(
i = block1start;
i < block1end;
i++ )
1805 for( j = block2start; j < block2end; j++ )
1807 if( colidxlistpp[
i] != colidxlistmm[j] )
1809 colpair.
col1idx =
MIN(colidxlistpp[
i], colidxlistmm[j]);
1810 colpair.
col2idx =
MAX(colidxlistpp[
i], colidxlistmm[j]);
1826 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1835 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1837#ifdef SCIP_MORE_DEBUG
1838 SCIPdebugMsg(
scip,
"pm/mp: %d retrievefails before reset, %d combines\n", retrievefails, ncombines);
1842 else if( retrievefails < presoldata->maxretrievefails )
1854 if( block1end < pospp && block2end < posmm )
1862 else if( hashlistpp[block1start] < hashlistmm[block2start] && block1end < pospp )
1864 else if( hashlistpp[block1start] > hashlistmm[block2start] && block2end < posmm )
1872 if( pospm > 0 && posmp > 0 )
1895#ifdef SCIP_MORE_DEBUG
1901 if( hashlistpm[block1start] == hashlistmp[block2start] )
1903 for(
i = block1start;
i < block1end;
i++ )
1905 for( j = block2start; j < block2end; j++ )
1907 if( colidxlistpm[
i] != colidxlistmp[j] )
1909 colpair.
col1idx =
MIN(colidxlistpm[
i], colidxlistmp[j]);
1910 colpair.
col2idx =
MAX(colidxlistpm[
i], colidxlistmp[j]);
1926 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1935 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1940 else if( retrievefails < presoldata->maxretrievefails )
1952 if( block1end < pospm && block2end < posmp )
1960 else if( hashlistpm[block1start] < hashlistmp[block2start] && block1end < pospm )
1962 else if( hashlistpm[block1start] > hashlistmp[block2start] && block2end < posmp )
1979#ifdef SCIP_MORE_DEBUG
1981 for(
i = 0;
i < nrows;
i++ )
1996 while( 0 < boundchanges && loops < presoldata->maxdualbndloops )
2001 for(
i = 0;
i < nimplubvars;
i++ )
2008 for(
i = 0;
i < nimplubvars;
i++ )
2015 col = implubvars[
i];
2023 for( ; colpnt < colend; colpnt++, valpnt++ )
2033 mincolact, mincolactinf, &mincolresact);
2036 lbdual, ubdual, &boundchanges, &ubinfchange, &lbinfchange);
2038 if( ubinfchange || lbinfchange )
2040 mincolact, mincolactinf, ubinfchange, lbinfchange);
2045#ifdef SCIP_MORE_DEBUG
2047 for(
i = 0;
i < nrows;
i++ )
2059 for(
i = 0;
i < ncols;
i++ )
2065 for(
i = 0;
i < ncols;
i++ )
2083 (*npossiblefixings)++;
2093 (*npossiblefixings)++;
2098 for(
i = 0;
i < nrows;
i++ )
2107 (*npossiblesidechanges)++;
2119 (*npossiblesidechanges)++;
2125 (*npossiblesidechanges)++;
2191 int npossiblefixings;
2196 int npossiblesidechanges;
2217 SCIPdebugMsg(
scip,
"DualInfer not executed because condition of existing dual solution is not fulfilled.\n");
2226 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2241 npossiblefixings = 0;
2245 npossiblesidechanges = 0;
2258 varstofix, &npossiblefixings, sidestochange, &npossiblesidechanges) );
2260 if( npossiblefixings > 0 )
2262 for(
i = ncols - 1;
i >= 0; --
i )
2321 if( npossiblesidechanges > 0 )
2323 for(
i = 0;
i < nrows;
i++ )
2327 const char* conshdlrname;
2339 if( strcmp(conshdlrname,
"linear") == 0 )
2400 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 || npossiblesidechanges > 0 )
2402 SCIPdebugMsg(
scip,
"### fixed vars [cont: %d, int: %d, bin: %d], changed sides [%d]\n",
2403 nconvarsfixed, nintvarsfixed, nbinvarsfixed, nsideschanged);
2434 "presolving/dualinfer/twocolcombine",
2435 "use convex combination of columns for determining dual bounds",
2439 "presolving/dualinfer/maxdualbndloops",
2440 "maximal number of dual bound strengthening loops",
2444 "presolving/dualinfer/maxconsiderednonzeros",
2445 "maximal number of considered non-zeros within one column (-1: no limit)",
2449 "presolving/dualinfer/maxretrievefails",
2450 "maximal number of consecutive useless hashtable retrieves",
2454 "presolving/dualinfer/maxcombinefails",
2455 "maximal number of consecutive useless column combines",
2459 "presolving/dualinfer/maxhashfac",
2460 "Maximum number of hashlist entries as multiple of number of columns in the problem (-1: no limit)",
2464 "presolving/dualinfer/maxpairfac",
2465 "Maximum number of processed column pairs as multiple of the number of columns in the problem (-1: no limit)",
2469 "presolving/dualinfer/maxrowsupport",
2470 "Maximum number of row's non-zeros for changing inequality to equality",
Constraint handler for linear constraints in their most general form, .
static SCIP_RETCODE determineBestBounds(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real boundswitch, int usevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, SCIP_Bool ignoresol, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real *bestlb, SCIP_Real *bestub, int *bestlbtype, int *bestubtype, SCIP_BOUNDTYPE *selectedbound, SCIP_Bool *freevariable)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
void SCIPhashsetFree(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPhashsetExists(SCIP_HASHSET *hashset, void *element)
SCIP_RETCODE SCIPhashsetInsert(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem, void *element)
SCIP_RETCODE SCIPhashsetCreate(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem, int size)
#define SCIPhashTwo(a, b)
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_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
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 SCIPincludePresolDualinfer(SCIP *scip)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Real SCIPgetPseudoObjval(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(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)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(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 SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(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 SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
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))
static SCIP_RETCODE solveLP(SCIP *scip, SCIP_DIVESET *diveset, SCIP_Longint maxnlpiterations, SCIP_DIVECONTEXT divecontext, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_Bool SCIPmatrixUplockConflict(SCIP_MATRIX *matrix, int col)
int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col)
SCIP_Bool SCIPmatrixIsRowRhsInfinity(SCIP_MATRIX *matrix, int row)
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)
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_CONS * SCIPmatrixGetCons(SCIP_MATRIX *matrix, int row)
void SCIPmatrixFree(SCIP *scip, SCIP_MATRIX **matrix)
SCIP_VAR * SCIPmatrixGetVar(SCIP_MATRIX *matrix, int col)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
enum Fixingdirection FIXINGDIRECTION
#define DEFAULT_TWOCOLUMN_COMBINE
static void calcMaxColActivity(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbdual, SCIP_Real *ubdual, SCIP_Real *maxcolact, int *maxcolactinf)
static void * encodeColPair(COLPAIR *colpair)
static void calcMinColActResidual(SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Real *lbdual, SCIP_Real *ubdual, const SCIP_Real *mincolact, const int *mincolactinf, SCIP_Real *mincolresact)
#define DEFAULT_MAXCONSIDEREDNONZEROS
static void getImpliedBounds(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbs, SCIP_Real *ubs, SCIP_Bool *ubimplied, SCIP_Bool *lbimplied)
static void calcMinColActivity(SCIP *scip, SCIP_MATRIX *matrix, int col, SCIP_Real *lbdual, SCIP_Real *ubdual, SCIP_Real *mincolact, int *mincolactinf)
static int hashIndexPair(int idx1, int idx2)
static void getVarBoundsOfRow(SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Real *lbs, SCIP_Real *ubs, SCIP_Real *rowub, SCIP_Bool *ubfound, SCIP_Real *rowlb, SCIP_Bool *lbfound)
static SCIP_RETCODE combineCols(SCIP *scip, int *row1idxptr, int *row2idxptr, SCIP_Real *row1valptr, SCIP_Real *row2valptr, SCIP_Real b1, SCIP_Real b2, int row1len, int row2len, int ncols, SCIP_Bool swaprow1, SCIP_Bool swaprow2, SCIP_Real *lbs, SCIP_Real *ubs, SCIP_Bool *success)
static SCIP_Real getMinColActWithoutRow(SCIP *scip, SCIP_MATRIX *matrix, int col, int withoutrow, SCIP_Real *lbdual, SCIP_Real *ubdual)
static void updateDualBounds(SCIP *scip, SCIP_MATRIX *matrix, SCIP_Real objval, SCIP_Real val, int row, SCIP_Real mincolresact, SCIP_Real *lbdual, SCIP_Real *ubdual, int *boundchanges, SCIP_Bool *ubinfchange, SCIP_Bool *lbinfchange)
static void findNextBlock(const int *list, int len, int *start, int *end)
static SCIP_RETCODE dualBoundStrengthening(SCIP *scip, SCIP_MATRIX *matrix, SCIP_PRESOLDATA *presoldata, FIXINGDIRECTION *varstofix, int *npossiblefixings, SIDECHANGE *sidestochange, int *npossiblesidechanges)
#define DEFAULT_MAXHASHFAC
enum SideChange SIDECHANGE
static void getMinMaxActivityResiduals(SCIP *scip, SCIP_MATRIX *matrix, int withoutcol, int row, SCIP_Real *lbs, SCIP_Real *ubs, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
#define DEFAULT_MAXCOMBINEFAILS
#define DEFAULT_MAXRETRIEVEFAILS
#define DEFAULT_MAXLOOPS_DUALBNDSTR
#define DEFAULT_MAXPAIRFAC
static void infinityCountUpdate(SCIP *scip, SCIP_MATRIX *matrix, int row, SCIP_Real *lbdual, SCIP_Real *ubdual, const SCIP_Bool *isubimplied, SCIP_Real *mincolact, int *mincolactinf, SCIP_Bool ubinfchange, SCIP_Bool lbinfchange)
#define DEFAULT_MAXROWSUPPORT
static SCIP_RETCODE addEntry(SCIP *scip, int *pos, int *listsize, int **hashlist, int **colidxlist, int hash, int colidx)
public methods for managing constraints
public methods for matrix
public methods for message output
public methods for presolvers
public methods for problem variables
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for presolving plugins
public methods for global and local (sub)problems
public methods for the probing mode
public methods for SCIP variables
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Matrix SCIP_MATRIX
struct SCIP_HashSet SCIP_HASHSET
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS