66#define PRESOL_NAME "dualinfer"
67#define PRESOL_DESC "exploit dual information for fixings and side changes"
68#define PRESOL_PRIORITY (-3000)
69#define PRESOL_MAXROUNDS 0
70#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
72#define DEFAULT_TWOCOLUMN_COMBINE TRUE
73#define DEFAULT_MAXLOOPS_DUALBNDSTR 12
74#define DEFAULT_MAXCONSIDEREDNONZEROS 100
75#define DEFAULT_MAXRETRIEVEFAILS 1000
76#define DEFAULT_MAXCOMBINEFAILS 1000
77#define DEFAULT_MAXHASHFAC 10
78#define DEFAULT_MAXPAIRFAC 1
79#define DEFAULT_MAXROWSUPPORT 3
95 int maxconsiderednonzeros;
150 a = (uint64_t)(
long)colpair->
col1idx;
151 b = (uint64_t)(
long)colpair->
col2idx;
152 return (
void*)((
a << 32) |
b);
164 return (
int)(hash>>1);
179 if( (*pos) >= (*listsize) )
184 (*listsize) = newsize;
187 (*hashlist)[(*pos)] = hash;
188 (*colidxlist)[(*pos)] = colidx;
211 while(
i < len && list[
i] == list[
i - 1] )
272 for(
i = 0;
i < row1len;
i++ )
273 row1coefs[row1idxptr[
i]] = -row1valptr[
i];
278 for(
i = 0;
i < row1len;
i++ )
279 row1coefs[row1idxptr[
i]] = row1valptr[
i];
284 for(
i = 0;
i < row2len;
i++ )
285 row2coefs[row2idxptr[
i]] = -row2valptr[
i];
290 for(
i = 0;
i < row2len;
i++ )
291 row2coefs[row2idxptr[
i]] = row2valptr[
i];
303 while(
i < row1len && j < row2len )
305 assert(
i + 1 == row1len || row1idxptr[
i] < row1idxptr[
i + 1]);
306 assert(j + 1 == row2len || row2idxptr[j] < row2idxptr[j + 1]);
308 idx1 = row1idxptr[
i];
309 idx2 = row2idxptr[j];
313 breakpoints[
nvars] = 2.0;
325 breakpoints[
nvars] = row2coefs[idx2] / (row2coefs[idx2] - row1coefs[idx1]);
333 varinds[
nvars] = idx1;
337 else if( idx1 < idx2 )
345 row2coefs[idx1] = 0.0;
347 varinds[
nvars] = idx1;
359 row1coefs[idx2] = 0.0;
361 varinds[
nvars] = idx2;
369 idx1 = row1idxptr[
i];
377 row2coefs[idx1] = 0.0;
379 varinds[
nvars] = idx1;
380 breakpoints[
nvars] = 2.0;
387 idx2 = row2idxptr[j];
395 row1coefs[idx2] = 0.0;
397 varinds[
nvars] = idx2;
398 breakpoints[
nvars] = 2.0;
406 if( nbreakpoints >= 1 )
414 newlbs[
i] = lbs[idx];
415 newubs[
i] = ubs[idx];
432 l1 -= row1coefs[idx] * lbs[idx];
433 l2 -= row2coefs[idx] * lbs[idx];
443 l1 -= row1coefs[idx] * ubs[idx];
444 l2 -= row2coefs[idx] * ubs[idx];
457 l1 -= row1coefs[idx] * lbs[idx];
465 l1 -= row1coefs[idx] * ubs[idx];
473#ifdef SCIP_MORE_DEBUG
474 SCIPdebugMsg(
scip,
"lambda = 0, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
479#ifdef SCIP_MORE_DEBUG
485#ifdef SCIP_MORE_DEBUG
493 newlbs[
i] =
MAX(newlbs[
i], (l2 + row2coefs[idx] * ubs[idx]) / row2coefs[idx]);
495 newlbs[
i] =
MAX(newlbs[
i], l2 / row2coefs[idx]);
500 newubs[
i] =
MIN(newubs[
i], (l2 + row2coefs[idx] * lbs[idx]) / row2coefs[idx]);
502 newubs[
i] =
MIN(newubs[
i], l2 / row2coefs[idx]);
504#ifdef SCIP_MORE_DEBUG
506 SCIPdebugMsg(
scip,
"%g <= %g <= var_%d <= %g <= %g\n", oldlb, newlbs[
i],
i, newubs[
i], oldub);
514 while(
i < nbreakpoints )
532 if( signs[idx] ==
UP )
539 l1update += sign * row1coefs[idx] * lbs[idx];
540 l2update += sign * row2coefs[idx] * lbs[idx];
544 if( signs[idx] ==
UP )
552 l1update -= sign * row1coefs[idx] * ubs[idx];
553 l2update -= sign * row2coefs[idx] * ubs[idx];
557 if( signs[idx] ==
UP )
563 if( signs[idx] ==
UP )
568 if( j + 1 >= nbreakpoints || !
SCIPisEQ(
scip, breakpoints[j], breakpoints[j + 1]) )
575#ifdef SCIP_MORE_DEBUG
576 SCIPdebugMsg(
scip,
"lambda_%d = %g, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
585 for( j = 0; j <
nvars; j++ )
587#ifdef SCIP_MORE_DEBUG
593 coef = breakpoints[
i] * row1coefs[idx] + (1 - breakpoints[
i]) * row2coefs[idx];
600 if( signs[idx] ==
POS || signs[idx] ==
DN )
603 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * ubs[idx]) / coef);
605 newlbs[j] =
MAX(newlbs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
607 else if ( signs[idx] ==
NEG || signs[idx] ==
UP )
610 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2 + coef * lbs[idx]) / coef);
612 newubs[j] =
MIN(newubs[j], (breakpoints[
i] * l1 + (1 - breakpoints[
i]) * l2) / coef);
614#ifdef SCIP_MORE_DEBUG
616 SCIPdebugMsg(
scip,
"%g <= %g <= var_%d <= %g <= %g\n", oldlb, newlbs[j], j, newubs[j], oldub);
638#ifdef SCIP_MORE_DEBUG
639 SCIPdebugMsg(
scip,
"lambda = 1, l1 = %g, l2 = %g, ninfs = %d\n",
i, breakpoints[
i], l1, l2, ninfs);
643#ifdef SCIP_MORE_DEBUG
649#ifdef SCIP_MORE_DEBUG
657 newlbs[
i] =
MAX(newlbs[
i], (l1 + row1coefs[idx] * ubs[idx]) / row1coefs[idx]);
659 newlbs[
i] =
MAX(newlbs[
i], l1 / row1coefs[idx]);
664 newubs[
i] =
MIN(newubs[
i], (l1 + row1coefs[idx] * lbs[idx]) / row1coefs[idx]);
666 newubs[
i] =
MIN(newubs[
i], l1 / row1coefs[idx]);
668#ifdef SCIP_MORE_DEBUG
670 SCIPdebugMsg(
scip,
"%g <= %g <= var_%i <= %g <= %g\n", oldlb, newlbs[
i],
i, newubs[
i], oldub);
687 lbs[idx] = newlbs[
i];
688 ubs[idx] = newubs[
i];
738 *isminsettoinfinity =
FALSE;
739 *ismaxsettoinfinity =
FALSE;
752 for( ; rowpnt < rowend; rowpnt++, valpnt++ )
756 if( col == withoutcol )
767 maxresact += coef * ubs[col];
772 minresact += coef * lbs[col];
779 maxresact += coef * lbs[col];
784 minresact += coef * ubs[col];
788 if( (nmaxactneginf + nmaxactposinf) > 0 )
789 *ismaxsettoinfinity =
TRUE;
791 *maxresactivity = maxresact;
793 if( (nminactneginf + nminactposinf) > 0 )
794 *isminsettoinfinity =
TRUE;
796 *minresactivity = minresact;
833 &minresactivity, &maxresactivity,
834 &isminsettoinfinity, &ismaxsettoinfinity);
843 *rowub = (rhs - minresactivity) / val;
849 *rowlb = (lhs - maxresactivity) / val;
857 *rowub = (lhs - maxresactivity) / val;
863 *rowlb = (rhs - minresactivity) / val;
904 for( ; (colpnt < colend); colpnt++, valpnt++ )
912 &rowub, &ubfound, &rowlb, &lbfound);
914 if( ubfound && (rowub < impliedub) )
917 if( lbfound && (rowlb > impliedlb) )
961 for( ; colpnt < colend; colpnt++, valpnt++ )
966 if( row == withoutrow )
972 mincolactivity += val * lbdual[row];
977 mincolactivity += val * ubdual[row];
981 return mincolactivity;
999 const int* mincolactinf,
1017 assert(mincolactinf[col] >= 1);
1018 if( mincolactinf[col] == 1 )
1025 if( mincolactinf[col] > 0 )
1028 *mincolresact = mincolact[col] - val * lbdual[row];
1031 else if( val < 0.0 )
1035 assert(mincolactinf[col] >= 1);
1036 if( mincolactinf[col] == 1 )
1043 if( mincolactinf[col] > 0 )
1046 *mincolresact = mincolact[col] - val * ubdual[row];
1077 mincolact[col] = 0.0;
1078 mincolactinf[col] = 0;
1085 for( ; colpnt < colend; colpnt++, valpnt++ )
1093 mincolactinf[col]++;
1095 mincolact[col] += val * lbdual[row];
1097 else if( val < 0.0 )
1100 mincolactinf[col]++;
1102 mincolact[col] += val * ubdual[row];
1107 if( mincolactinf[col] > 0 )
1137 maxcolact[col] = 0.0;
1138 maxcolactinf[col] = 0;
1145 for( ; colpnt < colend; colpnt++, valpnt++ )
1153 maxcolactinf[col]++;
1155 maxcolact[col] += val * ubdual[row];
1157 else if( val < 0.0 )
1160 maxcolactinf[col]++;
1162 maxcolact[col] += val * lbdual[row];
1167 if( maxcolactinf[col] > 0 )
1202 for(; (rowpnt < rowend); rowpnt++, valpnt++ )
1207 if( isubimplied[col] )
1213 assert(mincolactinf[col] > 0);
1214 mincolactinf[col]--;
1221 assert(mincolactinf[col] > 0);
1222 mincolactinf[col]--;
1226 if( mincolactinf[col] == 0 )
1267 assert(0 <= row && row < nrows);
1281 for(
i = 0;
i < ncols;
i++)
1286 colmap[
i] = numberconvars;
1292 numDualVars = nrows + 2 * numberconvars;
1296 for(
i = 0;
i < nrows;
i++ )
1298 variables[
i] =
NULL;
1319 for(
i = 0;
i < numberconvars;
i++ )
1335 assert(numDualVars == fillcnt);
1341 for(
i = 0;
i <numberconvars;
i++)
1342 constraints[
i] =
NULL;
1344 for(
i = 0;
i < ncols;
i++)
1350 int cidx = colmap[
i];
1351 assert(0 <= cidx && cidx < numberconvars);
1357 for( ; colpnt < colend; colpnt++, valpnt++ )
1359 assert(0 <= *colpnt && *colpnt < nrows);
1361 tmpvars[fillcnt] = variables[*colpnt];
1362 tmpcoef[fillcnt] = *valpnt;
1370 tmpvars[fillcnt] = variables[nrows + 2 * cidx];
1371 tmpcoef[fillcnt] = 1.0;
1378 assert(variables[nrows + 2 * cidx + 1] !=
NULL);
1379 tmpvars[fillcnt] = variables[nrows + 2 * cidx + 1];
1380 tmpcoef[fillcnt] = -1.0;
1446 for(
i = 0;
i < numDualVars;
i++ )
1448 if(variables[
i] !=
NULL)
1451 for(
i = 0;
i < numberconvars;
i++ )
1453 if(constraints[
i] !=
NULL)
1495 *ubinfchange =
FALSE;
1496 *lbinfchange =
FALSE;
1502 newubdual = (
objval - mincolresact) / val;
1504 if( newubdual < ubdual[row] )
1510 *ubinfchange =
TRUE;
1512 ubdual[row] = newubdual;
1519 newlbdual = (
objval - mincolresact) / val;
1521 if( newlbdual > lbdual[row] )
1527 *lbinfchange =
TRUE;
1529 lbdual[row] = newlbdual;
1544 int* npossiblefixings,
1546 int* npossiblesidechanges
1615 for(
i = 0;
i < ncols;
i++ )
1627 for(
i = 0;
i < ncols;
i++ )
1648 if( isubimplied[
i] )
1650 implubvars[nimplubvars] =
i;
1657 if( islbimplied[
i] )
1665 for(
i = 0;
i < nrows;
i++ )
1682 if( nimplubvars >= 2 && presoldata->usetwocolcombine )
1704 for(
i = 0;
i < nimplubvars;
i++)
1706 if( ((
SCIP_Longint)pospp) + posmm + pospm + posmp > maxhashes )
1712 for( j = 0; j < maxlen; j++)
1714 for( k = j + 1; k < maxlen; k++)
1745#ifdef SCIP_MORE_DEBUG
1746 SCIPdebugMsg(
scip,
"hashlist sizes: pp %d, mm %d, pm %d, mp %d \n", pospp, posmm, pospm, posmp);
1756 if( pospp > 0 && posmm > 0 )
1779#ifdef SCIP_MORE_DEBUG
1787 if( hashlistpp[block1start] == hashlistmm[block2start] )
1789 for(
i = block1start;
i < block1end;
i++ )
1791 for( j = block2start; j < block2end; j++ )
1793 if( colidxlistpp[
i] != colidxlistmm[j] )
1795 colpair.
col1idx =
MIN(colidxlistpp[
i], colidxlistmm[j]);
1796 colpair.
col2idx =
MAX(colidxlistpp[
i], colidxlistmm[j]);
1812 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1821 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1823#ifdef SCIP_MORE_DEBUG
1824 SCIPdebugMsg(
scip,
"pm/mp: %d retrievefails before reset, %d combines\n", retrievefails, ncombines);
1828 else if( retrievefails < presoldata->maxretrievefails )
1840 if( block1end < pospp && block2end < posmm )
1848 else if( hashlistpp[block1start] < hashlistmm[block2start] && block1end < pospp )
1850 else if( hashlistpp[block1start] > hashlistmm[block2start] && block2end < posmm )
1858 if( pospm > 0 && posmp > 0 )
1881#ifdef SCIP_MORE_DEBUG
1887 if( hashlistpm[block1start] == hashlistmp[block2start] )
1889 for(
i = block1start;
i < block1end;
i++ )
1891 for( j = block2start; j < block2end; j++ )
1893 if( colidxlistpm[
i] != colidxlistmp[j] )
1895 colpair.
col1idx =
MIN(colidxlistpm[
i], colidxlistmp[j]);
1896 colpair.
col2idx =
MAX(colidxlistpm[
i], colidxlistmp[j]);
1912 collen2, nrows,
TRUE,
TRUE, lbdual, ubdual, &success) );
1921 if( ncombines >= maxcombines || combinefails >= presoldata->maxcombinefails )
1926 else if( retrievefails < presoldata->maxretrievefails )
1938 if( block1end < pospm && block2end < posmp )
1946 else if( hashlistpm[block1start] < hashlistmp[block2start] && block1end < pospm )
1948 else if( hashlistpm[block1start] > hashlistmp[block2start] && block2end < posmp )
1965#ifdef SCIP_MORE_DEBUG
1967 for(
i = 0;
i < nrows;
i++ )
1982 while( 0 < boundchanges && loops < presoldata->maxdualbndloops )
1987 for(
i = 0;
i < nimplubvars;
i++ )
1994 for(
i = 0;
i < nimplubvars;
i++ )
2001 col = implubvars[
i];
2009 for( ; colpnt < colend; colpnt++, valpnt++ )
2019 mincolact, mincolactinf, &mincolresact);
2022 lbdual, ubdual, &boundchanges, &ubinfchange, &lbinfchange);
2024 if( ubinfchange || lbinfchange )
2026 mincolact, mincolactinf, ubinfchange, lbinfchange);
2031#ifdef SCIP_MORE_DEBUG
2033 for(
i = 0;
i < nrows;
i++ )
2045 for(
i = 0;
i < ncols;
i++ )
2051 for(
i = 0;
i < ncols;
i++ )
2069 (*npossiblefixings)++;
2079 (*npossiblefixings)++;
2084 for(
i = 0;
i < nrows;
i++ )
2093 (*npossiblesidechanges)++;
2105 (*npossiblesidechanges)++;
2111 (*npossiblesidechanges)++;
2178 int npossiblefixings;
2183 int npossiblesidechanges;
2204 SCIPdebugMsg(
scip,
"DualInfer not executed because condition of existing dual solution is not fulfilled.\n");
2213 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
2228 npossiblefixings = 0;
2232 npossiblesidechanges = 0;
2245 varstofix, &npossiblefixings, sidestochange, &npossiblesidechanges) );
2247 if( npossiblefixings > 0 )
2249 for(
i = ncols - 1;
i >= 0; --
i )
2308 if( npossiblesidechanges > 0 )
2310 for(
i = 0;
i < nrows;
i++ )
2314 const char* conshdlrname;
2326 if( strcmp(conshdlrname,
"linear") == 0 )
2387 if( (nconvarsfixed + nintvarsfixed + nbinvarsfixed) > 0 || npossiblesidechanges > 0 )
2389 SCIPdebugMsg(
scip,
"### fixed vars [cont: %d, int: %d, bin: %d], changed sides [%d]\n",
2390 nconvarsfixed, nintvarsfixed, nbinvarsfixed, nsideschanged);
2421 "presolving/dualinfer/twocolcombine",
2422 "use convex combination of columns for determining dual bounds",
2426 "presolving/dualinfer/maxdualbndloops",
2427 "maximal number of dual bound strengthening loops",
2431 "presolving/dualinfer/maxconsiderednonzeros",
2432 "maximal number of considered non-zeros within one column (-1: no limit)",
2436 "presolving/dualinfer/maxretrievefails",
2437 "maximal number of consecutive useless hashtable retrieves",
2441 "presolving/dualinfer/maxcombinefails",
2442 "maximal number of consecutive useless column combines",
2446 "presolving/dualinfer/maxhashfac",
2447 "Maximum number of hashlist entries as multiple of number of columns in the problem (-1: no limit)",
2451 "presolving/dualinfer/maxpairfac",
2452 "Maximum number of processed column pairs as multiple of the number of columns in the problem (-1: no limit)",
2456 "presolving/dualinfer/maxrowsupport",
2457 "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, MIR_DATA *data, 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)
#define SCIP_STRINGEQ(name, reference, retcode)
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)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
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_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNonimpliedIntegral(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_Bool SCIPvarIsIntegral(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)
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