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);
2184 assert(lpi !=
NULL);
2193 #if (CPX_VERSION == 12070000) 2198 assert( scaling == -1 );
2214 case CPXERR_NO_MEMORY:
2223 SCIPdebugMessage(
" -> CPLEX returned solstat=%d, pfeas=%d, dfeas=%d (%d iterations)\n",
2226 if( lpi->
solstat == CPX_STAT_INForUNBD
2227 || (lpi->
solstat == CPX_STAT_INFEASIBLE && !dualfeasible)
2228 || (lpi->
solstat == CPX_STAT_UNBOUNDED && !primalfeasible) )
2230 if(
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON )
2233 SCIPdebugMessage(
"presolver may have solved the problem -> calling CPLEX primal simplex again without presolve\n");
2244 case CPXERR_NO_MEMORY:
2259 if( lpi->
solstat == CPX_STAT_INForUNBD )
2262 SCIPerrorMessage(
"CPLEX primal simplex returned CPX_STAT_INForUNBD after presolving was turned off\n");
2269 if( lpi->
solstat == CPX_STAT_OPTIMAL )
2275 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2282 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2298 assert(lpi !=
NULL);
2312 #if (CPX_VERSION == 12070000) 2317 assert( scaling == -1 );
2328 case CPXERR_NO_MEMORY:
2339 SCIPdebugMessage(
" -> CPLEX returned solstat=%d, pfeas=%d, dfeas=%d (%d iterations)\n",
2342 if( lpi->
solstat == CPX_STAT_INForUNBD
2343 || (lpi->
solstat == CPX_STAT_INFEASIBLE && !dualfeasible)
2344 || (lpi->
solstat == CPX_STAT_UNBOUNDED && !primalfeasible) )
2346 if(
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON )
2349 SCIPdebugMessage(
"presolver may have solved the problem -> calling CPLEX dual simplex again without presolve\n");
2360 case CPXERR_NO_MEMORY:
2376 if( lpi->
solstat == CPX_STAT_INForUNBD )
2379 SCIPerrorMessage(
"CPLEX dual simplex returned CPX_STAT_INForUNBD after presolving was turned off\n");
2386 if( lpi->
solstat == CPX_STAT_OPTIMAL )
2392 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2399 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2421 if( objval >= llim - eps && objval <= ulim + eps )
2427 SCIPdebugMessage(
"dual solution %g does not exceed objective limit [%g,%g] (%d iterations) -> calling CPLEX dual simplex again for one iteration\n",
2433 setDblParam(lpi, CPX_PARAM_OBJLLIM, -CPX_INFBOUND);
2434 setDblParam(lpi, CPX_PARAM_OBJULIM, CPX_INFBOUND);
2443 case CPXERR_NO_MEMORY:
2465 case CPXERR_NO_MEMORY:
2491 assert(lpi !=
NULL);
2506 retval = CPXhybbaropt(lpi->
cpxenv, lpi->
cpxlp, crossover ? 0 : CPX_ALG_NONE);
2512 case CPXERR_NO_MEMORY:
2520 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2525 if( lpi->
solstat == CPX_STAT_INForUNBD )
2528 SCIPdebugMessage(
"CPLEX returned INForUNBD -> calling CPLEX barrier again without presolve\n");
2534 retval = CPXhybbaropt(lpi->
cpxenv, lpi->
cpxlp, crossover ? 0 : CPX_ALG_NONE);
2539 case CPXERR_NO_MEMORY:
2547 lpi->
solisbasic = (solntype == CPX_BASIC_SOLN);
2553 if( lpi->
solstat == CPX_STAT_INForUNBD )
2556 SCIPerrorMessage(
"CPLEX barrier returned CPX_STAT_INForUNBD after presolving was turned off\n");
2581 const char lbound =
'L';
2582 const char ubound =
'U';
2614 if( newub >= oldlb - 0.5 )
2641 if( newlb <= oldub + 0.5 )
2707 assert(lpi !=
NULL);
2710 assert(down !=
NULL);
2712 assert(downvalid !=
NULL);
2713 assert(upvalid !=
NULL);
2715 SCIPdebugMessage(
"calling CPLEX strongbranching on fractional variable %d (%d iterations)\n", col, itlim);
2728 retval = CPXstrongbranch(lpi->
cpxenv, lpi->
cpxlp, &col, 1, down, up, itlim);
2729 if( retval == CPXERR_NEED_OPT_SOLN )
2734 else if( retval == CPXERR_TILIM_STRONGBRANCH )
2739 else if( retval == CPXERR_SINGULAR )
2773 assert(lpi !=
NULL);
2776 assert(cols !=
NULL);
2777 assert(psols !=
NULL);
2778 assert(down !=
NULL);
2780 assert(downvalid !=
NULL);
2781 assert(upvalid !=
NULL);
2783 SCIPdebugMessage(
"calling CPLEX strongbranching on %d fractional variables (%d iterations)\n", ncols, itlim);
2791 for( j = 0; j < ncols; ++j )
2800 retval = CPXstrongbranch(lpi->
cpxenv, lpi->
cpxlp, cols, ncols, down, up, itlim);
2801 if( retval == CPXERR_NEED_OPT_SOLN )
2806 else if( retval == CPXERR_TILIM_STRONGBRANCH )
2835 assert(lpi !=
NULL);
2837 assert(down !=
NULL);
2839 assert(downvalid !=
NULL);
2840 assert(upvalid !=
NULL);
2842 SCIPdebugMessage(
"calling CPLEX strongbranching on variable %d with integral value (%d iterations)\n", col, itlim);
2872 assert(lpi !=
NULL);
2874 assert(cols !=
NULL);
2875 assert(psols !=
NULL);
2876 assert(down !=
NULL);
2878 assert(downvalid !=
NULL);
2879 assert(upvalid !=
NULL);
2881 SCIPdebugMessage(
"calling CPLEX strongbranching on %d variables with integer values (%d iterations)\n", ncols, itlim);
2887 for( j = 0; j < ncols; ++j )
2912 assert(lpi !=
NULL);
2927 assert(lpi !=
NULL);
2930 assert(primalfeasible !=
NULL);
2931 assert(dualfeasible !=
NULL);
2949 assert(lpi !=
NULL);
2953 return (lpi->
solstat == CPX_STAT_UNBOUNDED || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED);
2963 assert(lpi !=
NULL);
2968 return (lpi->
solstat == CPX_STAT_UNBOUNDED && CPXgetmethod(lpi->
cpxenv, lpi->
cpxlp) == CPX_ALG_PRIMAL);
2978 assert(lpi !=
NULL);
2991 return ((primalfeasible && (lpi->
solstat == CPX_STAT_UNBOUNDED || lpi->
solstat == CPX_STAT_INForUNBD))
2992 || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED);
3002 assert(lpi !=
NULL);
3011 return (lpi->
solstat == CPX_STAT_INFEASIBLE || (lpi->
solstat == CPX_STAT_INForUNBD && dualfeasible));
3021 assert(lpi !=
NULL);
3040 assert(lpi !=
NULL);
3043 return (lpi->
solstat == CPX_STAT_INFEASIBLE);
3053 assert(lpi !=
NULL);
3058 return (lpi->
solstat == CPX_STAT_INFEASIBLE && CPXgetmethod(lpi->
cpxenv, lpi->
cpxlp) == CPX_ALG_DUAL);
3068 assert(lpi !=
NULL);
3077 return (dualfeasible && (lpi->
solstat == CPX_STAT_INFEASIBLE || lpi->
solstat == CPX_STAT_INForUNBD));
3087 assert(lpi !=
NULL);
3096 return (lpi->
solstat == CPX_STAT_UNBOUNDED
3097 || lpi->
solstat == CPX_STAT_OPTIMAL_FACE_UNBOUNDED
3098 || (lpi->
solstat == CPX_STAT_INForUNBD && primalfeasible));
3108 assert(lpi !=
NULL);
3125 assert(lpi !=
NULL);
3128 return (lpi->
solstat == CPX_STAT_OPTIMAL);
3136 assert(lpi !=
NULL);
3147 if( lpi->
solstat == CPX_STAT_UNBOUNDED )
3153 if( !primalfeasible )
3177 return (lpi->
solstat != CPX_STAT_NUM_BEST && lpi->
solstat != CPX_STAT_OPTIMAL_INFEAS);
3185 assert(lpi !=
NULL);
3188 return (lpi->
solstat == CPX_STAT_ABORT_OBJ_LIM
3189 || lpi->
solstat == CPX_STAT_ABORT_DUAL_OBJ_LIM
3190 || lpi->
solstat == CPX_STAT_ABORT_PRIM_OBJ_LIM);
3198 assert(lpi !=
NULL);
3201 return (lpi->
solstat == CPX_STAT_ABORT_IT_LIM);
3209 assert(lpi !=
NULL);
3212 return (lpi->
solstat == CPX_STAT_ABORT_TIME_LIM);
3220 assert(lpi !=
NULL);
3232 assert(lpi !=
NULL);
3234 assert(success !=
NULL);
3235 assert(lpi->
solstat == CPX_STAT_UNBOUNDED
3236 || lpi->
solstat == CPX_STAT_NUM_BEST
3237 || lpi->
solstat == CPX_STAT_OPTIMAL_INFEAS);
3240 if( lpi->
solstat == CPX_STAT_NUM_BEST || lpi->
solstat == CPX_STAT_OPTIMAL_INFEAS )
3241 lpi->
solstat = CPX_STAT_OPTIMAL;
3257 assert(lpi !=
NULL);
3263 retcode = CPXgetobjval(lpi->
cpxenv, lpi->
cpxlp, objval);
3266 if( retcode == CPXERR_NO_SOLN )
3290 assert(lpi !=
NULL);
3300 if( activity !=
NULL )
3314 assert(lpi !=
NULL);
3333 assert(lpi !=
NULL);
3337 assert(dualfarkas !=
NULL);
3353 assert(lpi !=
NULL);
3354 assert(iterations !=
NULL);
3375 assert(lpi !=
NULL);
3376 assert(quality !=
NULL);
3380 SCIPdebugMessage(
"requesting solution quality from CPLEX: quality %d\n", qualityindicator);
3382 switch( qualityindicator )
3389 what = CPX_EXACT_KAPPA;
3399 if( solntype == CPX_BASIC_SOLN )
3430 assert(lpi !=
NULL);
3434 SCIPdebugMessage(
"saving CPLEX basis into %p/%p\n", (
void *) cstat, (
void *) rstat);
3440 for (i = 0; i < nrows; ++i)
3442 if ( rstat[i] == CPX_AT_LOWER )
3470 assert(lpi !=
NULL);
3473 assert(cstat !=
NULL);
3474 assert(rstat !=
NULL);
3476 SCIPdebugMessage(
"loading basis %p/%p into CPLEX\n", (
void *) cstat, (
void *) rstat);
3490 for (i = 0; i < nrows; ++i)
3496 lpi->
rstat[i] = CPX_AT_LOWER;
3499 lpi->
rstat[i] = rstat[i];
3515 assert(lpi !=
NULL);
3526 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3554 assert(lpi !=
NULL);
3561 if ( ninds !=
NULL )
3568 retval = CPXbinvrow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3569 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3572 retval = CPXbinvrow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3589 assert(basicrow >= 0);
3590 assert(basicrow < nrows);
3595 if( rowsense ==
'G' || rowsense ==
'R' )
3599 for( i = 0; i < nrows; i++ )
3630 assert(lpi !=
NULL);
3637 if ( ninds !=
NULL )
3644 retval = CPXbinvcol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3645 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3648 retval = CPXbinvcol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3661 for( r = 0; r < nrows; r++ )
3668 assert(basicrow >= 0);
3669 assert(basicrow < nrows);
3672 if( basicrow >= 0 && basicrow < nrows && (lpi->
senarray[basicrow] ==
'G' || lpi->
senarray[basicrow] ==
'R') )
3699 assert(lpi !=
NULL);
3706 if ( ninds !=
NULL )
3713 retval = CPXbinvarow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3714 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3717 retval = CPXbinvarow(lpi->
cpxenv, lpi->
cpxlp, r, coef);
3734 assert(basicrow >= 0);
3735 assert(basicrow < nrows);
3740 if( rowsense ==
'G' || rowsense ==
'R' )
3744 for( i = 0; i < nrows; i++ )
3771 assert(lpi !=
NULL);
3778 if ( ninds !=
NULL )
3785 retval = CPXbinvacol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3786 if( retval == CPXERR_NO_SOLN || retval == CPXERR_NO_LU_FACTOR || retval == CPXERR_NO_BASIC_SOLN || retval == CPXERR_NO_BASIS )
3789 retval = CPXbinvacol(lpi->
cpxenv, lpi->
cpxlp, c, coef);
3802 for( r = 0; r < nrows; r++ )
3809 assert(basicrow >= 0);
3810 assert(basicrow < nrows);
3813 if( basicrow >= 0 && basicrow < nrows && (lpi->
senarray[basicrow] ==
'G' || lpi->
senarray[basicrow] ==
'R') )
3843 assert(blkmem !=
NULL);
3844 assert(lpi !=
NULL);
3847 assert(lpistate !=
NULL);
3866 SCIPdebugMessage(
"storing CPLEX LPI state in %p (%d cols, %d rows)\n", (
void *) *lpistate, ncols, nrows);
3872 (*lpistate)->ncols = ncols;
3873 (*lpistate)->nrows = nrows;
3892 assert(blkmem !=
NULL);
3893 assert(lpi !=
NULL);
3898 if( lpistate ==
NULL )
3903 assert(lpistate->
ncols <= lpncols);
3904 assert(lpistate->
nrows <= lpnrows);
3906 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into CPLEX LP with %d cols and %d rows\n",
3907 (
void *) lpistate, lpistate->
ncols, lpistate->nrows, lpncols, lpnrows);
3909 if( lpistate->ncols == 0 || lpistate->nrows == 0 )
3920 for( i = lpistate->ncols; i < lpncols; ++i )
3936 for( i = lpistate->nrows; i < lpnrows; ++i )
3950 assert(lpi !=
NULL);
3965 assert(lpi !=
NULL);
3966 assert(lpistate !=
NULL);
3968 if( *lpistate !=
NULL )
3982 return (lpistate !=
NULL);
3991 assert(lpi !=
NULL);
4008 assert(lpi !=
NULL);
4044 assert(blkmem !=
NULL);
4045 assert(lpi !=
NULL);
4049 assert(lpinorms !=
NULL);
4067 (*lpinorms)->normlen = 0;
4069 SCIPdebugMessage(
"storing CPLEX LPI pricing norms in %p (%d rows)\n", (
void *) *lpinorms, nrows);
4072 retval = CPXgetdnorms(lpi->
cpxenv, lpi->
cpxlp, (*lpinorms)->norm, (*lpinorms)->head, &((*lpinorms)->normlen));
4075 if( retval == 1264 )
4081 assert(*lpinorms ==
NULL);
4085 assert((*lpinorms)->normlen == nrows);
4103 assert(blkmem !=
NULL);
4104 assert(lpi !=
NULL);
4109 if( lpinorms ==
NULL )
4113 assert(lpinorms->
normlen <= lpnrows);
4115 SCIPdebugMessage(
"loading LPI simplex norms %p (%d rows) into CPLEX LP with %d rows\n",
4116 (
void *) lpinorms, lpinorms->
normlen, lpnrows);
4118 if( lpinorms->normlen == 0 )
4134 assert(lpi !=
NULL);
4135 assert(lpinorms !=
NULL);
4167 assert(lpi !=
NULL);
4169 assert(ival !=
NULL);
4178 #if (CPX_VERSION < 12060100)
4184 #if (CPX_VERSION <= 1100) 4191 *ival = (
getIntParam(lpi, CPX_PARAM_PREIND) == CPX_ON);
4200 case CPX_PPRIIND_FULL:
4203 case CPX_PPRIIND_PARTIAL:
4206 case CPX_PPRIIND_STEEP:
4209 case CPX_PPRIIND_STEEPQSTART:
4212 #if (CPX_VERSION >= 900) 4213 case CPX_PPRIIND_DEVEX:
4224 *ival = (
getIntParam(lpi, CPX_PARAM_SCRIND) == CPX_ON);
4228 #if (CPX_VERSION <= 1230) 4234 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 4237 *ival = lpi->pseudonthreads;
4257 assert(lpi !=
NULL);
4268 #if (CPX_VERSION < 12060100) 4270 assert(0 <= ival && ival <= 1);
4275 assert(0 <= ival && ival <= 2);
4276 #if (CPX_VERSION <= 1100) 4291 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_AUTO);
4292 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_AUTO);
4295 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_FULL);
4296 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_FULL);
4299 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_PARTIAL);
4300 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_AUTO);
4304 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_STEEP);
4305 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_STEEP);
4308 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_STEEPQSTART);
4309 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_STEEPQSTART);
4311 #if (CPX_VERSION >= 900) 4313 setIntParam(lpi, CPX_PARAM_PPRIIND, CPX_PPRIIND_DEVEX);
4314 setIntParam(lpi, CPX_PARAM_DPRIIND, CPX_DPRIIND_DEVEX);
4329 #if (CPX_VERSION <= 1230) 4335 #if (CPX_VERSION == 1100 || (CPX_VERSION == 1220 && (CPX_SUBVERSION == 0 || CPX_SUBVERSION == 2))) 4338 lpi->pseudonthreads = ival;
4362 assert(lpi !=
NULL);
4364 assert(dval !=
NULL);
4408 assert(lpi !=
NULL);
4465 return CPX_INFBOUND;
4474 return (val >= CPX_INFBOUND);
4497 assert(lpi !=
NULL);
4521 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)