59 #include <ClpSimplex.hpp> 60 #include <ClpPrimalColumnSteepest.hpp> 61 #include <ClpDualRowSteepest.hpp> 62 #include <CoinIndexedVector.hpp> 63 #include <ClpConfig.h> 65 #include <config_clp.h> 66 #define CLP_VERSION VERSION 76 #include "scip/bitencode.h" 80 #if defined(_WIN32) || defined(_WIN64) 81 #define snprintf _snprintf 85 #ifdef LPI_CLP_DEBUG_WRITE_FILES 86 static int fileNr = 0;
90 #define SUMINFEASBOUND 1.0e-3 103 bool validFactorization;
105 bool setFactorizationFrequency;
116 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE 118 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE 145 if( num > lpi->cstatsize )
149 newsize =
MAX(2*lpi->cstatsize, num);
150 SCIP_ALLOC( BMSreallocMemoryArray(&lpi->cstat, newsize) );
151 lpi->cstatsize = newsize;
153 assert(num <= lpi->cstatsize);
167 if( num > lpi->rstatsize )
171 newsize =
MAX(2*lpi->rstatsize, num);
172 SCIP_ALLOC( BMSreallocMemoryArray(&lpi->rstat, newsize) );
173 lpi->rstatsize = newsize;
175 assert(num <= lpi->rstatsize);
213 assert(lpistate != 0);
214 assert(lpistate->packcstat != 0);
215 assert(lpistate->packrstat != 0);
217 SCIPencodeDualBit(cstat, lpistate->packcstat, lpistate->ncols);
218 SCIPencodeDualBit(rstat, lpistate->packrstat, lpistate->nrows);
229 assert(lpistate != 0);
230 assert(lpistate->packcstat != 0);
231 assert(lpistate->packrstat != 0);
233 SCIPdecodeDualBit(lpistate->packcstat, cstat, lpistate->ncols);
234 SCIPdecodeDualBit(lpistate->packrstat, rstat, lpistate->nrows);
246 assert(lpistate != 0);
251 SCIP_ALLOC( BMSallocBlockMemory(blkmem, lpistate) );
252 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->packcstat, colpacketNum(ncols)) );
253 SCIP_ALLOC( BMSallocBlockMemoryArray(blkmem, &(*lpistate)->packrstat, rowpacketNum(nrows)) );
266 assert(lpistate != 0);
267 assert(*lpistate != 0);
269 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->packcstat, colpacketNum((*lpistate)->ncols));
270 BMSfreeBlockMemoryArray(blkmem, &(*lpistate)->packrstat, rowpacketNum((*lpistate)->nrows));
271 BMSfreeBlockMemory(blkmem, lpistate);
284 void invalidateSolution(
294 void setFactorizationFrequency(
299 if ( lpi->setFactorizationFrequency )
302 lpi->clp->defaultFactorizationFrequency();
303 lpi->setFactorizationFrequency =
true;
308 void setFastmipClpParameters(
324 lpi->clp->setPerturbation(50);
388 lpi->clp->setSpecialOptions(32|64|512|1024|32768);
390 lpi->clp->setSpecialOptions(32|64|128|512|1024|4096|32768);
394 lpi->clp->setMoreSpecialOptions(8192 | lpi->clp->moreSpecialOptions());
403 void unsetFastmipClpParameters(
407 lpi->fastmip =
FALSE;
410 lpi->clp->setPerturbation(100);
413 lpi->clp->setSpecialOptions(0);
416 lpi->clp->setPersistenceFlag(0);
446 return "COIN-OR Linear Programming Solver developed by J. Forrest et.al. (projects.coin-or.org/Clp)";
454 return (
void*) lpi->clp;
482 (*lpi)->clp =
new ClpSimplex();
485 (*lpi)->cstatsize = 0;
486 (*lpi)->rstatsize = 0;
487 (*lpi)->startscratch =
true;
489 (*lpi)->validFactorization =
false;
490 (*lpi)->setFactorizationFrequency =
false;
491 (*lpi)->fastmip =
FALSE;
492 invalidateSolution(*lpi);
506 ClpPrimalColumnSteepest primalSteepest;
507 (*lpi)->clp->setPrimalColumnPivotAlgorithm(primalSteepest);
515 ClpDualRowSteepest dualSteepest;
516 (*lpi)->clp->setDualRowPivotAlgorithm(dualSteepest);
519 (*lpi)->clp->setStrParam(ClpProbName, std::string(name) );
522 (*lpi)->clp->setOptimizationDirection(objsen);
525 (*lpi)->clp->setLogLevel(0);
528 (*lpi)->clp->scaling(0);
544 assert((*lpi)->clp != 0);
552 BMSfreeMemoryArrayNull(&(*lpi)->cstat);
553 BMSfreeMemoryArrayNull(&(*lpi)->rstat);
593 assert(lpi->clp != 0);
596 assert( nnonz > beg[ncols-1] );
598 invalidateSolution(lpi);
600 ClpSimplex* clp = lpi->clp;
604 SCIP_ALLOC( BMSallocMemoryArray(&mybeg, ncols + 1) );
605 BMScopyMemoryArray(mybeg, beg, ncols);
606 mybeg[ncols] = nnonz;
609 clp->loadProblem(ncols, nrows, mybeg, ind, val, lb, ub, obj, lhs, rhs);
610 BMSfreeMemoryArray( &mybeg );
613 clp->setOptimizationDirection(objsen);
616 if ( colnames || rownames )
618 std::vector<std::string> columnNames(ncols);
619 std::vector<std::string> rowNames(nrows);
622 for (
int j = 0; j < ncols; ++j)
623 columnNames[j].assign(colnames[j]);
627 for (
int i = 0; i < ncols; ++i)
628 rowNames[i].assign(rownames[i]);
630 clp->copyNames(rowNames, columnNames);
654 assert(lpi->clp != 0);
658 assert(nnonz == 0 || beg != 0);
659 assert(nnonz == 0 || ind != 0);
660 assert(nnonz == 0 || val != 0);
664 invalidateSolution(lpi);
667 int numCols = lpi->clp->getNumCols();
671 SCIP_ALLOC( BMSallocMemoryArray(&mybeg, ncols + 1) );
676 BMScopyMemoryArray(mybeg, beg, ncols);
677 mybeg[ncols] = nnonz;
680 lpi->clp->addColumns(ncols, lb, ub, obj, mybeg, ind, val);
684 for (
int j = 0; j <= ncols; ++j)
687 lpi->clp->addColumns(ncols, lb, ub, obj, mybeg, 0, 0);
689 BMSfreeMemoryArray(&mybeg);
694 std::vector<std::string> columnNames(ncols);
695 for (
int j = 0; j < ncols; ++j)
696 columnNames[j].assign(colnames[j]);
697 lpi->clp->copyColumnNames(columnNames, numCols, numCols + ncols);
714 assert(lpi->clp != 0);
715 assert(0 <= firstcol && firstcol <= lastcol && lastcol < lpi->clp->numberColumns());
717 invalidateSolution(lpi);
720 int num = lastcol-firstcol+1;
722 SCIP_ALLOC( BMSallocMemoryArray( &which, num) );;
725 for (
int j = firstcol; j <= lastcol; ++j)
726 which[j - firstcol] = j;
728 lpi->clp->deleteColumns(num, which);
729 BMSfreeMemoryArray( &which );
746 assert(lpi->clp != 0);
749 invalidateSolution(lpi);
752 int ncols = lpi->clp->getNumCols();
754 SCIP_ALLOC( BMSallocMemoryArray( &which, ncols) );
756 for (
int j = 0; j < ncols; ++j)
761 lpi->clp->deleteColumns(cnt, which);
762 BMSfreeMemoryArray(&which);
766 for (
int j = 0; j < ncols; ++j)
797 assert(lpi->clp != 0);
800 assert(nnonz == 0 || beg != 0);
801 assert(nnonz == 0 || ind != 0);
802 assert(nnonz == 0 || val != 0);
804 invalidateSolution(lpi);
807 int numRows = lpi->clp->getNumRows();
810 SCIP_ALLOC( BMSallocMemoryArray( &mybeg, nrows + 1) );
815 BMScopyMemoryArray( mybeg, beg, nrows);
816 mybeg[nrows] = nnonz;
819 lpi->clp->addRows(nrows, lhs, rhs, mybeg, ind, val);
824 for (
int i = 0; i <= nrows; ++i)
826 lpi->clp->addRows(nrows, lhs, rhs, mybeg, 0, 0);
828 BMSfreeMemoryArray( &mybeg );
833 std::vector<std::string> rowNames(nrows);
834 for (
int j = 0; j < nrows; ++j)
835 rowNames[j].assign(rownames[j]);
836 lpi->clp->copyRowNames(rowNames, numRows, numRows + nrows);
850 SCIPdebugMessage(
"calling SCIPlpiDelRows() (number: %d)\n", lastrow-firstrow+1);
853 assert(lpi->clp != 0);
854 assert(0 <= firstrow && firstrow <= lastrow && lastrow < lpi->clp->numberRows());
856 invalidateSolution(lpi);
859 int num = lastrow-firstrow+1;
861 SCIP_ALLOC( BMSallocMemoryArray( &which, num) );
864 for (
int i = firstrow; i <= lastrow; ++i)
865 which[i - firstrow] = i;
867 lpi->clp->deleteRows(num, which);
869 BMSfreeMemoryArray( &which );
886 assert(lpi->clp != 0);
889 invalidateSolution(lpi);
892 int nrows = lpi->clp->getNumRows();
894 SCIP_ALLOC( BMSallocMemoryArray( &which, nrows) );
896 for (
int i = 0; i < nrows; ++i)
901 lpi->clp->deleteRows(cnt, which);
902 BMSfreeMemoryArray( &which );
906 for (
int i = 0; i < nrows; ++i)
929 assert(lpi->clp != 0);
931 invalidateSolution(lpi);
934 lpi->clp->resize(0,0);
952 assert(lpi->clp != 0);
957 invalidateSolution(lpi);
959 ClpSimplex* clp = lpi->clp;
963 double* sol = lpi->clp->primalColumnSolution();
964 const double* colLower = lpi->clp->getColLower();
965 const double* colUpper = lpi->clp->getColUpper();
967 for (
int j = 0; j < ncols; ++j)
969 clp->setColumnBounds(ind[j], lb[j], ub[j]);
972 if( clp->statusExists() )
974 assert( colLower != 0 );
975 assert( colUpper != 0 );
977 switch ( clp->getColumnStatus(k) )
979 case ClpSimplex::isFree:
980 case ClpSimplex::superBasic:
983 case ClpSimplex::atUpperBound:
984 sol[k] = colUpper[k];
985 assert( colUpper[k] == ub[j] );
987 case ClpSimplex::isFixed:
988 case ClpSimplex::atLowerBound:
989 sol[k] = colLower[k];
990 assert( colLower[k] == lb[j] );
1018 assert(lpi->clp != 0);
1023 invalidateSolution(lpi);
1025 ClpSimplex* clp = lpi->clp;
1027 for (
int i = 0; i < nrows; ++i)
1028 clp->setRowBounds(ind[i], lhs[i], rhs[i]);
1045 assert(lpi->clp != 0);
1046 assert(0 <= row && row < lpi->clp->numberRows());
1047 assert(0 <= col && col < lpi->clp->numberColumns());
1049 invalidateSolution(lpi);
1051 lpi->clp->matrix()->modifyCoefficient(row, col, newval);
1066 assert(lpi->clp != 0);
1068 invalidateSolution(lpi);
1071 lpi->clp->setOptimizationDirection(objsen);
1088 assert(lpi->clp != 0);
1092 invalidateSolution(lpi);
1094 ClpSimplex* clp = lpi->clp;
1097 for(
int j = 0; j < ncols; ++j )
1098 clp->setObjCoeff(ind[j], obj[j]);
1114 assert(lpi->clp != 0);
1115 assert(scaleval != 0.0);
1116 assert(0 <= row && row <= lpi->clp->numberRows() );
1118 invalidateSolution(lpi);
1124 ClpSimplex* clp = lpi->clp;
1127 double* lhs = clp->rowLower();
1128 double* rhs = clp->rowUpper();
1130 double lhsval = lhs[row];
1131 if( lhsval > -COIN_DBL_MAX )
1133 else if( scaleval < 0.0 )
1134 lhsval = COIN_DBL_MAX;
1135 double rhsval = rhs[row];
1136 if( rhsval < COIN_DBL_MAX)
1138 else if( scaleval < 0.0 )
1139 rhsval = -COIN_DBL_MAX;
1140 if( scaleval < 0.0 )
1154 CoinPackedMatrix* M = clp->matrix();
1155 assert( M->getNumCols() == clp->numberColumns() );
1157 const CoinBigIndex* beg = M->getVectorStarts();
1158 const int* length = M->getVectorLengths();
1159 const int* ind = M->getIndices();
1160 double* val = M->getMutableElements();
1162 for (
int j = 0; j < M->getNumCols(); ++j)
1164 for (CoinBigIndex k = beg[j]; k < beg[j] + length[j]; ++k)
1187 assert(lpi->clp != 0);
1188 assert(scaleval != 0.0);
1189 assert(0 <= col && col <= lpi->clp->numberColumns() );
1191 invalidateSolution(lpi);
1197 ClpSimplex* clp = lpi->clp;
1200 double* objvec = clp->objective();
1201 objvec[col] *= scaleval;
1204 double* lb = clp->columnLower();
1205 double* ub = clp->columnUpper();
1206 double lbval = lb[col];
1207 double ubval = ub[col];
1209 if( lbval > -COIN_DBL_MAX )
1211 else if( scaleval < 0.0 )
1212 lbval = COIN_DBL_MAX;
1213 if( ubval < COIN_DBL_MAX )
1215 else if( scaleval < 0.0 )
1216 ubval = -COIN_DBL_MAX;
1217 if( scaleval < 0.0 )
1228 CoinPackedMatrix* M = clp->matrix();
1229 assert( M->getNumCols() == clp->numberColumns() );
1231 const CoinBigIndex* beg = M->getVectorStarts();
1232 const int* length = M->getVectorLengths();
1233 double* val = M->getMutableElements();
1234 for (CoinBigIndex k = beg[col]; k < beg[col] + length[col]; ++k)
1263 assert(lpi->clp != 0);
1266 *nrows = lpi->clp->numberRows();
1281 assert(lpi->clp != 0);
1284 *ncols = lpi->clp->numberColumns();
1299 assert(lpi->clp != 0);
1302 *nnonz = lpi->clp->getNumElements();
1327 assert(lpi->clp != 0);
1328 assert(0 <= firstcol && firstcol <= lastcol && lastcol < lpi->clp->numberColumns());
1330 ClpSimplex* clp = lpi->clp;
1333 assert( (lb != 0 && ub != 0) || (lb == 0 && ub == 0) );
1336 const double* colLower = clp->getColLower();
1337 const double* colUpper = clp->getColUpper();
1339 BMScopyMemoryArray( lb, colLower + firstcol, (lastcol - firstcol + 1));
1340 BMScopyMemoryArray( ub, colUpper + firstcol, (lastcol - firstcol + 1));
1343 assert( nnonz != 0 || beg == 0);
1344 assert( nnonz != 0 || ind == 0);
1345 assert( nnonz != 0 || val == 0);
1349 CoinPackedMatrix* M = clp->matrix();
1351 assert( M->getNumCols() == clp->numberColumns() );
1353 const CoinBigIndex* Mbeg = M->getVectorStarts();
1354 const int* Mlength = M->getVectorLengths();
1355 const int* Mind = M->getIndices();
1356 const double* Mval = M->getElements();
1360 for (
int j = firstcol; j <= lastcol; ++j)
1362 beg[j-firstcol] = *nnonz;
1364 BMScopyMemoryArray( (ind + (*nnonz)), Mind + Mbeg[j], Mlength[j]);
1365 BMScopyMemoryArray( (val + (*nnonz)), Mval + Mbeg[j], Mlength[j]);
1367 (*nnonz) += Mlength[j];
1394 assert(lpi->clp != 0);
1395 assert(0 <= firstrow && firstrow <= lastrow && lastrow < lpi->clp->numberRows());
1397 ClpSimplex* clp = lpi->clp;
1398 assert( (lhs != 0 && rhs != 0) || (lhs == 0 && rhs == 0) );
1401 const double* rowLower = clp->getRowLower();
1402 const double* rowUpper = clp->getRowUpper();
1404 BMScopyMemoryArray( lhs, rowLower + firstrow, (lastrow - firstrow + 1) );
1405 BMScopyMemoryArray( rhs, rowUpper + firstrow, (lastrow - firstrow + 1) );
1408 assert( nnonz != 0 || beg == 0);
1409 assert( nnonz != 0 || ind == 0);
1410 assert( nnonz != 0 || val == 0);
1414 ClpMatrixBase* M = clp->rowCopy();
1416 M = clp->clpMatrix()->reverseOrderedCopy();
1418 assert( M->getNumRows() == clp->numberRows() );
1420 const CoinBigIndex* Mbeg = M->getVectorStarts();
1421 const int* Mlength = M->getVectorLengths();
1422 const int* Mind = M->getIndices();
1423 const double* Mval = M->getElements();
1426 for(
int i = firstrow; i <= lastrow; ++i )
1428 beg[i-firstrow] = *nnonz;
1429 for( CoinBigIndex k = Mbeg[i]; k < Mbeg[i] + Mlength[i]; ++k )
1431 ind[*nnonz] = Mind[k];
1432 val[*nnonz] = Mval[k];
1449 int namestoragesize,
1465 int namestoragesize,
1482 assert(lpi !=
NULL);
1483 assert(lpi->clp !=
NULL);
1498 assert( lpi !=
NULL );
1499 assert( lpi->clp !=
NULL );
1500 assert( objsen !=
NULL );
1503 if ( lpi->clp->getObjSense() < 0 )
1523 assert(lpi->clp != 0);
1524 assert(0 <= firstcol && firstcol <= lastcol && lastcol < lpi->clp->numberColumns());
1527 const double* obj = lpi->clp->getObjCoefficients();
1529 BMScopyMemoryArray( vals, obj + firstcol, (lastcol - firstcol + 1) );
1547 assert(lpi->clp != 0);
1548 assert(0 <= firstcol && firstcol <= lastcol && lastcol < lpi->clp->numberColumns());
1552 const double* colLower = lpi->clp->getColLower();
1553 BMScopyMemoryArray( lbs, colLower + firstcol, (lastcol - firstcol + 1) );
1558 const double* colUpper = lpi->clp->getColUpper();
1559 BMScopyMemoryArray( ubs, colUpper + firstcol, (lastcol - firstcol + 1) );
1578 assert(lpi->clp != 0);
1579 assert(0 <= firstrow && firstrow <= lastrow && lastrow < lpi->clp->numberRows());
1583 const double* rowLower = lpi->clp->getRowLower();
1584 BMScopyMemoryArray( lhss, rowLower + firstrow, (lastrow - firstrow + 1) );
1589 const double* rowUpper = lpi->clp->getRowUpper();
1590 BMScopyMemoryArray( rhss, rowUpper + firstrow, (lastrow - firstrow + 1) );
1608 assert(lpi->clp != 0);
1609 assert(0 <= col && col < lpi->clp->numberColumns());
1610 assert(0 <= row && row < lpi->clp->numberRows());
1613 *val = lpi->clp->matrix()->getCoefficient(row, col);
1637 assert(lpi->clp != 0);
1639 SCIPdebugMessage(
"calling Clp primal(): %d cols, %d rows\n", lpi->clp->numberColumns(), lpi->clp->numberRows());
1641 #ifdef LPI_CLP_DEBUG_WRITE_FILES 1643 snprintf(filename, 255,
"debug_p_%d.mps", fileNr);
1644 fileNr = fileNr % 2;
1649 invalidateSolution(lpi);
1652 setFactorizationFrequency(lpi);
1655 if ( lpi->startscratch )
1657 lpi->clp->allSlackBasis(
true);
1658 lpi->validFactorization =
false;
1668 int startFinishOptions = 1;
1669 if ( lpi->validFactorization )
1670 startFinishOptions = startFinishOptions | 2;
1673 int status = lpi->clp->primal(0, startFinishOptions);
1675 #ifdef LPI_CLP_DEBUG_WRITE_FILES 1676 char basisname[255];
1677 snprintf(basisname, 255,
"debug_p_%d.bas", fileNr);
1681 fileNr = fileNr % 2;
1684 lpi->validFactorization =
true;
1695 assert( status != -1 );
1696 assert( status != 5 );
1697 if ( status == 4 || status == 5 || status == -1 )
1710 assert(lpi->clp != 0);
1712 SCIPdebugMessage(
"calling Clp dual(): %d cols, %d rows\n", lpi->clp->numberColumns(), lpi->clp->numberRows());
1714 #ifdef LPI_CLP_DEBUG_WRITE_FILES 1716 snprintf(filename, 255,
"debug_d_%d.mps", fileNr);
1719 snprintf(filename, 255,
"debug_d_%d.sav", fileNr);
1724 invalidateSolution(lpi);
1727 setFactorizationFrequency(lpi);
1730 if( lpi->startscratch )
1732 lpi->clp->allSlackBasis(
true);
1733 lpi->validFactorization =
false;
1743 int startFinishOptions = 1;
1744 if ( lpi->validFactorization )
1745 startFinishOptions = startFinishOptions | 2;
1748 int status = lpi->clp->dual(0, startFinishOptions);
1750 #ifdef LPI_CLP_DEBUG_WRITE_FILES 1751 char basisname[255];
1752 snprintf(basisname, 255,
"debug_d_%d.bas", fileNr);
1756 fileNr = fileNr % 2;
1759 lpi->validFactorization =
true;
1770 assert( status != -1 );
1771 assert( status != 5 );
1772 if ( status == 4 || status == 5 || status == -1 )
1786 assert(lpi->clp != 0);
1788 SCIPdebugMessage(
"calling Clp barrier(): %d cols, %d rows\n", lpi->clp->numberColumns(), lpi->clp->numberRows());
1790 invalidateSolution(lpi);
1799 int status = lpi->clp->barrier(crossover);
1812 assert( status != -1 );
1813 assert( status != 5 );
1814 if ( status == 4 || status == 5 || status == -1 )
1854 SCIPdebugMessage(
"calling SCIPlpiStrongbranch() on variable %d (%d iterations)\n", col, itlim);
1857 assert(lpi->clp != 0);
1860 assert(downvalid != 0);
1861 assert(upvalid != 0);
1863 ClpSimplex* clp = lpi->clp;
1866 int ncols = clp->numberColumns();
1867 assert( 0 <= col && col < ncols );
1868 double** outputSolution =
NULL;
1869 SCIP_ALLOC( BMSallocMemoryArray( &outputSolution, 2) );
1870 SCIP_ALLOC( BMSallocMemoryArray( &outputSolution[0], ncols) );
1871 SCIP_ALLOC( BMSallocMemoryArray( &outputSolution[1], ncols) );
1873 int* outputStatus =
NULL;
1874 SCIP_ALLOC( BMSallocMemoryArray( &outputStatus, 2) );
1876 int* outputIterations =
NULL;
1877 SCIP_ALLOC( BMSallocMemoryArray( &outputIterations, 2) );
1880 int iterlimit = clp->maximumIterations();
1881 clp->setMaximumIterations(itlim);
1884 double objval = clp->objectiveValue();
1887 int specialoptions = clp->specialOptions();
1926 clp->setSpecialOptions(64|512|1024);
1928 clp->setSpecialOptions(64|128|512|1024|4096);
1939 int startFinishOptions = 1;
1940 if ( lpi->validFactorization )
1941 startFinishOptions = startFinishOptions | 2;
1944 *down =
EPSCEIL(psol - 1.0, 1e-06);
1963 int res = clp->strongBranching(1, &col, up, down, outputSolution, outputStatus, outputIterations,
false,
true, startFinishOptions);
1966 clp->setSpecialOptions(specialoptions);
1968 lpi->validFactorization =
true;
1979 *iter = outputIterations[0] + outputIterations[1];
1982 clp->setMaximumIterations(iterlimit);
1985 BMSfreeMemoryArray( &outputStatus );
1986 BMSfreeMemoryArray( &outputIterations );
1987 BMSfreeMemoryArray( &outputSolution[1] );
1988 BMSfreeMemoryArray( &outputSolution[0] );
1989 BMSfreeMemoryArray( &outputSolution );
2014 SCIPdebugMessage(
"calling SCIPlpiStrongbranches() on %d variables (%d iterations)\n", ncols, itlim);
2017 assert( lpi->clp != 0 );
2018 assert( cols != 0 );
2019 assert( psols != 0 );
2020 assert( down != 0 );
2022 assert( downvalid != 0 );
2023 assert( upvalid != 0 );
2025 ClpSimplex* clp = lpi->clp;
2028 int n = clp->numberColumns();
2029 assert( 0 < ncols && ncols <= n );
2030 double** outputSolution =
NULL;
2031 SCIP_ALLOC( BMSallocMemoryArray( &outputSolution, 2*ncols) );
2032 for (
int j = 0; j < 2*ncols; ++j)
2034 SCIP_ALLOC( BMSallocMemoryArray( &(outputSolution[j]), n) );
2037 int* outputStatus =
NULL;
2038 SCIP_ALLOC( BMSallocMemoryArray(&outputStatus, 2*ncols) );
2040 int* outputIterations =
NULL;
2041 SCIP_ALLOC( BMSallocMemoryArray(&outputIterations, 2*ncols) );
2044 int iterlimit = clp->maximumIterations();
2045 clp->setMaximumIterations(itlim);
2048 double objval = clp->objectiveValue();
2051 int specialoptions = clp->specialOptions();
2090 clp->setSpecialOptions(64|512|1024);
2092 clp->setSpecialOptions(64|128|512|1024|4096);
2103 int startFinishOptions = 1;
2104 if ( lpi->validFactorization )
2105 startFinishOptions = startFinishOptions | 2;
2108 for (
int j = 0; j < ncols; ++j)
2110 assert( 0 <= cols[j] && cols[j] < n );
2111 down[j] =
EPSCEIL(psols[j] - 1.0, 1e-06);
2112 up[j] =
EPSFLOOR(psols[j] + 1.0, 1e-06);
2115 downvalid[j] =
TRUE;
2134 int res = clp->strongBranching(ncols, cols, up, down, outputSolution, outputStatus, outputIterations,
false,
true, startFinishOptions);
2137 clp->setSpecialOptions(specialoptions);
2139 lpi->validFactorization =
true;
2141 for (
int j = 0; j < ncols; ++j)
2148 *iter += outputIterations[2*j] + outputIterations[2*j+1];
2150 BMSfreeMemoryArray(&outputSolution[2*j]);
2151 BMSfreeMemoryArray(&outputSolution[2*j+1]);
2155 clp->setMaximumIterations(iterlimit);
2158 BMSfreeMemoryArray( &outputStatus );
2159 BMSfreeMemoryArray( &outputIterations );
2160 BMSfreeMemoryArray( &outputSolution );
2184 SCIP_CALL( lpiStrongbranch(lpi, col, psol, itlim, down, up, downvalid, upvalid, iter) );
2209 SCIP_CALL( lpiStrongbranches(lpi, cols, ncols, psols, itlim, down, up, downvalid, upvalid, iter) );
2230 SCIP_CALL( lpiStrongbranch(lpi, col, psol, itlim, down, up, downvalid, upvalid, iter) );
2255 SCIP_CALL( lpiStrongbranches(lpi, cols, ncols, psols, itlim, down, up, downvalid, upvalid, iter) );
2275 assert(lpi !=
NULL);
2290 assert(lpi->clp != 0);
2291 assert(primalfeasible != 0);
2292 assert(dualfeasible != 0);
2294 if ( lpi->clp->primalFeasible() )
2295 *primalfeasible =
TRUE;
2297 *primalfeasible =
FALSE;
2299 if ( lpi->clp->dualFeasible() )
2300 *dualfeasible =
TRUE;
2302 *dualfeasible =
FALSE;
2305 if (lpi->clp->status()==0 && ( ! (*primalfeasible) || ! (*dualfeasible)) )
2307 if ( !(*primalfeasible) && lpi->clp->sumPrimalInfeasibilities() <
SUMINFEASBOUND )
2309 lpi->clp->setNumberPrimalInfeasibilities(0);
2310 *primalfeasible =
TRUE;
2312 if ( !(*dualfeasible) && lpi->clp->sumDualInfeasibilities() <
SUMINFEASBOUND)
2314 lpi->clp->setNumberDualInfeasibilities(0);
2315 *dualfeasible =
TRUE;
2333 assert(lpi->clp != 0);
2337 return ( lpi->clp->status() == 2 );
2351 assert(lpi->clp != 0);
2355 return ( lpi->clp->status() == 2 );
2367 assert(lpi->clp != 0);
2369 return ( lpi->clp->isProvenDualInfeasible() && lpi->clp->primalFeasible() );
2381 assert(lpi->clp != 0);
2388 return ( lpi->clp->status() == 1 && (lpi->clp->secondaryStatus() == 0 || lpi->clp->secondaryStatus() == 6) );
2400 assert(lpi->clp != 0);
2402 return ( lpi->clp->primalFeasible() );
2416 assert(lpi->clp != 0);
2420 return ( lpi->clp->status() == 1 && lpi->clp->secondaryStatus() == 0 && lpi->clp->algorithm() < 0 );
2434 assert(lpi->clp != 0);
2438 if ( lpi->clp->rayExists() )
2440 if ( lpi->clp->status() == 1 && lpi->clp->secondaryStatus() == 0 && lpi->clp->algorithm() < 0)
2444 if ( lpi->clp->status() != 2 || lpi->clp->algorithm() <= 0 )
2445 lpi->clp->deleteRay();
2462 assert(lpi->clp != 0);
2467 return ( lpi->clp->status() == 1 && lpi->clp->secondaryStatus() == 0 && lpi->clp->dualFeasible() );
2479 assert(lpi->clp != 0);
2481 return ( lpi->clp->isProvenDualInfeasible() );
2493 assert(lpi->clp != 0);
2495 return ( lpi->clp->dualFeasible() );
2507 assert(lpi->clp != 0);
2513 return( lpi->clp->isProvenOptimal() && (lpi->clp->secondaryStatus() == 0 || lpi->clp->secondaryStatus() == 6));
2525 assert(lpi->clp != 0);
2549 SCIPdebugMessage(
"status: %d secondary: %d\n", lpi->clp->status(), lpi->clp->secondaryStatus());
2550 assert( 0 <= lpi->clp->status() && lpi->clp->status() <= 5 );
2551 return( (lpi->clp->status() <= 3) && (lpi->clp->secondaryStatus() <= 1 || lpi->clp->secondaryStatus() == 6 || lpi->clp->secondaryStatus() == 9) );
2563 assert(lpi->clp != 0);
2566 if ( lpi->clp->status() == 1 )
2568 if ( lpi->clp->secondaryStatus() == 1 )
2574 return ( lpi->clp->isObjectiveLimitTestValid() && (lpi->clp->isPrimalObjectiveLimitReached() || lpi->clp->isDualObjectiveLimitReached()) );
2595 assert(lpi->clp != 0);
2599 return ( lpi->clp->status() == 3 && lpi->clp->secondaryStatus() != 9 );
2611 assert(lpi->clp != 0);
2615 return ( lpi->clp->status() == 3 && lpi->clp->secondaryStatus() == 9 );
2627 assert(lpi->clp != 0);
2629 return lpi->clp->status();
2642 assert(lpi->clp != 0);
2643 assert(objval != 0);
2645 *objval = lpi->clp->objectiveValue();
2664 assert(lpi->clp != 0);
2666 ClpSimplex* clp = lpi->clp;
2668 *objval = clp->objectiveValue();
2672 const double* sol = clp->getColSolution();
2673 BMScopyMemoryArray( primsol, sol, clp->numberColumns() );
2677 const double* dsol = clp->getRowPrice();
2678 BMScopyMemoryArray( dualsol, dsol, clp->numberRows() );
2682 const double* act = clp->getRowActivity();
2683 BMScopyMemoryArray( activity, act, clp->numberRows() );
2687 const double* red = clp->getReducedCost();
2688 BMScopyMemoryArray( redcost, red, clp->numberColumns() );
2704 assert(lpi->clp != 0);
2708 const double* clpray = lpi->clp->unboundedRay();
2713 BMScopyMemoryArray( ray, clpray, lpi->clp->numberColumns() );
2729 assert(lpi->clp != 0);
2730 assert(dualfarkas != 0);
2733 const double* dualray = lpi->clp->infeasibilityRay();
2738 BMScopyMemoryArray( dualfarkas, dualray, lpi->clp->numberRows() );
2759 assert(iterations != 0);
2761 *iterations = lpi->clp->numberIterations();
2777 assert(lpi !=
NULL);
2778 assert(quality !=
NULL);
2807 assert(lpi->clp != 0);
2809 ClpSimplex* clp = lpi->clp;
2814 for(
int i = 0; i < clp->numberRows(); ++i )
2816 switch ( clp->getRowStatus(i) )
2818 case ClpSimplex::isFree:
2821 case ClpSimplex::basic:
2824 case ClpSimplex::atUpperBound:
2827 case ClpSimplex::atLowerBound:
2830 case ClpSimplex::superBasic:
2833 case ClpSimplex::isFixed:
2834 if (clp->getRowPrice()[i] > 0.0)
2849 for(
int j = 0; j < clp->numberColumns(); ++j )
2851 switch ( clp->getColumnStatus(j) )
2853 case ClpSimplex::isFree:
2856 case ClpSimplex::basic:
2859 case ClpSimplex::atUpperBound:
2862 case ClpSimplex::atLowerBound:
2865 case ClpSimplex::superBasic:
2868 case ClpSimplex::isFixed:
2869 if (clp->getReducedCost()[j] > 0.0)
2895 assert(lpi->clp != 0);
2897 invalidateSolution(lpi);
2901 ClpSimplex* clp = lpi->clp;
2902 clp->createStatus();
2904 const double* lhs = clp->getRowLower();
2905 const double* rhs = clp->getRowUpper();
2907 assert( rstat != 0 || clp->numberRows() == 0 );
2908 for(
int i = 0; i < clp->numberRows(); ++i )
2910 int status = rstat[i];
2911 assert( 0 <= status && status <= 3 );
2918 if (lhs[i] <= -COIN_DBL_MAX && rhs[i] >= COIN_DBL_MAX)
2919 clp->setRowStatus(i, ClpSimplex::isFree);
2921 clp->setRowStatus(i, ClpSimplex::superBasic);
2924 clp->setRowStatus(i, ClpSimplex::basic);
2927 clp->setRowStatus(i, ClpSimplex::atUpperBound);
2930 if (
EPSEQ(rhs[i], lhs[i], 1e-6) )
2931 clp->setRowStatus(i, ClpSimplex::isFixed);
2933 clp->setRowStatus(i, ClpSimplex::atLowerBound);
2942 const double* lb = clp->getColLower();
2943 const double* ub = clp->getColUpper();
2945 assert( cstat != 0 || clp->numberColumns() == 0 );
2946 for(
int j = 0; j < clp->numberColumns(); ++j )
2948 int status = cstat[j];
2949 assert( 0 <= status && status <= 3 );
2956 if (lb[j] <= -COIN_DBL_MAX && ub[j] >= COIN_DBL_MAX)
2957 clp->setColumnStatus(j, ClpSimplex::isFree);
2959 clp->setColumnStatus(j, ClpSimplex::superBasic);
2962 clp->setColumnStatus(j, ClpSimplex::basic);
2965 clp->setColumnStatus(j, ClpSimplex::atUpperBound);
2968 if (
EPSEQ(ub[j], lb[j], 1e-6) )
2969 clp->setColumnStatus(j, ClpSimplex::isFixed);
2971 clp->setColumnStatus(j, ClpSimplex::atLowerBound);
2994 clp->setWhatsChanged(clp->whatsChanged() & (~512));
3010 assert(lpi->clp != 0);
3013 ClpSimplex* clp = lpi->clp;
3014 int nrows = clp->numberRows();
3015 int ncols = clp->numberColumns();
3018 SCIP_ALLOC( BMSallocMemoryArray(&idx, nrows) );
3023 if ( clp->secondaryStatus() == 6 )
3025 assert( clp->getNumElements() == 0 );
3026 for (
int i = 0; i < nrows; ++i)
3030 clp->getBasics(idx);
3032 for (
int i = 0; i < nrows; ++i)
3034 if ( idx[i] < ncols )
3037 bind[i] = -1 - (idx[i] - ncols);
3040 BMSfreeMemoryArray(&idx);
3066 assert( lpi->clp != 0 );
3067 assert( coef != 0 );
3068 assert( 0 <= r && r <= lpi->clp->numberRows() );
3071 if ( ninds !=
NULL )
3074 ClpSimplex* clp = lpi->clp;
3075 clp->getBInvRow(r, coef);
3105 assert( lpi->clp != 0 );
3106 assert( coef != 0 );
3107 assert( 0 <= c && c <= lpi->clp->numberRows() );
3110 if ( ninds !=
NULL )
3113 ClpSimplex* clp = lpi->clp;
3114 clp->getBInvCol(c, coef);
3140 assert( lpi->clp != 0 );
3141 assert( coef != 0 );
3142 assert( 0 <= r && r <= lpi->clp->numberRows() );
3145 if ( ninds !=
NULL )
3148 ClpSimplex* clp = lpi->clp;
3149 clp->getBInvARow(r, coef, 0);
3174 assert( lpi->clp != 0 );
3175 assert( coef != 0 );
3176 assert( 0 <= c && c <= lpi->clp->numberColumns() );
3179 if ( ninds !=
NULL )
3182 ClpSimplex* clp = lpi->clp;
3183 clp->getBInvACol(c, coef);
3210 assert(blkmem != 0);
3212 assert(lpi->clp != 0);
3213 assert(lpistate != 0);
3215 int ncols = lpi->clp->numberColumns();
3216 int nrows = lpi->clp->numberRows();
3221 SCIP_CALL( lpistateCreate(lpistate, blkmem, ncols, nrows) );
3224 SCIP_CALL( ensureCstatMem(lpi, ncols) );
3225 SCIP_CALL( ensureRstatMem(lpi, nrows) );
3231 (*lpistate)->ncols = ncols;
3232 (*lpistate)->nrows = nrows;
3233 lpistatePack(*lpistate, lpi->cstat, lpi->rstat);
3255 assert(lpi->clp != 0);
3256 assert(lpistate != 0);
3258 lpncols = lpi->clp->numberColumns();
3259 lpnrows = lpi->clp->numberRows();
3260 assert(lpistate->ncols <= lpncols);
3261 assert(lpistate->nrows <= lpnrows);
3264 SCIP_CALL( ensureCstatMem(lpi, lpncols) );
3265 SCIP_CALL( ensureRstatMem(lpi, lpnrows) );
3268 lpistateUnpack(lpistate, lpi->cstat, lpi->rstat);
3271 for( i = lpistate->ncols; i < lpncols; ++i )
3273 SCIP_Real bnd = (lpi->clp->getColLower())[i];
3277 bnd = (lpi->clp->getColUpper())[i];
3286 for( i = lpistate->nrows; i < lpnrows; ++i )
3303 assert(lpi->clp != 0);
3305 lpi->clp->allSlackBasis(
true);
3306 lpi->validFactorization =
false;
3321 assert(lpistate !=
NULL);
3323 if ( *lpistate !=
NULL )
3324 lpistateFree(lpistate, blkmem);
3335 return (lpistate !=
NULL);
3349 if ( lpi->clp->readBasis(fname) < 0 )
3372 if ( lpi->clp->writeBasis(fname,
false, 0) )
3399 assert(lpinorms !=
NULL);
3415 assert(lpinorms ==
NULL);
3428 assert(lpinorms ==
NULL);
3456 assert(lpi->clp != 0);
3462 *ival = lpi->startscratch;
3465 if( lpi->clp->scalingFlag() != 0 )
3471 *ival = (int)lpi->pricing;
3474 *ival = lpi->clp->logLevel() > 0 ?
TRUE :
FALSE;
3477 *ival = lpi->clp->maximumIterations();
3480 *ival = lpi->fastmip;
3500 assert(lpi->clp != 0);
3525 primalmode = 3; dualmode = 3;
break;
3527 primalmode = 0; dualmode = 1;
break;
3530 primalmode = 1; dualmode = 0;
break;
3532 primalmode = 1; dualmode = 2;
break;
3534 primalmode = 2; dualmode = 3;
break;
3540 ClpPrimalColumnSteepest primalpivot(primalmode);
3541 lpi->clp->setPrimalColumnPivotAlgorithm(primalpivot);
3542 ClpDualRowSteepest dualpivot(dualmode);
3543 lpi->clp->setDualRowPivotAlgorithm(dualpivot);
3550 lpi->startscratch = ival;
3553 lpi->clp->scaling(ival ==
TRUE ? 3 : 0);
3570 lpi->clp->setLogLevel(2);
3572 lpi->clp->setLogLevel(0);
3575 lpi->clp->setMaximumIterations(ival);
3580 setFastmipClpParameters(lpi);
3582 unsetFastmipClpParameters(lpi);
3602 assert(lpi->clp != 0);
3608 *dval = lpi->clp->primalTolerance();
3611 *dval = lpi->clp->dualTolerance();
3617 if ( lpi->clp->optimizationDirection() > 0 )
3618 *dval = lpi->clp->primalObjectiveLimit();
3620 *dval = lpi->clp->dualObjectiveLimit();
3623 if ( lpi->clp->optimizationDirection() > 0 )
3624 *dval = lpi->clp->dualObjectiveLimit();
3626 *dval = lpi->clp->primalObjectiveLimit();
3629 *dval = lpi->clp->maximumSeconds();
3648 assert(lpi->clp != 0);
3653 lpi->clp->setPrimalTolerance(dval);
3656 lpi->clp->setDualTolerance(dval);
3662 if ( lpi->clp->optimizationDirection() > 0 )
3663 lpi->clp->setPrimalObjectiveLimit(dval);
3665 lpi->clp->setDualObjectiveLimit(dval);
3668 if ( lpi->clp->optimizationDirection() > 0 )
3669 lpi->clp->setDualObjectiveLimit(dval);
3671 lpi->clp->setPrimalObjectiveLimit(dval);
3674 lpi->clp->setMaximumSeconds(dval);
3702 return COIN_DBL_MAX;
3714 return (val >= COIN_DBL_MAX);
3732 const char* filename
3737 f = fopen(filename,
"r");
3755 assert(lpi->clp != 0);
3759 if ( !fileExists(fname) )
3768 if ( lpi->clp->readMps(fname,
true,
false) )
3783 assert(lpi->clp != 0);
3792 if ( lpi->clp->writeMps(fname, 0, 2, lpi->clp->optimizationDirection()) )
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 SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
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 SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
unsigned int SCIP_DUALPACKET
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
enum SCIP_ObjSen SCIP_OBJSEN
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
interface methods for specific LP solvers
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
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)
enum SCIP_Retcode SCIP_RETCODE
enum SCIP_LPParam SCIP_LPPARAM
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
enum SCIP_Pricing SCIP_PRICING
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_DUALPACKET COLPACKET
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiStrongbranchesFrac(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_Real SCIPlpiInfinity(SCIP_LPI * )
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
struct SCIP_LPiState SCIP_LPISTATE
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
const char * SCIPlpiGetSolverDesc(void)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS *lpinorms)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetCols(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
const char * SCIPlpiGetSolverName(void)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
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 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 SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClear(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)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, int *ind, SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
public methods for message output
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *, SCIP_Real val)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
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 SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)