39#define STRONGBRANCH_RESTOREBASIS
47#include "scip/config.h"
50#ifdef SCIP_WITH_LPSCHECK
53#define CHECK_SPXSOLVE true
54#define CHECK_SPXSTRONGBRANCH true
56#define EXIT_AT_WRONG_RESULT false
57#define EXIT_AT_CPXERROR false
59#define CPX_CALL(x) do \
62 if( (_cpxstat_ = (x)) != 0 ) \
64 SCIPmessagePrintWarning(_messagehdlr, "CPLEX error <%d>; SoPlex result unchecked\n", _cpxstat_); \
65 if( EXIT_AT_CPXERROR ) \
79#define CHECK_SOPLEX_PARAM(x) \
82 SCIPmessagePrintWarning(_messagehdlr, "SoPlex: unsupported parameter value\n"); \
93#pragma GCC visibility push(default)
94#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
101#ifndef SOPLEX_SUBVERSION
102#define SOPLEX_SUBVERSION 0
105#ifndef SOPLEX_APIVERSION
106#define SOPLEX_APIVERSION 0
110#if (SOPLEX_VERSION < 200 || (SOPLEX_VERSION == 200 && SOPLEX_SUBVERSION < 2) || (SOPLEX_VERSION > 200 && SOPLEX_VERSION < 201))
111#error "This interface is not compatible with SoPlex versions prior to 2.0.0.2"
114#if (SOPLEX_APIVERSION <= 5)
115#include "spxgithash.h"
126#if defined(_MSC_VER) && _MSC_VER < 1900
128#define snprintf _snprintf
132#define SOPLEX_VERBLEVEL 5
145using namespace soplex;
153#define SOPLEX_TRY(messagehdlr, x) do \
159 catch( const SPxMemoryException& E ) \
161 std::string s = E.what(); \
162 SCIPerrorMessage("SoPlex threw a memory exception: %s\n", s.c_str()); \
165 catch( const SPxException& E ) \
167 std::string s = E.what(); \
168 SCIPmessagePrintWarning((messagehdlr), "SoPlex threw an exception: %s\n", s.c_str()); \
169 return SCIP_LPERROR; \
175#define SOPLEX_TRY(messagehdlr, x) do \
181 catch( const SPxMemoryException& E ) \
183 std::string s = E.what(); \
184 SCIPerrorMessage("SoPlex threw a memory exception: %s\n", s.c_str()); \
187 catch( const SPxException& ) \
189 return SCIP_LPERROR; \
198#define SOPLEX_TRY_ABORT(x) do \
204 catch( const SPxException& E ) \
206 std::string s = E.what(); \
207 SCIPerrorMessage("SoPlex threw an exception: %s\n", s.c_str()); \
216class SPxSCIP :
public SoPlex
224#ifdef SCIP_WITH_LPSCHECK
235 const char* probname =
NULL
242 _messagehdlr(messagehdlr)
244 if ( probname !=
NULL )
247#if SOPLEX_APIVERSION >= 2
251#ifdef SCIP_WITH_LPSCHECK
264 if( _probname !=
NULL )
267 freePreStrongbranchingBasis();
269#ifdef SCIP_WITH_LPSCHECK
305 Real getObjLimit()
const
307 return (
intParam(SoPlex::OBJSENSE) == SoPlex::OBJSENSE_MINIMIZE)
313 bool getFromScratch()
const
318 void setFromScratch(
bool fs)
323 void setInterrupt(
bool interrupt)
325 _interrupt = interrupt;
334 bool getLpInfo()
const
339 void setLpInfo(
bool lpinfo)
345 void setProbname(
const char* probname)
350 if( _probname !=
NULL )
355 memcpy(_probname, probname, len + 1);
358 void setRep(SPxSolver::Representation
p_rep)
372#ifdef SCIP_WITH_LPSCHECK
388 case SPxSolver::ABORT_TIME:
390 case SPxSolver::ABORT_ITER:
392 case SPxSolver::ABORT_VALUE:
393 return "ABORT_VALUE";
394 case SPxSolver::SINGULAR:
396 case SPxSolver::REGULAR:
398 case SPxSolver::UNKNOWN:
400 case SPxSolver::OPTIMAL:
402#if SOPLEX_APIVERSION >= 3
403 case SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS:
404 return "OPTIMAL_UNSCALED_VIOLATIONS";
406 case SPxSolver::UNBOUNDED:
408 case SPxSolver::INFEASIBLE:
424 return "ABORT_VALUE";
428 return "CPX_STAT_OPTIMAL_INFEAS: OPT SOL INFEASIBLE AFTER UNSCALING";
434 return "INFEASIBLE or UNBOUNDED";
436 return "CPX_STAT_NUM_BEST: SOL AVAILABLE BUT NOT PROVEN OPTIMAL DUE TO NUM TROUBLE";
444 bool checkConsistentBounds()
const
450 SCIPerrorMessage(
"inconsistent bounds on column %d: lower=%.17g, upper=%.17g\n",
459 bool checkConsistentSides()
const
482#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
483#if SOPLEX_APIVERSION > 11
494 std::string s =
x.what();
504 assert(status() != SPxSolver::OPTIMAL);
535 assert(checkConsistentBounds());
536 assert(checkConsistentSides());
538#ifdef SCIP_WITH_LPSCHECK
550#ifdef SCIP_WITH_LPSCHECK
580 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s)\n",
589 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
594 else if(
spxStatus == SPxSolver::ABORT_VALUE )
602 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
610 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
619 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
627 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
634 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
640 else if(
spxStatus == SPxSolver::OPTIMAL )
669 void savePreStrongbranchingBasis()
676 getBasis(_rowStat.get_ptr(), _colStat.get_ptr());
681 std::string s =
x.what();
688 assert(status() != SPxSolver::OPTIMAL);
697 void restorePreStrongbranchingBasis()
704 setBasis(_rowStat.get_ptr(), _colStat.get_ptr());
709 std::string s =
x.what();
719 assert(status() != SPxSolver::OPTIMAL);
724 void freePreStrongbranchingBasis()
731 bool preStrongbranchingBasisFreed()
const
733 return ((_rowStat.size() == 0 ) && (_colStat.size() == 0));
761#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
763#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
777 SCIP_Real conditionlimit;
778 SCIP_Bool checkcondition;
976#if (SOPLEX_SUBVERSION > 0)
977 const static char spxname[20] = {
'S',
'o',
'p',
'l',
'e',
'x',
' ',
SOPLEX_VERSION/100 +
'0',
'.', (
SOPLEX_VERSION % 100)/10 +
'0',
'.',
SOPLEX_VERSION % 10 +
'0',
'.',
SOPLEX_SUBVERSION +
'0'};
979 const static char spxname[20] = {
'S',
'o',
'p',
'l',
'e',
'x',
' ',
SOPLEX_VERSION/100 +
'0',
'.', (
SOPLEX_VERSION % 100)/10 +
'0',
'.',
SOPLEX_VERSION % 10 +
'0'};
981const static char spxdesc[200] = {
'L',
'i',
'n',
'e',
'a',
'r',
' ',
'P',
'r',
'o',
'g',
'r',
'a',
'm',
'm',
'i',
'n',
'g',
982 ' ',
'S',
'o',
'l',
'v',
'e',
'r',
' ' ,
'd',
'e',
'v',
'e',
'l',
'o',
'p',
'e',
'd',
983 ' ',
'a',
't',
' ',
'Z',
'u',
's',
'e',
' ',
'I',
'n',
's',
't',
'i',
't',
'u',
't',
'e',
984 ' ',
'B',
'e',
'r',
'l',
'i',
'n',
' ',
'(',
's',
'o',
'p',
'l',
'e',
'x',
'.',
'z',
'i',
'b',
'.',
'd',
'e',
')',
985#ifdef SCIP_WITH_LPSCHECK
986 ' ',
'-',
' ',
'i',
'n',
'c',
'l',
'u',
'd',
'i',
'n',
'g',
' ',
'C',
'P',
'L',
'E',
'X',
987 ' ',
'd',
'o',
'u',
'b',
'l',
'e',
' ',
'c',
'h',
'e',
'c',
'k',
989 ' ',
'[',
'G',
'i',
't',
'H',
'a',
's',
'h',
':',
' ',
1019 return (
void*) lpi->
spx;
1033#if (SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 3))
1035 lpi->
spx->setIntegralityInformation(ncols,
intInfo);
1038 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
1095 SOPLEX_TRY( messagehdlr, (*lpi)->spx =
new ((*lpi)->spx) SPxSCIP(messagehdlr, name) );
1096 (
void) (*lpi)->spx->setIntParam(SoPlex::SYNCMODE, SoPlex::SYNCMODE_ONLYREAL);
1097 (
void) (*lpi)->spx->setIntParam(SoPlex::SOLVEMODE, SoPlex::SOLVEMODE_REAL);
1098 (
void) (*lpi)->spx->setIntParam(SoPlex::REPRESENTATION, SoPlex::REPRESENTATION_AUTO);
1101#if SOPLEX_APIVERSION >= 10
1102 (
void) (*lpi)->spx->setIntParam(SoPlex::STATTIMER, 0);
1105 (*lpi)->cstat =
NULL;
1106 (*lpi)->rstat =
NULL;
1107 (*lpi)->cstatsize = 0;
1108 (*lpi)->rstatsize = 0;
1110 (*lpi)->conditionlimit = -1.0;
1111 (*lpi)->checkcondition =
FALSE;
1112 (*lpi)->messagehdlr = messagehdlr;
1123 (*lpi)->spx->setInterrupt(
FALSE);
1124 SPxOut::Verbosity
verbosity = (*lpi)->spx->spxout.getVerbosity();
1125 (*lpi)->spx->spxout.setVerbosity((SPxOut::Verbosity)((*lpi)->spx->getLpInfo() ?
SOPLEX_VERBLEVEL : 0));
1126 (*lpi)->spx->printVersion();
1127 (*lpi)->spx->spxout.setVerbosity(
verbosity);
1143 (*lpi)->spx->~SPxSCIP();
1171 const SCIP_Real*
obj,
1172 const SCIP_Real* lb,
1173 const SCIP_Real* ub,
1176 const SCIP_Real* lhs,
1177 const SCIP_Real* rhs,
1182 const SCIP_Real* val
1188 for(
j = 0;
j < nnonz;
j++ )
1207 assert(lpi->
spx->preStrongbranchingBasisFreed());
1211 SPxSCIP* spx = lpi->
spx;
1222 for(
i = 0;
i < nrows; ++
i )
1224 spx->addRowsReal(rows);
1232 std::string s =
x.what();
1248 const SCIP_Real*
obj,
1249 const SCIP_Real* lb,
1250 const SCIP_Real* ub,
1255 const SCIP_Real* val
1273 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1279 int nrows = lpi->
spx->numRowsReal();
1280 for (
int j = 0;
j < nnonz; ++
j)
1288 SPxSCIP* spx = lpi->
spx;
1298 for(
i = 0;
i < ncols; ++
i )
1304 last = (
i == ncols-1 ? nnonz :
beg[
i+1]);
1309 spx->addColsReal(cols);
1314 std::string s =
x.what();
1341 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1367 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1369 ncols = lpi->
spx->numColsReal();
1372 for(
i = 0;
i < ncols; ++
i )
1384 const SCIP_Real* lhs,
1385 const SCIP_Real* rhs,
1390 const SCIP_Real* val
1405 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1411 int ncols = lpi->
spx->numColsReal();
1412 for (
int j = 0;
j < nnonz; ++
j)
1422 SPxSCIP* spx = lpi->
spx;
1430 for(
i = 0;
i < nrows; ++
i )
1436 last = (
i == nrows-1 ? nnonz :
beg[
i+1]);
1441 spx->addRowsReal(rows);
1446 std::string s =
x.what();
1473 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1498 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1500 nrows = lpi->
spx->numRowsReal();
1503 for(
i = 0;
i < nrows; ++
i )
1523 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1534 const SCIP_Real* lb,
1550 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1554 for(
i = 0;
i < ncols; ++
i )
1569 lpi->
spx->changeBoundsReal(
ind[
i], lb[
i], ub[
i]);
1570 assert(lpi->
spx->lowerReal(
ind[
i]) <= lpi->
spx->upperReal(
ind[
i]) + lpi->
spx->realParam(SoPlex::EPSILON_ZERO));
1576 std::string s =
x.what();
1593 const SCIP_Real* lhs,
1594 const SCIP_Real* rhs
1611 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1615 for(
i = 0;
i < nrows; ++
i )
1618 lpi->
spx->changeRangeReal(
ind[
i], lhs[
i], rhs[
i]);
1625 std::string s =
x.what();
1654 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1674 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1686 const SCIP_Real*
obj
1700 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1704 for(
i = 0;
i < ncols; ++
i )
1713 std::string s =
x.what();
1745 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1748#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
1753 lhs = lpi->
spx->lhsReal(row);
1754 rhs = lpi->
spx->rhsReal(row);
1760 if( lhs > -lpi->
spx->realParam(SoPlex::INFTY) )
1762 else if( scaleval < 0.0 )
1763 lhs = lpi->
spx->realParam(SoPlex::INFTY);
1766 else if( scaleval < 0.0 )
1767 rhs = -lpi->
spx->realParam(SoPlex::INFTY);
1768 if( scaleval < 0.0 )
1779 lpi->
spx->changeRowReal(row,
lprow);
1780 assert(lpi->
spx->lhsReal(row) <= lpi->
spx->rhsReal(row));
1785 std::string s =
x.what();
1820 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1823#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
1828 obj = lpi->
spx->objReal(col);
1829 lb = lpi->
spx->lowerReal(col);
1830 ub = lpi->
spx->upperReal(col);
1839 if( lb > -lpi->
spx->realParam(SoPlex::INFTY) )
1841 else if( scaleval < 0.0 )
1842 lb = lpi->
spx->realParam(SoPlex::INFTY);
1843 if(
ub < lpi->spx->realParam(SoPlex::INFTY) )
1845 else if( scaleval < 0.0 )
1846 ub = -lpi->
spx->realParam(SoPlex::INFTY);
1847 if( scaleval < 0.0 )
1849 SCIP_Real
oldlb = lb;
1858 lpi->
spx->changeColReal(col,
lpcol);
1859 assert(lpi->
spx->lowerReal(col) <= lpi->
spx->upperReal(col));
1864 std::string s =
x.what();
1900 *nrows = lpi->
spx->numRowsReal();
1917 *ncols = lpi->
spx->numColsReal();
1938 if( lpi->
spx->numRowsReal() < lpi->
spx->numColsReal() )
1940 for(
i = 0;
i < lpi->
spx->numRowsReal(); ++
i )
1942 (*nnonz) += lpi->
spx->rowVectorRealInternal(
i).size();
1944 (*nnonz) += lpi->
spx->rowVectorReal(
i).size();
1949 for(
i = 0;
i < lpi->
spx->numColsReal(); ++
i )
1951 (*nnonz) += lpi->
spx->colVectorRealInternal(
i).size();
1953 (*nnonz) += lpi->
spx->colVectorReal(
i).size();
1989#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
1990 if( lpi->
spx->boolParam(SoPlex::PERSISTENTSCALING) )
2031#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2032 if( lpi->
spx->boolParam(SoPlex::PERSISTENTSCALING) )
2035 lpi->
spx->getColVectorReal(
i,
cvec);
2036 for(
j = 0;
j <
cvec.size(); ++
j )
2039 val[*nnonz] =
cvec.value(
j);
2046 for(
j = 0;
j <
cvec.size(); ++
j )
2049 val[*nnonz] =
cvec.value(
j);
2055 for(
j = 0;
j <
cvec.size(); ++
j )
2058 val[*nnonz] =
cvec.value(
j);
2097#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2098 if( lpi->
spx->boolParam(SoPlex::PERSISTENTSCALING) )
2136 beg[
i-firstrow] = *nnonz;
2138#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2139 if( lpi->
spx->boolParam(SoPlex::PERSISTENTSCALING) )
2142 lpi->
spx->getRowVectorReal(
i,
rvec);
2143 for(
j = 0;
j <
rvec.size(); ++
j )
2146 val[*nnonz] =
rvec.value(
j);
2153 for(
j = 0;
j <
rvec.size(); ++
j )
2156 val[*nnonz] =
rvec.value(
j);
2162 for(
j = 0;
j <
rvec.size(); ++
j )
2165 val[*nnonz] =
rvec.value(
j);
2315 lhss[
i-firstrow] = lpi->
spx->lhsReal(
i);
2317 rhss[
i-firstrow] = lpi->
spx->rhsReal(
i);
2339#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2340 *val = lpi->
spx->coefReal(row, col);
2342 *val = lpi->
spx->colVectorReal(col)[row];
2374 SCIPdebugMessage(
"calling SoPlex solve(): %d cols, %d rows\n", lpi->
spx->numColsReal(), lpi->
spx->numRowsReal());
2378 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2380#ifdef SCIP_WITH_LPSCHECK
2385 if( lpi->
spx->getFromScratch() )
2389 lpi->
spx->clearBasis();
2394 std::string s =
x.what();
2400 assert( lpi->
spx->status() != SPxSolver::OPTIMAL );
2404 assert(!lpi->
spx->getFromScratch() || lpi->
spx->status() == SPxSolver::NO_PROBLEM);
2406 SPxSolver::Status status = lpi->
spx->doSolve();
2407 SCIPdebugMessage(
" -> SoPlex status: %d, basis status: %d\n", lpi->
spx->status(), lpi->
spx->basisStatus());
2415 case SPxSolver::ABORT_TIME:
2416 case SPxSolver::ABORT_ITER:
2417 case SPxSolver::ABORT_VALUE:
2418 case SPxSolver::SINGULAR:
2419 case SPxSolver::REGULAR:
2420 case SPxSolver::UNKNOWN:
2421 case SPxSolver::OPTIMAL:
2422#if SOPLEX_APIVERSION >= 3
2423 case SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS:
2425 case SPxSolver::UNBOUNDED:
2426 case SPxSolver::INFEASIBLE:
2443 (
void) lpi->
spx->setIntParam(SoPlex::ALGORITHM, SoPlex::ALGORITHM_PRIMAL);
2457 (
void) lpi->
spx->setIntParam(SoPlex::ALGORITHM, SoPlex::ALGORITHM_DUAL);
2484 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2485 lpi->
spx->savePreStrongbranchingBasis();
2498 assert( ! lpi->
spx->preStrongbranchingBasisFreed() );
2499 lpi->
spx->restorePreStrongbranchingBasis();
2500 lpi->
spx->freePreStrongbranchingBasis();
2525 SPxSolver::Status status;
2549#ifndef STRONGBRANCH_RESTOREBASIS
2553 oldItlim = spx->intParam(SoPlex::ITERLIMIT);
2556 oldlb = spx->lowerReal(col);
2557 oldub = spx->upperReal(col);
2566 (
void) spx->setIntParam(SoPlex::ALGORITHM, SoPlex::ALGORITHM_DUAL);
2574 spx->changeUpperReal(col,
newub);
2575 assert(spx->lowerReal(col) <= spx->upperReal(col));
2577 (
void) spx->setIntParam(SoPlex::ITERLIMIT,
itlim);
2580#ifndef STRONGBRANCH_RESTOREBASIS
2583#ifdef SCIP_WITH_LPSCHECK
2586#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2587#if SOPLEX_APIVERSION > 11
2588 status = spx->optimize(spx->getInterrupt());
2590 status = spx->optimize();
2593 status = spx->solve();
2598 case SPxSolver::OPTIMAL:
2599 *
down = spx->objValueReal();
2603 case SPxSolver::ABORT_TIME:
2604 case SPxSolver::ABORT_ITER:
2605 case SPxSolver::ABORT_CYCLING:
2606#if SOPLEX_APIVERSION >= 3
2607 case SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS:
2609 *
down = spx->objValueReal();
2611 case SPxSolver::ABORT_VALUE:
2612 case SPxSolver::INFEASIBLE:
2613 *
down = spx->getObjLimit();
2621 (*iter) += spx->numIterations();
2623#ifdef STRONGBRANCH_RESTOREBASIS
2625 assert( ! spx->preStrongbranchingBasisFreed() );
2626 spx->restorePreStrongbranchingBasis();
2631#if SOPLEX_APIVERSION >= 3
2632 repeatstrongbranching = ((status == SPxSolver::ABORT_CYCLING || status == SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS
2640 SCIPdebugMessage(
" --> Repeat strong branching down with %d iterations after restoring basis\n",
2641 itlim - spx->numIterations());
2642 spx->setIntParam(SoPlex::ITERLIMIT,
itlim - spx->numIterations());
2643 spx->restorePreStrongbranchingBasis();
2654 spx->changeUpperReal(col,
oldub);
2655 assert(spx->lowerReal(col) <= spx->upperReal(col));
2659 *
down = spx->getObjLimit();
2673 spx->changeLowerReal(col,
newlb);
2674 assert(spx->lowerReal(col) <= spx->upperReal(col));
2676 (
void) spx->setIntParam(SoPlex::ITERLIMIT,
itlim);
2679#ifndef STRONGBRANCH_RESTOREBASIS
2682#ifdef SCIP_WITH_LPSCHECK
2685#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
2686#if SOPLEX_APIVERSION > 11
2687 status = spx->optimize(spx->getInterrupt());
2689 status = spx->optimize();
2692 status = spx->solve();
2697 case SPxSolver::OPTIMAL:
2698 *
up = spx->objValueReal();
2702 case SPxSolver::ABORT_TIME:
2703 case SPxSolver::ABORT_ITER:
2704 case SPxSolver::ABORT_CYCLING:
2705#if SOPLEX_APIVERSION >= 3
2706 case SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS:
2708 *
up = spx->objValueReal();
2710 case SPxSolver::ABORT_VALUE:
2711 case SPxSolver::INFEASIBLE:
2712 *
up = spx->getObjLimit();
2720 (*iter) += spx->numIterations();
2722#ifdef STRONGBRANCH_RESTOREBASIS
2724 assert( ! spx->preStrongbranchingBasisFreed() );
2725 spx->restorePreStrongbranchingBasis();
2730#if SOPLEX_APIVERSION >= 3
2731 repeatstrongbranching = ((status == SPxSolver::ABORT_CYCLING || status == SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS
2739 SCIPdebugMessage(
" --> Repeat strong branching up with %d iterations after restoring basis\n",
itlim - spx->numIterations());
2740 spx->restorePreStrongbranchingBasis();
2741 spx->setIntParam(SoPlex::ITERLIMIT,
itlim - spx->numIterations());
2752 spx->changeLowerReal(col,
oldlb);
2753 assert(spx->lowerReal(col) <= spx->upperReal(col));
2757 *
up = spx->getObjLimit();
2772 SCIPdebugMessage(
"SCIPlpiStrongbranch() returned SoPlex status %d\n",
int(status));
2838 for (
int j = 0;
j < ncols; ++
j)
2912 for (
int j = 0;
j < ncols; ++
j)
2961 SCIP_Bool* primalfeasible,
2962 SCIP_Bool* dualfeasible
2989 return (lpi->
spx->status() == SPxSolver::UNBOUNDED);
3004 return lpi->
spx->hasPrimalRay();
3017 assert(lpi->
spx->status() != SPxSolver::UNBOUNDED || lpi->
spx->basisStatus() == SPxBasis::UNBOUNDED);
3022 return lpi->
spx->status() == SPxSolver::UNBOUNDED;
3035 return (lpi->
spx->status() == SPxSolver::INFEASIBLE);
3048 return lpi->
spx->basisStatus() == SPxBasis::OPTIMAL || lpi->
spx->basisStatus() == SPxBasis::PRIMAL;
3063 return (lpi->
spx->status() == SPxSolver::INFEASIBLE);
3078 return lpi->
spx->hasDualFarkas();
3091 return lpi->
spx->status() == SPxSolver::INFEASIBLE && lpi->
spx->basisStatus() == SPxBasis::DUAL;
3104 return (lpi->
spx->status() == SPxSolver::UNBOUNDED);
3117 return (lpi->
spx->basisStatus() == SPxBasis::OPTIMAL) || lpi->
spx->basisStatus() == SPxBasis::DUAL;
3129 assert((lpi->
spx->basisStatus() == SPxBasis::OPTIMAL)
3132 return (lpi->
spx->status() == SPxSolver::OPTIMAL);
3151 if( lpi->
spx->status() == SPxSolver::ERROR || lpi->
spx->status() == SPxSolver::SINGULAR )
3153#if SOPLEX_APIVERSION >= 3
3154 if( lpi->
spx->status() == SPxSolver::OPTIMAL_UNSCALED_VIOLATIONS )
3182 if( lpi->
spx->intParam(SoPlex::OBJSENSE) == SoPlex::OBJSENSE_MAXIMIZE )
3203 return (lpi->
spx->status() == SPxSolver::ABORT_VALUE);
3216 return (lpi->
spx->status() == SPxSolver::ABORT_ITER);
3229 return (lpi->
spx->status() == SPxSolver::ABORT_TIME);
3242 return static_cast<int>(lpi->
spx->status());
3257#if SOPLEX_APIVERSION >= 4
3258 *
success = lpi->
spx->ignoreUnscaledViolations();
3293 SCIP_Real* activity,
3309#if SOPLEX_APIVERSION > 10
3316 if( dualsol !=
NULL )
3318#if SOPLEX_APIVERSION > 10
3319 (
void)lpi->
spx->getDualReal(dualsol, lpi->
spx->numRowsReal());
3325 if( activity !=
NULL )
3327#if SOPLEX_APIVERSION > 10
3328 (
void)lpi->
spx->getSlacksReal(activity, lpi->
spx->numRowsReal());
3334 if( redcost !=
NULL )
3336#if SOPLEX_APIVERSION > 10
3337 (
void)lpi->
spx->getRedCostReal(redcost, lpi->
spx->numColsReal());
3347 std::string s =
x.what();
3374#if SOPLEX_APIVERSION > 10
3375 (
void)lpi->
spx->getPrimalRayReal(
ray, lpi->
spx->numColsReal());
3384 std::string s =
x.what();
3399 SCIP_Real* dualfarkas
3411#if SOPLEX_APIVERSION > 10
3412 (
void)lpi->
spx->getDualFarkasReal(dualfarkas, lpi->
spx->numRowsReal());
3421 std::string s =
x.what();
3445 *iterations = lpi->
spx->numIterations();
3521 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3525 for(
i = 0;
i < lpi->
spx->numRowsReal(); ++
i )
3527 switch( lpi->
spx->basisRowStatus(
i) )
3529 case SPxSolver::BASIC:
3532 case SPxSolver::FIXED:
3533 case SPxSolver::ON_LOWER:
3536 case SPxSolver::ON_UPPER:
3539 case SPxSolver::ZERO:
3540 SCIPerrorMessage(
"slack variable has basis status ZERO (should not occur)\n");
3542 case SPxSolver::UNDEFINED:
3553 for(
i = 0;
i < lpi->
spx->numColsReal(); ++
i )
3556 switch( lpi->
spx->basisColStatus(
i) )
3558 case SPxSolver::BASIC:
3561 case SPxSolver::FIXED:
3575 case SPxSolver::ON_LOWER:
3578 case SPxSolver::ON_UPPER:
3581 case SPxSolver::ZERO:
3584 case SPxSolver::UNDEFINED:
3618 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3627 for(
i = 0;
i < nrows; ++
i )
3641 SCIPerrorMessage(
"slack variable has basis status ZERO (should not occur)\n");
3650 for(
i = 0;
i < ncols; ++
i )
3674 lpi->
spx->freePreStrongbranchingBasis();
3691 assert(lpi->
spx->preStrongbranchingBasisFreed());
3718 assert(lpi->
spx->preStrongbranchingBasisFreed());
3724 if( ! lpi->
spx->getBasisInverseRowReal(
r, coef, inds,
ninds) )
3753 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3756 if( ! lpi->
spx->getBasisInverseColReal(
c, coef, inds,
ninds) )
3788 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3791 nrows = lpi->
spx->numRowsReal();
3792 ncols = lpi->
spx->numColsReal();
3815#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
3820 for(
c = 0;
c < ncols; ++
c )
3822#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
3823 lpi->
spx->getColVectorReal(
c,
acol);
3854#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
3863 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3878#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 4)
3883 col = lpi->
spx->colVectorReal(
c);
3887 if( ! lpi->
spx->getBasisInverseTimesVecReal(col.get_ptr(), coef) )
3922 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3924 ncols = lpi->
spx->numColsReal();
3925 nrows = lpi->
spx->numRowsReal();
3940 (*lpistate)->ncols = ncols;
3941 (*lpistate)->nrows = nrows;
3967 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3984 SCIP_Real
bnd = lpi->
spx->lowerReal(
i);
4021 lpi->
spx->clearBasis();
4026 std::string s =
x.what();
4032 assert( lpi->
spx->status() != SPxSolver::OPTIMAL );
4052 if ( *lpistate !=
NULL )
4079 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4098 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4130#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
4139 lpi->
spx->getNdualNorms(nrows, ncols);
4141 if( nrows == 0 && ncols == 0)
4150 (*lpinorms)->nrows = 0;
4151 (*lpinorms)->ncols = 0;
4153 SCIPdebugMessage(
"storing SoPlex LPi pricing norms in %p (%d rows, %d cols)\n", (
void *) *lpinorms, nrows, ncols);
4155 if( !lpi->
spx->getDualNorms((*lpinorms)->nrows, (*lpinorms)->ncols, (*lpinorms)->norms) )
4165 assert(nrows == (*lpinorms)->nrows);
4166 assert(ncols == (*lpinorms)->ncols);
4185#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
4191 if( lpinorms ==
NULL )
4197 if( lpinorms->
nrows == 0 )
4200 SCIPdebugMessage(
"loading LPi simplex norms %p (%d rows, %d cols) into SoPlex LP with %d rows and %d cols\n",
4201 (
const void *) lpinorms, lpinorms->
nrows, lpinorms->
ncols, lpi->
spx->numRowsReal(), lpi->
spx->numColsReal());
4216#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
4260 *
ival = lpi->
spx->getFromScratch();
4263 *
ival = lpi->
spx->getLpInfo();
4266 *
ival = lpi->
spx->intParam(SoPlex::ITERLIMIT);
4271 *
ival = lpi->
spx->intParam(SoPlex::SIMPLIFIER);
4281 else if(
scaleparam == SoPlex::SCALER_BIEQUI )
4283#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 2)
4297#if SOPLEX_VERSION >= 201
4299 *
ival = (int) (lpi->
spx->intParam(SoPlex::TIMER));
4302#if SOPLEX_VERSION >= 230 || (SOPLEX_VERSION == 220 && SOPLEX_SUBVERSION >= 3)
4304 *
ival = (int) lpi->
spx->randomSeed();
4307#if SOPLEX_APIVERSION >= 1
4309 *
ival = (int) lpi->
spx->intParam(SoPlex::FACTOR_UPDATE_MAX);
4335 lpi->
spx->setFromScratch(
bool(
ival));
4339 lpi->
spx->setLpInfo(
bool(
ival));
4346 (
void) lpi->
spx->setIntParam(SoPlex::ITERLIMIT,
ival);
4350#if SOPLEX_APIVERSION < 13
4355 (
void) lpi->
spx->setIntParam(SoPlex::SIMPLIFIER,
ival);
4363 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_AUTO);
4366 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_STEEP);
4369 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_PARMULT);
4372 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_STEEP);
4375 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_QUICKSTEEP);
4378 (
void) lpi->
spx->setIntParam(SoPlex::PRICER, SoPlex::PRICER_DEVEX);
4387 (
void) lpi->
spx->setIntParam(SoPlex::SCALER, SoPlex::SCALER_OFF);
4388 else if(
ival == 1 )
4389 (
void) lpi->
spx->setIntParam(SoPlex::SCALER, SoPlex::SCALER_BIEQUI);
4391#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 2)
4392 (
void) lpi->
spx->setIntParam(SoPlex::SCALER, SoPlex::SCALER_LEASTSQ);
4394 (
void) lpi->
spx->setIntParam(SoPlex::SCALER, SoPlex::SCALER_GEO8);
4398#if SOPLEX_VERSION >= 201
4401 (
void) lpi->
spx->setIntParam(SoPlex::TIMER,
ival);
4404#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 3)
4406 lpi->
spx->setRandomSeed((
unsigned long)(long)
ival);
4409#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION >= 221 && SOPLEX_SUBVERSION >= 3)
4412 (
void) lpi->
spx->setIntParam(SoPlex::SOLUTION_POLISHING,
ival);
4415#if SOPLEX_APIVERSION >= 1
4418 (
void) lpi->
spx->setIntParam(SoPlex::FACTOR_UPDATE_MAX,
ival);
4451 if ( lpi->
spx->intParam(SoPlex::OBJSENSE) == SoPlex::OBJSENSE_MINIMIZE )
4452 *
dval = lpi->
spx->realParam(SoPlex::OBJLIMIT_UPPER);
4454 *
dval = lpi->
spx->realParam(SoPlex::OBJLIMIT_LOWER);
4457 *
dval = lpi->
spx->realParam(SoPlex::TIMELIMIT);
4460 *
dval = lpi->
spx->realParam(SoPlex::REPRESENTATION_SWITCH);
4468#if (SOPLEX_APIVERSION >= 9)
4469 *
dval = lpi->
spx->realParam(SoPlex::MIN_MARKOWITZ);
4505 if ( lpi->
spx->intParam(SoPlex::OBJSENSE) == SoPlex::OBJSENSE_MINIMIZE )
4506 (
void) lpi->
spx->setRealParam(SoPlex::OBJLIMIT_UPPER,
dval);
4508 (
void) lpi->
spx->setRealParam(SoPlex::OBJLIMIT_LOWER,
dval);
4513 (
void) lpi->
spx->setRealParam(SoPlex::TIMELIMIT,
dval);
4521 (
void) lpi->
spx->setRealParam(SoPlex::REPRESENTATION_SWITCH,
dval);
4528#if (SOPLEX_APIVERSION >= 9)
4532 else if(
dval > 0.9999 )
4535 (
void) lpi->
spx->setRealParam(SoPlex::MIN_MARKOWITZ,
dval);
4554 lpi->
spx->setInterrupt(interrupt);
4579 return lpi->
spx->realParam(SoPlex::INFTY);
4591 return (val >= lpi->
spx->realParam(SoPlex::INFTY));
4609 const char* filename
4614 f =
fopen(filename,
"r");
4635 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4642 assert(lpi->
spx->intParam(SoPlex::READMODE) == SoPlex::READMODE_REAL);
4649 std::string s =
x.what();
4680 std::string s =
x.what();
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
packing single and dual bit values
unsigned int SCIP_DUALPACKET
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
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_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_Bool SCIPlpiHasPrimalSolve(void)
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 SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_Bool SCIPlpiHasBarrierSolve(void)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiFree(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 SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
const char * SCIPlpiGetSolverName(void)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
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 SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
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 SCIPlpiWasSolved(SCIP_LPI *lpi)
const char * SCIPlpiGetSolverDesc(void)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_Bool SCIPlpiHasDualSolve(void)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
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 SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiLoadColLP(SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiInterrupt(SCIP_LPI *lpi, SCIP_Bool interrupt)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_RETCODE optimize(SCIP *scip, SCIP_SOL *worksol, SCIP_VAR **vars, int *blockstart, int *blockend, int nblocks, OPTTYPE opttype, SCIP_Real *activities, int nrows, SCIP_Bool *improvement, SCIP_Bool *varboundserr, SCIP_HEURDATA *heurdata)
interface methods for specific LP solvers
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
static void setIntParam(SCIP_LPI *lpi, int const param, int const parval)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
static SCIP_Bool fileExists(const char *filename)
#define SOPLEX_TRY(messagehdlr, x)
static int rowpacketNum(int nrows)
static SCIP_RETCODE spxSolve(SCIP_LPI *lpi)
SCIP_DUALPACKET ROWPACKET
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
static const char spxdesc[200]
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_DUALPACKET COLPACKET
static SCIP_RETCODE lpiStrongbranch(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
static int colpacketNum(int ncols)
#define CHECK_SOPLEX_PARAM(x)
#define SOPLEX_SUBVERSION
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
#define SOPLEX_TRY_ABORT(x)
static const char spxname[20]
static void invalidateSolution(SCIP_LPI *lpi)
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSallocMemoryCPP(size)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
public methods for message output
SCIP_MESSAGEHDLR * messagehdlr
@ SCIP_PRICING_STEEPQSTART
@ SCIP_PRICING_LPIDEFAULT
enum SCIP_Pricing SCIP_PRICING
enum SCIP_LPParam SCIP_LPPARAM
@ SCIP_LPSOLQUALITY_EXACTCONDITION
@ SCIP_LPSOLQUALITY_ESTIMCONDITION
@ SCIP_LPPAR_CONDITIONLIMIT
@ SCIP_LPPAR_ROWREPSWITCH
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
enum SCIP_ObjSen SCIP_OBJSEN
enum SCIP_Retcode SCIP_RETCODE