46#include "tinycthread/tinycthread.h"
49#define snprintf _snprintf
52#if ( GRB_VERSION_MAJOR < 6 || ( GRB_VERSION_MAJOR == 7 && GRB_VERSION_MINOR == 0 && GRB_VERSION_TECHNICAL < 2 ) )
53#error "The Gurobi interface only works for Gurobi versions at least 7.0.2"
57 #if defined(_Thread_local)
60 static _Thread_local
int numlp = 0;
71#define CHECK_ZERO(messagehdlr, x) do { int _restat_; \
72 if( (_restat_ = (x)) != 0 ) \
74 SCIPmessagePrintWarning((messagehdlr), "Gurobi error %d: %s\n", _restat_, GRBgeterrormsg(lpi->grbenv)); \
75 return SCIP_LPERROR; \
80#define CHECK_ZERO_STAR(messagehdlr, x) do { int _restat_; \
81 if( (_restat_ = (x)) != 0 ) \
83 SCIPmessagePrintWarning((messagehdlr), "Gurobi error %d: %s\n", _restat_, GRBgeterrormsg((*lpi)->grbenv)); \
84 return SCIP_LPERROR; \
89#define SVECTOR GRBsvec
93#define SCIP_DUALPACKETSIZE (sizeof(SCIP_DUALPACKET)*4)
96#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
98#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
104#define GRB_REFACTORMAXITERS 50
112 GRB_INT_PAR_SCALEFLAG,
113 GRB_INT_PAR_PRESOLVE,
114 GRB_INT_PAR_SIMPLEXPRICING,
115 GRB_INT_PAR_OUTPUTFLAG,
125 GRB_DBL_PAR_FEASIBILITYTOL,
126 GRB_DBL_PAR_OPTIMALITYTOL,
127 GRB_DBL_PAR_BARCONVTOL,
129 GRB_DBL_PAR_TIMELIMIT,
130 GRB_DBL_PAR_ITERATIONLIMIT,
131 GRB_DBL_PAR_MARKOWITZTOL
242 assert(num <= lpi->sidechgsize);
265 assert(num <= lpi->valsize);
287 assert(num <= lpi->cstatsize);
309 assert(num <= lpi->rstatsize);
334 assert(num <= lpi->rngrowmapsize);
357 assert(num <= lpi->rngrowssize);
378 if ( success !=
NULL )
389 res = GRBgetintattrarray(lpi->
grbmodel, GRB_INT_ATTR_VBASIS, 0, ncols, lpi->
cstat);
390 if ( res == GRB_ERROR_DATA_NOT_AVAILABLE )
393 if ( success !=
NULL )
403 res = GRBgetintattrarray(lpi->
grbmodel, GRB_INT_ATTR_CBASIS, 0, nrows, lpi->
rstat);
404 if ( res == GRB_ERROR_DATA_NOT_AVAILABLE )
407 if ( success !=
NULL )
483 {0x00000000, 0x00000001, 0x00000002, 0x00000003},
484 {0x00000000, 0x00000004, 0x00000008, 0x0000000C},
485 {0x00000000, 0x00000010, 0x00000020, 0x00000030},
486 {0x00000000, 0x00000040, 0x00000080, 0x000000C0},
487 {0x00000000, 0x00000100, 0x00000200, 0x00000300},
488 {0x00000000, 0x00000400, 0x00000800, 0x00000C00},
489 {0x00000000, 0x00001000, 0x00002000, 0x00003000},
490 {0x00000000, 0x00004000, 0x00008000, 0x0000C000},
491 {0x00000000, 0x00010000, 0x00020000, 0x00030000},
492 {0x00000000, 0x00040000, 0x00080000, 0x000C0000},
493 {0x00000000, 0x00100000, 0x00200000, 0x00300000},
494 {0x00000000, 0x00400000, 0x00800000, 0x00C00000},
495 {0x00000000, 0x01000000, 0x02000000, 0x03000000},
496 {0x00000000, 0x04000000, 0x08000000, 0x0C000000},
497 {0x00000000, 0x10000000, 0x20000000, 0x30000000},
498 {0x00000000, 0x40000000, 0x80000000, 0xC0000000}
510 nfull = count - rest;
521 assert(0 <= -inp[j] && -inp[j] <= 3);
525 mask[0][-inp[0]] | mask[1][-inp[1]] | mask[2][-inp[2]] | mask[3][-inp[3]]
526 | mask[4][-inp[4]] | mask[5][-inp[5]] | mask[6][-inp[6]]
527 | mask[7][-inp[7]] | mask[8][-inp[8]] | mask[9][-inp[9]]
528 | mask[10][-inp[10]] | mask[11][-inp[11]] | mask[12][-inp[12]]
529 | mask[13][-inp[13]] | mask[14][-inp[14]] | mask[15][-inp[15]];
539 for(
i = 0;
i < rest;
i++ )
540 m |= mask[
i][-inp[
i]];
564 nfull = count - rest;
573 *out++ = -(int)(m & 3);
575 *out++ = -(int)(m & 3);
577 *out++ = -(int)(m & 3);
579 *out++ = -(int)(m & 3);
581 *out++ = -(int)(m & 3);
583 *out++ = -(int)(m & 3);
585 *out++ = -(int)(m & 3);
587 *out++ = -(int)(m & 3);
589 *out++ = -(int)(m & 3);
591 *out++ = -(int)(m & 3);
593 *out++ = -(int)(m & 3);
595 *out++ = -(int)(m & 3);
597 *out++ = -(int)(m & 3);
599 *out++ = -(int)(m & 3);
601 *out++ = -(int)(m & 3);
603 *out++ = -(int)(m & 3);
613 for(
i = 0;
i < rest;
i++ )
615 *out++ = -(int)(m & 3);
795 dest->intparval[
i] = source->intparval[
i];
797 dest->dblparval[
i] = source->dblparval[
i];
930 for(
i = 0;
i < nrows; ++
i )
934 if( lhs[
i] == rhs[
i] )
936 assert(-GRB_INFINITY < rhs[
i] && rhs[
i] < GRB_INFINITY);
941 else if( lhs[
i] <= -GRB_INFINITY )
944 assert(-GRB_INFINITY < rhs[
i]);
948 else if( rhs[
i] >= GRB_INFINITY )
950 assert(-GRB_INFINITY < lhs[
i] && lhs[
i] < GRB_INFINITY);
957 assert(-GRB_INFINITY < lhs[
i] && lhs[
i] < GRB_INFINITY);
958 assert(-GRB_INFINITY < rhs[
i] && rhs[
i] < GRB_INFINITY);
983 nrows = lastrow - firstrow + 1;
989 assert(lastrow < ntotalrows);
993 for (
i = 0;
i < nrows; ++
i)
1014 case GRB_LESS_EQUAL:
1016 lhs[
i] = -GRB_INFINITY;
1021 case GRB_GREATER_EQUAL:
1025 rhs[
i] = GRB_INFINITY;
1092 for (
i = 0;
i < nrows;
i++)
1097 assert(-1 <= rngrow && rngrow < lpi->nrngrows);
1109#define checkRangeInfo(lpi)
1127 double coeff = -1.0;
1220 for(
r = firstrow;
r < nrows;
r++ )
1227 for(
i = 0;
i < rngcount;
i++ )
1233 row = firstrow + pos;
1255static const char grbname[] = {
'G',
'u',
'r',
'o',
'b',
'i',
' ',
1256#if GRB_VERSION_MAJOR < 10
1257 GRB_VERSION_MAJOR +
'0',
1259 (GRB_VERSION_MAJOR/10) +
'0', (GRB_VERSION_MAJOR%10) +
'0',
1261 '.', GRB_VERSION_MINOR +
'0',
'.', GRB_VERSION_TECHNICAL +
'0',
'\0'};
1279 return "Linear Programming Solver developed by Gurobi Optimization (www.gurobi.com)";
1304 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
1378#if GRB_VERSION_MAJOR >= 8
1382 SCIPmessagePrintWarning(messagehdlr,
"Gurobi error %d: Something went wrong with creating the environment.\n", restat);
1394 SCIPmessagePrintWarning(messagehdlr,
"Gurobi error %d: Something went wrong with creating the environment.\n", restat);
1410 (*lpi)->grbenv = GRBgetenv((*lpi)->grbmodel);
1413 (*lpi)->numlp = &
numlp;
1421#if GRB_VERSION_MAJOR >= 8
1425 CHECK_ZERO_STAR( messagehdlr, GRBsetintparam((*lpi)->grbenv, GRB_INT_PAR_OUTPUTFLAG, 0) );
1432 CHECK_ZERO_STAR( messagehdlr, GRBsetintparam((*lpi)->grbenv, GRB_INT_PAR_OUTPUTFLAG, 0) );
1436 CHECK_ZERO_STAR( messagehdlr, GRBsetintparam((*lpi)->grbenv, GRB_INT_PAR_INFUNBDINFO, 1) );
1444 (*lpi)->senarray =
NULL;
1445 (*lpi)->rhsarray =
NULL;
1446 (*lpi)->rngarray =
NULL;
1447 (*lpi)->rngidxarray =
NULL;
1448 (*lpi)->valarray =
NULL;
1449 (*lpi)->cstat =
NULL;
1450 (*lpi)->rstat =
NULL;
1451 (*lpi)->indarray =
NULL;
1452 (*lpi)->rngrowmap =
NULL;
1453 (*lpi)->rngrows =
NULL;
1454 (*lpi)->rngvals =
NULL;
1455 (*lpi)->sidechgsize = 0;
1456 (*lpi)->valsize = 0;
1457 (*lpi)->cstatsize = 0;
1458 (*lpi)->rstatsize = 0;
1459 (*lpi)->rngrowmapsize = 0;
1460 (*lpi)->nrngrows = 0;
1461 (*lpi)->rngrowssize = 0;
1462 (*lpi)->rngvarsadded =
FALSE;
1463 (*lpi)->iterations = 0;
1464 (*lpi)->solisbasic =
FALSE;
1465 (*lpi)->fromscratch =
FALSE;
1466 (*lpi)->conditionlimit = -1.0;
1467 (*lpi)->checkcondition =
FALSE;
1469 (*lpi)->messagehdlr = messagehdlr;
1500 CHECK_ZERO_STAR( (*lpi)->messagehdlr, GRBfreemodel((*lpi)->grbmodel) );
1518 assert(*(*lpi)->numlp > 0);
1521 if( *(*lpi)->numlp == 0 )
1524 GRBfreeenv(*(*lpi)->reusegrbenv);
1525 *(*lpi)->reusegrbenv =
NULL;
1529 GRBfreeenv((*lpi)->grbenv);
1576 for( j = 0; j < nnonz; j++ )
1593 SCIPdebugMessage(
"loading LP in column format into Gurobi: %d cols, %d rows\n", ncols, nrows);
1607 for(
c = 0;
c < ncols-1; ++
c )
1609 cnt[
c] = beg[
c+1] - beg[
c];
1612 cnt[ncols-1] = nnonz - beg[ncols-1];
1613 assert(cnt[ncols-1] >= 0);
1617 lpi->
senarray, lpi->
rhsarray, (
int*)beg, cnt, (
int*)ind, (
SCIP_Real*)val, (
SCIP_Real*)lb, (
SCIP_Real*)ub,
NULL, colnames, rownames) );
1675 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Gurobi\n", ncols, nnonz);
1687 for (j = 0; j < nnonz; ++j)
1689 assert( 0 <= ind[j] && ind[j] < nrows );
1726 ndelcols = lastcol - firstcol + 1;
1746 for( j = firstcol; j <= lastcol; ++j )
1747 which[j - firstcol] = j;
1785 for( j = 0; j < ncols; ++j )
1796 for( j = 0; j < ncols; ++j )
1839 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Gurobi\n", nrows, nnonz);
1851 for (j = 0; j < nnonz; ++j) {
1852 assert( 0 <= ind[j] && ind[j] < ncols );
1862 if ( lpi->
nrngrows > 0 || rngcount > 0 )
1884 for (
r = oldnrows;
r < oldnrows+nrows;
r++)
1907 ndelrows = lastrow - firstrow + 1;
1927 for(
i = firstrow;
i <= lastrow; ++
i )
1928 which[
i - firstrow] =
i;
1964 lpi->
rngrows[nrngrows] = oldrow - ndelrows;
1978 if ( nrngrows == 0 )
1984 for (
i = firstrow;
i < nrows;
i++)
2020 for(
i = 0;
i < nrows; ++
i )
2030 for(
i = 0;
i < nrows; ++
i )
2052 int newrow = dstat[oldrow];
2056 lpi->
rngrows[nrngrows] = newrow;
2074 if ( nrngrows == 0 )
2079 for (
i = 0;
i < nrows;
i++)
2081 int newrow = dstat[
i];
2127#ifdef SCIP_DISABLED_CODE
2161 for (
i = 0;
i < ncols; ++
i)
2167 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[
i]);
2172 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[
i]);
2221 if ( rngcount > 0 || lpi->
nrngrows > 0 )
2224 int nnewrngrows = 0;
2234 for (
i = 0;
i < nrows;
i++)
2242 assert(-1 <= rngrowidx && rngrowidx < lpi->nrngrows);
2247 if ( rngrowidx >= 0 )
2272 if ( rngrowidx >= 0 )
2293 if ( nnewrngrows > 0 )
2315 if ( nrngrows == 0 )
2336 SCIPdebugMessage(
"changing coefficient row %d, column %d in Gurobi to %g\n", row, col, newval);
2413 SCIPdebugMessage(
"scaling row %d with factor %g in Gurobi\n", row, scaleval);
2424 for (
i = 0;
i < nnonz; ++
i )
2430 if( lhs > -GRB_INFINITY )
2432 else if( scaleval < 0.0 )
2434 if( rhs < GRB_INFINITY )
2436 else if( scaleval < 0.0 )
2437 rhs = -GRB_INFINITY;
2438 if( scaleval > 0.0 )
2473 SCIPdebugMessage(
"scaling column %d with factor %g in Gurobi\n", col, scaleval);
2487 for(
i = 0;
i < nnonz; ++
i )
2497 if( lb > -GRB_INFINITY )
2499 else if( scaleval < 0.0 )
2501 if( ub < GRB_INFINITY )
2503 else if( scaleval < 0.0 )
2505 if( scaleval > 0.0 )
2611 assert(firstcol <= lastcol + 1);
2658 assert(firstrow <= lastrow + 1);
2695 for(
i = firstrow;
i <= lastrow;
i++ )
2704 int newnz = (
i < lastrow ? beg[
i - firstrow +1]-1 : (*nnonz)-1);
2707 for( ;
i <= lastrow;
i++ )
2713 thebeg = beg[
i - firstrow];
2714 theend = (
i < lastrow ? beg[
i - firstrow +1] : *nnonz);
2720 assert(theend >= thebeg);
2721 memmove(&ind[newnz], &ind[thebeg], ((
size_t) (theend - thebeg)) *
sizeof(*ind));
2722 memmove(&val[newnz], &val[thebeg], ((
size_t) (theend - thebeg)) *
sizeof(*val));
2723 beg[
i - firstrow] = newnz;
2724 newnz += theend - thebeg;
2742 int namestoragesize,
2748 assert(colnames !=
NULL || namestoragesize == 0);
2749 assert(namestorage !=
NULL || namestoragesize == 0);
2750 assert(namestoragesize >= 0);
2753 assert(firstcol <= lastcol + 1);
2774 int namestoragesize,
2780 assert(rownames !=
NULL || namestoragesize == 0);
2781 assert(namestorage !=
NULL || namestoragesize == 0);
2782 assert(namestoragesize >= 0);
2785 assert(firstrow <= lastrow + 1);
2814 assert(grbobjsen == GRB_MINIMIZE || grbobjsen == GRB_MAXIMIZE);
2833 assert(firstcol <= lastcol + 1);
2842 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
2861 assert(firstcol <= lastcol + 1);
2897 assert(firstrow <= lastrow + 1);
2971 SCIPdebugMessage(
"calling Gurobi primal simplex: %d cols, %d rows\n", ncols, nrows);
2979#if GRB_VERSION_MAJOR < 8
2998 retval = GRBoptimize(lpi->
grbmodel);
3003 case GRB_ERROR_OUT_OF_MEMORY:
3015 SCIPdebugMessage(
"Gurobi primal simplex needed %d iterations to gain LP status %d\n", (
int) cnt, lpi->
solstat);
3019 if( lpi->
solstat == GRB_INFEASIBLE )
3027 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi primal simplex again without presolve\n");
3032 retval = GRBoptimize(lpi->
grbmodel);
3037 case GRB_ERROR_OUT_OF_MEMORY:
3052 if( lpi->
solstat == GRB_INF_OR_UNBD )
3055 SCIPerrorMessage(
"Gurobi primal simplex returned GRB_INF_OR_UNBD after presolving was turned off\n");
3059 else if ( lpi->
solstat == GRB_UNBOUNDED )
3084 if ( grbobjsen == GRB_MINIMIZE )
3091 assert( grbobjsen == GRB_MAXIMIZE );
3116 case GRB_INF_OR_UNBD:
3117 case GRB_INFEASIBLE:
3118 lpi->
solstat = GRB_INFEASIBLE;
3128 case GRB_ITERATION_LIMIT:
3129 case GRB_TIME_LIMIT:
3153 int oldprimdual = 0;
3154 int oldpresolve = GRB_PRESOLVE_OFF;
3168 SCIPdebugMessage(
"calling Gurobi dual simplex: %d cols, %d rows\n", ncols, nrows);
3176#if GRB_VERSION_MAJOR < 8
3197 if ( itlim < GRB_INFINITY )
3201 if ( oldprimdual != 0 )
3209 if ( oldpresolve != GRB_PRESOLVE_OFF )
3215 retval = GRBoptimize(lpi->
grbmodel);
3220 case GRB_ERROR_OUT_OF_MEMORY:
3234 if( lpi->
solstat == GRB_INF_OR_UNBD )
3242 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi dual simplex again without presolve\n");
3248 retval = GRBoptimize(lpi->
grbmodel);
3253 case GRB_ERROR_OUT_OF_MEMORY:
3268 if( lpi->
solstat == GRB_INF_OR_UNBD )
3271 SCIPerrorMessage(
"Gurobi dual simplex returned GRB_INF_OR_UNBD after presolving was turned off.\n");
3279 if ( oldprimdual != 0 )
3283 if ( oldpresolve != GRB_PRESOLVE_OFF )
3309 SCIPdebugMessage(
"calling Gurobi barrier: %d cols, %d rows\n", ncols, nrows);
3317#if GRB_VERSION_MAJOR < 8
3348 retval = GRBoptimize(lpi->
grbmodel);
3353 case GRB_ERROR_OUT_OF_MEMORY:
3367 if( lpi->
solstat == GRB_INF_OR_UNBD )
3375 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi barrier again without presolve\n");
3381 retval = GRBoptimize(lpi->
grbmodel);
3386 case GRB_ERROR_OUT_OF_MEMORY:
3401 if( lpi->
solstat == GRB_INF_OR_UNBD )
3404 SCIPerrorMessage(
"Gurobi barrier returned GRB_INF_OR_UNBD after presolving was turned off\n");
3473 SCIPdebugMessage(
"performing strong branching on variable %d (%d iterations)\n", col, itlim);
3489#if GRB_VERSION_MAJOR < 8
3510 newub =
EPSCEIL(psol-1.0, 1e-06);
3511 if( newub >= oldlb - 0.5 )
3513 SCIPdebugMessage(
"strong branching down (%g) on x%d (%g) with %d iterations\n", newub, col, psol, itlim);
3563 if( newlb <= oldub + 0.5 )
3565 SCIPdebugMessage(
"strong branching up (%g) on x%d (%g) with %d iterations\n", newlb, col, psol, itlim);
3677 for( j = 0; j < ncols; ++j )
3680 SCIP_CALL(
lpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) );
3740 for( j = 0; j < ncols; ++j )
3743 SCIP_CALL(
lpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) );
3814 return (lpi->
solstat == GRB_UNBOUNDED);
3832 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
3839 return (lpi->
solstat == GRB_UNBOUNDED && algo == GRB_METHOD_PRIMAL);
3855 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
3865 return (lpi->
solstat == GRB_UNBOUNDED && algo == GRB_METHOD_PRIMAL);
3880 return (lpi->
solstat == GRB_INFEASIBLE);
3898 if ( lpi->
solstat == GRB_OPTIMAL )
3901 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
3907 if ( algo != GRB_METHOD_PRIMAL )
3910 if( lpi->
solstat == GRB_ITERATION_LIMIT )
3917 res = GRBgetdblparam(lpi->
grbenv, GRB_DBL_PAR_FEASIBILITYTOL, &
eps);
3923 res = GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_CONSTR_VIO, &consviol);
3929 res = GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_BOUND_VIO, &boundviol);
3936 if ( consviol <=
eps && boundviol <=
eps )
3954 return (lpi->
solstat == GRB_INFEASIBLE);
3972 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
3979 return (lpi->
solstat == GRB_INFEASIBLE && algo == GRB_METHOD_DUAL);
3997 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
4004 return (lpi->
solstat == GRB_INFEASIBLE && algo == GRB_METHOD_DUAL);
4018 return (lpi->
solstat == GRB_UNBOUNDED);
4036 res = GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
4043 return (lpi->
solstat == GRB_OPTIMAL ||
4044 (lpi->
solstat == GRB_INFEASIBLE && algo == GRB_METHOD_DUAL) ||
4045 (lpi->
solstat == GRB_ITERATION_LIMIT && algo == GRB_METHOD_DUAL) );
4057 return (lpi->
solstat == GRB_OPTIMAL);
4075 double optimalitytol;
4107 res = GRBgetdblparam(lpi->
grbenv, GRB_DBL_PAR_FEASIBILITYTOL, &feastol);
4113 res = GRBgetdblparam(lpi->
grbenv, GRB_DBL_PAR_OPTIMALITYTOL, &optimalitytol);
4121 res = GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_CONSTR_VIO, &consviol);
4127 res = GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_BOUND_VIO, &boundviol);
4133 res = GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_DUAL_VIO, &dualviol);
4140 return ( consviol <= feastol && boundviol <= feastol && dualviol <= optimalitytol );
4143 return (lpi->
solstat != GRB_NUMERIC);
4155 return (lpi->
solstat == GRB_CUTOFF);
4167 return (lpi->
solstat == GRB_ITERATION_LIMIT);
4179 return (lpi->
solstat == GRB_TIME_LIMIT);
4224 assert( ret == 0 || ret == GRB_ERROR_DATA_NOT_AVAILABLE );
4230#if GRB_VERSION_MAJOR < 12
4231 double obnd = -GRB_INFINITY;
4233 (void)GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_OBJBOUND, &obnd);
4234 (void)GRBgetintparam(lpi->
grbenv, GRB_INT_PAR_METHOD, &algo);
4239 (void)GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_OBJBOUND, &obnd);
4240 (void)GRBgetdblparam(lpi->
grbenv, GRB_DBL_PAR_FEASIBILITYTOL, &
eps);
4247 if( lpi->
solstat == GRB_ITERATION_LIMIT )
4249 (void)GRBgetdblattr(lpi->
grbmodel, GRB_DBL_ATTR_OBJBOUND,
objval);
4251 else if( lpi->
solstat == GRB_CUTOFF )
4259#ifdef SCIP_DISABLED_CODE
4307 assert( ncols >= 0 && nrows >= 0 );
4319 if( dualsol !=
NULL )
4324 if( activity !=
NULL )
4336 for(
i = 0;
i < nrows; ++
i )
4354 case GRB_LESS_EQUAL:
4357 case GRB_GREATER_EQUAL:
4368 if( redcost !=
NULL )
4421 for (
i = 0;
i < nrows; ++
i)
4422 dualfarkas[
i] *= -1.0;
4460 SCIPdebugMessage(
"requesting solution quality from Gurobi: quality %d\n", qualityindicator);
4462 switch( qualityindicator )
4465 what = GRB_DBL_ATTR_KAPPA;
4469 what = GRB_DBL_ATTR_KAPPA_EXACT;
4477 ret = GRBgetdblattr(lpi->
grbmodel, what, quality);
4509 SCIPdebugMessage(
"saving Gurobi basis into %p/%p\n", (
void*) cstat, (
void*) rstat);
4523 for(
i = 0;
i < nrows; ++
i )
4540 case GRB_NONBASIC_LOWER:
4544 case GRB_NONBASIC_UPPER:
4549 case GRB_SUPERBASIC:
4565 case GRB_NONBASIC_LOWER:
4576 case GRB_NONBASIC_UPPER:
4577 case GRB_SUPERBASIC:
4593 for( j = 0; j < ncols; ++j )
4601 case GRB_NONBASIC_LOWER:
4605 case GRB_NONBASIC_UPPER:
4609 case GRB_SUPERBASIC:
4646 SCIPdebugMessage(
"loading basis %p/%p into Gurobi\n", (
void*) cstat, (
void*) rstat);
4653 for(
i = 0;
i < nrows; ++
i )
4663 lpi->
rstat[
i] = GRB_NONBASIC_LOWER;
4673 lpi->
rstat[
i] = GRB_BASIC;
4684 lpi->
rstat[
i] = GRB_NONBASIC_LOWER;
4693 assert( sense ==
'>' || sense ==
'=' );
4695 lpi->
rstat[
i] = GRB_NONBASIC_LOWER;
4708 for( j = 0; j < ncols; ++j )
4713 lpi->
cstat[j] = GRB_BASIC;
4717 lpi->
cstat[j] = GRB_NONBASIC_LOWER;
4721 lpi->
cstat[j] = GRB_NONBASIC_UPPER;
4725 lpi->
cstat[j] = GRB_SUPERBASIC;
4769 if ( status == GRB_LOADED || status == GRB_INTERRUPTED || status == GRB_INPROGRESS )
4785 for (
i = 0;
i < nrows; ++
i)
4788 if ( bhead[
i] < ncols )
4790 else if ( bhead[
i] < ngrbcols )
4793 int rngrow = bhead[
i]-ncols;
4794 assert(rngrow < lpi->nrngrows);
4798 bind[
i] = -1 - lpi->
rngrows[rngrow];
4803 bind[
i] = -1 - (bhead[
i] - ngrbcols);
4845 if ( status == GRB_LOADED || status == GRB_INTERRUPTED || status == GRB_INPROGRESS )
4866 if (
x.ind[
r] > ncols )
4869 if (
x.ind[
r] < ngrbcols )
4889 if ( ninds !=
NULL && inds !=
NULL )
4895 for (
i = 0;
i <
x.len; ++
i)
4898 assert( idx >= 0 && idx < nrows );
4900 coef[idx] = (
x.val)[
i];
4911 for (
i = 0;
i <
x.len; ++
i)
4914 assert( idx >= 0 && idx < nrows );
4915 coef[idx] = (
x.val)[
i];
4964 if ( status == GRB_LOADED || status == GRB_INTERRUPTED || status == GRB_INPROGRESS )
4985 if (
x.ind[
c] > ncols )
4988 if (
x.ind[
c] < ngrbcols )
5008 if ( ninds !=
NULL && inds !=
NULL )
5014 for (
i = 0;
i <
x.len; ++
i)
5017 assert( idx >= 0 && idx < nrows );
5019 coef[idx] = (
x.val)[
i];
5030 for (
i = 0;
i <
x.len; ++
i)
5033 assert( idx >= 0 && idx < nrows );
5034 coef[idx] = (
x.val)[
i];
5079 if ( status == GRB_LOADED || status == GRB_INTERRUPTED || status == GRB_INPROGRESS )
5097 isslackvar = ((
x.ind)[
r] < 0);
5103 assert(
x.len <= ngrbcols + nrows );
5106 if ( ninds !=
NULL && inds !=
NULL )
5117 for (j = 0; j <
x.len; ++j)
5120 assert( idx >= 0 && idx < ngrbcols+nrows );
5124 coef[idx] = (
x.val)[j];
5138 for (j = 0; j <
x.len; ++j)
5141 assert( idx >= 0 && idx < ngrbcols+nrows );
5144 coef[idx] = (
x.val)[j];
5188 if ( status == GRB_LOADED || status == GRB_INTERRUPTED || status == GRB_INPROGRESS )
5209 if ( ninds !=
NULL && inds !=
NULL )
5215 for (j = 0; j <
x.len; ++j)
5218 assert( idx >= 0 && idx < nrows );
5220 coef[idx] = (
x.val)[j];
5233 for (j = 0; j <
x.len; ++j)
5236 assert( idx >= 0 && idx < nrows );
5237 coef[idx] = (
x.val)[j];
5298 (*lpistate)->ncols = ncols;
5299 (*lpistate)->nrows = nrows;
5300 (*lpistate)->nrngrows = lpi->
nrngrows;
5302 SCIPdebugMessage(
"stored Gurobi LPI state in %p (%d cols, %d rows, %d ranged rows)\n",
5303 (
void*) *lpistate, ncols, nrows, lpi->
nrngrows);
5314 (*lpistate)->ncols = ncols;
5315 (*lpistate)->nrows = nrows;
5316 (*lpistate)->nrngrows = lpi->
nrngrows;
5317 (*lpistate)->packrstat =
NULL;
5318 (*lpistate)->packcstat =
NULL;
5351 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows, %d ranged rows) into Gurobi LP with %d cols, %d rows, and %d ranged rows\n",
5354 if( lpistate->
ncols == 0 || lpistate->
nrows == 0 )
5371 for(
i = lpistate->
ncols;
i < ncols; ++
i )
5389 for(
i = lpistate->
nrows;
i < nrows; ++
i )
5406#if GRB_VERSION_MAJOR < 8
5426 if( *lpistate !=
NULL )
5458 if ( l > 4 && fname[l-4] ==
'.' && fname[l-3] ==
'b' && fname[l-2] ==
'a' && fname[l-1] ==
's' )
5464 SCIPerrorMessage(
"To read a basis with gurobi, the extension has to be '.bas'.\n");
5487 if ( l > 4 && fname[l-4] ==
'.' && fname[l-3] ==
'b' && fname[l-2] ==
'a' && fname[l-1] ==
's' )
5558 (*lpinorms)->ncols = ncols;
5559 (*lpinorms)->nrows = nrows;
5583 if( lpinorms ==
NULL )
5587 error = GRBsetdblattrarray(lpi->
grbmodel, GRB_DBL_ATTR_VDUALNORM, 0, lpinorms->
ncols, lpinorms->
colnorm);
5599 error = GRBsetdblattrarray(lpi->
grbmodel, GRB_DBL_ATTR_CDUALNORM, 0, lpinorms->
nrows, lpinorms->
rownorm);
5624 if ( *lpinorms !=
NULL )
5672 assert(temp >= -1 && temp <= 3);
5680 assert( temp == GRB_PRESOLVE_AUTO || temp == GRB_PRESOLVE_OFF || temp == GRB_PRESOLVE_CONSERVATIVE || temp == GRB_PRESOLVE_AGGRESSIVE );
5681 *ival = (temp == GRB_PRESOLVE_OFF) ?
FALSE :
TRUE;
5688 assert( temp == 0 || temp == 1 );
5694 if( dtemp >= INT_MAX )
5697 *ival = (int) dtemp;
5786 itlim = (ival >= INT_MAX ? GRB_INFINITY : ival);
5867 else if( dval > 1e-2 )
5877 else if( dval > 1e-2 )
5908 else if( dval > 0.999 )
5953 return GRB_INFINITY;
5963 return (val >= GRB_INFINITY);
#define SCIP_DUALPACKETSIZE
unsigned int SCIP_DUALPACKET
#define SCIP_CALL_QUIET(x)
#define SCIP_CALL_ABORT(x)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiStrongbranchFrac(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_Bool SCIPlpiHasPrimalSolve(void)
SCIP_RETCODE SCIPlpiStrongbranchInt(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_Bool SCIPlpiHasBarrierSolve(void)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiStrongbranchesFrac(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
static SCIP_RETCODE lpiStrongbranch(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
const char * SCIPlpiGetSolverName(void)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
SCIP_RETCODE SCIPlpiGetCols(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRows(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
const char * SCIPlpiGetSolverDesc(void)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_Bool SCIPlpiHasDualSolve(void)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
SCIP_RETCODE SCIPlpiStrongbranchesInt(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiLoadColLP(SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiInterrupt(SCIP_LPI *lpi, SCIP_Bool interrupt)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
void SCIPsortIntReal(int *intarray, SCIP_Real *realarray, int len)
assert(minobj< SCIPgetCutoffbound(scip))
interface methods for specific LP solvers
static int rowpacketNum(int nrows)
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
static int colpacketNum(int ncols)
static const int intparam[NUMINTPARAM]
static const double dblparammin[NUMDBLPARAM]
static const int dblparam[NUMDBLPARAM]
static void SCIPdecodeDualBitNeg(const SCIP_DUALPACKET *inp, int *out, int count)
static SCIP_RETCODE setBase(SCIP_LPI *lpi)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static SCIP_RETCODE getDblParam(SCIP_LPI *lpi, const char *param, double *p)
static SCIP_RETCODE getBase(SCIP_LPI *lpi, SCIP_Bool *success)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
static int rowpacketNum(int nrows)
static SCIP_RETCODE reconvertSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs)
static SCIP_RETCODE addRangeVars(SCIP_LPI *lpi)
static void copyParameterValues(GRBPARAM *dest, const GRBPARAM *source)
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
static GRBenv * reusegrbenv
static SCIP_RETCODE getIntParam(SCIP_LPI *lpi, const char *param, int *p)
static void checkRangeInfo(SCIP_LPI *lpi)
static SCIP_RETCODE ensureRngrowmapMem(SCIP_LPI *lpi, int num)
static SCIP_RETCODE convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, int *rngcount)
static SCIP_RETCODE delRangeVars(SCIP_LPI *lpi)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
static SCIP_RETCODE restoreLPData(SCIP_LPI *lpi)
static void SCIPencodeDualBitNeg(const int *inp, SCIP_DUALPACKET *out, int count)
#define CHECK_ZERO(messagehdlr, x)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
static int colpacketNum(int ncols)
static SCIP_RETCODE ensureRngrowsMem(SCIP_LPI *lpi, int num)
static SCIP_RETCODE setParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam)
static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num)
static SCIP_RETCODE getParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam)
static void clearRangeInfo(SCIP_LPI *lpi)
static const char grbname[]
static SCIP_RETCODE addRangeInfo(SCIP_LPI *lpi, int rngcount, int firstrow)
#define CHECK_ZERO_STAR(messagehdlr, x)
static SCIP_RETCODE setIntParam(SCIP_LPI *lpi, const char *param, int parval)
static SCIP_RETCODE checkParameterValues(SCIP_LPI *lpi)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows, int nrngrows)
static SCIP_RETCODE setDblParam(SCIP_LPI *lpi, const char *param, double parval)
static void invalidateSolution(SCIP_LPI *lpi)
#define GRB_REFACTORMAXITERS
static SCIP_RETCODE ensureValMem(SCIP_LPI *lpi, int num)
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(ptr, num)
#define BMSallocClearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
public methods for message output
methods for sorting joint arrays of various types
static SCIP_RETCODE presolve(SCIP *scip, SCIP_Bool *unbounded, SCIP_Bool *infeasible, SCIP_Bool *vanished)
double dblparval[NUMDBLPARAM]
int intparval[NUMINTPARAM]
SCIP_MESSAGEHDLR * messagehdlr
@ SCIP_PRICING_STEEPQSTART
@ SCIP_PRICING_LPIDEFAULT
enum SCIP_Pricing SCIP_PRICING
enum SCIP_LPParam SCIP_LPPARAM
@ SCIP_LPSOLQUALITY_EXACTCONDITION
@ SCIP_LPSOLQUALITY_ESTIMCONDITION
struct SCIP_LPiState SCIP_LPISTATE
struct SCIP_LPiNorms SCIP_LPINORMS
@ SCIP_LPPAR_BARRIERCONVTOL
@ SCIP_LPPAR_CONDITIONLIMIT
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
enum SCIP_ObjSen SCIP_OBJSEN
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
enum SCIP_Retcode SCIP_RETCODE