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
597 coef = breakpoints[
i] * row1coefs[idx] + (1 - breakpoints[
i]) * row2coefs[idx];
604 if( signs[idx] ==
POS || signs[idx] ==
DN )
607 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * ubs[idx]) / coef);
609 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
611 else if ( signs[idx] ==
NEG || signs[idx] ==
UP )
614 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * lbs[idx]) / coef);
616 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
618#ifdef SCIP_MORE_DEBUG
620 SCIPdebugMsg(
scip,
"%g <= %g <= var_%d <= %g <= %g\n", oldlb, newlbs[j], j, newubs[j], oldub);
642#ifdef SCIP_MORE_DEBUG
643 SCIPdebugMsg(
scip,
"lambda = 1, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
647#ifdef SCIP_MORE_DEBUG
653#ifdef SCIP_MORE_DEBUG
661 newlbs[
i] =
MAX(newlbs[
i], (l1 + row1coefs[idx] * ubs[idx]) / row1coefs[idx]);
663 newlbs[
i] =
MAX(newlbs[
i], l1 / row1coefs[idx]);
668 newubs[
i] =
MIN(newubs[
i], (l1 + row1coefs[idx] * lbs[idx]) / row1coefs[idx]);
670 newubs[
i] =
MIN(newubs[
i], l1 / row1coefs[idx]);
672#ifdef SCIP_MORE_DEBUG
674 SCIPdebugMsg(
scip,
"%g <= %g <= var_%i <= %g <= %g\n", oldlb, newlbs[
i],
i, newubs[
i], oldub);
691 lbs[idx] = newlbs[
i];
692 ubs[idx] = newubs[
i];
742 *isminsettoinfinity =
FALSE;
743 *ismaxsettoinfinity =
FALSE;
756 for( ; rowpnt < rowend; rowpnt++, valpnt++ )
760 if( col == withoutcol )
771 maxresact += coef * ubs[col];
776 minresact += coef * lbs[col];
783 maxresact += coef * lbs[col];
788 minresact += coef * ubs[col];
792 if( (nmaxactneginf + nmaxactposinf) > 0 )
793 *ismaxsettoinfinity =
TRUE;
795 *maxresactivity = maxresact;
797 if( (nminactneginf + nminactposinf) > 0 )
798 *isminsettoinfinity =
TRUE;
800 *minresactivity = minresact;
837 &minresactivity, &maxresactivity,
838 &isminsettoinfinity, &ismaxsettoinfinity);
847 *rowub = (rhs - minresactivity) / val;
853 *rowlb = (lhs - maxresactivity) / val;
861 *rowub = (lhs - maxresactivity) / val;
867 *rowlb = (rhs - minresactivity) / val;
908 for( ; (colpnt < colend); colpnt++, valpnt++ )
916 &rowub, &ubfound, &rowlb, &lbfound);
918 if( ubfound && (rowub < impliedub) )
921 if( lbfound && (rowlb > impliedlb) )
965 for( ; colpnt < colend; colpnt++, valpnt++ )
970 if( row == withoutrow )
976 mincolactivity += val * lbdual[row];
981 mincolactivity += val * ubdual[row];
985 return mincolactivity;
1003 const int* mincolactinf,
1021 assert(mincolactinf[col] >= 1);
1022 if( mincolactinf[col] == 1 )
1029 if( mincolactinf[col] > 0 )
1032 *mincolresact = mincolact[col] - val * lbdual[row];
1035 else if( val < 0.0 )
1039 assert(mincolactinf[col] >= 1);
1040 if( mincolactinf[col] == 1 )
1047 if( mincolactinf[col] > 0 )
1050 *mincolresact = mincolact[col] - val * ubdual[row];
1081 mincolact[col] = 0.0;
1082 mincolactinf[col] = 0;
1089 for( ; colpnt < colend; colpnt++, valpnt++ )
1097 mincolactinf[col]++;
1099 mincolact[col] += val * lbdual[row];
1101 else if( val < 0.0 )
1104 mincolactinf[col]++;
1106 mincolact[col] += val * ubdual[row];
1111 if( mincolactinf[col] > 0 )
1141 maxcolact[col] = 0.0;
1142 maxcolactinf[col] = 0;
1149 for( ; colpnt < colend; colpnt++, valpnt++ )
1157 maxcolactinf[col]++;
1159 maxcolact[col] += val * ubdual[row];
1161 else if( val < 0.0 )
1164 maxcolactinf[col]++;
1166 maxcolact[col] += val * lbdual[row];
1171 if( maxcolactinf[col] > 0 )
1206 for(; (rowpnt < rowend); rowpnt++, valpnt++ )
1211 if( isubimplied[col] )
1217 assert(mincolactinf[col] > 0);
1218 mincolactinf[col]--;
1225 assert(mincolactinf[col] > 0);
1226 mincolactinf[col]--;
1230 if( mincolactinf[col] == 0 )
1271 assert(0 <= row && row < nrows);
1285 for(
i = 0;
i < ncols;
i++)
1290 colmap[
i] = numberconvars;
1296 numDualVars = nrows + 2 * numberconvars;
1300 for(
i = 0;
i < nrows;
i++ )
1302 variables[
i] =
NULL;
1323 for(
i = 0;
i < numberconvars;
i++ )
1339 assert(numDualVars == fillcnt);
1345 for(
i = 0;
i <numberconvars;
i++)
1346 constraints[
i] =
NULL;
1348 for(
i = 0;
i < ncols;
i++)
1354 int cidx = colmap[
i];
1355 assert(0 <= cidx && cidx < numberconvars);
1361 for( ; colpnt < colend; colpnt++, valpnt++ )
1363 assert(0 <= *colpnt && *colpnt < nrows);
1365 tmpvars[fillcnt] = variables[*colpnt];
1366 tmpcoef[fillcnt] = *valpnt;
1374 tmpvars[fillcnt] = variables[nrows + 2 * cidx];
1375 tmpcoef[fillcnt] = 1.0;
1382 assert(variables[nrows + 2 * cidx + 1] !=
NULL);
1383 tmpvars[fillcnt] = variables[nrows + 2 * cidx + 1];
1384 tmpcoef[fillcnt] = -1.0;
1450 for(
i = 0;
i < numDualVars;
i++ )
1452 if(variables[
i] !=
NULL)
1455 for(
i = 0;
i < numberconvars;
i++ )
1457 if(constraints[
i] !=
NULL)
1499 *ubinfchange =
FALSE;
1500 *lbinfchange =
FALSE;
1506 newubdual = (
objval - mincolresact) / val;
1508 if( newubdual < ubdual[row] )
1514 *ubinfchange =
TRUE;
1516 ubdual[row] = newubdual;
1523 newlbdual = (
objval - mincolresact) / val;
1525 if( newlbdual > lbdual[row] )
1531 *lbinfchange =
TRUE;
1533 lbdual[row] = newlbdual;
1548 int* npossiblefixings,
1550 int* npossiblesidechanges
1619 for(
i = 0;
i < ncols;
i++ )
1631 for(
i = 0;
i < ncols;
i++ )
1652 if( isubimplied[
i] )
1654 implubvars[nimplubvars] =
i;
1661 if( islbimplied[
i] )
1669 for(
i = 0;
i < nrows;
i++ )
1686 if( nimplubvars >= 2 && presoldata->usetwocolcombine )
1708 for(
i = 0;
i < nimplubvars;
i++)
1710 if( ((
SCIP_Longint)pospp) + posmm + pospm + posmp > maxhashes )
1716 for( j = 0; j < maxlen; j++)
1718 for( k = j + 1; k < maxlen; k++)
1749#ifdef SCIP_MORE_DEBUG
1750 SCIPdebugMsg(
scip,
"hashlist sizes: pp %d, mm %d, pm %d, mp %d \n", pospp, posmm, pospm, posmp);
1760 if( pospp > 0 && posmm > 0 )
1783#ifdef SCIP_MORE_DEBUG
1791 if( hashlistpp[block1start] == hashlistmm[block2start] )
1793 for(
i = block1start;
i < block1end;
i++ )
1795 for( j = block2start; j < block2end; j++ )
1797 if( colidxlistpp[
i] != colidxlistmm[j] )
1799 colpair.
col1idx =
MIN(colidxlistpp[
i], colidxlistmm[j]);
1800 colpair.
col2idx =
MAX(colidxlistpp[
i], colidxlistmm[j]);
1816 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1825 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1827#ifdef SCIP_MORE_DEBUG
1828 SCIPdebugMsg(
scip,
"pm/mp: %d retrievefails before reset, %d combines\n", retrievefails, ncombines);
1832 else if( retrievefails < presoldata->maxretrievefails )
1844 if( block1end < pospp && block2end < posmm )
1852 else if( hashlistpp[block1start] < hashlistmm[block2start] && block1end < pospp )
1854 else if( hashlistpp[block1start] > hashlistmm[block2start] && block2end < posmm )
1862 if( pospm > 0 && posmp > 0 )
1885#ifdef SCIP_MORE_DEBUG
1891 if( hashlistpm[block1start] == hashlistmp[block2start] )
1893 for(
i = block1start;
i < block1end;
i++ )
1895 for( j = block2start; j < block2end; j++ )
1897 if( colidxlistpm[
i] != colidxlistmp[j] )
1899 colpair.
col1idx =
MIN(colidxlistpm[
i], colidxlistmp[j]);
1900 colpair.
col2idx =
MAX(colidxlistpm[
i], colidxlistmp[j]);
1916 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1925 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1930 else if( retrievefails < presoldata->maxretrievefails )
1942 if( block1end < pospm && block2end < posmp )
1950 else if( hashlistpm[block1start] < hashlistmp[block2start] && block1end < pospm )
1952 else if( hashlistpm[block1start] > hashlistmp[block2start] && block2end < posmp )
1969#ifdef SCIP_MORE_DEBUG
1971 for(
i = 0;
i < nrows;
i++ )
1986 while( 0 < boundchanges && loops < presoldata->maxdualbndloops )
1991 for(
i = 0;
i < nimplubvars;
i++ )
1998 for(
i = 0;
i < nimplubvars;
i++ )
2005 col = implubvars[
i];
2013 for( ; colpnt < colend; colpnt++, valpnt++ )
2023 mincolact, mincolactinf, &mincolresact);
2026 lbdual, ubdual, &boundchanges, &ubinfchange, &lbinfchange);
2028 if( ubinfchange || lbinfchange )
2030 mincolact, mincolactinf, ubinfchange, lbinfchange);
2035#ifdef SCIP_MORE_DEBUG
2037 for(
i = 0;
i < nrows;
i++ )
2049 for(
i = 0;
i < ncols;
i++ )
2055 for(
i = 0;
i < ncols;
i++ )
2073 (*npossiblefixings)++;
2083 (*npossiblefixings)++;
2088 for(
i = 0;
i < nrows;
i++ )
2097 (*npossiblesidechanges)++;
2109 (*npossiblesidechanges)++;
2115 (*npossiblesidechanges)++;
2181 int npossiblefixings;
2186 int npossiblesidechanges;
2207 SCIPdebugMsg(
scip,
"DualInfer not executed because condition of existing dual solution is not fulfilled.\n");
2216 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2231 npossiblefixings = 0;
2235 npossiblesidechanges = 0;
2248 varstofix, &npossiblefixings, sidestochange, &npossiblesidechanges) );
2250 if( npossiblefixings > 0 )
2252 for(
i = ncols - 1;
i >= 0; --
i )
2311 if( npossiblesidechanges > 0 )
2313 for(
i = 0;
i < nrows;
i++ )
2317 const char* conshdlrname;
2329 if( strcmp(conshdlrname,
"linear") == 0 )
2390 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 || npossiblesidechanges > 0 )
2392 SCIPdebugMsg(
scip,
"### fixed vars [cont: %d, int: %d, bin: %d], changed sides [%d]\n",
2393 nconvarsfixed, nintvarsfixed, nbinvarsfixed, nsideschanged);
2424 "presolving/dualinfer/twocolcombine",
2425 "use convex combination of columns for determining dual bounds",
2429 "presolving/dualinfer/maxdualbndloops",
2430 "maximal number of dual bound strengthening loops",
2434 "presolving/dualinfer/maxconsiderednonzeros",
2435 "maximal number of considered non-zeros within one column (-1: no limit)",
2439 "presolving/dualinfer/maxretrievefails",
2440 "maximal number of consecutive useless hashtable retrieves",
2444 "presolving/dualinfer/maxcombinefails",
2445 "maximal number of consecutive useless column combines",
2449 "presolving/dualinfer/maxhashfac",
2450 "Maximum number of hashlist entries as multiple of number of columns in the problem (-1: no limit)",
2454 "presolving/dualinfer/maxpairfac",
2455 "Maximum number of processed column pairs as multiple of the number of columns in the problem (-1: no limit)",
2459 "presolving/dualinfer/maxrowsupport",
2460 "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