32 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE 34 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE 85 #define __QS_PRINTLOC__ fprintf(stderr,", in (%s:%d)\n", __FILE__, __LINE__); 89 #define QS_TESTG(A,B,C) do{{ \ 96 #define QS_ERROR(A,...) do{{ \ 98 fprintf(stderr,__VA_ARGS__); \ 100 return SCIP_LPERROR;}}}while(0) 104 #define QS_RETURN(A) do{ \ 105 const int __RVAL__ = (A); \ 107 fprintf(stderr,"LP Error: QSopt returned %d",__RVAL__); \ 109 return SCIP_ERROR;} \ 110 return SCIP_OKAY;}while(0) 114 #define QS_CONDRET(A) do{ \ 115 const int __RVAL__ = (A); \ 117 fprintf(stderr,"LP Error: QSopt returned %d",__RVAL__); \ 119 return SCIP_LPERROR;} \ 164 assert(lpistate !=
NULL);
180 assert(lpistate !=
NULL);
197 assert(lpistate !=
NULL);
198 assert(blkmem !=
NULL);
216 assert(blkmem !=
NULL);
217 assert(lpistate !=
NULL);
218 assert(*lpistate !=
NULL);
287 const double*
const lhs,
288 const double*
const rhs
294 for( i = nrows ; i-- ; )
296 state = ((lhs[i] <= -QS_MAXDOUBLE ? 1U:0U) | (rhs[i] >= QS_MAXDOUBLE ? 2U:0U));
306 lpi->
irhs[i] = lhs[i];
312 lpi->
irhs[i] = lhs[i];
313 lpi->
irng[i] = rhs[i] - lhs[i];
314 assert(lpi->
irng[i] >= 0.0);
319 lpi->
irhs[i] = rhs[i];
324 lpi->
irhs[i] = lhs[i];
356 vnamelen = strlen(vname);
359 memcpy(__qsstr, vname, vnamelen);
360 __qsstr[vnamelen+1] =
'\0';
370 return "Linear Programming Solver developed by D. Applegate, W. Cook, S. Dash, and M. Mevenkamp (www.isye.gatech.edu/~wcook/qsopt)";
378 return (
void*) lpi->
prob;
388 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
413 assert(
sizeof(
SCIP_Real) ==
sizeof(
double));
414 assert(
sizeof(
SCIP_Bool) ==
sizeof(
int));
421 memset(*lpi, 0,
sizeof(
struct SCIP_LPi));
423 (*lpi)->prob = QScreate_prob(name, (
int) objsen);
424 if ( (*lpi)->prob ==
NULL )
430 (*lpi)->rowspace = 1024;
437 (*lpi)->colspace = 1024;
456 assert(*lpi !=
NULL);
461 QSfree_prob((*lpi)->prob);
516 SCIPdebugMessage(
"loading LP in column format into QSopt: %d cols, %d rows\n", ncols, nrows);
524 rval = QSchange_objsense(lpi->
prob, QS_MAX);
529 rval = QSchange_objsense(lpi->
prob, QS_MIN);
540 rval = QSadd_ranged_rows(lpi->
prob, nrows, lpi->
ircnt, lpi->
irbeg, 0, 0, lpi->
irhs, lpi->
isen, lpi->
irng, (
const char**)rownames);
547 for( i = 0; i < ncols-1; ++i )
549 lpi->
iccnt[i] = beg[i+1] - beg[i];
550 assert(lpi->
iccnt[i] >= 0);
555 lpi->
iccnt[ncols-1] = nnonz - beg[ncols-1];
556 assert(lpi->
iccnt[ncols-1] >= 0);
585 assert( lpi !=
NULL );
590 assert(nnonz == 0 || beg !=
NULL);
591 assert(nnonz == 0 || ind !=
NULL);
592 assert(nnonz == 0 || val !=
NULL);
596 SCIPdebugMessage(
"adding %d columns with %d nonzeros to QSopt\n", ncols, nnonz);
613 for( i = 0; i <
ncols; ++i )
625 nrows = QSget_rowcount(lpi->
prob);
626 for (i = 0; i < nnonz; ++i)
627 assert( 0 <= ind[i] && ind[i] < nrows );
631 for( i = 0; i < ncols - 1; ++i )
633 lpi->
iccnt[i] = beg[i+1] - beg[i];
634 assert(lpi->
iccnt[i] >= 0);
637 lpi->
iccnt[ncols-1] = nnonz - beg[ncols-1];
638 assert(lpi->
iccnt[ncols-1] >= 0);
669 len = lastcol - firstcol +1;
671 assert(0 <= firstcol && len > 0 && lastcol < QSget_colcount(lpi->
prob));
676 for( i = firstcol ; i <= lastcol ; i++ )
677 lpi->
iccnt[i-firstcol] = i;
679 rval = QSdelete_cols(lpi->
prob, len, lpi->
iccnt);
700 ncols = QSget_colcount(lpi->
prob);
705 rval = QSdelete_setcols(lpi->
prob,dstat);
708 for( i=0, ccnt=0; i <
ncols; i++ )
735 assert( lpi !=
NULL );
737 assert( nrows >= 0 );
741 SCIPdebugMessage(
"adding %d rows with %d nonzeros to QSopt\n", nrows, nnonz);
764 ncols = QSget_colcount(lpi->
prob);
765 for (i = 0; i < nnonz; ++i)
766 assert( 0 <= ind[i] && ind[i] < ncols );
770 for( i = 0 ; i < nrows -1 ; i++ )
772 lpi->
ircnt[i] = beg[i+1] - beg[i];
773 assert(lpi->
ircnt[i] >= 0);
777 lpi->
ircnt[nrows-1] = nnonz - beg[nrows-1];
778 assert(lpi->
ircnt[nrows-1] >= 0);
782 rval = QSadd_ranged_rows(lpi->
prob, nrows, lpi->
ircnt, (
int*) beg, (
int*) ind, (
SCIP_Real*) val, lpi->
irhs,
783 lpi->
isen, lpi->
irng, (
const char**)rownames);
784 QS_ERROR(rval,
"failed adding %d rows with %d non-zeros", nrows, nnonz);
788 for( i = 0; i < nrows -1; ++i )
796 lpi->
isen, lpi->
irng, (
const char**)rownames);
797 QS_ERROR(rval,
"failed adding %d rows with %d non-zeros", nrows, nnonz);
823 assert(colnames !=
NULL || namestoragesize == 0);
824 assert(namestorage !=
NULL || namestoragesize == 0);
825 assert(namestoragesize >= 0);
826 assert(storageleft !=
NULL);
827 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount(lpi->
prob));
831 ncols = QSget_colcount(lpi->
prob);
834 rval = QSget_colnames(lpi->
prob, cnames);
835 QS_ERROR(rval,
"failed getting column names");
839 sizeleft = namestoragesize;
840 for( j = firstcol; j <= lastcol; ++j )
847 if( colnames !=
NULL )
848 colnames[j-firstcol] = s;
857 *storageleft = sizeleft;
860 for( j = 0; j <
ncols; ++j )
886 assert(rownames !=
NULL || namestoragesize == 0);
887 assert(namestorage !=
NULL || namestoragesize == 0);
888 assert(namestoragesize >= 0);
889 assert(storageleft !=
NULL);
890 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount(lpi->
prob));
894 nrows = QSget_rowcount(lpi->
prob);
897 rval = QSget_rownames(lpi->
prob, rnames);
898 QS_ERROR(rval,
"failed getting row names");
901 sizeleft = namestoragesize;
902 for( i = firstrow; i <= lastrow; ++i )
909 if( rownames !=
NULL )
910 rownames[i-firstrow] = s;
919 *storageleft = sizeleft;
922 for( i = 0; i <
nrows; ++i )
935 const int len = lastrow - firstrow +1;
943 assert(0 <= firstrow && len > 0 && lastrow < QSget_rowcount (lpi->
prob));
948 for( i = firstrow; i <= lastrow; i++ )
949 lpi->
ircnt[i-firstrow] = i;
950 rval = QSdelete_rows(lpi->
prob, len, lpi->
ircnt);
973 nrows = QSget_rowcount(lpi->
prob);
976 for( i = 0; i <
nrows; ++i )
984 rval = QSdelete_setrows(lpi->
prob,dstat);
987 for( i=0, ccnt=0; i <
nrows; i++ )
1007 assert(lpi !=
NULL);
1013 ncols = QSget_colcount(lpi->
prob);
1014 nrows = QSget_rowcount(lpi->
prob);
1018 for( i = 0; i <
ncols; ++i )
1020 rval = QSdelete_cols(lpi->
prob, ncols, lpi->
iccnt);
1027 for( i = 0; i <
nrows; ++i )
1029 rval = QSdelete_rows(lpi->
prob, nrows, lpi->
ircnt);
1048 assert(lpi !=
NULL);
1050 assert(ncols == 0 || (ind !=
NULL && lb !=
NULL && ub !=
NULL));
1056 for (i = 0; i <
ncols; ++i)
1062 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[i]);
1067 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[i]);
1073 for( i = 0; i <
ncols; ++i )
1074 lpi->
iccha[i] =
'L';
1079 for( i = 0; i <
ncols; ++i )
1080 lpi->
iccha[i] =
'U';
1099 assert(lpi !=
NULL);
1111 for( i = 0; i <
nrows; ++i )
1113 rval = QSchange_sense(lpi->
prob, ind[i], lpi->
isen[i]);
1116 rval = QSchange_rhscoef(lpi->
prob, ind[i], lpi->
irhs[i]);
1119 if( lpi->
isen[i] ==
'R' )
1121 rval = QSchange_range(lpi->
prob, ind[i], lpi->
irng[i]);
1139 assert(lpi !=
NULL);
1144 SCIPdebugMessage(
"changing coefficient row %d, column %d in QSopt to %g\n", row, col, newval);
1146 rval = QSchange_coef(lpi->
prob, row, col, newval);
1159 assert(lpi !=
NULL);
1168 rval = QSchange_objsense(lpi->
prob, QS_MAX);
1173 rval = QSchange_objsense(lpi->
prob, QS_MIN);
1190 assert(lpi !=
NULL);
1196 for( i = 0; i <
ncols; ++i )
1198 rval = QSchange_objcoef(lpi->
prob, ind[i], obj[i]);
1218 assert(lpi !=
NULL);
1222 SCIPdebugMessage(
"scaling row %d with factor %g in QSopt\n", row, scaleval);
1226 rval = QSget_ranged_rows_list(lpi->
prob, 1, rowlist, &rowcnt, &rowbeg, &rowind, &rowval, &rhs, &sense, &range, 0);
1230 for( i = 0; i < rowcnt[0]; ++i )
1232 rval = QSchange_coef(lpi->
prob, row, rowind[i], rowval[i] * scaleval);
1239 rval = QSchange_rhscoef(lpi->
prob, row, rhs[0] * scaleval);
1241 if( sense[0] ==
'R' )
1243 rval = QSchange_range(lpi->
prob, row, range[0] * scaleval);
1253 rval = QSchange_rhscoef(lpi->
prob, row, rhs[0]*scaleval);
1257 rval = QSchange_rhscoef(lpi->
prob, row, rhs[0]*scaleval);
1259 rval = QSchange_sense(lpi->
prob, row,
'G');
1263 rval = QSchange_rhscoef(lpi->
prob, row, rhs[0]*scaleval);
1265 rval = QSchange_sense(lpi->
prob, row,
'L');
1269 rhs[0] = (rhs[0] + range[0]) * scaleval;
1270 range[0] = fabs(scaleval) * range[0];
1271 rval = QSchange_rhscoef(lpi->
prob, row, rhs[0]);
1273 rval = QSchange_range(lpi->
prob, row, range[0]);
1286 if( rowcnt !=
NULL )
1288 if( rowbeg !=
NULL )
1290 if( rowind !=
NULL )
1292 if( rowval !=
NULL )
1324 assert(lpi !=
NULL);
1328 SCIPdebugMessage(
"scaling column %d with factor %g in QSopt\n", col, scaleval);
1332 rval = QSget_columns_list(lpi->
prob, 1, collist, &colcnt, &colbeg, &colind, &colval, &obj, &lb, &ub, 0);
1336 for( i = 0; i < colcnt[0]; ++i )
1338 rval = QSchange_coef(lpi->
prob, colind[i], col, colval[i]*scaleval);
1343 rval = QSchange_objcoef(lpi->
prob, col, obj[0]*scaleval);
1349 scaleval = -scaleval;
1354 if( lb[0] > -QS_MAXDOUBLE )
1356 if( ub[0] < QS_MAXDOUBLE )
1359 if( lb[0] < -QS_MAXDOUBLE )
1360 lb[0] = -QS_MAXDOUBLE;
1361 if( ub[0] > QS_MAXDOUBLE )
1362 ub[0] = QS_MAXDOUBLE;
1364 rval = QSchange_bound(lpi->
prob, col,
'L', lb[0]);
1366 rval = QSchange_bound(lpi->
prob, col,
'U', ub[0]);
1371 if( colcnt !=
NULL )
1373 if( colbeg !=
NULL )
1375 if( colind !=
NULL )
1377 if( colval !=
NULL )
1406 assert(lpi !=
NULL);
1408 assert(nrows !=
NULL);
1412 *nrows = QSget_rowcount(lpi->
prob);
1423 assert(lpi !=
NULL);
1425 assert(ncols !=
NULL);
1429 *ncols = QSget_colcount(lpi->
prob);
1440 assert(lpi !=
NULL);
1445 *nnonz = QSget_nzcount(lpi->
prob);
1468 double* lval =
NULL;
1476 assert(lpi !=
NULL);
1478 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount(lpi->
prob));
1485 len = lastcol - firstcol + 1;
1488 for( i = 0; i < len; ++i )
1489 lpi->
iccnt[i] = i + firstcol;
1492 rval = QSget_columns_list(lpi->
prob, len, lpi->
iccnt, nnonz ? (&lcnt) : 0, nnonz ? (&lbeg) : 0, nnonz ? (&lind) : 0,
1493 nnonz ? (&lval) : 0, 0, lb ? (&llb) : 0, lb ? (&lub) : 0, 0);
1500 assert( beg !=
NULL && lbeg !=
NULL );
1501 assert( ind !=
NULL && lind !=
NULL );
1502 assert( val !=
NULL && lval !=
NULL );
1503 assert( lcnt !=
NULL );
1505 *nnonz = lbeg[len-1] + lcnt[len-1];
1506 for( i = 0 ; i < len ; i++ )
1508 for( i = 0; i < *nnonz; ++i )
1516 assert( llb !=
NULL );
1517 assert( lub !=
NULL );
1518 assert( ub !=
NULL );
1520 for( i = 0; i < len; ++i )
1560 const int len = lastrow - firstrow + 1;
1562 double* lval =
NULL;
1563 double* lrhs =
NULL;
1564 double* lrng =
NULL;
1569 char* lsense =
NULL;
1571 assert(lpi !=
NULL);
1573 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount (lpi->
prob));
1581 for( i = 0; i < len; ++i )
1582 lpi->
ircnt[i] = i + firstrow;
1585 rval = QSget_ranged_rows_list(lpi->
prob, len, lpi->
ircnt, nnonz ? (&lcnt) : 0, nnonz ? (&lbeg) : 0, nnonz ? (&lind) : 0,
1586 nnonz ? (&lval) : 0, rhs ? (&lrhs) : 0, rhs ? (&lsense) : 0, rhs ? (&lrng) : 0, 0);
1592 assert( beg !=
NULL && lbeg !=
NULL );
1593 assert( ind !=
NULL && lind !=
NULL );
1594 assert( val !=
NULL && lval !=
NULL );
1595 assert( lcnt !=
NULL );
1597 *nnonz = lbeg[len-1] + lcnt[len-1];
1598 for( i = 0 ; i < len; i++ )
1600 for( i = 0; i < *nnonz; ++i )
1608 assert( lhs !=
NULL && lrhs !=
NULL );
1609 assert( lrng !=
NULL );
1610 assert( lsense !=
NULL );
1612 for( i = 0; i < len; ++i )
1618 rhs[i] = lrhs[i] + lrng[i];
1621 lhs[i] = rhs[i] = lrhs[i];
1625 lhs[i] = -QS_MAXDOUBLE;
1629 rhs[i] = QS_MAXDOUBLE;
1640 if( lsense !=
NULL )
1680 assert(lpi !=
NULL);
1682 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount (lpi->
prob));
1684 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
1687 len = lastcol - firstcol + 1;
1689 for( i = 0; i < len; ++i )
1690 lpi->
iccnt[i] = i + firstcol;
1693 rval = QSget_obj_list(lpi->
prob, len, lpi->
iccnt, vals);
1707 const int len = lastcol - firstcol + 1;
1711 assert(lpi !=
NULL);
1713 assert(0 <= firstcol && firstcol <= lastcol&& lastcol < QSget_colcount (lpi->
prob));
1719 for( i = 0; i < len; ++i )
1720 lpi->
iccnt[i] = i + firstcol;
1723 rval = QSget_bounds_list(lpi->
prob, len, lpi->
iccnt, lbs, ubs);
1737 const int len = lastrow - firstrow + 1;
1739 double* lrhs=0, *lrng=0;
1743 assert(lpi !=
NULL);
1745 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount (lpi->
prob));
1746 assert(rhss !=
NULL);
1747 assert(lhss !=
NULL);
1753 for( i = 0; i < len; ++i )
1754 lpi->
ircnt[i] = i + firstrow;
1757 rval = QSget_ranged_rows_list(lpi->
prob, len, lpi->
ircnt, 0, 0, 0, 0, &lrhs, &lsense, &lrng, 0);
1761 for( i = 0; i < len; ++i )
1767 rhss[i] = lrhs[i] + lrng[i];
1770 lhss[i] = rhss[i] = lrhs[i];
1774 lhss[i] = -QS_MAXDOUBLE;
1778 rhss[i] = QS_MAXDOUBLE;
1788 if( lsense !=
NULL )
1808 assert(lpi !=
NULL);
1813 rval = QSget_coef(lpi->
prob, row, col, val);
1837 assert(lpi !=
NULL);
1840 SCIPdebugMessage(
"calling QSopt primal simplex: %d cols, %d rows, %d nz\n", QSget_colcount(lpi->
prob),
1841 QSget_rowcount(lpi->
prob), QSget_nzcount(lpi->
prob));
1855 assert(lpi !=
NULL);
1858 SCIPdebugMessage(
"calling QSopt dual simplex: %d cols, %d rows, %d nz\n", QSget_colcount(lpi->
prob),
1859 QSget_rowcount(lpi->
prob), QSget_nzcount(lpi->
prob));
1911 assert(lpi !=
NULL);
1913 assert(down !=
NULL);
1915 assert(downvalid !=
NULL);
1916 assert(upvalid !=
NULL);
1918 SCIPdebugMessage(
"calling QSopt strong branching on variable %d with fractional value (%d it lim)\n", col, itlim);
1927 rval = QSopt_strongbranch(lpi->
prob, 1, &col, &psol, down, up, itlim, QS_MAXDOUBLE);
1930 rval = QSget_itcnt(lpi->
prob, 0, 0, 0, 0, &nit);
1934 *iter = nit - lpi->
previt;
1960 assert(lpi !=
NULL);
1962 assert(cols !=
NULL);
1963 assert(psols !=
NULL);
1964 assert(down !=
NULL);
1966 assert(downvalid !=
NULL);
1967 assert(upvalid !=
NULL);
1969 SCIPdebugMessage(
"calling QSopt strong branching on %d variables with fractional value (%d it lim)\n", ncols, itlim);
1972 for( j = 0; j <
ncols; ++j )
1974 downvalid[j] =
TRUE;
1980 rval = QSopt_strongbranch(lpi->
prob, ncols, cols, psols, down, up, itlim, QS_MAXDOUBLE);
1983 rval = QSget_itcnt(lpi->
prob, 0, 0, 0, 0, &nit);
1987 *iter = nit - lpi->
previt;
2011 assert(lpi !=
NULL);
2013 assert(down !=
NULL);
2015 assert(downvalid !=
NULL);
2016 assert(upvalid !=
NULL);
2018 SCIPdebugMessage(
"calling QSopt strong branching on variable %d with integral value (%d it lim)\n", col, itlim);
2025 rval = QSget_objval(lpi->
prob, &objval);
2059 assert(lpi !=
NULL);
2061 assert(down !=
NULL);
2063 assert(downvalid !=
NULL);
2064 assert(upvalid !=
NULL);
2066 SCIPdebugMessage(
"calling QSopt strong branching on %d variables with integral value (%d it lim)\n", ncols, itlim);
2071 rval = QSget_objval(lpi->
prob, &objval);
2074 for( j = 0; j <
ncols; ++j )
2079 downvalid[j] =
TRUE;
2120 assert(lpi !=
NULL);
2127 if( lpi->
solstat == QS_LP_OPTIMAL || lpi->
solstat == QS_LP_UNBOUNDED )
2128 *primalfeasible = 1;
2130 if( lpi->
solstat == QS_LP_OPTIMAL || lpi->
solstat == QS_LP_INFEASIBLE || lpi->
solstat == QS_LP_OBJ_LIMIT )
2143 assert(lpi !=
NULL);
2150 return (lpi->
solstat == QS_LP_UNBOUNDED);
2160 assert(lpi !=
NULL);
2174 assert(lpi !=
NULL);
2181 return (lpi->
solstat == QS_LP_UNBOUNDED);
2189 assert(lpi !=
NULL);
2196 return (lpi->
solstat == QS_LP_INFEASIBLE);
2204 assert(lpi !=
NULL);
2211 return (lpi->
solstat == QS_LP_OPTIMAL || lpi->
solstat == QS_LP_UNBOUNDED);
2221 assert(lpi !=
NULL);
2228 return (lpi->
solstat == QS_LP_INFEASIBLE);
2238 assert(lpi !=
NULL);
2245 return (lpi->
solstat == QS_LP_INFEASIBLE);
2253 assert(lpi !=
NULL);
2260 return (lpi->
solstat == QS_LP_INFEASIBLE);
2268 assert(lpi !=
NULL);
2275 return (lpi->
solstat == QS_LP_UNBOUNDED);
2283 assert(lpi !=
NULL);
2290 return (lpi->
solstat == QS_LP_OPTIMAL || lpi->
solstat == QS_LP_OBJ_LIMIT);
2298 assert(lpi !=
NULL);
2305 return (lpi->
solstat == QS_LP_OPTIMAL);
2313 assert(lpi !=
NULL);
2320 return (lpi->
solstat != QS_LP_NUMERR);
2328 assert(lpi !=
NULL);
2335 return (lpi->
solstat == QS_LP_OBJ_LIMIT);
2343 assert(lpi !=
NULL);
2350 return (lpi->
solstat == QS_LP_ITER_LIMIT);
2358 assert(lpi !=
NULL);
2365 return (lpi->
solstat == QS_LP_TIME_LIMIT);
2373 assert(lpi !=
NULL);
2389 assert(lpi !=
NULL);
2408 assert(lpi !=
NULL);
2413 rval = QSget_objval(lpi->
prob, objval);
2433 int stat,
ncols, sense;
2434 char *icstat, *irstat;
2437 assert(lpi !=
NULL);
2442 nrows = QSget_rowcount(lpi->
prob);
2445 rval = QSget_solution(lpi->
prob, objval, primsol, dualsol, lpi->
irng, redcost);
2450 QSget_status(lpi->
prob, &stat);
2451 rval = QSget_objsense(lpi->
prob, &sense);
2452 if( stat == QS_LP_OPTIMAL )
2454 ncols = QSget_colcount(lpi->
prob);
2461 rval = QSget_basis_array(lpi->
prob,icstat, irstat);
2464 for( i = ncols ; i-- ; )
2468 case QS_COL_BSTAT_BASIC:
2469 case QS_COL_BSTAT_FREE:
2470 if( fabs(redcost[i])>
FEASTOL )
2472 SCIPerrorMessage(
"stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense);
2477 case QS_COL_BSTAT_UPPER:
2478 if( redcost[i]*sense >
FEASTOL )
2480 SCIPerrorMessage(
"stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense);
2485 case QS_COL_BSTAT_LOWER:
2486 if( redcost[i]*sense < -
FEASTOL )
2488 SCIPerrorMessage(
"stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense);
2494 SCIPerrorMessage(
"unknown stat col[%d] = %c, rd[%d] = %lg\n", i, icstat[i], i, redcost[i]*sense);
2507 rval = QSget_rhs(lpi->
prob, lpi->
irhs);
2509 rval = QSget_senses(lpi->
prob, lpi->
isen);
2515 for( i = 0; i <
nrows; ++i )
2517 switch( lpi->
isen[i] )
2522 activity[i] = lpi->
irhs[i] + lpi->
irng[i];
2525 activity[i] = lpi->
irhs[i] - lpi->
irng[i];
2544 assert(lpi !=
NULL);
2560 assert(lpi !=
NULL);
2562 assert(dualfarkas !=
NULL);
2564 SCIPdebugMessage(
"calling QSopt dual Farkas: %d cols, %d rows, %d non zeros\n", QSget_colcount (lpi->
prob),
2565 QSget_rowcount(lpi->
prob), QSget_nzcount(lpi->
prob));
2567 rval = QSget_infeas_array(lpi->
prob, dualfarkas);
2581 assert(lpi !=
NULL);
2584 rval = QSget_itcnt(lpi->
prob, 0, 0, 0, 0, &nit);
2587 *iterations = nit - lpi->
previt;
2604 assert(lpi !=
NULL);
2605 assert(quality !=
NULL);
2638 assert(lpi !=
NULL);
2641 SCIPdebugMessage(
"saving QSopt basis into %p/%p\n", (
void*)cstat, (
void*)rstat);
2643 ncols = QSget_colcount(lpi->
prob);
2644 nrows = QSget_rowcount(lpi->
prob);
2650 rval = QSget_senses(lpi->
prob, lpi->
isen);
2656 rval = QSget_basis_array(lpi->
prob, icstat, irstat);
2665 for( i = 0; i <
nrows; ++i )
2669 case QS_ROW_BSTAT_LOWER:
2670 if ( lpi->
isen[i] ==
'L' )
2675 case QS_ROW_BSTAT_BASIC:
2678 case QS_ROW_BSTAT_UPPER:
2687 for( i = 0; i <
ncols; ++i )
2691 case QS_COL_BSTAT_LOWER:
2694 case QS_COL_BSTAT_BASIC:
2697 case QS_COL_BSTAT_UPPER:
2700 case QS_COL_BSTAT_FREE:
2726 assert(lpi !=
NULL);
2729 SCIPdebugMessage(
"loading basis %p/%p into QSopt\n", (
void*)cstat, (
void*)rstat);
2731 ncols = QSget_colcount(lpi->
prob);
2732 nrows = QSget_rowcount(lpi->
prob);
2738 rval = QSget_senses(lpi->
prob, lpi->
isen);
2745 for( i = 0; i <
nrows; ++i )
2750 irstat[i] = QS_ROW_BSTAT_LOWER;
2753 irstat[i] = QS_ROW_BSTAT_BASIC;
2756 if ( lpi->
isen[i] ==
'L' )
2757 irstat[i] = QS_ROW_BSTAT_LOWER;
2759 irstat[i] = QS_ROW_BSTAT_UPPER;
2767 for( i = 0; i <
ncols; ++i )
2772 icstat[i] = QS_COL_BSTAT_LOWER;
2775 icstat[i] = QS_COL_BSTAT_BASIC;
2778 icstat[i] = QS_COL_BSTAT_UPPER;
2781 icstat[i] = QS_COL_BSTAT_FREE;
2791 rval = QSload_basis_array(lpi->
prob, icstat, irstat);
2811 nrows = QSget_rowcount(lpi->
prob);
2812 ncols = QSget_colcount(lpi->
prob);
2815 if ( stat == QS_LP_UNSOLVED || stat == QS_LP_MODIFIED || stat == QS_LP_NUMERR )
2823 for( i = 0; i <
nrows; ++i )
2825 if( bind[i] >= ncols )
2826 bind[i] = -(bind[i] -
ncols) - 1;
2856 nrows = QSget_rowcount(lpi->
prob);
2857 assert( 0 <= r && r < nrows );
2859 SCIPdebugMessage(
"getting binv-row %d from Qsopt %d cols, %d rows, %d nonz\n", r, QSget_colcount(lpi->
prob),
2860 QSget_rowcount(lpi->
prob), QSget_nzcount(lpi->
prob));
2863 if ( ninds !=
NULL )
2866 rval = QSget_binv_row(lpi->
prob, r, coef);
2868 for (i = 0; i <
nrows; i++)
2927 assert(lpi !=
NULL);
2933 if ( ninds !=
NULL )
2936 ncols = QSget_colcount(lpi->
prob);
2937 nrows = QSget_rowcount(lpi->
prob);
2941 rval = QSget_tableau_row(lpi->
prob, r, lpi->
itab);
2945 memcpy(coef, lpi->
itab,
sizeof(
double)*ncols);
2947 for (i = 0; i <
ncols; ++i)
3000 assert(lpi !=
NULL);
3002 assert(blkmem !=
NULL);
3003 assert(lpistate !=
NULL);
3005 ncols = QSget_colcount(lpi->
prob);
3006 nrows = QSget_rowcount(lpi->
prob);
3013 SCIPdebugMessage(
"storing QSopt LPI state in %p (%d cols, %d rows)\n", (
void*)*lpistate, ncols, nrows);
3021 (*lpistate)->ncols =
ncols;
3022 (*lpistate)->nrows =
nrows;
3044 assert(lpi !=
NULL);
3048 if( lpistate ==
NULL )
3052 ncols = QSget_colcount(lpi->
prob);
3053 nrows = QSget_rowcount(lpi->
prob);
3057 assert(lpistate->
ncols <= ncols);
3058 assert(lpistate->
nrows <= nrows);
3060 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into QSopt LP with %d cols and %d rows\n", (
void*)lpistate, lpistate->
ncols,
3061 lpistate->nrows, ncols, nrows);
3063 if( lpistate->ncols == 0 || lpistate->nrows == 0 )
3075 rval = QSget_senses(lpi->
prob, lpi->
isen);
3082 for( i = lpistate->ncols; i < ncols; ++i )
3088 rval = QSget_bounds_list(lpi->
prob, 1, &i, &lb, &ub);
3101 for( i = lpistate->nrows; i < nrows; ++i )
3105 for( i = 0; i <
nrows; ++i )
3107 switch( lpi->
ircnt[i] )
3110 irstat[i] = QS_ROW_BSTAT_LOWER;
3113 irstat[i] = QS_ROW_BSTAT_BASIC;
3116 if ( lpi->
isen[i] ==
'L' )
3117 irstat[i] = QS_ROW_BSTAT_LOWER;
3119 irstat[i] = QS_ROW_BSTAT_UPPER;
3128 for( i = 0; i <
ncols; ++i )
3130 switch( lpi->
iccnt[i] )
3133 icstat[i] = QS_COL_BSTAT_LOWER;
3136 icstat[i] = QS_COL_BSTAT_BASIC;
3139 icstat[i] = QS_COL_BSTAT_UPPER;
3142 icstat[i] = QS_COL_BSTAT_FREE;
3152 rval = QSload_basis_array(lpi->
prob, icstat, irstat);
3167 assert( lpi !=
NULL );
3172 ncols = QSget_colcount(lpi->
prob);
3173 nrows = QSget_rowcount(lpi->
prob);
3175 if ( ncols == 0 || nrows == 0 )
3181 for (i = 0; i <
ncols; ++i)
3183 for (i = 0; i <
nrows; ++i)
3201 assert(lpi !=
NULL);
3202 assert(lpistate !=
NULL);
3204 if( *lpistate !=
NULL )
3216 return (lpistate !=
NULL);
3227 assert(lpi !=
NULL);
3232 rval = QSread_and_load_basis(lpi->
prob, fname);
3251 assert(lpi !=
NULL);
3256 bas = QSget_basis(lpi->
prob);
3257 QS_ERROR(bas == 0,
"Could not get basis from problem.");
3260 rval = QSwrite_basis(lpi->
prob, bas, fname);
3296 assert( lpi !=
NULL );
3298 assert( lpinorms !=
NULL );
3300 ncols = QSget_colcount(lpi->
prob);
3301 nrows = QSget_rowcount(lpi->
prob);
3305 (*lpinorms)->ncols =
ncols;
3306 (*lpinorms)->nrows =
nrows;
3308 if ( QStest_row_norms(lpi->
prob) )
3314 rval = QSget_basis_and_row_norms_array(lpi->
prob, (*lpinorms)->cstat, (*lpinorms)->rstat, (*lpinorms)->norms);
3319 (*lpinorms)->cstat =
NULL;
3320 (*lpinorms)->rstat =
NULL;
3321 (*lpinorms)->norms =
NULL;
3340 assert( lpi !=
NULL );
3342 assert( lpinorms !=
NULL );
3347 ncols = QSget_colcount(lpi->
prob);
3348 nrows = QSget_rowcount(lpi->
prob);
3349 if ( nrows != lpinorms->
nrows || ncols != lpinorms->
ncols )
3354 rval = QSload_basis_and_row_norms_array(lpi->
prob, lpinorms->
cstat, lpinorms->
rstat, lpinorms->
norms);
3366 assert( lpinorms !=
NULL );
3368 if ( (*lpinorms)->norms !=
NULL )
3370 assert( (*lpinorms)->cstat !=
NULL && (*lpinorms)->rstat !=
NULL );
3401 assert(lpi !=
NULL);
3403 assert(ival !=
NULL);
3414 rval = QSget_param(lpi->
prob, QS_PARAM_SIMPLEX_SCALING, ival);
3415 assert((*ival) == 0 || (*ival) == 1);
3422 rval = QSget_param(lpi->
prob, QS_PARAM_SIMPLEX_DISPLAY, ival);
3429 rval = QSget_param(lpi->
prob, QS_PARAM_SIMPLEX_MAX_ITERATIONS, ival);
3447 assert(lpi !=
NULL);
3456 rval = QSset_param(lpi->
prob, QS_PARAM_SIMPLEX_SCALING, 0);
3458 rval = QSset_param(lpi->
prob, QS_PARAM_SIMPLEX_SCALING, 1);
3469 rval = QSset_param(lpi->
prob, QS_PARAM_PRIMAL_PRICING, QS_PRICE_PSTEEP);
3470 rval += QSset_param(lpi->
prob, QS_PARAM_DUAL_PRICING, QS_PRICE_DSTEEP);
3473 rval = QSset_param(lpi->
prob,QS_PARAM_PRIMAL_PRICING,QS_PRICE_PMULTPARTIAL);
3474 rval += QSset_param(lpi->
prob,QS_PARAM_DUAL_PRICING,QS_PRICE_DMULTPARTIAL);
3477 rval = QSset_param(lpi->
prob,QS_PARAM_PRIMAL_PRICING,QS_PRICE_PDEVEX);
3478 rval += QSset_param(lpi->
prob,QS_PARAM_DUAL_PRICING,QS_PRICE_DDEVEX);
3486 rval = QSset_param(lpi->
prob, QS_PARAM_SIMPLEX_DISPLAY, 1);
3488 rval = QSset_param(lpi->
prob, QS_PARAM_SIMPLEX_DISPLAY, 0);
3491 rval = QSset_param(lpi->
prob, QS_PARAM_SIMPLEX_MAX_ITERATIONS, ival);
3509 assert(lpi !=
NULL);
3511 assert(dval !=
NULL);
3518 rval = QSget_param_double(lpi->
prob, QS_PARAM_OBJLLIM, dval);
3521 rval = QSget_param_double(lpi->
prob, QS_PARAM_OBJULIM, dval);
3524 rval = QSget_param_double(lpi->
prob, QS_PARAM_SIMPLEX_MAX_TIME, dval);
3546 assert(lpi !=
NULL);
3554 rval = QSset_param_double(lpi->
prob, QS_PARAM_SIMPLEX_MAX_TIME, dval);
3557 rval = QSset_param_double(lpi->
prob, QS_PARAM_OBJLLIM, dval);
3560 rval = QSset_param_double(lpi->
prob, QS_PARAM_OBJULIM, dval);
3590 return QS_MAXDOUBLE;
3599 return (val >= QS_MAXDOUBLE);
3620 assert(lpi !=
NULL);
3626 QSfree_prob(lpi->
prob);
3631 lpi->
prob = QSread_prob(fname,
"LP");
3632 if( lpi->
prob == 0 )
3644 assert(lpi !=
NULL);
3649 if( QSwrite_prob (lpi->
prob, fname,
"LP") )
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static SCIP_RETCODE ensureColMem(SCIP_LPI *const lpi, int ncols)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
static SCIP_RETCODE convertSides(SCIP_LPI *const lpi, int nrows, const double *const lhs, const double *const rhs)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
static SCIP_RETCODE ensureTabMem(SCIP_LPI *const lpi, int sz)
enum SCIP_ObjSen SCIP_OBJSEN
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_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
interface methods for specific LP solvers
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
enum SCIP_Retcode SCIP_RETCODE
SCIP_DUALPACKET COLPACKET
enum SCIP_LPParam SCIP_LPPARAM
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
#define BMSallocMemoryArray(ptr, num)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
#define BMSfreeMemory(ptr)
#define QS_TESTG(A, B, C)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
SCIP_DUALPACKET COLPACKET
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 SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
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 SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
packing single and dual bit values
#define BMSfreeMemoryArray(ptr)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_DUALPACKET ROWPACKET
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
static SCIP_RETCODE ensureRowMem(SCIP_LPI *const lpi, int nrows)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
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)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
static int rowpacketNum(int nrows)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
#define BMSfreeBlockMemory(mem, ptr)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
unsigned int SCIP_DUALPACKET
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 SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
public data structures and miscellaneous methods
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
#define BMSallocBlockMemoryArray(mem, ptr, num)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
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 SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
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_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
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 SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
const char * SCIPlpiGetSolverDesc(void)
public methods for message output
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
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)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_MESSAGEHDLR * messagehdlr
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
#define BMSallocBlockMemory(mem, ptr)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
struct BMS_BlkMem BMS_BLKMEM
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_DUALPACKET ROWPACKET
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
const char * SCIPlpiGetSolverName(void)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
static int colpacketNum(int ncols)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)