106#define SEPA_NAME "cgmip"
107#define SEPA_DESC "Chvatal-Gomory cuts via MIPs separator"
108#define SEPA_PRIORITY -1000
110#define SEPA_MAXBOUNDDIST 0.0
111#define SEPA_USESSUBSCIP TRUE
112#define SEPA_DELAY FALSE
114#define DEFAULT_MAXROUNDS 5
115#define DEFAULT_MAXROUNDSROOT 50
116#define DEFAULT_MAXDEPTH -1
117#define DEFAULT_DECISIONTREE FALSE
118#define DEFAULT_TIMELIMIT 1e20
119#define DEFAULT_MEMORYLIMIT 1e20
120#define DEFAULT_CUTCOEFBND 1000.0
121#define DEFAULT_MINNODELIMIT 500LL
122#define DEFAULT_MAXNODELIMIT 5000LL
123#define DEFAULT_ONLYACTIVEROWS FALSE
124#define DEFAULT_MAXROWAGE -1
125#define DEFAULT_ONLYRANKONE FALSE
126#define DEFAULT_ONLYINTVARS FALSE
127#define DEFAULT_CONTCONVERT FALSE
128#define DEFAULT_CONTCONVFRAC 0.1
129#define DEFAULT_CONTCONVMIN 100
130#define DEFAULT_INTCONVERT FALSE
131#define DEFAULT_INTCONVFRAC 0.1
132#define DEFAULT_INTCONVMIN 100
133#define DEFAULT_SKIPMULTBOUNDS TRUE
134#define DEFAULT_OBJLONE FALSE
135#define DEFAULT_OBJWEIGHT 1e-03
136#define DEFAULT_OBJWEIGHTSIZE TRUE
137#define DEFAULT_DYNAMICCUTS TRUE
138#define DEFAULT_USECMIR TRUE
139#define DEFAULT_USESTRONGCG FALSE
140#define DEFAULT_CMIROWNBOUNDS FALSE
141#define DEFAULT_USECUTPOOL TRUE
142#define DEFAULT_PRIMALSEPARATION TRUE
143#define DEFAULT_EARLYTERM TRUE
144#define DEFAULT_ADDVIOLATIONCONS FALSE
145#define DEFAULT_ADDVIOLCONSHDLR FALSE
146#define DEFAULT_CONSHDLRUSENORM TRUE
147#define DEFAULT_USEOBJUB FALSE
148#define DEFAULT_USEOBJLB FALSE
149#define DEFAULT_SUBSCIPFAST TRUE
150#define DEFAULT_OUTPUT FALSE
151#define DEFAULT_RANDSEED 101
152#define DEFAULT_GENPRIMALSOLS FALSE
155#define NROWSTOOSMALL 5
156#define NCOLSTOOSMALL 5
158#define EPSILONVALUE 1e-03
159#define BETAEPSILONVALUE 1e-02
160#define STALLNODELIMIT 1000LL
161#define CONSHDLRFULLNORM FALSE
162#define MINEFFICACY 0.05
164#define OBJWEIGHTRANGE 0.01
167#define BOUNDSWITCH 0.9999
168#define VARTYPEUSEVBDS 2
170#define POSTPROCESS TRUE
171#define MINFRAC 0.0009
172#define MAXFRAC 0.9991
173#define FIXINTEGRALRHS FALSE
174#define MAKECONTINTEGRAL FALSE
175#define MAXWEIGHTRANGE 1e+05
177#define SEPARATEROWS TRUE
179#define MAXAGGRLEN(nvars) nvars
247 unsigned int ntotalrows;
282#define CONSHDLR_NAME "violatedCuts"
283#define CONSHDLR_DESC "only allow solutions corresponding to violated cuts"
286struct SCIP_ConshdlrData
328 subscip = mipdata->subscip;
338 if ( mipdata->conshdlrusenorm )
341 if ( mipdata->conshdlrfullnorm )
357 SCIP_CALL(
computeCut(mipdata->scip, mipdata->sepa, mipdata, mipdata->sepadata,
sol,
TRUE, cutcoefs, &rhs, &localrowsused, &localboundsused, &cutrank, &success) );
363 cutcoefs, &rhs, &localrowsused, &localboundsused, &cutrank, &success) );
369#ifdef SCIP_MORE_DEBUG
370 for (j = 0; j < (
unsigned int)
nvars; ++j)
380 for (j = 0; j < (
unsigned int)
nvars; ++j)
385 cutsqrnorm +=
SQR(cutcoefs[j]);
388 norm = sqrt(cutsqrnorm);
394 switch ( mipdata->normtype )
398 for (j = 0; j < mipdata->ncols; ++j)
400 var = mipdata->alpha[j];
408 cutsqrnorm +=
SQR(val);
411 norm = sqrt(cutsqrnorm);
414 for (j = 0; j < mipdata->ncols; ++j)
416 var = mipdata->alpha[j];
430 for (j = 0; j < mipdata->ncols; ++j)
432 var = mipdata->alpha[j];
445 for (j = 0; j < mipdata->ncols; ++j)
447 var = mipdata->alpha[j];
462 SCIPerrorMessage(
"invalid efficacy norm parameter '%c'\n", mipdata->normtype);
475 for (j = 0; j < mipdata->ncols; ++j)
477 var = mipdata->alpha[j];
493 SCIPdebugMsg(
scip,
"Violated cut from solution - act: %f, rhs: %f, norm: %f, eff.: %f\n", act, rhs, norm, (act-rhs)/norm);
497 SCIPdebugMsg(
scip,
"Rejected cut from solution - act: %f, rhs: %f, norm: %f, eff.: %f\n", act, rhs, norm, (act-rhs)/norm);
611 conshdlrdata->mipdata = mipdata;
615 -1000000, -1000000, 100,
FALSE,
616 consEnfolpViolatedCuts, consEnfopsViolatedCuts, consCheckViolatedCuts, consLockViolatedCuts,
673 for (v = 0; v <
nvars; ++v)
678 act += val * varsolvals[v];
679 cutsqrnorm +=
SQR(val);
681 cutvals[len++] = val;
684 norm = sqrt(cutsqrnorm);
687 for (v = 0; v <
nvars; ++v)
692 act += val * varsolvals[v];
696 cutvals[len++] = val;
701 for (v = 0; v <
nvars; ++v)
706 act += val * varsolvals[v];
709 cutvals[len++] = val;
714 for (v = 0; v <
nvars; ++v)
719 act += val * varsolvals[v];
721 cutvals[len++] = val;
820 assert( 0 <= pos && pos < (
int) mipdata->nrows );
824 lhs[pos] += sigma * colvals[
i] * offset;
828 rhs[pos] += sigma * colvals[
i] * offset;
835 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
851 l = *ub/sigma + offset;
857 *ub = *lb/sigma + offset;
866 *lb = *lb/sigma + offset;
869 *ub = *ub/sigma + offset;
898 assert( minrowsize < INT_MAX );
899 assert( minrowsize <= maxrowsize );
900 assert( minrowsize <= rowsize && rowsize <= maxrowsize );
902 if ( minrowsize == maxrowsize )
907 return 1.0 -
a * ((
SCIP_Real) (maxrowsize - rowsize));
1066 unsigned int nshifted;
1067 unsigned int ncomplemented;
1069 unsigned int ncontconverted = 0;
1070 unsigned int nintconverted = 0;
1072 unsigned int nlbounds;
1073 unsigned int nubounds;
1085 int minrowsize = INT_MAX;
1095 assert( ncols > 0 && nrows > 0 );
1099 mipdata->nrows = (
unsigned int) nrows;
1100 mipdata->ncols = (
unsigned int) ncols;
1101 mipdata->ntotalrows = mipdata->nrows;
1104 mipdata->ntotalrows = mipdata->nrows + 1;
1106 assert(mipdata->ntotalrows <= INT_MAX);
1107 ntotalrows = (int) mipdata->ntotalrows;
1110 mipdata->conshdlrusenorm =
sepadata->conshdlrusenorm;
1114 subscip = mipdata->subscip;
1148 for (
i = 0;
i < nrows; ++
i)
1207 assert( maxrowsize > 0 );
1208 assert( minrowsize < INT_MAX );
1213 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
1224 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
1242 for (j = 0; j < ncols; ++j)
1270 mipdata->iscomplemented[j] =
FALSE;
1271 mipdata->isshifted[j] =
FALSE;
1355 SCIP_CALL(
transformColumn(origscip,
sepadata, mipdata, col, ub[j], -1.0, lhs, rhs, &(lb[j]), &(ub[j]), &(
primsol[j])) );
1356 mipdata->iscomplemented[j] =
TRUE;
1357 mipdata->coltype[j] =
colAtUb;
1367 SCIP_CALL(
transformColumn(origscip,
sepadata, mipdata, col, -lb[j], 1.0, lhs, rhs, &(lb[j]), &(ub[j]), &(
primsol[j])) );
1369 mipdata->isshifted[j] =
TRUE;
1376 mipdata->coltype[j] =
colAtLb;
1386 SCIP_CALL(
transformColumn(origscip,
sepadata, mipdata, col, ub[j], -1.0, lhs, rhs, &(lb[j]), &(ub[j]), &(
primsol[j])) );
1388 mipdata->iscomplemented[j] =
TRUE;
1394 mipdata->coltype[j] =
colAtLb;
1408 SCIPdebugMsg(origscip,
"Converted %u fractional integral variables to have integral value.\n", nintconverted);
1412 SCIPdebugMsg(origscip,
"Converted %u integral variables to be continuous.\n", ncontconverted);
1415 SCIPdebugMsg(origscip,
"Original variables: %d integral, %d continuous, %u shifted, %u complemented, %u at lb, %u at ub\n",
1417 nshifted, ncomplemented, nlbounds, nubounds);
1427 for (
i = 0;
i < nrows; ++
i)
1434 mipdata->ylhs[
i] =
NULL;
1435 mipdata->yrhs[
i] =
NULL;
1471#ifdef SCIP_MORE_DEBUG
1481#ifdef SCIP_MORE_DEBUG
1503 if ( !
sepadata->onlyactiverows || isactive )
1512#ifdef SCIP_MORE_DEBUG
1534 if ( !
sepadata->onlyactiverows || isactive )
1542#ifdef SCIP_MORE_DEBUG
1549 assert( (
int) cnt <= 2 * nrows );
1557 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
1558 mipdata->ylhs[mipdata->nrows] =
NULL;
1559 mipdata->yrhs[mipdata->nrows] =
NULL;
1576#ifdef SCIP_MORE_DEBUG
1577 SCIPdebugMsg(origscip,
"Created variable <%s> for upper bound on objective (weight: %f).\n", name, weight);
1590#ifdef SCIP_MORE_DEBUG
1591 SCIPdebugMsg(origscip,
"Created variable <%s> for lower bound on objective (weight: %f).\n", name, weight);
1595 assert( (
int) cnt <= 2 * ntotalrows );
1602 for (j = 0; j < ncols; ++j)
1604 mipdata->z[j] =
NULL;
1605 mipdata->alpha[j] =
NULL;
1606 mipdata->fracalpha[j] =
NULL;
1652 assert( (
int) cnt <= 2 * ncols );
1653 assert( (
int) ucnt <= ncols );
1672 mipdata->n += cnt + ucnt + 2;
1680 for (j = 0; j < ncols; ++j)
1695 if ( mipdata->iscomplemented[j] )
1714 assert( 0 <= pos && pos < nrows );
1716 if ( mipdata->ylhs[pos] !=
NULL )
1718 consvars[nconsvars] = mipdata->ylhs[pos];
1719 consvals[nconsvars] = -sigma * colvals[
i];
1722 if ( mipdata->yrhs[pos] !=
NULL )
1724 consvars[nconsvars] = mipdata->yrhs[pos];
1725 consvals[nconsvars] = sigma * colvals[
i];
1728 assert( nconsvars <= (
int) mipdata->n );
1731 if ( mipdata->z[j] !=
NULL )
1734 consvars[nconsvars] = mipdata->z[j];
1735 consvals[nconsvars] = 1.0;
1738 assert( nconsvars <= (
int) mipdata->n );
1741 consvars[nconsvars] = mipdata->alpha[j];
1742 consvals[nconsvars] = -1.0;
1744 assert( nconsvars <= (
int) mipdata->n );
1747 consvars[nconsvars] = mipdata->fracalpha[j];
1748 consvals[nconsvars] = -1.0;
1750 assert( nconsvars <= (
int) mipdata->n );
1756 if ( mipdata->ylhs[mipdata->nrows] !=
NULL )
1759 consvars[nconsvars] = mipdata->ylhs[mipdata->nrows];
1765 if ( mipdata->yrhs[mipdata->nrows] !=
NULL )
1768 consvars[nconsvars] = mipdata->yrhs[mipdata->nrows];
1793 if ( mipdata->iscomplemented[j] )
1812 assert( 0 <= pos && pos < nrows );
1814 if ( mipdata->ylhs[pos] !=
NULL )
1816 consvars[nconsvars] = mipdata->ylhs[pos];
1817 consvals[nconsvars] = -sigma * colvals[
i];
1820 if ( mipdata->yrhs[pos] !=
NULL )
1822 consvars[nconsvars] = mipdata->yrhs[pos];
1823 consvals[nconsvars] = sigma * colvals[
i];
1826 assert( nconsvars <= (
int) mipdata->n );
1833 if ( mipdata->ylhs[mipdata->nrows] )
1836 consvars[nconsvars] = mipdata->ylhs[mipdata->nrows];
1842 if ( mipdata->yrhs[mipdata->nrows] )
1845 consvars[nconsvars] = mipdata->yrhs[mipdata->nrows];
1868 assert( (
int) cnt <= ncols );
1875 for (
i = 0;
i < nrows; ++
i)
1887 consvars[nconsvars] = mipdata->ylhs[
i];
1888 consvals[nconsvars] = -lhs[
i];
1895 consvars[nconsvars] = mipdata->yrhs[
i];
1896 consvals[nconsvars] = rhs[
i];
1899 assert( nconsvars <= (
int) mipdata->n );
1905 if ( mipdata->ylhs[mipdata->nrows] !=
NULL && !
SCIPisZero(origscip, lhs[mipdata->nrows]) )
1909 consvars[nconsvars] = mipdata->ylhs[mipdata->nrows];
1910 consvals[nconsvars] = -lhs[mipdata->nrows];
1915 if ( mipdata->yrhs[mipdata->nrows] !=
NULL && !
SCIPisZero(origscip, rhs[mipdata->nrows]) )
1919 consvars[nconsvars] = mipdata->yrhs[mipdata->nrows];
1920 consvals[nconsvars] = rhs[mipdata->nrows];
1923 assert( nconsvars <= (
int) mipdata->n );
1927 for (j = 0; j < ncols; ++j)
1934 consvars[nconsvars] = mipdata->z[j];
1935 consvals[nconsvars] = ub[j];
1937 assert( nconsvars <= (
int) mipdata->n );
1941 consvars[nconsvars] = mipdata->beta;
1942 consvals[nconsvars] = -1.0;
1946 consvars[nconsvars] = mipdata->fracbeta;
1947 consvals[nconsvars] = -1.0;
1949 assert( nconsvars <= (
int) mipdata->n );
1963 if ( bestsol !=
NULL )
1966 for (j = 0; j < ncols; ++j)
1968 if ( mipdata->alpha[j] !=
NULL )
1974 consvars[nconsvars] = mipdata->alpha[j];
1975 consvals[nconsvars] = val;
1977 assert( nconsvars <= (
int) mipdata->n );
1980 consvars[nconsvars] = mipdata->beta;
1981 consvals[nconsvars] = -1.0;
1997 for (j = 0; j < ncols; ++j)
1999 if ( mipdata->alpha[j] !=
NULL )
2001 consvars[nconsvars] = mipdata->alpha[j];
2002 consvals[nconsvars] =
primsol[j];
2004 assert( nconsvars <= (
int) mipdata->n );
2007 consvars[nconsvars] = mipdata->beta;
2008 consvals[nconsvars] = -1.0;
2019 SCIPdebugMsg(origscip,
"Subscip has %u vars (%d integral, %d continuous), %u conss.\n",
2032#ifdef SCIP_WRITEPROB
2036 sepadata->addviolationcons ?
"_vc" :
"",
2037 sepadata->skipmultbounds ?
"_ub" :
"",
2038 sepadata->primalseparation ?
"_ps" :
"",
2061 subscip = mipdata->subscip;
2117#ifdef SCIP_DISABLED_CODE
2174#ifdef SCIP_WRITEPROB
2180 sepadata->addviolationcons ?
"_vc" :
"",
2181 sepadata->skipmultbounds ?
"_ub" :
"",
2182 sepadata->primalseparation ?
"_ps" :
"",
2235 for (
i = 0;
i < nrows; ++
i)
2260#if ( SEPARATEROWS == TRUE )
2304 for (
r = 0;
r < nrows; ++
r)
2314 binvval = binvrow[
r];
2346 else if ( binvval < 0.0 )
2355 weight = -fabs(binvval);
2361 weight = fabs(binvval);
2376 assert( 0 <= idx && idx < ncols );
2378 cutcoefs[idx] += weight * rowvals[j];
2385 val = mipdata->lhs[
r];
2390 val = mipdata->rhs[
r];
2392 cutrhs += weight * val;
2397 for (
c = 0;
c < ncols; ++
c)
2403 if ( mipdata->iscomplemented[
c] )
2436 SCIPdebugMsg(
scip,
"Created %d primal solutions for CG-MIP from tableau cuts (tried: %d).\n", ngen, ntried);
2465 subscip = mipdata->subscip;
2477 if (
sepadata->timelimit < timelimit )
2483 if ( timelimit > 0.0 )
2497 if (
sepadata->memorylimit < memorylimit )
2498 memorylimit =
sepadata->memorylimit;
2505 if ( memorylimit > 0.0 )
2524 nodelimit =
MAX(
sepadata->minnodelimit, nodelimit);
2525 nodelimit =
MIN(
sepadata->maxnodelimit, nodelimit);
2527 assert( nodelimit >= 0 );
2537 SCIPdebugMsg(origscip,
"Solving sub-SCIP (time limit: %f mem limit: %f node limit: %" SCIP_LONGINT_FORMAT ") ...\n", timelimit, memorylimit, nodelimit);
2559 SCIPwarningMessage(origscip,
"Error while solving subproblem in CGMIP separator; sub-SCIP terminated with code <%d>\n", retcode);
2578 SCIPdebugMsg(origscip,
"CG-MIP separation problem infeasible.\n");
2586 SCIPdebugMsg(origscip,
"CG-MIP separation problem ran into time limit.\n");
2594 SCIPdebugMsg(origscip,
"CG-MIP separation problem stopped by user interrupt.\n");
2602 SCIPerrorMessage(
"Solution of subscip for CG-separation returned with invalid status %d.\n", status);
2622 SCIPwarningMessage(origscip,
"Error while solving subproblem in CGMIP separator; sub-SCIP terminated with code <%d>\n", retcode);
2649 SCIPerrorMessage(
"Solution of subscip for CG-separation returned with invalid status %d.\n", status);
2673 SCIPwarningMessage(origscip,
"Error while solving subproblem in CGMIP separator; sub-SCIP terminated with code <%d>\n", retcode);
2700 SCIPerrorMessage(
"Solution of subscip for CG-separation returned with invalid status %d.\n", status);
2782 *localrowsused =
FALSE;
2783 *localboundsused =
FALSE;
2787 subscip = mipdata->subscip;
2794 assert( nrows == (
int) mipdata->nrows );
2795 assert( ncols == (
int) mipdata->ncols );
2802 for (
i = 0;
i < nrows; ++
i)
2818 if ( mipdata->ylhs[
i] !=
NULL )
2831 if ( mipdata->yrhs[
i] !=
NULL )
2847 if ( absweight > maxabsweight )
2848 maxabsweight = absweight;
2856 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
2858 if ( mipdata->ylhs[mipdata->nrows] !=
NULL )
2867 if ( mipdata->yrhs[mipdata->nrows] !=
NULL )
2878 if ( absweight > maxabsweight )
2879 maxabsweight = absweight;
2883 for (
i = 0;
i < nrows; ++
i)
2903 if ( mipdata->ylhs[
i] !=
NULL )
2918 if ( mipdata->yrhs[
i] !=
NULL )
2961 cutcoefs[idx] += weight * rowvals[j];
2979 *cutrhs += weight * val;
2997 assert( mipdata->ntotalrows == mipdata->nrows + 1 );
2999 if ( mipdata->ylhs[mipdata->nrows] !=
NULL )
3013 if ( mipdata->yrhs[mipdata->nrows] !=
NULL )
3037 for (j = 0; j < ncols; ++j)
3046 cutcoefs[idx] += weight *
obj;
3065 *cutrhs += weight * val;
3070 for (j = 0; j < ncols; ++j)
3073 if ( mipdata->z[j] !=
NULL )
3101 if ( mipdata->iscomplemented[j] )
3117 *localboundsused =
TRUE;
3120 cutcoefs[idx] -= val;
3121 *cutrhs -= lbnd * val;
3136 *localboundsused =
TRUE;
3139 cutcoefs[idx] += val;
3140 *cutrhs += ubnd * val;
3147 for (j = 0; j <
nvars; ++j)
3164 if ( mipdata->iscomplemented[pos] )
3166 assert( ! mipdata->isshifted[pos] );
3189 *localboundsused =
TRUE;
3197 *cutrhs += ubnd * val;
3222 *localboundsused =
TRUE;
3230 *cutrhs -= lbnd * val;
3308 localrowsused =
FALSE;
3309 localboundsused =
FALSE;
3314 SCIP_CALL(
computeCut(
scip, sepa, mipdata,
sepadata,
sol,
TRUE, cutcoefs, &cutrhs, &localrowsused, &localboundsused, &cutrank, &success) );
3315 cutislocal = localrowsused || localboundsused;
3321 SCIP_CALL(
computeCut(
scip, sepa, mipdata,
sepadata,
sol,
FALSE, cutcoefs, &cutrhs, &localrowsused, &localboundsused, &cutrank, &success) );
3322 cutislocal = localrowsused || localboundsused;
3333 for (k = 0; k <
nvars; ++k)
3334 cutact += cutcoefs[k] * varsolvals[k];
3336#ifdef SCIP_DISABLED_CODE
3348 subscip = mipdata->subscip;
3354 for (j = 0; j < mipdata->ncols; ++j)
3369 contVarShifted =
TRUE;
3388 cutinds, cutvals, &cutlen, &cutact, &cutnorm) );
3390 SCIPdebugMsg(
scip,
"act=%f, rhs=%f, norm=%f, eff=%f\n", cutact, cutrhs, cutnorm, (cutact - cutrhs)/cutnorm);
3397 if ( violated || (
sepadata->usecutpool && ! cutislocal ) )
3406 for (k = 0; k < cutlen; ++k)
3429 for (k = 0; k < *nprevrows; ++k)
3441 if ( k >= *nprevrows )
3443 prevrows[*nprevrows] = cut;
3446 SCIPdebugMsg(
scip,
" -> CG-cut <%s>: act=%f, rhs=%f, norm=%f, eff=%f, min=%f, max=%f (range=%f)\n",
3496 int* boundsfortrans,
3535 subscip = mipdata->subscip;
3540 assert( (
int) mipdata->nrows == nrows );
3550 for (k = 0; k < nrows; ++k)
3555 if ( mipdata->ylhs[k] !=
NULL )
3569 if ( mipdata->yrhs[k] !=
NULL )
3599 for (k = 0; k <
nvars; ++k)
3611 assert( pos < (
int) mipdata->ncols );
3614 boundsfortrans[k] = typefortrans;
3627 if ( ! mipdata->iscomplemented[pos] )
3634 if ( mipdata->iscomplemented[pos] )
3651 boundtypesfortrans,
MINFRAC,
MAXFRAC, 1.0, aggrrow, cutcoefs, &cutrhs, cutinds, &cutnnz, &cutefficacy,
3652 &cutrank, &cutislocal, &success) );
3655 SCIPdebugMsg(
scip,
"CMIR: success = %u, cut is%sefficacious (cutefficacy: %g, cutrhs: %g)\n", success,
3670 for (k = 0; k < cutnnz; ++k)
3707 SCIPdebugMsg(
scip,
" -> CG-cut <%s> no longer efficacious: act=%f, rhs=%f, norm=%f, eff=%f\n",
3717 for (k = 0; k < *nprevrows; ++k)
3729 if ( k >= *nprevrows )
3731 prevrows[*nprevrows] = cut;
3734 SCIPdebugMsg(
scip,
" -> CG-cut <%s>: act=%f, rhs=%f, norm=%f, eff=%f, rank=%d, min=%f, max=%f (range=%f)\n",
3760 SCIPdebugMsg(
scip,
" -> CG-cut <%s> could not be scaled to integral coefficients: rhs=%f, eff=%f\n",
3761 name, cutefficacy, cutrhs);
3823 subscip = mipdata->subscip;
3828 assert( (
int) mipdata->nrows == nrows );
3838 for (k = 0; k < nrows; ++k)
3843 if ( mipdata->ylhs[k] !=
NULL )
3857 if ( mipdata->yrhs[k] !=
NULL )
3883 1.0, aggrrow, cutcoefs, &cutrhs, cutinds, &cutnnz, &cutefficacy, &cutrank, &cutislocal, &success) );
3886 SCIPdebugMsg(
scip,
"Strong-CG: success = %u, cut is%sefficacious (cutefficacy: %g, cutrhs: %g)\n", success,
3901 for (k = 0; k < cutnnz; ++k)
3938 SCIPdebugMsg(
scip,
" -> CG-cut <%s> no longer efficacious: act=%f, rhs=%f, norm=%f, eff=%f\n",
3948 for (k = 0; k < *nprevrows; ++k)
3960 if ( k >= *nprevrows )
3962 prevrows[*nprevrows] = cut;
3965 SCIPdebugMsg(
scip,
" -> CG-cut <%s>: act=%f, rhs=%f, norm=%f, eff=%f, rank=%d, min=%f, max=%f (range=%f)\n",
3991 SCIPdebugMsg(
scip,
" -> CG-cut <%s> could not be scaled to integral coefficients: rhs=%f, eff=%f\n",
3992 name, cutefficacy, cutrhs);
4026 int* boundsfortrans;
4040 subscip = mipdata->subscip;
4065 assert(mipdata->ntotalrows <= INT_MAX);
4066 ntotalrows = (int)mipdata->ntotalrows;
4088 boundsfortrans =
NULL;
4089 boundtypesfortrans =
NULL;
4093 for (k = 0; k <
nvars; ++k)
4098 varsolvals[k] = 0.0;
4103 for (s = 0; s < nsols; ++s)
4111 SCIP_CALL(
createCGCutCMIR(
scip, sepa,
sepadata, mipdata,
sol, aggrrow, cutcoefs, cutinds, cutvals, varsolvals, weights,
4112 boundsfortrans, boundtypesfortrans, &nprevrows, prevrows,
cutoff, ngen) );
4117 SCIP_CALL(
createCGCutStrongCG(
scip, sepa,
sepadata, mipdata,
sol, aggrrow, cutcoefs, cutinds, cutvals, varsolvals, weights,
4118 &nprevrows, prevrows,
cutoff, ngen) );
4123 SCIP_CALL(
createCGCutDirect(
scip, sepa,
sepadata, mipdata,
sol, cutcoefs, cutinds, cutvals, varsolvals, weights,
4124 &nprevrows, prevrows,
cutoff, ngen) );
4129 assert( nprevrows <= 2 * nsols );
4134 for (k = 0; k < nprevrows; ++k)
4179 subscip = mipdata->subscip;
4182 for (j = 0; j < mipdata->ncols; ++j)
4194 for (
i = 0;
i < mipdata->nrows; ++
i)
4196 if ( mipdata->ylhs[
i] !=
NULL )
4200 if ( mipdata->yrhs[
i] !=
NULL )
4208 if ( mipdata->yrhs[mipdata->nrows] )
4212 if ( mipdata->ylhs[mipdata->nrows] )
4218 for (j = 0; j < mipdata->ncols; ++j)
4220 if ( mipdata->z[j] !=
NULL )
4324 unsigned int ngen = 0;
4368 "WARNING - sepa_cgmip: Using objective function bounds and CMIR or Strong-CG functions is useless. Turning off usage of objective function bounds.\n");
4389 if ( nrows <= 136 && firstlptime <= 0.05 && ncols <= 143 )
4391 else if ( nrows <= 136 && 0.05 < firstlptime && firstlptime <= 0.15 && ncols <= 143 )
4393 else if ( 136 < nrows && nrows <= 332 && ncols <= 143 )
4395 else if ( 136 < nrows && nrows <= 332 && 655 < ncols && ncols <= 1290 )
4397 else if ( 333 < nrows && nrows <= 874 && 0.15 < firstlptime && firstlptime <= 0.25 && 2614 < ncols && ncols <= 5141 )
4399 else if ( 875 < nrows && nrows <= 1676 && firstlptime <= 0.05 && 143 < ncols && ncols <= 265 )
4401 else if ( 875 < nrows && nrows <= 1676 && firstlptime <= 0.05 && 265 < ncols && ncols <= 654 )
4403 else if ( 875 < nrows && nrows <= 1676 && 0.05 < firstlptime && firstlptime <= 0.15 )
4405 else if ( 875 < nrows && nrows <= 1676 && 0.15 < firstlptime && firstlptime <= 0.25 && 1291 < ncols && ncols <= 2613 )
4407 else if ( nrows > 8146 && 0.75 < firstlptime && firstlptime <= 6.25 && 655 < ncols && ncols <= 1290 )
4409 else if ( nrows > 8146 && 0.75 < firstlptime && firstlptime <= 6.25 && 1291 < ncols && ncols <= 2613 )
4411 else if ( nrows > 8146 && firstlptime > 6.25 )
4423 SCIPdebugMsg(
scip,
"separating CG-cuts via sub-MIPs: %d cols, %d rows\n", ncols, nrows);
4427 mipdata->subscip =
NULL;
4428 mipdata->alpha =
NULL;
4429 mipdata->fracalpha =
NULL;
4430 mipdata->beta =
NULL;
4431 mipdata->fracbeta =
NULL;
4432 mipdata->coltype =
NULL;
4433 mipdata->iscomplemented =
NULL;
4434 mipdata->isshifted =
NULL;
4435 mipdata->ylhs =
NULL;
4436 mipdata->yrhs =
NULL;
4438 mipdata->lhs =
NULL;
4439 mipdata->rhs =
NULL;
4440 mipdata->normtype =
' ';
4443 mipdata->scip =
scip;
4444 mipdata->sepa = sepa;
4475 else if ( ngen > 0 )
4514 "maximal number of cgmip separation rounds per node (-1: unlimited)",
4518 "separating/" SEPA_NAME "/maxroundsroot",
4519 "maximal number of cgmip separation rounds in the root node (-1: unlimited)",
4524 "maximal depth at which the separator is applied (-1: unlimited)",
4528 "separating/" SEPA_NAME "/decisiontree",
4529 "Use decision tree to turn separation on/off?",
4534 "time limit for sub-MIP",
4539 "memory limit for sub-MIP",
4543 "separating/" SEPA_NAME "/minnodelimit",
4544 "minimum number of nodes considered for sub-MIP (-1: unlimited)",
4548 "separating/" SEPA_NAME "/maxnodelimit",
4549 "maximum number of nodes considered for sub-MIP (-1: unlimited)",
4554 "bounds on the values of the coefficients in the CG-cut",
4558 "separating/" SEPA_NAME "/onlyactiverows",
4559 "Use only active rows to generate cuts?",
4564 "maximal age of rows to consider if onlyactiverows is false",
4569 "Separate only rank 1 inequalities w.r.t. CG-MIP separator?",
4574 "Generate cuts for problems with only integer variables?",
4579 "Convert some integral variables to be continuous to reduce the size of the sub-MIP?",
4583 "separating/" SEPA_NAME "/contconvfrac",
4584 "fraction of integral variables converted to be continuous (if contconvert)",
4589 "minimum number of integral variables before some are converted to be continuous",
4594 "Convert some integral variables attaining fractional values to have integral value?",
4599 "fraction of frac. integral variables converted to have integral value (if intconvert)",
4604 "minimum number of integral variables before some are converted to have integral value",
4608 "separating/" SEPA_NAME "/skipmultbounds",
4609 "Skip the upper bounds on the multipliers in the sub-MIP?",
4614 "Should the objective of the sub-MIP minimize the l1-norm of the multipliers?",
4619 "weight used for the row combination coefficient in the sub-MIP objective",
4623 "separating/" SEPA_NAME "/objweightsize",
4624 "Weight each row by its size?",
4629 "should generated cuts be removed from the LP if they are no longer tight?",
4634 "use CMIR-generator (otherwise add cut directly)?",
4639 "use strong CG-function to strengthen cut?",
4643 "separating/" SEPA_NAME "/cmirownbounds",
4644 "tell CMIR-generator which bounds to used in rounding?",
4649 "use cutpool to store CG-cuts even if the are not efficient?",
4653 "separating/" SEPA_NAME "/primalseparation",
4654 "only separate cuts that are tight for the best feasible solution?",
4659 "terminate separation if a violated (but possibly sub-optimal) cut has been found?",
4663 "separating/" SEPA_NAME "/addviolationcons",
4664 "add constraint to subscip that only allows violated cuts (otherwise add obj. limit)?",
4668 "separating/" SEPA_NAME "/addviolconshdlr",
4669 "add constraint handler to filter out violated cuts?",
4673 "separating/" SEPA_NAME "/conshdlrusenorm",
4674 "should the violation constraint handler use the norm of a cut to check for feasibility?",
4679 "Use upper bound on objective function (via primal solution)?",
4684 "Use lower bound on objective function (via primal solution)?",
4689 "Should the settings for the sub-MIP be optimized for speed?",
4694 "Should information about the sub-MIP and cuts be displayed?",
4698 "separating/" SEPA_NAME "/genprimalsols",
4699 "Try to generate primal solutions from Gomory cuts?",
#define DEFAULT_ONLYACTIVEROWS
#define DEFAULT_MAXROUNDSROOT
#define DEFAULT_MAXROUNDS
Constraint handler for linear constraints in their most general form, .
methods for the aggregation rows
#define SCIP_LONGINT_FORMAT
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)
void SCIPsetSubscipDepth(SCIP *scip, int newdepth)
SCIP_RETCODE SCIPcheckCopyLimits(SCIP *sourcescip, SCIP_Bool *success)
int SCIPgetSubscipDepth(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
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 SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
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 SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPwriteParams(SCIP *scip, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
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 SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetCharParam(SCIP *scip, const char *name, char *value)
int SCIPgetNLPBranchCands(SCIP *scip)
int SCIPcolGetLPPos(SCIP_COL *col)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Bool SCIPcolIsIntegral(SCIP_COL *col)
SCIP_Real SCIPcolGetObj(SCIP_COL *col)
SCIP_Real * SCIPcolGetVals(SCIP_COL *col)
SCIP_ROW ** SCIPcolGetRows(SCIP_COL *col)
SCIP_Real SCIPcolGetLb(SCIP_COL *col)
SCIP_Real SCIPcolGetPrimsol(SCIP_COL *col)
SCIP_Real SCIPcolGetUb(SCIP_COL *col)
int SCIPcolGetNLPNonz(SCIP_COL *col)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPcalcMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, int vartypeusevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
SCIP_RETCODE SCIPcalcStrongCG(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, int vartypeusevbds, SCIP_Bool allowlocal, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPaggrRowSumRows(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real *weights, int *rowinds, int nrowinds, SCIP_Bool sidetypebasis, SCIP_Bool allowlocal, int negslack, int maxaggrlen, SCIP_Bool *valid)
SCIP_RETCODE SCIPgetLPBasisInd(SCIP *scip, int *basisind)
SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
int SCIPgetNLPRows(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
int SCIPgetNLPCols(SCIP *scip)
SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIProwIsIntegral(SCIP_ROW *row)
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetParallelism(SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
int SCIProwGetAge(SCIP_ROW *row)
int SCIProwGetNLPNonz(SCIP_ROW *row)
SCIP_Real SCIProwGetNorm(SCIP_ROW *row)
int SCIProwGetLPPos(SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_RETCODE SCIPmakeRowIntegral(SCIP *scip, SCIP_ROW *row, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_SEPA * SCIProwGetOriginSepa(SCIP_ROW *row)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
int SCIProwGetRank(SCIP_ROW *row)
void SCIProwChgRank(SCIP_ROW *row, int rank)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_BASESTAT SCIProwGetBasisStatus(SCIP_ROW *row)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa,)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_RETCODE SCIPsetSepaExit(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_RETCODE SCIPsetSepaInit(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
int SCIPgetNSols(SCIP *scip)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
SCIP_Real SCIPgetFirstLPTime(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisSumPositive(SCIP *scip, SCIP_Real val)
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_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(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 SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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_Real SCIPepsilon(SCIP *scip)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPincludeSepaCGMIP(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPcreateSol(scip, &heurdata->sol, heur))
SCIPfreeRandom(scip, &heurdata->randnumgen)
#define DEFAULT_OBJWEIGHT
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
public methods for managing constraints
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
public methods for separators
public methods for problem variables
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for random numbers
public methods for separator plugins
public methods for solutions
public methods for querying solving statistics
public methods for timing
public methods for the branch-and-bound tree
public methods for SCIP variables
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
#define DEFAULT_DYNAMICCUTS
#define SEPA_MAXBOUNDDIST
#define DEFAULT_CUTCOEFBND
#define DEFAULT_USECUTPOOL
#define DEFAULT_CONSHDLRUSENORM
#define DEFAULT_ADDVIOLCONSHDLR
static SCIP_RETCODE createSubscip(SCIP *origscip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata)
#define DEFAULT_INTCONVMIN
#define DEFAULT_ADDVIOLATIONCONS
static SCIP_RETCODE createCGCutCMIR(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_SOL *sol, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, int *cutinds, SCIP_Real *cutvals, SCIP_Real *varsolvals, SCIP_Real *weights, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, int *nprevrows, SCIP_ROW **prevrows, SCIP_Bool *cutoff, unsigned int *ngen)
static SCIP_RETCODE solveSubscip(SCIP *origscip, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_Bool *success)
#define DEFAULT_SKIPMULTBOUNDS
#define DEFAULT_MINNODELIMIT
#define DEFAULT_CONTCONVERT
static SCIP_RETCODE computeCut(SCIP *scip, SCIP_SEPA *sepa, CGMIP_MIPDATA *mipdata, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_Bool usefrac, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, SCIP_Bool *localrowsused, SCIP_Bool *localboundsused, int *cutrank, SCIP_Bool *success)
static SCIP_RETCODE createCGCutDirect(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_SOL *sol, SCIP_Real *cutcoefs, int *cutinds, SCIP_Real *cutvals, SCIP_Real *varsolvals, SCIP_Real *weights, int *nprevrows, SCIP_ROW **prevrows, SCIP_Bool *cutoff, unsigned int *ngen)
#define DEFAULT_ONLYINTVARS
#define DEFAULT_DECISIONTREE
#define DEFAULT_GENPRIMALSOLS
static SCIP_Real computeObjWeightSize(int rowsize, int minrowsize, int maxrowsize)
static SCIP_RETCODE createCGCutStrongCG(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_SOL *sol, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, int *cutinds, SCIP_Real *cutvals, SCIP_Real *varsolvals, SCIP_Real *weights, int *nprevrows, SCIP_ROW **prevrows, SCIP_Bool *cutoff, unsigned int *ngen)
#define DEFAULT_ONLYRANKONE
#define DEFAULT_INTCONVERT
#define DEFAULT_CMIROWNBOUNDS
static SCIP_RETCODE createCGMIPprimalsols(SCIP *scip, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata)
#define DEFAULT_EARLYTERM
struct CGMIP_MIPData CGMIP_MIPDATA
static SCIP_RETCODE SCIPincludeConshdlrViolatedCut(SCIP *scip, CGMIP_MIPDATA *mipdata)
#define DEFAULT_PRIMALSEPARATION
static SCIP_RETCODE freeSubscip(SCIP *scip, SCIP_SEPA *sepa, CGMIP_MIPDATA *mipdata)
#define DEFAULT_CONTCONVMIN
#define MAXAGGRLEN(nvars)
#define DEFAULT_OBJWEIGHTSIZE
static SCIP_RETCODE storeCutInArrays(SCIP *scip, int nvars, SCIP_Real *cutcoefs, SCIP_Real *varsolvals, char normtype, int *cutinds, SCIP_Real *cutvals, int *cutlen, SCIP_Real *cutact, SCIP_Real *cutnorm)
static SCIP_RETCODE transformColumn(SCIP *scip, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_COL *col, SCIP_Real offset, SCIP_Real sigma, SCIP_Real *lhs, SCIP_Real *rhs, SCIP_Real *lb, SCIP_Real *ub, SCIP_Real *primsol)
static SCIP_RETCODE subscipSetParams(SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata)
#define DEFAULT_MEMORYLIMIT
#define DEFAULT_MAXROWAGE
static SCIP_RETCODE solCutIsViolated(SCIP *scip, CGMIP_MIPDATA *mipdata, SCIP_SOL *sol, SCIP_Bool *violated)
#define DEFAULT_SUBSCIPFAST
#define DEFAULT_MAXNODELIMIT
#define DEFAULT_CONTCONVFRAC
static SCIP_RETCODE createCGCuts(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, CGMIP_MIPDATA *mipdata, SCIP_Bool *cutoff, unsigned int *ngen)
#define DEFAULT_INTCONVFRAC
enum CGMIP_ColType CGMIP_COLTYPE
#define DEFAULT_TIMELIMIT
#define DEFAULT_USESTRONGCG
Chvatal-Gomory cuts computed via a sub-MIP.
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
#define SCIP_DECL_CONSENFOLP(x)
struct SCIP_Cons SCIP_CONS
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSFREE(x)
struct SCIP_AggrRow SCIP_AGGRROW
enum SCIP_BoundType SCIP_BOUNDTYPE
enum SCIP_BaseStat SCIP_BASESTAT
struct SCIP_RandNumGen SCIP_RANDNUMGEN
@ SCIP_PARAMEMPHASIS_FEASIBILITY
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_SepaData SCIP_SEPADATA
#define SCIP_DECL_SEPAEXECLP(x)
#define SCIP_DECL_SEPAFREE(x)
#define SCIP_DECL_SEPAEXIT(x)
struct SCIP_Sepa SCIP_SEPA
#define SCIP_DECL_SEPACOPY(x)
#define SCIP_DECL_SEPAINIT(x)
enum SCIP_Stage SCIP_STAGE
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
enum SCIP_Status SCIP_STATUS
@ SCIP_VARTYPE_CONTINUOUS