|
Go to the documentation of this file. 25 #include "scip/bitencode.h" 32 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE 34 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE 59 static char __qsstr[1024]; 68 #define __QS_PRINTLOC__ fprintf(stderr,", in (%s:%d)\n", __FILE__, __LINE__); 72 #define QS_TESTG(A,B,...) do{{ \ 74 fprintf(stderr,__VA_ARGS__); \ 79 #define QS_ERROR(A,...) do{{ \ 81 fprintf(stderr,__VA_ARGS__); \ 83 return SCIP_LPERROR;}}}while(0) 87 #define QS_RETURN(A) do{ \ 88 const int __RVAL__ = (A); \ 90 fprintf(stderr,"LP Error: QSopt returned %d",__RVAL__); \ 93 return SCIP_OKAY;}while(0) 97 #define QS_CONDRET(A) do{ \ 98 const int __RVAL__ = (A); \ 100 fprintf(stderr,"LP Error: QSopt returned %d",__RVAL__); \ 102 return SCIP_LPERROR;} \ 147 assert(lpistate != NULL); 148 assert(lpistate->packcstat != NULL); 149 assert(lpistate->packrstat != NULL); 151 SCIPencodeDualBit(cstat, lpistate->packcstat, lpistate->ncols); 152 SCIPencodeDualBit(rstat, lpistate->packrstat, lpistate->nrows); 163 assert(lpistate != NULL); 164 assert(lpistate->packcstat != NULL); 165 assert(lpistate->packrstat != NULL); 167 SCIPdecodeDualBit(lpistate->packcstat, cstat, lpistate->ncols); 168 SCIPdecodeDualBit(lpistate->packrstat, rstat, lpistate->nrows); 180 assert(lpistate != NULL); 181 assert(blkmem != NULL); 185 SCIP_ALLOC( BMSallocBlockMemory(blkmem, lpistate) ); 186 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->packcstat, colpacketNum(ncols)) ); 187 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->packrstat, rowpacketNum(nrows)) ); 199 assert(blkmem != NULL); 200 assert(lpistate != NULL); 201 assert(*lpistate != NULL); 203 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->packcstat, colpacketNum((*lpistate)->ncols)); 204 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->packrstat, rowpacketNum((*lpistate)->nrows)); 205 BMSfreeBlockMemory(blkmem, lpistate); 224 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->itab), lpi->tbsz) ); 225 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->ibas), lpi->tbsz) ); 237 if( lpi->colspace < ncols ) 239 lpi->colspace = ncols*2; 240 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->iccnt), lpi->colspace) ); 241 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->iccha), lpi->colspace) ); 253 if( lpi->rowspace < nrows ) 255 lpi->rowspace = nrows*2; 256 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->isen), lpi->rowspace) ); 257 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->irhs), lpi->rowspace) ); 258 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->irng), lpi->rowspace) ); 259 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->ircnt), lpi->rowspace) ); 260 SCIP_ALLOC( BMSreallocMemoryArray(&(lpi->irbeg), lpi->rowspace) ); 270 const double* const lhs, 271 const double* const rhs 277 for( i = nrows ; i-- ; ) 279 state = ((lhs[i] <= -QS_MAXDOUBLE ? 1U:0U) | (rhs[i] >= QS_MAXDOUBLE ? 2U:0U)); 286 if( lhs[i] == rhs[i] ) 289 lpi->irhs[i] = lhs[i]; 295 lpi->irhs[i] = lhs[i]; 296 lpi->irng[i] = rhs[i] - lhs[i]; 297 assert(lpi->irng[i] >= 0.0); 302 lpi->irhs[i] = rhs[i]; 307 lpi->irhs[i] = lhs[i]; 334 char* vname = QSversion(); 336 vnamelen = strlen(vname); 337 memcpy(__qsstr, vname, MIN( sizeof(__qsstr), vnamelen+1)); 338 __qsstr[ sizeof(__qsstr)-1] = '\0'; 348 return "Linear Programming Solver developed by D. Applegate, W. Cook, S. Dash, and M. Mevenkamp (www.isye.gatech.edu/~wcook/qsopt)"; 356 return ( void*) lpi->prob; 382 assert( sizeof ( SCIP_Real) == sizeof ( double)); 383 assert( sizeof ( SCIP_Bool) == sizeof ( int)); 390 memset(*lpi, 0, sizeof( struct SCIP_LPi)); 392 (*lpi)->prob = QScreate_prob(name, ( int) objsen); 393 if ( (*lpi)->prob == NULL ) 399 (*lpi)->rowspace = 1024; 400 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->isen),1024) ); 401 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->irhs),1024) ); 402 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->irng),1024) ); 403 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->irbeg),1024) ); 404 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->ircnt),1024) ); 406 (*lpi)->colspace = 1024; 407 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->iccnt), 1024) ); 408 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->iccha), 1024) ); 411 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->itab), 1024) ); 412 SCIP_ALLOC( BMSallocMemoryArray(&((*lpi)->ibas), 1024) ); 414 (*lpi)->messagehdlr = messagehdlr; 425 assert(*lpi != NULL); 430 QSfree_prob((*lpi)->prob); 431 BMSfreeMemoryArray( &((*lpi)->isen) ); 432 BMSfreeMemoryArray( &((*lpi)->irhs) ); 433 BMSfreeMemoryArray( &((*lpi)->irng) ); 434 BMSfreeMemoryArray( &((*lpi)->ircnt) ); 435 BMSfreeMemoryArray( &((*lpi)->irbeg) ); 436 BMSfreeMemoryArray( &((*lpi)->iccnt) ); 437 BMSfreeMemoryArray( &((*lpi)->iccha) ); 438 BMSfreeMemoryArray( &((*lpi)->itab) ); 439 BMSfreeMemoryArray( &((*lpi)->ibas) ); 482 assert(lpi->prob != NULL); 485 SCIPdebugMessage( "loading LP in column format into QSopt: %d cols, %d rows\n", ncols, nrows); 493 rval = QSchange_objsense(lpi->prob, QS_MAX); 498 rval = QSchange_objsense(lpi->prob, QS_MIN); 506 SCIP_CALL( convertSides(lpi, nrows, lhs, rhs) ); 509 rval = QSadd_ranged_rows(lpi->prob, nrows, lpi->ircnt, lpi->irbeg, 0, 0, lpi->irhs, lpi->isen, lpi->irng, ( const char**)rownames); 516 for( i = 0; i < ncols-1; ++i ) 518 lpi->iccnt[i] = beg[i+1] - beg[i]; 519 assert(lpi->iccnt[i] >= 0); 523 lpi->iccnt[ncols-1] = nnonz - beg[ncols-1]; 524 assert(lpi->iccnt[ncols-1] >= 0); 528 rval = QSadd_cols(lpi->prob, ncols, lpi->iccnt, ( int*) beg, ( int*) ind, ( SCIP_Real*) val, ( SCIP_Real*) obj, 553 assert(lpi->prob != NULL); 555 SCIPdebugMessage( "adding %d columns with %d nonzeros to QSopt\n", ncols, nnonz); 563 for( i = 0; i < ncols - 1; ++i ) 565 lpi->iccnt[i] = beg[i+1] - beg[i]; 566 assert(lpi->iccnt[i] >= 0); 570 lpi->iccnt[ncols-1] = nnonz - beg[ncols-1]; 571 assert(lpi->iccnt[ncols-1] >= 0); 575 rval = QSadd_cols(lpi->prob, ncols, lpi->iccnt, ( int*) beg, ( int*) ind, ( SCIP_Real*) val, ( SCIP_Real*) obj, 588 const int len = lastcol - firstcol +1; 593 assert(lpi->prob != NULL); 596 assert(0 <= firstcol && len > 0 && lastcol < QSget_colcount(lpi->prob)); 601 for( i = firstcol ; i <= lastcol ; i++ ) 602 lpi->iccnt[i-firstcol] = i; 604 rval = QSdelete_cols(lpi->prob, len, lpi->iccnt); 617 int rval = 0, ncols, ccnt; 621 assert(lpi->prob != NULL); 623 ncols = QSget_colcount(lpi->prob); 628 rval = QSdelete_setcols(lpi->prob,dstat); 631 for( i=0, ccnt=0; i < ncols; i++ ) 659 assert(lpi->prob != NULL); 662 SCIPdebugMessage( "adding %d rows with %d nonzeros to QSopt\n", nrows, nnonz); 668 SCIP_CALL( convertSides(lpi, nrows, lhs, rhs) ); 677 for( i = 0 ; i < nrows -1 ; i++ ) 679 lpi->ircnt[i] = beg[i+1] - beg[i]; 680 assert(lpi->ircnt[i] >= 0); 684 lpi->ircnt[nrows-1] = nnonz - beg[nrows-1]; 685 assert(lpi->ircnt[nrows-1] >= 0); 689 rval = QSadd_ranged_rows(lpi->prob, nrows, lpi->ircnt, ( int*) beg, ( int*) ind, ( SCIP_Real*) val, lpi->irhs, 690 lpi->isen, lpi->irng, ( const char**)rownames); 691 QS_ERROR(rval, "failed adding %d rows with %d non-zeros", nrows, nnonz); 695 for( i = 0; i < nrows -1; ++i ) 702 rval = QSadd_ranged_rows(lpi->prob, nrows, lpi->ircnt, lpi->irbeg, ( int*) ind, ( SCIP_Real*) val, lpi->irhs, 703 lpi->isen, lpi->irng, ( const char**)rownames); 704 QS_ERROR(rval, "failed adding %d rows with %d non-zeros", nrows, nnonz); 729 assert(lpi->prob != NULL); 730 assert(colnames != NULL || namestoragesize == 0); 731 assert(namestorage != NULL || namestoragesize == 0); 732 assert(namestoragesize >= 0); 733 assert(storageleft != NULL); 734 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount(lpi->prob)); 738 ncols = QSget_colcount(lpi->prob); 739 SCIP_ALLOC( BMSallocMemoryArray(&cnames, ncols) ); 741 rval = QSget_colnames(lpi->prob, cnames); 742 QS_ERROR(rval, "failed getting column names"); 746 sizeleft = namestoragesize; 747 for( j = firstcol; j <= lastcol; ++j ) 751 if( colnames != NULL ) 752 colnames[j-firstcol] = s; 761 *storageleft = sizeleft; 764 for( j = 0; j < ncols; ++j ) 789 assert(lpi->prob != NULL); 790 assert(rownames != NULL || namestoragesize == 0); 791 assert(namestorage != NULL || namestoragesize == 0); 792 assert(namestoragesize >= 0); 793 assert(storageleft != NULL); 794 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount(lpi->prob)); 798 nrows = QSget_rowcount(lpi->prob); 799 SCIP_ALLOC( BMSallocMemoryArray(&rnames, nrows) ); 801 rval = QSget_rownames(lpi->prob, rnames); 802 QS_ERROR(rval, "failed getting row names"); 805 sizeleft = namestoragesize; 806 for( i = firstrow; i <= lastrow; ++i ) 810 if( rownames != NULL ) 811 rownames[i-firstrow] = s; 820 *storageleft = sizeleft; 823 for( i = 0; i < nrows; ++i ) 836 const int len = lastrow - firstrow +1; 841 assert(lpi->prob != NULL); 844 assert(0 <= firstrow && len > 0 && lastrow < QSget_rowcount (lpi->prob)); 849 for( i = firstrow; i <= lastrow; i++ ) 850 lpi->ircnt[i-firstrow] = i; 851 rval = QSdelete_rows(lpi->prob, len, lpi->ircnt); 865 int rval = 0, nrows, ccnt, ndel=0; 869 assert(lpi->prob != NULL); 871 nrows = QSget_rowcount(lpi->prob); 874 for( i = 0; i < nrows; ++i ) 882 rval = QSdelete_setrows(lpi->prob,dstat); 885 for( i=0, ccnt=0; i < nrows; i++ ) 901 int ncols, nrows, rval = 0; 904 assert(lpi->prob != NULL); 909 ncols = QSget_colcount(lpi->prob); 910 nrows = QSget_rowcount(lpi->prob); 914 for( i = 0; i < ncols; ++i ) 916 rval = QSdelete_cols(lpi->prob, ncols, lpi->iccnt); 923 for( i = 0; i < nrows; ++i ) 925 rval = QSdelete_rows(lpi->prob, nrows, lpi->ircnt); 945 assert(lpi->prob != NULL); 953 for( j = 0; j < ncols; ++j ) 959 for( i = 0; i < ncols; ++i ) 962 rval = QSchange_bounds(lpi->prob, ncols, ( int*) ind, lpi->iccha, ( SCIP_Real*) lb); 965 for( i = 0; i < ncols; ++i ) 968 rval = QSchange_bounds(lpi->prob, ncols, ( int*) ind, lpi->iccha, ( SCIP_Real*) ub); 986 assert(lpi->prob != NULL); 994 SCIP_CALL( convertSides(lpi, nrows, lhs, rhs) ); 997 for( i = 0; i < nrows; ++i ) 999 rval = QSchange_sense(lpi->prob, ind[i], lpi->isen[i]); 1002 rval = QSchange_rhscoef(lpi->prob, ind[i], lpi->irhs[i]); 1005 if( lpi->isen[i] == 'R' ) 1007 rval = QSchange_range(lpi->prob, ind[i], lpi->irng[i]); 1025 assert(lpi != NULL); 1026 assert(lpi->prob != NULL); 1030 SCIPdebugMessage( "changing coefficient row %d, column %d in QSopt to %g\n", row, col, newval); 1032 rval = QSchange_coef(lpi->prob, row, col, newval); 1045 assert(lpi != NULL); 1046 assert(lpi->prob != NULL); 1054 rval = QSchange_objsense(lpi->prob, QS_MAX); 1059 rval = QSchange_objsense(lpi->prob, QS_MIN); 1076 assert(lpi != NULL); 1077 assert(lpi->prob != NULL); 1082 for( i = 0; i < ncols; ++i ) 1084 rval = QSchange_objcoef(lpi->prob, ind[i], obj[i]); 1104 assert(lpi != NULL); 1105 assert(lpi->prob != NULL); 1108 SCIPdebugMessage( "scaling row %d with factor %g in QSopt\n", row, scaleval); 1112 rval = QSget_ranged_rows_list(lpi->prob, 1, rowlist, &rowcnt, &rowbeg, &rowind, &rowval, &rhs, &sense, &range, 0); 1116 for( i = 0; i < rowcnt[0]; ++i ) 1118 rval = QSchange_coef(lpi->prob, row, rowind[i], rowval[i] * scaleval); 1125 rval = QSchange_rhscoef(lpi->prob, row, rhs[0] * scaleval); 1127 if( sense[0] == 'R' ) 1129 rval = QSchange_range(lpi->prob, row, range[0] * scaleval); 1139 rval = QSchange_rhscoef(lpi->prob, row, rhs[0]*scaleval); 1143 rval = QSchange_rhscoef(lpi->prob, row, rhs[0]*scaleval); 1145 rval = QSchange_sense(lpi->prob, row, 'G'); 1149 rval = QSchange_rhscoef(lpi->prob, row, rhs[0]*scaleval); 1151 rval = QSchange_sense(lpi->prob, row, 'L'); 1155 rhs[0] = (rhs[0] + range[0]) * scaleval; 1156 range[0] = fabs(scaleval) * range[0]; 1157 rval = QSchange_rhscoef(lpi->prob, row, rhs[0]); 1159 rval = QSchange_range(lpi->prob, row, range[0]); 1172 if( rowcnt != NULL ) 1174 if( rowbeg != NULL ) 1176 if( rowind != NULL ) 1178 if( rowval != NULL ) 1211 assert(lpi != NULL); 1212 assert(lpi->prob != NULL); 1215 SCIPdebugMessage( "scaling column %d with factor %g in QSopt\n", col, scaleval); 1219 rval = QSget_columns_list(lpi->prob, 1, collist, &colcnt, &colbeg, &colind, &colval, &obj, &lb, &ub, 0); 1223 for( i = 0; i < colcnt[0]; ++i ) 1225 rval = QSchange_coef(lpi->prob, colind[i], col, colval[i]*scaleval); 1230 rval = QSchange_objcoef(lpi->prob, col, obj[0]*scaleval); 1236 scaleval = -scaleval; 1241 if( lb[0] > -QS_MAXDOUBLE ) 1243 if( ub[0] < QS_MAXDOUBLE ) 1246 if( lb[0] < -QS_MAXDOUBLE ) 1247 lb[0] = -QS_MAXDOUBLE; 1248 if( ub[0] > QS_MAXDOUBLE ) 1249 ub[0] = QS_MAXDOUBLE; 1251 rval = QSchange_bound(lpi->prob, col, 'L', lb[0]); 1253 rval = QSchange_bound(lpi->prob, col, 'U', ub[0]); 1258 if( colcnt != NULL ) 1260 if( colbeg != NULL ) 1262 if( colind != NULL ) 1264 if( colval != NULL ) 1293 assert(lpi != NULL); 1294 assert(lpi->prob != NULL); 1295 assert(nrows != NULL); 1299 *nrows = QSget_rowcount(lpi->prob); 1310 assert(lpi != NULL); 1311 assert(lpi->prob != NULL); 1312 assert(ncols != NULL); 1316 *ncols = QSget_colcount(lpi->prob); 1327 assert(lpi != NULL); 1328 assert(lpi->prob != NULL); 1332 *nnonz = QSget_nzcount(lpi->prob); 1355 double* lval = NULL; 1363 assert(lpi != NULL); 1364 assert(lpi->prob != NULL); 1365 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount (lpi->prob)); 1366 assert((lb == 0 && ub == 0) || (lb != 0 && ub != 0)); 1367 assert((nnonz != 0 && beg != 0 && ind != 0 && val != 0) || (nnonz == 0 && beg == 0 && ind == 0 && val == 0)); 1372 len = lastcol - firstcol + 1; 1374 for( i = 0; i < len; ++i ) 1375 lpi->iccnt[i] = i + firstcol; 1378 rval = QSget_columns_list(lpi->prob, len, lpi->iccnt, nnonz ? (&lcnt) : 0, nnonz ? (&lbeg) : 0, nnonz ? (&lind) : 0, 1379 nnonz ? (&lval) : 0, 0, lb ? (&llb) : 0, lb ? (&lub) : 0, 0); 1386 assert(lbeg != NULL); 1387 assert(lcnt != NULL); 1388 assert(lind != NULL); 1389 assert(lval != NULL); 1391 *nnonz = lbeg[len-1] + lcnt[len-1]; 1392 for( i = 0 ; i < len ; i++ ) 1394 for( i = 0; i < *nnonz; ++i ) 1402 assert(llb != NULL); 1403 assert(lub != NULL); 1405 for( i = 0; i < len; ++i ) 1445 const int len = lastrow - firstrow + 1; 1447 double* lval = NULL; 1448 double* lrhs = NULL; 1449 double* lrng = NULL; 1454 char* lsense = NULL; 1456 assert(lpi != NULL); 1457 assert(lpi->prob != NULL); 1458 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount (lpi->prob)); 1459 assert((lhs == 0 && rhs == 0) || (rhs != 0 && lhs != 0)); 1460 assert((nnonz != 0 && beg != 0 && ind != 0 && val != 0) || (nnonz == 0 && beg == 0 && ind == 0 && val == 0)); 1466 for( i = 0; i < len; ++i ) 1467 lpi->ircnt[i] = i + firstrow; 1470 rval = QSget_ranged_rows_list(lpi->prob, len, lpi->ircnt, nnonz ? (&lcnt) : 0, nnonz ? (&lbeg) : 0, nnonz ? (&lind) : 0, 1471 nnonz ? (&lval) : 0, rhs ? (&lrhs) : 0, rhs ? (&lsense) : 0, rhs ? (&lrng) : 0, 0); 1477 assert(lbeg != NULL); 1478 assert(lcnt != NULL); 1479 assert(lind != NULL); 1480 assert(lval != NULL); 1482 *nnonz = lbeg[len-1] + lcnt[len-1]; 1483 for( i = 0 ; i < len; i++ ) 1485 for( i = 0; i < *nnonz; ++i ) 1493 assert(lrhs != NULL); 1494 assert(lrng != NULL); 1495 assert(lsense != NULL); 1497 for( i = 0; i < len; ++i ) 1503 rhs[i] = lrhs[i] + lrng[i]; 1506 lhs[i] = rhs[i] = lrhs[i]; 1510 lhs[i] = -QS_MAXDOUBLE; 1514 rhs[i] = QS_MAXDOUBLE; 1525 if( lsense != NULL ) 1561 const int len = lastcol - firstcol + 1; 1565 assert(lpi != NULL); 1566 assert(lpi->prob != NULL); 1567 assert(0 <= firstcol && firstcol <= lastcol && lastcol < QSget_colcount (lpi->prob)); 1569 SCIPdebugMessage( "getting objective values %d to %d\n", firstcol, lastcol); 1573 for( i = 0; i < len; ++i ) 1574 lpi->iccnt[i] = i + firstcol; 1577 rval = QSget_obj_list(lpi->prob, len, lpi->iccnt, vals); 1591 const int len = lastcol - firstcol + 1; 1595 assert(lpi != NULL); 1596 assert(lpi->prob != NULL); 1597 assert(0 <= firstcol && firstcol <= lastcol&& lastcol < QSget_colcount (lpi->prob)); 1603 for( i = 0; i < len; ++i ) 1604 lpi->iccnt[i] = i + firstcol; 1607 rval = QSget_bounds_list(lpi->prob, len, lpi->iccnt, lbs, ubs); 1621 const int len = lastrow - firstrow + 1; 1623 double* lrhs=0, *lrng=0; 1627 assert(lpi != NULL); 1628 assert(lpi->prob != NULL); 1629 assert(0 <= firstrow && firstrow <= lastrow && lastrow < QSget_rowcount (lpi->prob)); 1630 assert(rhss != NULL); 1631 assert(lhss != NULL); 1637 for( i = 0; i < len; ++i ) 1638 lpi->ircnt[i] = i + firstrow; 1641 rval = QSget_ranged_rows_list(lpi->prob, len, lpi->ircnt, 0, 0, 0, 0, &lrhs, &lsense, &lrng, 0); 1645 for( i = 0; i < len; ++i ) 1651 rhss[i] = lrhs[i] + lrng[i]; 1654 lhss[i] = rhss[i] = lrhs[i]; 1658 lhss[i] = -QS_MAXDOUBLE; 1662 rhss[i] = QS_MAXDOUBLE; 1672 if( lsense != NULL ) 1692 assert(lpi != NULL); 1693 assert(lpi->prob != NULL); 1697 rval = QSget_coef(lpi->prob, row, col, val); 1721 assert(lpi != NULL); 1722 assert(lpi->prob != NULL); 1724 SCIPdebugMessage( "calling QSopt primal simplex: %d cols, %d rows, %d nz\n", QSget_colcount(lpi->prob), 1725 QSget_rowcount(lpi->prob), QSget_nzcount(lpi->prob)); 1727 rval = QSopt_primal(lpi->prob, &(lpi->solstat)); 1739 assert(lpi != NULL); 1740 assert(lpi->prob != NULL); 1742 SCIPdebugMessage( "calling QSopt dual simplex: %d cols, %d rows, %d nz\n", QSget_colcount(lpi->prob), 1743 QSget_rowcount(lpi->prob), QSget_nzcount(lpi->prob)); 1745 rval = QSopt_dual(lpi->prob, &(lpi->solstat)); 1795 assert(lpi != NULL); 1796 assert(lpi->prob != NULL); 1797 assert(down != NULL); 1799 assert(downvalid != NULL); 1800 assert(upvalid != NULL); 1802 SCIPdebugMessage( "calling QSopt strong branching on variable %d with fractional value (%d it lim)\n", col, itlim); 1811 rval = QSopt_strongbranch(lpi->prob, 1, &col, &psol, down, up, itlim, QS_MAXDOUBLE); 1814 rval = QSget_itcnt(lpi->prob, 0, 0, 0, 0, &nit); 1818 *iter = nit - lpi->previt; 1844 assert(lpi != NULL); 1845 assert(lpi->prob != NULL); 1846 assert(cols != NULL); 1847 assert(psols != NULL); 1848 assert(down != NULL); 1850 assert(downvalid != NULL); 1851 assert(upvalid != NULL); 1853 SCIPdebugMessage( "calling QSopt strong branching on %d variables with fractional value (%d it lim)\n", ncols, itlim); 1856 for( j = 0; j < ncols; ++j ) 1858 downvalid[j] = TRUE; 1860 assert(! EPSISINT(psols[j], 1e-06)); 1864 rval = QSopt_strongbranch(lpi->prob, ncols, cols, psols, down, up, itlim, QS_MAXDOUBLE); 1867 rval = QSget_itcnt(lpi->prob, 0, 0, 0, 0, &nit); 1871 *iter = nit - lpi->previt; 1895 assert(lpi != NULL); 1896 assert(lpi->prob != NULL); 1897 assert(down != NULL); 1899 assert(downvalid != NULL); 1900 assert(upvalid != NULL); 1902 SCIPdebugMessage( "calling QSopt strong branching on variable %d with integral value (%d it lim)\n", col, itlim); 1909 rval = QSget_objval(lpi->prob, &objval); 1943 assert(lpi != NULL); 1944 assert(lpi->prob != NULL); 1945 assert(down != NULL); 1947 assert(downvalid != NULL); 1948 assert(upvalid != NULL); 1950 SCIPdebugMessage( "calling QSopt strong branching on %d variables with integral value (%d it lim)\n", ncols, itlim); 1955 rval = QSget_objval(lpi->prob, &objval); 1958 for( j = 0; j < ncols; ++j ) 1963 downvalid[j] = TRUE; 1990 assert(lpi->prob!= NULL); 1992 (void) QSget_status(lpi->prob, &(lpi->solstat)); 1994 return (lpi->solstat != 0 && lpi->solstat != QS_LP_MODIFIED); 2004 assert(lpi != NULL); 2005 assert(lpi->prob != NULL); 2009 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2011 if( lpi->solstat == QS_LP_OPTIMAL || lpi->solstat == QS_LP_UNBOUNDED ) 2012 *primalfeasible = 1; 2014 if( lpi->solstat == QS_LP_OPTIMAL || lpi->solstat == QS_LP_INFEASIBLE || lpi->solstat == QS_LP_OBJ_LIMIT ) 2027 assert(lpi != NULL); 2028 assert(lpi->prob != NULL); 2032 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2034 return (lpi->solstat == QS_LP_UNBOUNDED); 2044 assert(lpi != NULL); 2045 assert(lpi->prob != NULL); 2058 assert(lpi != NULL); 2059 assert(lpi->prob != NULL); 2063 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2065 return (lpi->solstat == QS_LP_UNBOUNDED); 2073 assert(lpi != NULL); 2074 assert(lpi->prob != NULL); 2078 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2080 return (lpi->solstat == QS_LP_INFEASIBLE); 2088 assert(lpi != NULL); 2089 assert(lpi->prob != NULL); 2093 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2095 return (lpi->solstat == QS_LP_OPTIMAL || lpi->solstat == QS_LP_UNBOUNDED); 2105 assert(lpi != NULL); 2106 assert(lpi->prob != NULL); 2110 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2112 return (lpi->solstat == QS_LP_INFEASIBLE); 2122 assert(lpi != NULL); 2123 assert(lpi->prob != NULL); 2127 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2129 return (lpi->solstat == QS_LP_INFEASIBLE); 2137 assert(lpi != NULL); 2138 assert(lpi->prob != NULL); 2142 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2144 return (lpi->solstat == QS_LP_INFEASIBLE); 2152 assert(lpi != NULL); 2153 assert(lpi->prob != NULL); 2157 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2159 return (lpi->solstat == QS_LP_UNBOUNDED); 2167 assert(lpi != NULL); 2168 assert(lpi->prob != NULL); 2172 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2174 return (lpi->solstat == QS_LP_OPTIMAL || lpi->solstat == QS_LP_OBJ_LIMIT); 2182 assert(lpi != NULL); 2183 assert(lpi->prob != NULL); 2187 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2189 return (lpi->solstat == QS_LP_OPTIMAL); 2197 assert(lpi != NULL); 2198 assert(lpi->prob != NULL); 2202 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2204 return (lpi->solstat != QS_LP_NUMERR); 2212 assert(lpi != NULL); 2213 assert(lpi->prob != NULL); 2217 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2219 return (lpi->solstat == QS_LP_OBJ_LIMIT); 2227 assert(lpi != NULL); 2228 assert(lpi->prob != NULL); 2232 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2234 return (lpi->solstat == QS_LP_ITER_LIMIT); 2242 assert(lpi != NULL); 2243 assert(lpi->prob != NULL); 2247 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2249 return (lpi->solstat == QS_LP_TIME_LIMIT); 2257 assert(lpi != NULL); 2258 assert(lpi->prob != NULL); 2262 (void) QSget_status(lpi->prob, &(lpi->solstat)); 2264 return lpi->solstat; 2273 assert(lpi != NULL); 2274 assert(lpi->prob != NULL); 2292 assert(lpi != NULL); 2293 assert(lpi->prob != NULL); 2297 rval = QSget_objval(lpi->prob, objval); 2312 int rval = 0, nrows; 2316 int stat, ncols, sense; 2317 char *icstat, *irstat; 2320 assert(lpi != NULL); 2321 assert(lpi->prob != NULL); 2325 nrows = QSget_rowcount(lpi->prob); 2328 rval = QSget_solution(lpi->prob, objval, primsol, dualsol, lpi->irng, redcost); 2333 QSget_status(lpi->prob, &stat); 2334 rval = QSget_objsense(lpi->prob, &sense); 2335 if( stat == QS_LP_OPTIMAL ) 2337 ncols = QSget_colcount(lpi->prob); 2340 SCIP_CALL(ensureTabMem(lpi,nrows+ncols)); 2342 irstat = lpi->ibas+ncols; 2344 rval = QSget_basis_array(lpi->prob,icstat, irstat); 2347 for( i = ncols ; i-- ; ) 2351 case QS_COL_BSTAT_BASIC: 2352 case QS_COL_BSTAT_FREE: 2353 if( fabs(redcost[i])> 1e-6 ) 2355 SCIPerrorMessage( "stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense); 2360 case QS_COL_BSTAT_UPPER: 2361 if( redcost[i]*sense > 1e-6 ) 2363 SCIPerrorMessage( "stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense); 2368 case QS_COL_BSTAT_LOWER: 2369 if( redcost[i]*sense < -1e-6 ) 2371 SCIPerrorMessage( "stat col[%d] = %c, rd[%d] = %lg sense %d\n", i, icstat[i], i, redcost[i]*sense, sense); 2377 SCIPerrorMessage( "unknown stat col[%d] = %c, rd[%d] = %lg\n", i, icstat[i], i, redcost[i]*sense); 2390 rval = QSget_rhs(lpi->prob, lpi->irhs); 2392 rval = QSget_senses(lpi->prob, lpi->isen); 2398 for( i = 0; i < nrows; ++i ) 2400 switch( lpi->isen[i] ) 2405 activity[i] = lpi->irhs[i] + lpi->irng[i]; 2408 activity[i] = lpi->irhs[i] - lpi->irng[i]; 2427 assert(lpi != NULL); 2428 assert(lpi->prob != NULL); 2443 assert(lpi != NULL); 2444 assert(lpi->prob != NULL); 2445 assert(dualfarkas != NULL); 2447 SCIPdebugMessage( "calling QSopt dual Farkas: %d cols, %d rows, %d non zeros\n", QSget_colcount (lpi->prob), 2448 QSget_rowcount(lpi->prob), QSget_nzcount(lpi->prob)); 2450 rval = QSget_infeas_array(lpi->prob, dualfarkas); 2464 assert(lpi != NULL); 2465 assert(lpi->prob != NULL); 2467 rval = QSget_itcnt(lpi->prob, 0, 0, 0, 0, &nit); 2470 *iterations = nit - lpi->previt; 2487 assert(lpi != NULL); 2488 assert(quality != NULL); 2514 int rval = 0, ncols, nrows; 2515 char* icstat = NULL; 2516 char* irstat = NULL; 2519 assert(lpi != NULL); 2520 assert(lpi->prob != NULL); 2522 SCIPdebugMessage( "saving QSopt basis into %p/%p\n", ( void*)cstat, ( void*)rstat); 2524 ncols = QSget_colcount(lpi->prob); 2525 nrows = QSget_rowcount(lpi->prob); 2527 SCIP_CALL(ensureTabMem(lpi, nrows + ncols)); 2530 irstat = lpi->ibas+ncols; 2531 rval = QSget_basis_array(lpi->prob, icstat, irstat); 2535 for( i = 0; i < nrows; ++i ) 2539 case QS_ROW_BSTAT_LOWER: 2542 case QS_ROW_BSTAT_BASIC: 2545 case QS_ROW_BSTAT_UPPER: 2554 for( i = 0; i < ncols; ++i ) 2558 case QS_COL_BSTAT_LOWER: 2561 case QS_COL_BSTAT_BASIC: 2564 case QS_COL_BSTAT_UPPER: 2567 case QS_COL_BSTAT_FREE: 2586 int rval = 0, ncols, nrows; 2588 char* icstat=0, *irstat = 0; 2590 assert(lpi != NULL); 2591 assert(lpi->prob != NULL); 2593 SCIPdebugMessage( "loading basis %p/%p into QSopt\n", ( void*)cstat, ( void*)rstat); 2595 ncols = QSget_colcount(lpi->prob); 2596 nrows = QSget_rowcount(lpi->prob); 2601 irstat = lpi->ibas + ncols; 2604 for( i = 0; i < nrows; ++i ) 2609 irstat[i] = QS_ROW_BSTAT_LOWER; 2612 irstat[i] = QS_ROW_BSTAT_BASIC; 2615 irstat[i] = QS_ROW_BSTAT_UPPER; 2623 for( i = 0; i < ncols; ++i ) 2628 icstat[i] = QS_COL_BSTAT_LOWER; 2631 icstat[i] = QS_COL_BSTAT_BASIC; 2634 icstat[i] = QS_COL_BSTAT_UPPER; 2637 icstat[i] = QS_COL_BSTAT_FREE; 2647 rval = QSget_basis_array(lpi->prob, icstat, irstat); 2664 assert(lpi->prob!= NULL); 2668 nrows = QSget_rowcount(lpi->prob); 2669 ncols = QSget_colcount(lpi->prob); 2671 QS_CONDRET( QSget_status(lpi->prob, &stat) ); 2672 if ( stat == QS_LP_UNSOLVED || stat == QS_LP_MODIFIED || stat == QS_LP_NUMERR ) 2674 QS_CONDRET( QSopt_dual(lpi->prob, &(lpi->solstat)) ); 2677 QS_CONDRET( QSget_basis_order( lpi->prob, bind) ); 2680 for( i = 0; i < nrows; ++i ) 2682 if( bind[i] >= ncols ) 2683 bind[i] = -(bind[i] - ncols - 1); 2709 assert(lpi->prob!= NULL); 2710 SCIPdebugMessage( "getting binv-row %d from Qsopt %d cols, %d rows, %d nonz\n", r, QSget_colcount(lpi->prob), 2711 QSget_rowcount(lpi->prob), QSget_nzcount(lpi->prob)); 2714 if ( ninds != NULL ) 2717 rval = QSget_binv_row(lpi->prob, r, coef); 2743 assert(lpi->prob!= NULL); 2773 assert(lpi != NULL); 2774 assert(lpi->prob != NULL); 2779 if ( ninds != NULL ) 2782 ncols = QSget_colcount(lpi->prob); 2783 nrows = QSget_rowcount(lpi->prob); 2785 SCIP_CALL(ensureTabMem(lpi, nrows+ncols)); 2787 rval = QSget_tableau_row(lpi->prob, r, lpi->itab); 2791 memcpy(coef, lpi->itab, sizeof( double)*ncols); 2814 assert(lpi->prob!= NULL); 2843 assert(lpi != NULL); 2844 assert(lpi->prob != NULL); 2845 assert(blkmem != NULL); 2846 assert(lpistate != NULL); 2848 ncols = QSget_colcount(lpi->prob); 2849 nrows = QSget_rowcount(lpi->prob); 2855 SCIP_CALL( lpistateCreate(lpistate, blkmem, ncols, nrows)); 2856 SCIPdebugMessage( "storing QSopt LPI state in %p (%d cols, %d rows)\n", ( void*)*lpistate, ncols, nrows); 2864 (*lpistate)->ncols = ncols; 2865 (*lpistate)->nrows = nrows; 2866 lpistatePack(*lpistate, lpi->iccnt, lpi->ircnt); 2887 assert(lpi != NULL); 2888 assert(lpi->prob != NULL); 2891 if( lpistate == NULL ) 2895 ncols = QSget_colcount(lpi->prob); 2896 nrows = QSget_rowcount(lpi->prob); 2900 assert(lpistate->ncols <= ncols); 2901 assert(lpistate->nrows <= nrows); 2903 SCIPdebugMessage( "loading LPI state %p (%d cols, %d rows) into QSopt LP with %d cols and %d rows\n", ( void*)lpistate, lpistate->ncols, 2904 lpistate->nrows, ncols, nrows); 2906 if( lpistate->ncols == 0 || lpistate->nrows == 0 ) 2912 SCIP_CALL( ensureTabMem(lpi, nrows + ncols) ); 2915 irstat = lpi->ibas + ncols; 2918 lpistateUnpack(lpistate, lpi->iccnt, lpi->ircnt); 2921 for( i = lpistate->ncols; i < ncols; ++i ) 2927 rval = QSget_bounds_list(lpi->prob, 1, &i, &lb, &ub); 2939 for( i = lpistate->nrows; i < nrows; ++i ) 2943 for( i = 0; i < nrows; ++i ) 2945 switch( lpi->ircnt[i] ) 2948 irstat[i] = QS_ROW_BSTAT_LOWER; 2951 irstat[i] = QS_ROW_BSTAT_BASIC; 2954 irstat[i] = QS_ROW_BSTAT_UPPER; 2962 for( i = 0; i < ncols; ++i ) 2964 switch( lpi->iccnt[i] ) 2967 icstat[i] = QS_COL_BSTAT_LOWER; 2970 icstat[i] = QS_COL_BSTAT_BASIC; 2973 icstat[i] = QS_COL_BSTAT_UPPER; 2976 icstat[i] = QS_COL_BSTAT_FREE; 2986 rval = QSload_basis_array(lpi->prob, icstat, irstat); 2995 assert(lpi != NULL); 2998 SCIPerrorMessage( "QSopt interface does not implement SCIPlpiClearState()\n"); 3010 assert(lpi != NULL); 3011 assert(lpistate != NULL); 3013 if( *lpistate != NULL ) 3014 lpistateFree(lpistate, blkmem); 3025 return (lpistate != NULL); 3036 assert(lpi != NULL); 3037 assert(lpi->prob != NULL); 3041 rval = QSread_and_load_basis(lpi->prob, fname); 3060 assert(lpi != NULL); 3061 assert(lpi->prob != NULL); 3065 bas = QSget_basis(lpi->prob); 3066 QS_ERROR(bas == 0, "Could not get basis from problem."); 3069 rval = QSwrite_basis(lpi->prob, bas, fname); 3101 assert(lpinorms != NULL); 3117 assert(lpinorms == NULL); 3130 assert(lpinorms == NULL); 3157 assert(lpi != NULL); 3158 assert(lpi->prob != NULL); 3159 assert(ival != NULL); 3170 rval = QSget_param(lpi->prob, QS_PARAM_SIMPLEX_SCALING,ival); 3177 *ival = lpi->pricing; 3180 rval = QSget_param(lpi->prob, QS_PARAM_SIMPLEX_DISPLAY, ival); 3187 rval = QSget_param(lpi->prob, QS_PARAM_SIMPLEX_MAX_ITERATIONS, ival); 3205 assert(lpi != NULL); 3206 assert(lpi->prob != NULL); 3214 rval = QSset_param(lpi->prob, QS_PARAM_SIMPLEX_SCALING, 1); 3216 rval = QSset_param(lpi->prob, QS_PARAM_SIMPLEX_SCALING, 0); 3219 lpi->pricing = ival; 3227 rval = QSset_param(lpi->prob, QS_PARAM_PRIMAL_PRICING, QS_PRICE_PSTEEP); 3228 rval += QSset_param(lpi->prob, QS_PARAM_DUAL_PRICING, QS_PRICE_DSTEEP); 3231 rval = QSset_param(lpi->prob,QS_PARAM_PRIMAL_PRICING,QS_PRICE_PMULTPARTIAL); 3232 rval += QSset_param(lpi->prob,QS_PARAM_DUAL_PRICING,QS_PRICE_DMULTPARTIAL); 3235 rval = QSset_param(lpi->prob,QS_PARAM_PRIMAL_PRICING,QS_PRICE_PDEVEX); 3236 rval += QSset_param(lpi->prob,QS_PARAM_DUAL_PRICING,QS_PRICE_DDEVEX); 3244 rval = QSset_param(lpi->prob, QS_PARAM_SIMPLEX_DISPLAY, 1); 3246 rval = QSset_param(lpi->prob, QS_PARAM_SIMPLEX_DISPLAY, 0); 3249 rval = QSset_param(lpi->prob, QS_PARAM_SIMPLEX_MAX_ITERATIONS, ival); 3267 assert(lpi != NULL); 3268 assert(lpi->prob != NULL); 3269 assert(dval != NULL); 3276 rval = QSget_param_double(lpi->prob, QS_PARAM_OBJLLIM, dval); 3279 rval = QSget_param_double(lpi->prob, QS_PARAM_OBJULIM, dval); 3282 rval = QSget_param_double(lpi->prob, QS_PARAM_SIMPLEX_MAX_TIME, dval); 3304 assert(lpi != NULL); 3305 assert(lpi->prob != NULL); 3312 rval = QSset_param_double(lpi->prob, QS_PARAM_SIMPLEX_MAX_TIME, dval); 3315 rval = QSset_param_double(lpi->prob, QS_PARAM_OBJLLIM, dval); 3318 rval = QSset_param_double(lpi->prob, QS_PARAM_OBJULIM, dval); 3348 return QS_MAXDOUBLE; 3357 return (val >= QS_MAXDOUBLE); 3378 assert(lpi != NULL); 3379 assert(lpi->prob != NULL); 3383 if( lpi->prob != NULL ) 3384 QSfree_prob(lpi->prob); 3389 lpi->prob = QSread_prob(fname, "LP"); 3390 if( lpi->prob == 0 ) 3402 assert(lpi != NULL); 3403 assert(lpi->prob != NULL); 3407 if( QSwrite_prob (lpi->prob, fname, "LP") ) 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)
unsigned int SCIP_DUALPACKET
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
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)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
interface methods for specific LP solvers
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
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)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
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)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, int *ind, SCIP_Real *obj)
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 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)
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)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
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
struct SCIP_LPiState SCIP_LPISTATE
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
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)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
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 SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
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 QS_TESTG(A, B,...)
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 SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS *lpinorms)
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)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_DUALPACKET ROWPACKET
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
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)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
|