36 #ifndef CPX_SUBVERSION 37 #define CPX_SUBVERSION 0 45 #define CHECK_ZERO(messagehdlr, x) { int _restat_; \ 46 if( (_restat_ = (x)) != 0 ) \ 48 SCIPmessagePrintWarning((messagehdlr), "LP Error: CPLEX returned %d\n", _restat_); \ 49 return SCIP_LPERROR; \ 54 #define ABORT_ZERO(x) { int _restat_; \ 55 if( (_restat_ = (x)) != 0 ) \ 57 SCIPerrorMessage("LP Error: CPLEX returned %d\n", _restat_); \ 63 #define CPX_INT_MAX 2100000000 68 #define CPX_REFACTORMAXITERS 50 72 #define CPX_MAGICZEROCONSTANT 1e-10 75 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE 77 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE 80 #if (CPX_VERSION < 12060100) 81 #define NUMINTPARAM 11 83 #define NUMINTPARAM 10 89 #if (CPX_VERSION < 12060100) 102 #define NUMDBLPARAM 7 166 #if (CPX_VERSION <= 1100) 170 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 224 assert(num <= lpi->boundchgsize);
249 assert(num <= lpi->sidechgsize);
272 assert(num <= lpi->valsize);
294 assert(num <= lpi->cstatsize);
316 assert(num <= lpi->rstatsize);
404 assert(lpistate !=
NULL);
420 assert(lpistate !=
NULL);
437 assert(lpistate !=
NULL);
438 assert(blkmem !=
NULL);
456 assert(blkmem !=
NULL);
457 assert(lpistate !=
NULL);
458 assert(*lpistate !=
NULL);
481 assert(cpxparam !=
NULL);
513 #if (CPX_VERSION == 12070000) 515 if (
intparam[i] != CPX_PARAM_SCAIND )
538 assert(cpxparam !=
NULL);
549 #if (CPX_VERSION == 12070000) 551 if (
intparam[i] != CPX_PARAM_SCAIND )
628 if( val >= CPX_INFBOUND )
630 else if( val <= -CPX_INFBOUND )
631 return -CPX_INFBOUND;
679 if( parval >= CPX_INFBOUND )
681 else if( parval <= -CPX_INFBOUND )
744 assert(rngcount !=
NULL);
748 for( i = 0; i < nrows; ++i )
750 assert(lhs[i] <= rhs[i]);
751 if( lhs[i] == rhs[i] )
753 assert(-CPX_INFBOUND < rhs[i] && rhs[i] < CPX_INFBOUND);
757 else if( lhs[i] <= -CPX_INFBOUND )
759 assert(-CPX_INFBOUND < rhs[i] && rhs[i] < CPX_INFBOUND);
763 else if( rhs[i] >= CPX_INFBOUND )
765 assert(-CPX_INFBOUND < lhs[i] && lhs[i] < CPX_INFBOUND);
786 lpi->
rngarray[*rngcount] = rhs[i] - lhs[i];
809 for( i = 0; i < nrows; ++i )
819 lhs[i] = -CPX_INFBOUND;
825 rhs[i] = CPX_INFBOUND;
846 assert(lhs[i] <= rhs[i]);
864 for( i = 0; i < nrows; ++i )
875 lhs[i] = -CPX_INFBOUND;
912 for( i = 0; i < nrows; ++i )
928 rhs[i] = CPX_INFBOUND;
957 else if( lhs !=
NULL )
959 else if( rhs !=
NULL )
1013 #ifdef CPX_VERSION_VERSION 1014 sprintf(
cpxname,
"CPLEX %d.%d.%d.%d", CPX_VERSION_VERSION, CPX_VERSION_RELEASE, CPX_VERSION_MODIFICATION, CPX_VERSION_FIX);
1016 sprintf(
cpxname,
"CPLEX %d.%d.%d.%d", CPX_VERSION/100, (CPX_VERSION%100)/10, CPX_VERSION%10,
CPX_SUBVERSION);
1026 return "Linear Programming Solver developed by IBM (www.cplex.com)";
1037 return (
void*) lpi->
cpxlp;
1047 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
1073 assert(
sizeof(
SCIP_Real) ==
sizeof(
double));
1074 assert(
sizeof(
SCIP_Bool) ==
sizeof(
int));
1075 assert(lpi !=
NULL);
1082 (*lpi)->cpxenv = CPXopenCPLEX(&restat);
1085 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 1087 CHECK_ZERO( messagehdlr, CPXsetintparam((*lpi)->cpxenv, CPX_PARAM_THREADS, 1) );
1092 CHECK_ZERO( messagehdlr, CPXsetintparam((*lpi)->cpxenv, CPX_PARAM_PREIND, CPX_OFF) );
1095 #if (CPX_VERSION == 12070000) 1097 CHECK_ZERO( messagehdlr, CPXsetintparam((*lpi)->cpxenv, CPX_PARAM_SCAIND, -1) );
1105 (*lpi)->larray =
NULL;
1106 (*lpi)->uarray =
NULL;
1107 (*lpi)->senarray =
NULL;
1108 (*lpi)->rhsarray =
NULL;
1109 (*lpi)->rngarray =
NULL;
1110 (*lpi)->valarray =
NULL;
1111 (*lpi)->rngindarray =
NULL;
1112 (*lpi)->cstat =
NULL;
1113 (*lpi)->rstat =
NULL;
1114 (*lpi)->indarray =
NULL;
1115 (*lpi)->boundchgsize = 0;
1116 (*lpi)->sidechgsize = 0;
1117 (*lpi)->valsize = 0;
1118 (*lpi)->cstatsize = 0;
1119 (*lpi)->rstatsize = 0;
1120 (*lpi)->iterations = 0;
1122 (*lpi)->solisbasic =
FALSE;
1123 (*lpi)->cpxlp = CPXcreateprob((*lpi)->cpxenv, &restat, name);
1124 (*lpi)->instabilityignored =
FALSE;
1125 (*lpi)->fromscratch =
FALSE;
1126 (*lpi)->clearstate =
FALSE;
1127 (*lpi)->feastol = 1e-06;
1128 (*lpi)->conditionlimit = -1.0;
1129 (*lpi)->checkcondition =
FALSE;
1130 #if (CPX_VERSION <= 1100) 1131 (*lpi)->rngfound =
FALSE;
1133 (*lpi)->messagehdlr = messagehdlr;
1153 assert(lpi !=
NULL);
1154 assert(*lpi !=
NULL);
1155 assert((*lpi)->cpxenv !=
NULL);
1160 CHECK_ZERO( (*lpi)->messagehdlr, CPXfreeprob((*lpi)->cpxenv, &((*lpi)->cpxlp)) );
1175 CHECK_ZERO( (*lpi)->messagehdlr, CPXcloseCPLEX(&((*lpi)->cpxenv)) );
1217 assert(lpi !=
NULL);
1221 SCIPdebugMessage(
"loading LP in column format into CPLEX: %d cols, %d rows\n", ncols, nrows);
1232 for( c = 0; c < ncols-1; ++c )
1234 cnt[c] = beg[c+1] - beg[c];
1235 assert(cnt[c] >= 0);
1237 cnt[ncols-1] = nnonz - beg[ncols-1];
1238 assert(cnt[ncols-1] >= 0);
1242 lpi->
rhsarray, lpi->
senarray, beg, cnt, ind, val, lb, ub, lpi->
rngarray, colnames, rownames) );
1247 assert(CPXgetnumcols(lpi->
cpxenv, lpi->
cpxlp) == ncols);
1248 assert(CPXgetnumrows(lpi->
cpxenv, lpi->
cpxlp) == nrows);
1249 assert(CPXgetnumnz(lpi->
cpxenv, lpi->
cpxlp) == nnonz);
1268 assert(lpi !=
NULL);
1274 assert(nnonz == 0 || beg != 0);
1275 assert(nnonz == 0 || ind != 0);
1276 assert(nnonz == 0 || val != 0);
1280 SCIPdebugMessage(
"adding %d columns with %d nonzeros to CPLEX\n", ncols, nnonz);
1292 for (j = 0; j < nnonz; ++j)
1293 assert( 0 <= ind[j] && ind[j] < nrows );
1296 CHECK_ZERO( lpi->
messagehdlr, CPXaddcols(lpi->
cpxenv, lpi->
cpxlp, ncols, nnonz, obj, beg, ind, val, lb, ub, colnames) );
1313 assert(lpi !=
NULL);
1316 assert(0 <= firstcol && firstcol <= lastcol && lastcol < CPXgetnumcols(lpi->
cpxenv, lpi->
cpxlp));
1318 SCIPdebugMessage(
"deleting %d columns from CPLEX\n", lastcol - firstcol + 1);
1335 assert(lpi !=
NULL);
1363 assert(lpi !=
NULL);
1367 SCIPdebugMessage(
"adding %d rows with %d nonzeros to CPLEX\n", nrows, nnonz);
1385 for (j = 0; j < nnonz; ++j)
1386 assert( 0 <= ind[j] && ind[j] < ncols );
1388 CHECK_ZERO( lpi->
messagehdlr, CPXaddrows(lpi->
cpxenv, lpi->
cpxlp, 0, nrows, nnonz, lpi->
rhsarray, lpi->
senarray, beg, ind, val,
NULL,
1397 #if (CPX_VERSION <= 1100) 1417 assert(lpi !=
NULL);
1420 assert(0 <= firstrow && firstrow <= lastrow && lastrow < CPXgetnumrows(lpi->
cpxenv, lpi->
cpxlp));
1439 assert(lpi !=
NULL);
1460 assert(lpi !=
NULL);
1493 assert(lpi !=
NULL);
1496 assert(ncols == 0 || (ind !=
NULL && lb !=
NULL && ub !=
NULL));
1503 for( i = 0; i < ncols; ++i )
1509 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[i]);
1514 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[i]);
1528 for( i = 0; i < ncols; ++i )
1558 assert(lpi !=
NULL);
1580 for( i = 0; i < rngcount; ++i )
1602 assert(lpi !=
NULL);
1606 SCIPdebugMessage(
"changing coefficient row %d, column %d in CPLEX to %g\n", row, col, newval);
1621 assert(lpi !=
NULL);
1629 #if (CPX_VERSION >= 12050000) 1646 assert(lpi !=
NULL);
1670 assert(lpi !=
NULL);
1673 assert(scaleval != 0.0);
1675 SCIPdebugMessage(
"scaling row %d with factor %g in CPLEX\n", row, scaleval);
1685 for( i = 0; i < nnonz; ++i )
1691 if( lhs > -CPX_INFBOUND )
1693 else if( scaleval < 0.0 )
1695 if( rhs < CPX_INFBOUND )
1697 else if( scaleval < 0.0 )
1698 rhs = -CPX_INFBOUND;
1699 if( scaleval > 0.0 )
1727 assert(lpi !=
NULL);
1730 assert(scaleval != 0.0);
1732 SCIPdebugMessage(
"scaling column %d with factor %g in CPLEX\n", col, scaleval);
1745 for( i = 0; i < nnonz; ++i )
1755 if( lb > -CPX_INFBOUND )
1757 else if( scaleval < 0.0 )
1759 if( ub < CPX_INFBOUND )
1761 else if( scaleval < 0.0 )
1763 if( scaleval > 0.0 )
1793 assert(lpi !=
NULL);
1795 assert(nrows !=
NULL);
1810 assert(lpi !=
NULL);
1812 assert(ncols !=
NULL);
1827 assert(lpi !=
NULL);
1829 assert(nnonz !=
NULL);
1854 assert(lpi !=
NULL);
1857 assert(0 <= firstcol && firstcol <= lastcol && lastcol < CPXgetnumcols(lpi->
cpxenv, lpi->
cpxlp));
1875 assert(beg !=
NULL);
1876 assert(ind !=
NULL);
1877 assert(val !=
NULL);
1881 CPXgetnumnz(lpi->
cpxenv, lpi->
cpxlp), &surplus, firstcol, lastcol) );
1882 assert(surplus >= 0);
1886 assert(beg ==
NULL);
1887 assert(ind ==
NULL);
1888 assert(val ==
NULL);
1910 #if CPX_VERSION < 12070000 1914 assert(lpi !=
NULL);
1917 assert(0 <= firstrow && firstrow <= lastrow && lastrow < CPXgetnumrows(lpi->
cpxenv, lpi->
cpxlp));
1927 #if CPX_VERSION < 12070000 1929 if( retcode != CPXERR_NO_RNGVAL )
1947 assert(beg !=
NULL);
1948 assert(ind !=
NULL);
1949 assert(val !=
NULL);
1953 CPXgetnumnz(lpi->
cpxenv, lpi->
cpxlp), &surplus, firstrow, lastrow) );
1954 assert(surplus >= 0);
1958 assert(beg ==
NULL);
1959 assert(ind ==
NULL);
1960 assert(val ==
NULL);
1973 int namestoragesize,
1979 assert(lpi !=
NULL);
1982 assert(colnames !=
NULL || namestoragesize == 0);
1983 assert(namestorage !=
NULL || namestoragesize == 0);
1984 assert(namestoragesize >= 0);
1985 assert(storageleft !=
NULL);
1986 assert(0 <= firstcol && firstcol <= lastcol && lastcol < CPXgetnumcols(lpi->
cpxenv, lpi->
cpxlp));
1990 retcode = CPXgetcolname(lpi->
cpxenv, lpi->
cpxlp, colnames, namestorage, namestoragesize, storageleft, firstcol, lastcol);
1991 assert( namestoragesize != 0 || retcode == CPXERR_NEGATIVE_SURPLUS );
1992 if( namestoragesize != 0 )
2007 int namestoragesize,
2013 assert(lpi !=
NULL);
2016 assert(rownames !=
NULL || namestoragesize == 0);
2017 assert(namestorage !=
NULL || namestoragesize == 0);
2018 assert(namestoragesize >= 0);
2019 assert(storageleft !=
NULL);
2020 assert(0 <= firstrow && firstrow <= lastrow && lastrow < CPXgetnumrows(lpi->
cpxenv, lpi->
cpxlp));
2024 retcode = CPXgetrowname(lpi->
cpxenv, lpi->
cpxlp, rownames, namestorage, namestoragesize, storageleft, firstrow, lastrow);
2025 assert( namestoragesize != 0 || retcode == CPXERR_NEGATIVE_SURPLUS );
2026 if( namestoragesize != 0 )
2040 assert(lpi !=
NULL);
2041 assert(objsen !=
NULL);
2042 assert(CPXgetobjsen(lpi->
cpxenv, lpi->
cpxlp) == CPX_MIN || CPXgetobjsen(lpi->
cpxenv, lpi->
cpxlp) == CPX_MAX);
2059 assert(lpi !=
NULL);
2062 assert(firstcol <= lastcol);
2063 assert(vals !=
NULL);
2065 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
2081 assert(lpi !=
NULL);
2084 assert(firstcol <= lastcol);
2110 #if CPX_VERSION < 12070000 2114 assert(lpi !=
NULL);
2117 assert(firstrow <= lastrow);
2125 #if CPX_VERSION < 12070000 2127 if( retval != CPXERR_NO_RNGVAL )
2151 assert(lpi !=
NULL);
2183 #if CPX_VERSION == 12070100 2187 assert(lpi !=
NULL);
2196 #if (CPX_VERSION == 12070000) 2201 assert( scaling == -1 );
2210 #if CPX_VERSION == 12070100 2215 CPXsetintparam(lpi->
cpxenv, CPX_PARAM_PREIND, CPX_ON);
2223 #if CPX_VERSION == 12070100 2227 CPXsetintparam(lpi->
cpxenv, CPX_PARAM_PREIND, presolving);
2235 case CPXERR_NO_MEMORY:
2244 SCIPdebugMessage(
" -> CPLEX returned solstat=%d, pfeas=%d, dfeas=%d (%d iterations)\n",
2247 #if CPX_VERSION == 12070100 2253 if( lpi->
solstat == CPX_STAT_INForUNBD && CPXgetnumrows(lpi->
cpxenv, lpi->
cpxlp) == 0 )
2255 lpi->
solstat = CPX_STAT_UNBOUNDED;
2261 if( lpi->
solstat == CPX_STAT_INForUNBD
2262 || (lpi->
solstat == CPX_STAT_INFEASIBLE && !dualfeasible)
2263 || (lpi->
solstat == CPX_STAT_UNBOUNDED && !primalfeasible) )
2265 if(
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON )
2268 SCIPdebugMessage(
"presolver may have solved the problem -> calling CPLEX primal simplex again without presolve\n");
2279 case CPXERR_NO_MEMORY:
2294 if( lpi->
solstat == CPX_STAT_INForUNBD )
2297 SCIPerrorMessage(
"CPLEX primal simplex returned CPX_STAT_INForUNBD after presolving was turned off\n");
2304 if( lpi->
solstat == CPX_STAT_OPTIMAL )
2310 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2317 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2333 assert(lpi !=
NULL);
2347 #if (CPX_VERSION == 12070000) 2352 assert( scaling == -1 );
2363 case CPXERR_NO_MEMORY:
2374 SCIPdebugMessage(
" -> CPLEX returned solstat=%d, pfeas=%d, dfeas=%d (%d iterations)\n",
2377 if( lpi->
solstat == CPX_STAT_INForUNBD
2378 || (lpi->
solstat == CPX_STAT_INFEASIBLE && !dualfeasible)
2379 || (lpi->
solstat == CPX_STAT_UNBOUNDED && !primalfeasible) )
2381 if(
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON )
2384 SCIPdebugMessage(
"presolver may have solved the problem -> calling CPLEX dual simplex again without presolve\n");
2395 case CPXERR_NO_MEMORY:
2411 if( lpi->
solstat == CPX_STAT_INForUNBD )
2414 SCIPerrorMessage(
"CPLEX dual simplex returned CPX_STAT_INForUNBD after presolving was turned off\n");
2421 if( lpi->
solstat == CPX_STAT_OPTIMAL )
2427 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2434 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2456 if( objval >= llim - eps && objval <= ulim + eps )
2462 SCIPdebugMessage(
"dual solution %g does not exceed objective limit [%g,%g] (%d iterations) -> calling CPLEX dual simplex again for one iteration\n",
2468 setDblParam(lpi, CPX_PARAM_OBJLLIM, -CPX_INFBOUND);
2469 setDblParam(lpi, CPX_PARAM_OBJULIM, CPX_INFBOUND);
2478 case CPXERR_NO_MEMORY:
2500 case CPXERR_NO_MEMORY:
2526 assert(lpi !=
NULL);
2541 retval = CPXhybbaropt(lpi->
cpxenv, lpi->
cpxlp, crossover ? 0 : CPX_ALG_NONE);
2547 case CPXERR_NO_MEMORY:
2555 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2560 if( lpi->
solstat == CPX_STAT_INForUNBD )
2563 SCIPdebugMessage(
"CPLEX returned INForUNBD -> calling CPLEX barrier again without presolve\n");
2569 retval = CPXhybbaropt(lpi->
cpxenv, lpi->
cpxlp, crossover ? 0 : CPX_ALG_NONE);
2574 case CPXERR_NO_MEMORY:
2582 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2588 if( lpi->
solstat == CPX_STAT_INForUNBD )
2591 SCIPerrorMessage(
"CPLEX barrier returned CPX_STAT_INForUNBD after presolving was turned off\n");
2616 const char lbound =
'L';
2617 const char ubound =
'U';
2649 if( newub >= oldlb - 0.5 )
2676 if( newlb <= oldub + 0.5 )
2742 assert(lpi !=
NULL);
2745 assert(down !=
NULL);
2747 assert(downvalid !=
NULL);
2748 assert(upvalid !=
NULL);
2750 SCIPdebugMessage(
"calling CPLEX strongbranching on fractional variable %d (%d iterations)\n", col, itlim);
2763 retval = CPXstrongbranch(lpi->
cpxenv, lpi->
cpxlp, &col, 1, down, up, itlim);
2764 if( retval == CPXERR_NEED_OPT_SOLN )
2769 else if( retval == CPXERR_TILIM_STRONGBRANCH )
2774 else if( retval == CPXERR_SINGULAR )
2808 assert(lpi !=
NULL);
2811 assert(cols !=
NULL);
2812 assert(psols !=
NULL);
2813 assert(down !=
NULL);
2815 assert(downvalid !=
NULL);
2816 assert(upvalid !=
NULL);
2818 SCIPdebugMessage(
"calling CPLEX strongbranching on %d fractional variables (%d iterations)\n", ncols, itlim);
2826 for( j = 0; j < ncols; ++j )
2835 retval = CPXstrongbranch(lpi->
cpxenv, lpi->
cpxlp, cols, ncols, down, up, itlim);
2836 if( retval == CPXERR_NEED_OPT_SOLN )
2841 else if( retval == CPXERR_TILIM_STRONGBRANCH )
2870 assert(lpi !=
NULL);
2872 assert(down !=
NULL);
2874 assert(downvalid !=
NULL);
2875 assert(upvalid !=
NULL);
2877 SCIPdebugMessage(
"calling CPLEX strongbranching on variable %d with integral value (%d iterations)\n", col, itlim);
2907 assert(lpi !=
NULL);
2909 assert(cols !=
NULL);
2910 assert(psols !=
NULL);
2911 assert(down !=
NULL);
2913 assert(downvalid !=
NULL);
2914 assert(upvalid !=
NULL);
2916 SCIPdebugMessage(
"calling CPLEX strongbranching on %d variables with integer values (%d iterations)\n", ncols, itlim);
2922 for( j = 0; j < ncols; ++j )
2947 assert(lpi !=
NULL);
2962 assert(lpi !=
NULL);
2965 assert(primalfeasible !=
NULL);
2966 assert(dualfeasible !=
NULL);
2984 assert(lpi !=
NULL);
2988 return (lpi->
solstat == CPX_STAT_UNBOUNDED || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED);
2998 assert(lpi !=
NULL);
3003 return (lpi->
solstat == CPX_STAT_UNBOUNDED && CPXgetmethod(lpi->
cpxenv, lpi->
cpxlp) == CPX_ALG_PRIMAL);
3013 assert(lpi !=
NULL);
3026 return ((primalfeasible && (lpi->
solstat == CPX_STAT_UNBOUNDED || lpi->
solstat == CPX_STAT_INForUNBD))
3027 || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED);
3037 assert(lpi !=
NULL);
3046 return (lpi->
solstat == CPX_STAT_INFEASIBLE || (lpi->
solstat == CPX_STAT_INForUNBD && dualfeasible));
3056 assert(lpi !=
NULL);
3075 assert(lpi !=
NULL);
3078 return (lpi->
solstat == CPX_STAT_INFEASIBLE);
3088 assert(lpi !=
NULL);
3093 return (lpi->
solstat == CPX_STAT_INFEASIBLE && CPXgetmethod(lpi->
cpxenv, lpi->
cpxlp) == CPX_ALG_DUAL);
3103 assert(lpi !=
NULL);
3112 return (dualfeasible && (lpi->
solstat == CPX_STAT_INFEASIBLE || lpi->
solstat == CPX_STAT_INForUNBD));
3122 assert(lpi !=
NULL);
3131 return (lpi->
solstat == CPX_STAT_UNBOUNDED
3132 || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED
3133 || (lpi->
solstat == CPX_STAT_INForUNBD && primalfeasible));
3143 assert(lpi !=
NULL);
3160 assert(lpi !=
NULL);
3163 return (lpi->
solstat == CPX_STAT_OPTIMAL);
3171 assert(lpi !=
NULL);
3182 if( lpi->
solstat == CPX_STAT_UNBOUNDED )
3188 if( !primalfeasible )
3212 return (lpi->
solstat != CPX_STAT_NUM_BEST && lpi->
solstat != CPX_STAT_OPTIMAL_INFEAS);
3220 assert(lpi !=
NULL);
3223 return (lpi->
solstat == CPX_STAT_ABORT_OBJ_LIM
3224 || lpi->
solstat == CPX_STAT_ABORT_DUAL_OBJ_LIM
3225 || lpi->
solstat == CPX_STAT_ABORT_PRIM_OBJ_LIM);
3233 assert(lpi !=
NULL);
3236 return (lpi->
solstat == CPX_STAT_ABORT_IT_LIM);
3244 assert(lpi !=
NULL);
3247 return (lpi->
solstat == CPX_STAT_ABORT_TIME_LIM);
3255 assert(lpi !=
NULL);
3267 assert(lpi !=
NULL);
3269 assert(success !=
NULL);
3270 assert(lpi->
solstat == CPX_STAT_UNBOUNDED
3271 || lpi->
solstat == CPX_STAT_NUM_BEST
3272 || lpi->
solstat == CPX_STAT_OPTIMAL_INFEAS);
3275 if( lpi->
solstat == CPX_STAT_NUM_BEST || lpi->
solstat == CPX_STAT_OPTIMAL_INFEAS )
3276 lpi->
solstat = CPX_STAT_OPTIMAL;
3292 assert(lpi !=
NULL);
3298 retcode = CPXgetobjval(lpi->
cpxenv, lpi->
cpxlp, objval);
3301 if( retcode == CPXERR_NO_SOLN )
3325 assert(lpi !=
NULL);
3335 if( activity !=
NULL )
3349 assert(lpi !=
NULL);
3368 assert(lpi !=
NULL);
3372 assert(dualfarkas !=
NULL);
3388 assert(lpi !=
NULL);
3389 assert(iterations !=
NULL);
3410 assert(lpi !=
NULL);
3411 assert(quality !=
NULL);
3415 SCIPdebugMessage(
"requesting solution quality from CPLEX: quality %d\n", qualityindicator);
3417 switch( qualityindicator )
3424 what = CPX_EXACT_KAPPA;
3434 if( solntype == CPX_BASIC_SOLN )
3465 assert(lpi !=
NULL);
3469 SCIPdebugMessage(
"saving CPLEX basis into %p/%p\n", (
void *) cstat, (
void *) rstat);
3475 for (i = 0; i < nrows; ++i)
3477 if ( rstat[i] == CPX_AT_LOWER )
3505 assert(lpi !=
NULL);
3508 assert(cstat !=
NULL);
3509 assert(rstat !=
NULL);
3511 SCIPdebugMessage(
"loading basis %p/%p into CPLEX\n", (
void *) cstat, (
void *) rstat);
3525 for (i = 0; i < nrows; ++i)
3531 lpi->
rstat[i] = CPX_AT_LOWER;
3534 lpi->
rstat[i] = rstat[i];
3550 assert(lpi !=
NULL);
3561 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3589 assert(lpi !=
NULL);
3596 if ( ninds !=
NULL )
3603 retval = CPXbinvrow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3604 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3607 retval = CPXbinvrow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3624 assert(basicrow >= 0);
3625 assert(basicrow < nrows);
3630 if( rowsense ==
'G' || rowsense ==
'R' )
3634 for( i = 0; i < nrows; i++ )
3665 assert(lpi !=
NULL);
3672 if ( ninds !=
NULL )
3679 retval = CPXbinvcol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3680 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3683 retval = CPXbinvcol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3696 for( r = 0; r < nrows; r++ )
3703 assert(basicrow >= 0);
3704 assert(basicrow < nrows);
3707 if( basicrow >= 0 && basicrow < nrows && (lpi->
senarray[basicrow] ==
'G' || lpi->
senarray[basicrow] ==
'R') )
3734 assert(lpi !=
NULL);
3741 if ( ninds !=
NULL )
3748 retval = CPXbinvarow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3749 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3752 retval = CPXbinvarow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3769 assert(basicrow >= 0);
3770 assert(basicrow < nrows);
3775 if( rowsense ==
'G' || rowsense ==
'R' )
3779 for( i = 0; i < nrows; i++ )
3806 assert(lpi !=
NULL);
3813 if ( ninds !=
NULL )
3820 retval = CPXbinvacol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3821 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3824 retval = CPXbinvacol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3837 for( r = 0; r < nrows; r++ )
3844 assert(basicrow >= 0);
3845 assert(basicrow < nrows);
3848 if( basicrow >= 0 && basicrow < nrows && (lpi->
senarray[basicrow] ==
'G' || lpi->
senarray[basicrow] ==
'R') )
3878 assert(blkmem !=
NULL);
3879 assert(lpi !=
NULL);
3882 assert(lpistate !=
NULL);
3901 SCIPdebugMessage(
"storing CPLEX LPI state in %p (%d cols, %d rows)\n", (
void *) *lpistate, ncols, nrows);
3907 (*lpistate)->ncols = ncols;
3908 (*lpistate)->nrows = nrows;
3927 assert(blkmem !=
NULL);
3928 assert(lpi !=
NULL);
3933 if( lpistate ==
NULL )
3938 assert(lpistate->
ncols <= lpncols);
3939 assert(lpistate->
nrows <= lpnrows);
3941 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into CPLEX LP with %d cols and %d rows\n",
3942 (
void *) lpistate, lpistate->
ncols, lpistate->nrows, lpncols, lpnrows);
3944 if( lpistate->ncols == 0 || lpistate->nrows == 0 )
3955 for( i = lpistate->ncols; i < lpncols; ++i )
3971 for( i = lpistate->nrows; i < lpnrows; ++i )
3985 assert(lpi !=
NULL);
4000 assert(lpi !=
NULL);
4001 assert(lpistate !=
NULL);
4003 if( *lpistate !=
NULL )
4017 return (lpistate !=
NULL);
4026 assert(lpi !=
NULL);
4043 assert(lpi !=
NULL);
4079 assert(blkmem !=
NULL);
4080 assert(lpi !=
NULL);
4084 assert(lpinorms !=
NULL);
4102 (*lpinorms)->normlen = 0;
4104 SCIPdebugMessage(
"storing CPLEX LPI pricing norms in %p (%d rows)\n", (
void *) *lpinorms, nrows);
4107 retval = CPXgetdnorms(lpi->
cpxenv, lpi->
cpxlp, (*lpinorms)->norm, (*lpinorms)->head, &((*lpinorms)->normlen));
4110 if( retval == 1264 )
4116 assert(*lpinorms ==
NULL);
4120 assert((*lpinorms)->normlen == nrows);
4138 assert(blkmem !=
NULL);
4139 assert(lpi !=
NULL);
4144 if( lpinorms ==
NULL )
4148 assert(lpinorms->
normlen <= lpnrows);
4150 SCIPdebugMessage(
"loading LPI simplex norms %p (%d rows) into CPLEX LP with %d rows\n",
4151 (
void *) lpinorms, lpinorms->
normlen, lpnrows);
4153 if( lpinorms->normlen == 0 )
4169 assert(lpi !=
NULL);
4170 assert(lpinorms !=
NULL);
4202 assert(lpi !=
NULL);
4204 assert(ival !=
NULL);
4213 #if (CPX_VERSION < 12060100)
4219 #if (CPX_VERSION <= 1100) 4226 *ival = (
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON);
4235 case CPX_PPRIIND_FULL:
4238 case CPX_PPRIIND_PARTIAL:
4241 case CPX_PPRIIND_STEEP:
4244 case CPX_PPRIIND_STEEPQSTART:
4247 #if (CPX_VERSION >= 900) 4248 case CPX_PPRIIND_DEVEX:
4259 *ival = (
getIntParam(lpi, CPX_PARAM_SCRIND) == CPX_ON);
4263 #if (CPX_VERSION <= 1230) 4269 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 4272 *ival = lpi->pseudonthreads;
4292 assert(lpi !=
NULL);
4303 #if (CPX_VERSION < 12060100) 4305 assert(0 <= ival && ival <= 1);
4310 assert(0 <= ival && ival <= 2);
4311 #if (CPX_VERSION <= 1100) 4326 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_AUTO);
4327 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_AUTO);
4330 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_FULL);
4331 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_FULL);
4334 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_PARTIAL);
4335 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_AUTO);
4339 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_STEEP);
4340 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_STEEP);
4343 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_STEEPQSTART);
4344 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_STEEPQSTART);
4346 #if (CPX_VERSION >= 900) 4348 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_DEVEX);
4349 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_DEVEX);
4364 #if (CPX_VERSION <= 1230) 4370 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 4373 lpi->pseudonthreads = ival;
4397 assert(lpi !=
NULL);
4399 assert(dval !=
NULL);
4443 assert(lpi !=
NULL);
4500 return CPX_INFBOUND;
4509 return (val >= CPX_INFBOUND);
4532 assert(lpi !=
NULL);
4556 assert(lpi !=
NULL);
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
#define BMSfreeMemoryArrayNull(ptr)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
static double getDblParam(SCIP_LPI *lpi, int const param)
double dblparval[NUMDBLPARAM]
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
enum SCIP_ObjSen SCIP_OBJSEN
static SCIP_RETCODE restoreLPData(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
SCIP_DUALPACKET COLPACKET
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
interface methods for specific LP solvers
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
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)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num)
enum SCIP_LPParam SCIP_LPPARAM
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
#define BMSallocMemoryArray(ptr, num)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
#define CHECK_ZERO(messagehdlr, x)
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 SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
static void reconvertBothSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs)
#define BMSfreeMemory(ptr)
enum SCIP_Pricing SCIP_PRICING
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
static int colpacketNum(int ncols)
SCIP_DUALPACKET COLPACKET
static SCIP_RETCODE getParameterValues(SCIP_LPI *lpi, SCIP_CPXPARAM *cpxparam)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
#define CPX_MAGICZEROCONSTANT
static SCIP_RETCODE setParameterValues(SCIP_LPI *const lpi, SCIP_CPXPARAM *const cpxparam)
packing single and dual bit values
static SCIP_RETCODE ensureValMem(SCIP_LPI *lpi, int num)
#define BMSfreeMemoryArray(ptr)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
static int getIntParam(SCIP_LPI *lpi, int const param)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
static SCIP_RETCODE lpiStrongbranchIntegral(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_Real SCIPlpiInfinity(SCIP_LPI *lpi)
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 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)
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
static void setIntParam(SCIP_LPI *lpi, int const param, int const parval)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
static void invalidateSolution(SCIP_LPI *const 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_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
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)
#define BMSfreeBlockMemory(mem, ptr)
static SCIP_RETCODE getBase(SCIP_LPI *lpi)
unsigned int SCIP_DUALPACKET
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
#define BMSallocBlockMemoryArray(mem, ptr, num)
static void setDblParam(SCIP_LPI *lpi, int const param, double parval)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
static int cpxObjsen(SCIP_OBJSEN const objsen)
SCIP_Bool instabilityignored
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
static SCIP_RETCODE setBase(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_DUALPACKET ROWPACKET
const char * SCIPlpiGetSolverName(void)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
static const double dblparammin[NUMDBLPARAM]
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
#define SCIP_CALL_QUIET(x)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
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)
static SCIP_RETCODE checkParameterValues(SCIP_LPI *const lpi)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
#define CPX_REFACTORMAXITERS
static void copyParameterValues(SCIP_CPXPARAM *dest, SCIP_CPXPARAM *const source)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
public methods for message output
static SCIP_RETCODE ensureBoundchgMem(SCIP_LPI *lpi, int num)
static const int dblparam[NUMDBLPARAM]
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 SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
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 SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
static int rowpacketNum(int nrows)
static void convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, int indoffset, int *rngcount)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
static void reconvertSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs)
static void reconvertLhs(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
int intparval[NUMINTPARAM]
SCIP_MESSAGEHDLR * messagehdlr
static const int intparam[NUMINTPARAM]
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
static void reconvertRhs(SCIP_LPI *lpi, int nrows, SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
#define BMSallocBlockMemory(mem, ptr)
#define BMSclearMemoryArray(ptr, num)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
const char * SCIPlpiGetSolverDesc(void)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)