43#define AUTOPRICING_ITERSWITCH 10000
44#define STRONGBRANCH_RESTOREBASIS
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(m_messagehdlr, "CPLEX error <%d>; SoPlex result unchecked\n", _cpxstat_); \
65 if( EXIT_AT_CPXERROR ) \
89#pragma GCC diagnostic ignored "-Wclass-memaccess"
97#ifndef SOPLEX_SUBVERSION
98#define SOPLEX_SUBVERSION 0
101#ifndef SOPLEX_APIVERSION
102#define SOPLEX_APIVERSION 0
106#if (SOPLEX_VERSION < 133)
107#error "This interface is not compatible with SoPlex versions prior to 1.4"
111#if (SOPLEX_VERSION >= 160)
112#if (SOPLEX_APIVERSION <= 5)
113#include "spxgithash.h"
117#define WITH_BOUNDFLIPPING
118#if (SOPLEX_APIVERSION <= 5)
120#include "spxsolver.h"
121#include "slufactor.h"
122#include "spxsteeppr.h"
123#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 6) || SOPLEX_VERSION > 160)
124#include "spxsteepexpr.h"
126#include "spxparmultpr.h"
127#include "spxdevexpr.h"
128#include "spxfastrt.h"
129#include "spxmainsm.h"
130#include "spxequilisc.h"
132#ifdef WITH_BOUNDFLIPPING
133#include "spxboundflippingrt.h"
145#if defined(_MSC_VER) && _MSC_VER < 1900
147#define snprintf _snprintf
151#define SOPLEX_VERBLEVEL 5
164using namespace soplex;
172#define SOPLEX_TRY(messagehdlr, x) do \
178 catch( const SPxMemoryException& E ) \
180 std::string s = E.what(); \
181 SCIPerrorMessage("SoPlex threw a memory exception: %s\n", s.c_str()); \
184 catch( const SPxException& E ) \
186 std::string s = E.what(); \
187 SCIPmessagePrintWarning((messagehdlr), "SoPlex threw an exception: %s\n", s.c_str()); \
188 return SCIP_LPERROR; \
194#define SOPLEX_TRY(messagehdlr, x) do \
200 catch( const SPxMemoryException& E ) \
202 std::string s = E.what(); \
203 SCIPerrorMessage("SoPlex threw a memory exception: %s\n", s.c_str()); \
206 catch( const SPxException& ) \
208 return SCIP_LPERROR; \
217#define SOPLEX_TRY_ABORT(x) do \
223 catch( const SPxException& E ) \
225 std::string s = E.what(); \
226 SCIPerrorMessage("SoPlex threw an exception: %s\n", s.c_str()); \
237 SPxLP::SPxSense m_sense;
240#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 6) || SOPLEX_VERSION > 160)
247#ifdef WITH_BOUNDFLIPPING
270#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
274#ifdef SCIP_WITH_LPSCHECK
285 const char* probname =
NULL
289 m_fromscratch(
false),
291 m_objLoLimit(-soplex::infinity),
292 m_objUpLimit(soplex::infinity),
303 m_messagehdlr(messagehdlr)
305#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
309 setSense(SPxLP::MINIMIZE);
310#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION == 4)
319 if ( probname !=
NULL )
322#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
323 m_lpifeastol = SPxSolver::feastol();
324 m_lpiopttol = SPxSolver::opttol();
326 m_lpifeastol = SPxSolver::delta();
327 m_lpiopttol = SPxSolver::delta();
330#ifdef SCIP_WITH_LPSCHECK
343 if( m_probname !=
NULL )
346 freePreStrongbranchingBasis();
348 if( m_rownames !=
NULL )
350 m_rownames->~NameSet();
353 if( m_colnames !=
NULL )
355 m_colnames->~NameSet();
359#ifdef SCIP_WITH_LPSCHECK
378#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
379 SPxSolver::setFeastol(
d);
381 SPxSolver::setDelta(
d);
398#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
399 SPxSolver::setOpttol(
d);
401 SPxSolver::setDelta(
d);
405 bool isPerturbed()
const
408 return (shift() >= 10.0 * epsilon());
412 void setIterationLimit(
422 m_autopricing =
true;
428 m_autopricing =
false;
431 void setSteepPricer()
434 m_autopricing =
false;
437 void setSteepQStartPricer()
440 m_autopricing =
false;
443 void setParmultPricer()
446 m_autopricing =
false;
449 void setDevexPricer()
452 m_autopricing =
false;
456 int getIterationLimit()
const
461 bool getFromScratch()
const
463 return m_fromscratch;
466 void setFromScratch(
bool fs)
471 int getScaling()
const
476 void setScaling(
int s)
481 bool getPresolving()
const
486 void setPresolving(
bool p)
491 bool getLpInfo()
const
496 void setLpInfo(
bool li)
501 SPxLP::SPxSense getSense()
const
508 void setSense(
const SPxLP::SPxSense
sen)
518 if( m_sense == SPxLP::MINIMIZE && getObjUpLimit() < soplex::infinity )
521 SPxSolver::setTerminationValue(getObjUpLimit());
523 else if( m_sense == SPxLP::MAXIMIZE && getObjLoLimit() > -soplex::infinity )
526 SPxSolver::setTerminationValue(getObjLoLimit());
531 void setProbname(
const char* probname)
536 if( m_probname !=
NULL )
541 memcpy(m_probname, probname, len + 1);
544 Real getObjLoLimit()
const
551 if( getSense() == SPxLP::MAXIMIZE )
554 SPxSolver::setTerminationValue(
limit);
556 m_objLoLimit =
limit;
559 Real getObjUpLimit()
const
566 if( getSense() == SPxLP::MINIMIZE )
569 SPxSolver::setTerminationValue(
limit);
571 m_objUpLimit =
limit;
574 void setRep(SPxSolver::Representation
p_rep)
578 SCIPdebugMessage(
"switching to %s representation of the basis\n",
p_rep == SPxSolver::ROW ?
"row" :
"column");
579 SPxSolver::setRep(
p_rep);
583#ifdef SCIP_WITH_LPSCHECK
599 case SPxSolver::ABORT_TIME:
601 case SPxSolver::ABORT_ITER:
603 case SPxSolver::ABORT_VALUE:
604 return "ABORT_VALUE";
605 case SPxSolver::SINGULAR:
607 case SPxSolver::REGULAR:
609 case SPxSolver::UNKNOWN:
611 case SPxSolver::OPTIMAL:
613 case SPxSolver::UNBOUNDED:
615 case SPxSolver::INFEASIBLE:
633 return "ABORT_VALUE";
637 return "CPX_STAT_OPTIMAL_INFEAS: OPT SOL INFEASIBLE AFTER UNSCALING";
643 return "INFEASIBLE or UNBOUNDED";
645 return "CPX_STAT_NUM_BEST: SOL AVAILABLE BUT NOT PROVEN OPTIMAL DUE TO NUM TROUBLE";
655 bool checkConsistentBounds()
const
661 SCIPerrorMessage(
"inconsistent bounds on column %d: lower=%.17g, upper=%.17g\n",
670 bool checkConsistentSides()
const
674 if( lhs(
i) > rhs(
i) + Param::epsilon() )
692 m_stat = SPxSolver::solve();
696 std::string s =
x.what();
701 m_stat = SPxSolver::status();
707 assert( m_stat != SPxSolver::OPTIMAL );
711 m_itused += SPxSolver::iterations();
712 assert(m_itlim < 0 || m_itused <= m_itlim);
719 timelimit = SPxSolver::terminationTime();
726 SPxSolver::setTerminationTime(timelimit);
733#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
743 assert(checkConsistentBounds());
744 assert(checkConsistentSides());
746#ifdef SCIP_WITH_LPSCHECK
774 if( (
objval > m_objUpLimit) || (
objval < m_objLoLimit) )
778#ifdef SCIP_WITH_LPSCHECK
780 if(
getDoubleCheck() && (m_stat == SPxSolver::OPTIMAL || m_stat == SPxSolver::UNBOUNDED || m_stat == SPxSolver::INFEASIBLE || m_stat == SPxSolver::ABORT_VALUE) )
798 if( getSense() == SPxLP::MAXIMIZE )
804 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s)\n",
813 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
818 else if( m_stat == SPxSolver::ABORT_VALUE )
823 if( (getSense() == SPxSolver::MINIMIZE &&
LTrel(
cpxobj, getObjUpLimit(), 2*opttol()))
824 || (getSense() == SPxSolver::MAXIMIZE &&
GTrel(
cpxobj, getObjLoLimit(), 2*opttol())) )
826 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
832 else if( (getSense() == SPxSolver::MINIMIZE &&
cpxobj < getObjUpLimit())
833 || (getSense() == SPxSolver::MAXIMIZE &&
cpxobj > getObjLoLimit()) )
835 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
842 if( (getSense() == SPxSolver::MINIMIZE &&
cpxobj < getObjUpLimit())
843 || (getSense() == SPxSolver::MAXIMIZE &&
cpxobj > getObjLoLimit()) )
845 SCIPerrorMessage(
"In %s: SoPlex returned status=%d (%s) while CPLEX claims obj=%.10f %s %.10f=obj.limit (%s) (checknum=%d)\n",
853 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
860 SCIPerrorMessage(
"In %s: SoPlex status=%d (%s) while CPLEX status=%d (%s) (checknum=%d)\n",
866 else if( m_stat == SPxSolver::OPTIMAL )
868 if( (getSense() == SPxSolver::MINIMIZE &&
LTrel(value(),
cpxobj, 2*opttol()))
869 || (getSense() == SPxSolver::MAXIMIZE &&
GTrel(value(),
cpxobj, 2*opttol())) )
874 else if( (getSense() == SPxSolver::MINIMIZE &&
GTrel(value(),
cpxobj, 2*opttol()))
875 || (getSense() == SPxSolver::MAXIMIZE &&
LTrel(value(),
cpxobj, 2*opttol())) )
877 SCIPerrorMessage(
"In %s: LP optimal; SoPlex value=%.10f %s CPLEX value=%.10f suboptimal (checknum=%d)\n", value(),
878 m_probname, getSense() == SPxSolver::MINIMIZE ?
">" :
"<",
cpxobj,
m_checknum);
889#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
903 SPxSimplifier::Result
result = SPxSimplifier::OKAY;
906 if ( getFromScratch() )
914 std::string s =
x.what();
916 m_stat = SPxSolver::status();
917 assert( m_stat != SPxSolver::OPTIMAL );
924 if( SPxSolver::getBasisStatus() == SPxBasis::NO_PROBLEM && (getScaling() > 0) &&
nCols() > 0 &&
nRows() > 0 )
929#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
934 if( SPxSolver::getBasisStatus() == SPxBasis::NO_PROBLEM && getPresolving() &&
nCols() > 0 &&
nRows() > 0 )
952 scaler->scale(*
this);
958#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
968#ifdef WITH_BOUNDFLIPPING
971#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
977 SCIPdebugMessage(
"simplifier ended with status %u (0: OKAY, 1: INFEASIBLE, 2: DUAL_INFEASIBLE, 3: UNBOUNDED, 4: VANISHED)\n",
result);
980 if(
result == SPxSimplifier::INFEASIBLE ||
result == SPxSimplifier::DUAL_INFEASIBLE )
982 SCIPdebugMessage(
"simplifier detected primal or dual infeasibility - reloading and solving unsimplified LP\n");
987 SPxSolver::loadLP(
origlp);
993#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 201)
1001 if(
result != SPxSimplifier::VANISHED )
1009 setObjLoLimit(-soplex::infinity);
1010 setObjUpLimit(soplex::infinity);
1029 SCIPdebugMessage(
"presolved LP not optimal - reloading and solving original LP\n");
1034 SPxSolver::loadLP(
origlp);
1043 SPxSolver::VarStatus* cstat =
NULL;
1044 SPxSolver::VarStatus* rstat =
NULL;
1047 if( (
simplifier ==
NULL ||
result != SPxSimplifier::VANISHED) && SPxSolver::getBasisStatus() >= SPxBasis::REGULAR )
1052 (
void) SPxSolver::getBasis(rstat, cstat);
1056 if(
simplifier !=
NULL && SPxSolver::getBasisStatus() >= SPxBasis::REGULAR )
1062 int ncols =
result == SPxSimplifier::VANISHED ? 0 :
nCols();
1063 int nrows =
result == SPxSimplifier::VANISHED ? 0 :
nRows();
1070 if(
result != SPxSimplifier::VANISHED )
1074 (
void) SPxSolver::getSlacks(slacks);
1086 std::string s =
x.what();
1087 SCIPmessagePrintWarning(m_messagehdlr,
"SoPlex unsimplification unsuccessful; solving again without LP presolving (SoPlex says %s)\n",
1109 SPxSolver::loadLP(
origlp);
1113 if( rstat !=
NULL && cstat !=
NULL )
1116 SPxSolver::setBasis(rstat, cstat);
1131 if( scaler !=
NULL )
1133 scaler->~SPxEquiliSC();
1147 if( (
objval > m_objUpLimit) || (
objval < m_objLoLimit) )
1155 void savePreStrongbranchingBasis()
1157 m_rowstat.reSize(
nRows());
1158 m_colstat.reSize(
nCols());
1162 m_stat =
getBasis(m_rowstat.get_ptr(), m_colstat.get_ptr());
1167 std::string s =
x.what();
1174 assert(m_stat != SPxSolver::OPTIMAL);
1184 void restorePreStrongbranchingBasis()
1191 setBasis(m_rowstat.get_const_ptr(), m_colstat.get_const_ptr());
1196 std::string s =
x.what();
1202 m_stat = SPxSolver::status();
1208 assert(m_stat != SPxSolver::OPTIMAL);
1213 void freePreStrongbranchingBasis()
1220 bool preStrongbranchingBasisFreed()
const
1222 return ((m_rowstat.size() == 0 ) && (m_colstat.size() == 0));
1244 m_stat = SPxSolver::status();
1248 bool isInitialized()
const
1250 return SPxSolver::isInitialized();
1253 int iterations()
const
1258 virtual void clear()
1261 freePreStrongbranchingBasis();
1266 bool readLP(
const char*
fname)
1270 if ( m_rownames != 0 )
1271 m_rownames->~NameSet();
1275 if ( m_colnames != 0 )
1276 m_colnames->~NameSet();
1280 m_rownames =
new (m_rownames)
NameSet();
1281 m_colnames =
new (m_colnames)
NameSet();
1283 if( SPxSolver::readFile(
fname, m_rownames, m_colnames) )
1319 const char* t = (*names)[
j];
1321 while( *t !=
'\0' &&
sizeleft >= 0 )
1364 const char* t = (*names)[
i];
1365 rownames[
i-firstrow] = s;
1366 while( *t !=
'\0' &&
sizeleft >= 0 )
1395#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
1397#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
1413 SCIP_Real conditionlimit;
1414 SCIP_Bool checkcondition;
1600 return SPxLP::MAXIMIZE;
1602 return SPxLP::MINIMIZE;
1606 return SPxLP::MINIMIZE;
1636#if (SOPLEX_SUBVERSION > 0)
1637 const static char spxname[20]= {
'S',
'o',
'p',
'l',
'e',
'x',
'1',
' ',
SOPLEX_VERSION/100 +
'0',
'.', (
SOPLEX_VERSION % 100)/10 +
'0',
'.',
SOPLEX_VERSION % 10 +
'0',
'.',
SOPLEX_SUBVERSION +
'0'};
1639 const static char spxname[20] = {
'S',
'o',
'p',
'l',
'e',
'x',
'1',
' ',
SOPLEX_VERSION/100 +
'0',
'.', (
SOPLEX_VERSION % 100)/10 +
'0',
'.',
SOPLEX_VERSION % 10 +
'0'};
1647 (
void)
snprintf(
spxdesc, 200,
"%s [GitHash: %s]",
"Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de)"
1649 " - including CPLEX double check"
1680 return (
void*) lpi->
spx;
1690#if (SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 3))
1692 lpi->
spx->setIntegralityInformation(ncols,
intInfo);
1695 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
1752 SOPLEX_TRY( messagehdlr, (*lpi)->spx =
new ((*lpi)->spx) SPxSCIP(messagehdlr, name) );
1753 (*lpi)->cstat =
NULL;
1754 (*lpi)->rstat =
NULL;
1755 (*lpi)->cstatsize = 0;
1756 (*lpi)->rstatsize = 0;
1758 (*lpi)->factorization = 0;
1760 (*lpi)->conditionlimit = -1.0;
1761 (*lpi)->checkcondition =
FALSE;
1762 (*lpi)->messagehdlr = messagehdlr;
1785 (*lpi)->spx->~SPxSCIP();
1813 const SCIP_Real*
obj,
1814 const SCIP_Real* lb,
1815 const SCIP_Real* ub,
1818 const SCIP_Real* lhs,
1819 const SCIP_Real* rhs,
1824 const SCIP_Real* val
1830 for(
j = 0;
j < nnonz;
j++ )
1849 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1853 SPxSCIP* spx = lpi->
spx;
1864 for(
i = 0;
i < nrows; ++
i )
1874 std::string s =
x.what();
1890 const SCIP_Real*
obj,
1891 const SCIP_Real* lb,
1892 const SCIP_Real* ub,
1897 const SCIP_Real* val
1915 assert( lpi->
spx->preStrongbranchingBasisFreed() );
1921 int nrows = lpi->
spx->nRows();
1922 for (
int j = 0;
j < nnonz; ++
j)
1930 SPxSCIP* spx = lpi->
spx;
1940 for(
i = 0;
i < ncols; ++
i )
1946 last = (
i == ncols-1 ? nnonz :
beg[
i+1]);
1956 std::string s =
x.what();
1983 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2009 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2011 ncols = lpi->
spx->nCols();
2014 for(
i = 0;
i < ncols; ++
i )
2026 const SCIP_Real* lhs,
2027 const SCIP_Real* rhs,
2032 const SCIP_Real* val
2047 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2053 int ncols = lpi->
spx->nCols();
2054 for (
int j = 0;
j < nnonz; ++
j)
2064 SPxSCIP* spx = lpi->
spx;
2072 for(
i = 0;
i < nrows; ++
i )
2078 last = (
i == nrows-1 ? nnonz :
beg[
i+1]);
2088 std::string s =
x.what();
2115 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2140 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2142 nrows = lpi->
spx->nRows();
2145 for(
i = 0;
i < nrows; ++
i )
2165 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2176 const SCIP_Real* lb,
2192 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2196 for(
i = 0;
i < ncols; ++
i )
2211 lpi->
spx->changeBounds(
ind[
i], lb[
i], ub[
i]);
2218 std::string s =
x.what();
2235 const SCIP_Real* lhs,
2236 const SCIP_Real* rhs
2253 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2257 for(
i = 0;
i < nrows; ++
i )
2260 lpi->
spx->changeRange(
ind[
i], lhs[
i], rhs[
i]);
2267 std::string s =
x.what();
2296 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2316 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2328 const SCIP_Real*
obj
2342 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2346 for(
i = 0;
i < ncols; ++
i )
2355 std::string s =
x.what();
2387 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2391 lhs = lpi->
spx->lhs(row);
2392 rhs = lpi->
spx->rhs(row);
2398 if( lhs > -soplex::infinity )
2400 else if( scaleval < 0.0 )
2401 lhs = soplex::infinity;
2402 if( rhs < soplex::infinity )
2404 else if( scaleval < 0.0 )
2405 rhs = -soplex::infinity;
2406 if( scaleval < 0.0 )
2423 std::string s =
x.what();
2458 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2462 obj = lpi->
spx->obj(col);
2463 lb = lpi->
spx->lower(col);
2464 ub = lpi->
spx->upper(col);
2473 if( lb > -soplex::infinity )
2475 else if( scaleval < 0.0 )
2476 lb = soplex::infinity;
2477 if( ub < soplex::infinity )
2479 else if( scaleval < 0.0 )
2480 ub = -soplex::infinity;
2481 if( scaleval < 0.0 )
2483 SCIP_Real
oldlb = lb;
2498 std::string s =
x.what();
2534 *nrows = lpi->
spx->nRows();
2551 *ncols = lpi->
spx->nCols();
2572 if( lpi->
spx->nRows() < lpi->
spx->nCols() )
2574 for(
i = 0;
i < lpi->
spx->nRows(); ++
i )
2575 (*nnonz) += lpi->
spx->rowVector(
i).size();
2579 for(
i = 0;
i < lpi->
spx->nCols(); ++
i )
2580 (*nnonz) += lpi->
spx->colVector(
i).size();
2631 for(
j = 0;
j <
cvec.size(); ++
j )
2634 val[*nnonz] =
cvec.value(
j);
2686 beg[
i-firstrow] = *nnonz;
2688 for(
j = 0;
j <
rvec.size(); ++
j )
2691 val[*nnonz] =
rvec.value(
j);
2864 *val = lpi->
spx->colVector(col)[row];
2885 SPxSolver::Representation
rep,
2886 SPxSolver::Type type
2891 assert(
rep == SPxSolver::ROW ||
rep == SPxSolver::COLUMN );
2892 assert( type == SPxSolver::ENTER || type == SPxSolver::LEAVE );
2894 SCIPdebugMessage(
"calling SoPlex solve(): %d cols, %d rows, rep=%s\n", lpi->
spx->nCols(), lpi->
spx->nRows(),
2895 rep == SPxSolver::COLUMN ?
"column" :
"row");
2899 assert( lpi->
spx->preStrongbranchingBasisFreed() );
2903 lpi->
spx->setType(type);
2905#ifdef SCIP_WITH_LPSCHECK
2909 SPxSolver::Status status = lpi->
spx->solve();
2910 SCIPdebugMessage(
" -> SoPlex status: %d, basis status: %d\n", lpi->
spx->getStatus(), lpi->
spx->basis().status());
2915 case SPxSolver::ABORT_TIME:
2916 case SPxSolver::ABORT_ITER:
2917 case SPxSolver::ABORT_VALUE:
2918 case SPxSolver::SINGULAR:
2919 case SPxSolver::REGULAR:
2920 case SPxSolver::UNKNOWN:
2921 case SPxSolver::OPTIMAL:
2922 case SPxSolver::UNBOUNDED:
2923 case SPxSolver::INFEASIBLE:
2947 rowrep = lpi->
spx->rep() == SPxSolver::ROW;
2967 retcode =
rowrep ?
spxSolve(lpi, SPxSolver::ROW, SPxSolver::LEAVE) :
spxSolve(lpi, SPxSolver::COLUMN, SPxSolver::ENTER);
2991 rowrep = lpi->
spx->rep() == SPxSolver::ROW;
3011 retcode =
rowrep ?
spxSolve(lpi, SPxSolver::ROW, SPxSolver::ENTER) :
spxSolve(lpi, SPxSolver::COLUMN, SPxSolver::LEAVE);
3042 assert( lpi->
spx->preStrongbranchingBasisFreed() );
3043 lpi->
spx->savePreStrongbranchingBasis();
3056 assert( ! lpi->
spx->preStrongbranchingBasisFreed() );
3057 lpi->
spx->restorePreStrongbranchingBasis();
3058 lpi->
spx->freePreStrongbranchingBasis();
3080 SPxSolver::Status status;
3099 status = SPxSolver::UNKNOWN;
3102 oldItlim = spx->getIterationLimit();
3105 oldlb = spx->lower(col);
3106 oldub = spx->upper(col);
3115 lpi->
spx->setType( lpi->
spx->rep() == SPxSolver::ROW ? SPxSolver::ENTER : SPxSolver::LEAVE);
3123 spx->changeUpper(col,
newub);
3124 assert(spx->lower(col) <= spx->upper(col));
3126 spx->setIterationLimit(
itlim);
3129#ifdef SCIP_WITH_LPSCHECK
3132 status = spx->solve();
3136 case SPxSolver::OPTIMAL:
3137 *
down = spx->value();
3141 case SPxSolver::ABORT_TIME:
3142 case SPxSolver::ABORT_ITER:
3143 case SPxSolver::ABORT_CYCLING:
3144 *
down = spx->value();
3146 case SPxSolver::ABORT_VALUE:
3147 case SPxSolver::INFEASIBLE:
3148 *
down = spx->terminationValue();
3156 (*iter) += spx->iterations();
3158#ifdef STRONGBRANCH_RESTOREBASIS
3160 assert( ! spx->preStrongbranchingBasisFreed() );
3161 spx->restorePreStrongbranchingBasis();
3166 if( (status == SPxSolver::ABORT_CYCLING || status == SPxSolver::SINGULAR) && !
fromparentbasis && spx->iterations() <
itlim )
3168 SCIPdebugMessage(
" --> Repeat strong branching down with %d iterations after restoring basis\n",
itlim - spx->iterations());
3169 spx->setIterationLimit(
itlim - spx->iterations());
3170 spx->restorePreStrongbranchingBasis();
3181 spx->changeUpper(col,
oldub);
3182 assert(spx->lower(col) <= spx->upper(col));
3186 *
down = spx->terminationValue();
3200 spx->changeLower(col,
newlb);
3201 assert(spx->lower(col) <= spx->upper(col));
3203 spx->setIterationLimit(
itlim);
3206#ifdef SCIP_WITH_LPSCHECK
3209 status = spx->solve();
3213 case SPxSolver::OPTIMAL:
3218 case SPxSolver::ABORT_TIME:
3219 case SPxSolver::ABORT_ITER:
3220 case SPxSolver::ABORT_CYCLING:
3223 case SPxSolver::ABORT_VALUE:
3224 case SPxSolver::INFEASIBLE:
3225 *
up = spx->terminationValue();
3233 (*iter) += spx->iterations();
3235#ifdef STRONGBRANCH_RESTOREBASIS
3237 assert( ! spx->preStrongbranchingBasisFreed() );
3238 spx->restorePreStrongbranchingBasis();
3243 if( (status == SPxSolver::ABORT_CYCLING || status == SPxSolver::SINGULAR) && !
fromparentbasis && spx->iterations() <
itlim )
3245 SCIPdebugMessage(
" --> Repeat strong branching up with %d iterations after restoring basis\n",
itlim - spx->iterations());
3246 spx->restorePreStrongbranchingBasis();
3247 spx->setIterationLimit(
itlim - spx->iterations());
3258 spx->changeLower(col,
oldlb);
3259 assert(spx->lower(col) <= spx->upper(col));
3263 *
up = spx->terminationValue();
3275 SCIPdebugMessage(
"SCIPlpiStrongbranch() returned SoPlex status %d\n",
int(status));
3341 for (
int j = 0;
j < ncols; ++
j)
3415 for (
int j = 0;
j < ncols; ++
j)
3464 SCIP_Bool* primalfeasible,
3465 SCIP_Bool* dualfeasible
3492 return (lpi->
spx->getStatus() == SPxSolver::UNBOUNDED);
3507#if ((SOPLEX_VERSION == 150 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 150)
3508 return (lpi->
spx->getStatus() == SPxSolver::UNBOUNDED);
3524 assert(lpi->
spx->getStatus() != SPxSolver::UNBOUNDED || lpi->
spx->basis().status() == SPxBasis::UNBOUNDED);
3529 return (lpi->
spx->getStatus() == SPxSolver::UNBOUNDED && !lpi->
spx->isPerturbed());
3542 return (lpi->
spx->getStatus() == SPxSolver::INFEASIBLE);
3580 return (lpi->
spx->getStatus() == SPxSolver::INFEASIBLE);
3595 return (lpi->
spx->getStatus() == SPxSolver::INFEASIBLE);
3608 return (lpi->
spx->getStatus() == SPxSolver::INFEASIBLE && lpi->
spx->basis().status() == SPxBasis::DUAL
3609 && !lpi->
spx->isPerturbed());
3622 return (lpi->
spx->getStatus() == SPxSolver::UNBOUNDED);
3638 assert(lpi->
spx->basis().status() == SPxBasis::OPTIMAL || lpi->
spx->getStatus() != SPxSolver::OPTIMAL);
3640 return (lpi->
spx->basis().status() == SPxBasis::OPTIMAL) ||
3641 (lpi->
spx->basis().status() == SPxBasis::DUAL && !lpi->
spx->isPerturbed());
3653 assert((lpi->
spx->basis().status() == SPxBasis::OPTIMAL)
3659 return (lpi->
spx->basis().status() == SPxBasis::OPTIMAL);
3678#if ((SOPLEX_VERSION == 172 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 172)
3701 return (lpi->
spx->getStatus() != SPxSolver::ERROR && lpi->
spx->getStatus() != SPxSolver::SINGULAR);
3714 return (lpi->
spx->getStatus() == SPxSolver::ABORT_VALUE);
3727 return (lpi->
spx->getStatus() == SPxSolver::ABORT_ITER);
3740 return (lpi->
spx->getStatus() == SPxSolver::ABORT_TIME);
3753 return static_cast<int>(lpi->
spx->getStatus());
3801 SCIP_Real* activity,
3820 if( dualsol !=
NULL )
3825 if( activity !=
NULL )
3830 if( redcost !=
NULL )
3839 std::string s =
x.what();
3863#if ((SOPLEX_VERSION == 150 && SOPLEX_SUBVERSION >= 2) || SOPLEX_VERSION > 150)
3872 std::string s =
x.what();
3883 SCIPerrorMessage(
"SCIPlpiGetPrimalRay() not supported by SoPlex versions <= 1.5.0\n");
3891 SCIP_Real* dualfarkas
3908 std::string s =
x.what();
3932 *iterations = lpi->
spx->iterations();
3953#if ((SOPLEX_VERSION == 172 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 172)
4006 if (! spx->isInitialized() )
4011 if( spx->rep() == SPxSolver::COLUMN )
4014 if (spx->getSense() == SPxLP::MINIMIZE)
4015 *val = spx->pVec()[col] - spx->maxObj()[col];
4017 *val = spx->maxObj()[col] - spx->pVec()[col];
4021 assert( spx->rep() == SPxSolver::ROW );
4024#ifdef SCIP_DISABLED_CODE
4026 SCIP_Real
sign = 1.0;
4027 if ( spx->getSense() == SPxLP::MINIMIZE )
4030 if ( spx->isColBasic(col) )
4033 for (
int i = spx->dim() - 1;
i >= 0; --
i)
4035 SPxId id = spx->basis().baseId(
i);
4038 *val =
sign * spx->fVec()[
i];
4065 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4069 for(
i = 0;
i < lpi->
spx->nRows(); ++
i )
4071 switch( lpi->
spx->getBasisRowStatus(
i) )
4073 case SPxSolver::BASIC:
4076 case SPxSolver::FIXED:
4077 case SPxSolver::ON_LOWER:
4080 case SPxSolver::ON_UPPER:
4083 case SPxSolver::ZERO:
4084 SCIPerrorMessage(
"slack variable has basis status ZERO (should not occur)\n");
4086 case SPxSolver::UNDEFINED:
4097 for(
i = 0;
i < lpi->
spx->nCols(); ++
i )
4099 SCIP_Real val = 0.0;
4100 switch( lpi->
spx->getBasisColStatus(
i) )
4102 case SPxSolver::BASIC:
4105 case SPxSolver::FIXED:
4117 case SPxSolver::ON_LOWER:
4120 case SPxSolver::ON_UPPER:
4123 case SPxSolver::ZERO:
4126 case SPxSolver::UNDEFINED:
4160 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4166 m_colstat.reSize(ncols);
4167 m_rowstat.reSize(nrows);
4169 for(
i = 0;
i < nrows; ++
i )
4175 m_rowstat[
i] = SPxSolver::ON_LOWER;
4178 m_rowstat[
i] = SPxSolver::BASIC;
4181 m_rowstat[
i] = SPxSolver::ON_UPPER;
4184 SCIPerrorMessage(
"slack variable has basis status ZERO (should not occur)\n");
4193 for(
i = 0;
i < ncols; ++
i )
4199 m_colstat[
i] = SPxSolver::ON_LOWER;
4202 m_colstat[
i] = SPxSolver::BASIC;
4205 m_colstat[
i] = SPxSolver::ON_UPPER;
4208 m_colstat[
i] = SPxSolver::ZERO;
4218 (
void) lpi->
spx->updateStatus();
4220 lpi->
spx->freePreStrongbranchingBasis();
4239 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4247 if( spx->rep() == SPxSolver::COLUMN )
4249 for(
int i = 0;
i < spx->nRows(); ++
i )
4251 SPxId id = spx->basis().baseId(
i);
4253 bind[
i] = (
id.isSPxColId() ? spx->number(
id) : - 1 - spx->number(
id));
4260 int nrows = spx->nRows();
4261 int ncols = spx->nCols();
4263 assert( spx->rep() == SPxSolver::ROW );
4265 for(
int i = 0;
i < nrows; ++
i )
4267 if( !spx->isRowBasic(
i) )
4275 for(
int j = 0;
j < ncols &&
k < nrows; ++
j )
4277 if( !spx->isColBasic(
j) )
4294 SCIPdebugMessage(
"Preparing factorization for computation of basis inverse.\n");
4307 for (
int i = 0;
i < spx->nRows(); ++
i)
4309 if ( ! spx->isRowBasic(
i) )
4312 for (
int j = 0;
j < spx->nCols(); ++
j)
4314 if ( ! spx->isColBasic(
j) )
4315 matrix[
k++] = &spx->colVector(
j);
4323 SLinSolver::Status status = lpi->
factorization->load(matrix.get_ptr(),
k);
4327 assert( status == SLinSolver::OK );
4332 for (
int i = 0;
i < spx->nRows(); ++
i)
4334 if ( ! spx->isRowBasic(
i) )
4342 std::string s =
x.what();
4374 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4388 if ( spx->rep() == SPxSolver::COLUMN )
4391 spx->basis().coSolve(
x, spx->unitVector(
r));
4419 assert(spx->rep() == SPxSolver::ROW);
4461 assert(!spx->isRowBasic(idx));
4464 rhs = spx->rowVector(idx);
4472 assert(!spx->isColBasic(idx));
4475 rhs = spx->unitVector(idx);
4479 spx->basis().solve(
y, rhs);
4487 SPxId id = spx->basis().baseId(
i);
4491 assert(spx->number(
id) >= 0);
4495 x[spx->number(
id)] =
y[
i];
4518 std::string s =
x.what();
4542 assert(lpi->
spx->preStrongbranchingBasisFreed());
4556 if( spx->rep() == SPxSolver::COLUMN )
4559 spx->basis().solve(
x, v);
4563 assert(spx->rep() == SPxSolver::ROW);
4588 SPxId id = spx->basis().baseId(
i);
4592 assert(spx->number(
id) >= 0);
4595 rowrhs.add(
i, v[spx->number(
id)]);
4604 spx->basis().coSolve(
y,
rowrhs);
4620 assert(!spx->isRowBasic(idx));
4622 x[
i] = v[idx] - (spx->rowVector(idx) *
Vector(
nCols,
y.get_ptr()));
4629 assert(!spx->isColBasic(idx));
4643 std::string s =
x.what();
4678 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4726 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4729 nrows = lpi->
spx->nRows();
4730 ncols = lpi->
spx->nCols();
4751 for(
c = 0;
c < ncols; ++
c )
4781 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4793 col = lpi->
spx->colVector(
c);
4794 col.reDim(lpi->
spx->nRows());
4831 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4833 ncols = lpi->
spx->nCols();
4834 nrows = lpi->
spx->nRows();
4849 (*lpistate)->ncols = ncols;
4850 (*lpistate)->nrows = nrows;
4876 assert( lpi->
spx->preStrongbranchingBasisFreed() );
4893 SCIP_Real
bnd = lpi->
spx->lower(
i);
4932 std::string s =
x.what();
4938 assert( lpi->
spx->getStatus() != SPxSolver::OPTIMAL );
4958 if ( *lpistate !=
NULL )
4985 assert( lpi->
spx->preStrongbranchingBasisFreed() );
5004 assert( lpi->
spx->preStrongbranchingBasisFreed() );
5036#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
5045 lpi->
spx->getNdualNorms(nrows, ncols);
5047 if( nrows == 0 && ncols == 0)
5056 (*lpinorms)->nrows = 0;
5057 (*lpinorms)->ncols = 0;
5059 SCIPdebugMessage(
"storing SoPlex LPi pricing norms in %p (%d rows, %d cols)\n", (
void *) *lpinorms, nrows, ncols);
5061 if( !lpi->
spx->getDualNorms((*lpinorms)->nrows, (*lpinorms)->ncols, (*lpinorms)->norms) )
5071 assert(nrows == (*lpinorms)->nrows);
5072 assert(ncols == (*lpinorms)->ncols);
5091#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
5097 if( lpinorms ==
NULL )
5103 if( lpinorms->
nrows == 0 )
5106 SCIPdebugMessage(
"loading LPi simplex norms %p (%d rows, %d cols) into SoPlex LP with %d rows and %d cols\n",
5107 (
const void *) lpinorms, lpinorms->
nrows, lpinorms->
ncols, lpi->
spx->nRows(), lpi->
spx->nCols());
5123#if ((SOPLEX_VERSION == 201 && SOPLEX_SUBVERSION >= 3) || SOPLEX_VERSION > 201)
5165 *
ival = lpi->
spx->getFromScratch();
5168 *
ival = lpi->
spx->getLpInfo();
5171 *
ival = lpi->
spx->getIterationLimit();
5176 *
ival = lpi->
spx->getPresolving();
5182 *
ival = lpi->
spx->getScaling();
5184#if SOPLEX_VERSION >= 201
5186 *
ival = (int) lpi->
spx->getTiming();
5189#if SOPLEX_VERSION >= 230 || (SOPLEX_VERSION == 220 && SOPLEX_SUBVERSION >= 3)
5191 *
ival = (int) lpi->
spx->random.getSeed();
5217 lpi->
spx->setFromScratch(
bool(
ival));
5221 lpi->
spx->setLpInfo(
bool(
ival));
5228 lpi->
spx->setIterationLimit(
ival);
5232 lpi->
spx->setPresolving(
bool(
ival));
5240 lpi->
spx->setAutoPricer();
5243 lpi->
spx->setFullPricer();
5246 lpi->
spx->setParmultPricer();
5249 lpi->
spx->setSteepPricer();
5252 lpi->
spx->setSteepQStartPricer();
5255 lpi->
spx->setDevexPricer();
5265#if SOPLEX_VERSION >= 201
5268 lpi->
spx->setTiming((Timer::TYPE)
ival);
5271#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 220 && SOPLEX_SUBVERSION >= 2)
5273 lpi->
spx->random.setSeed((
unsigned int)
ival);
5276#if SOPLEX_VERSION > 221 || (SOPLEX_VERSION == 221 && SOPLEX_SUBVERSION >= 3)
5279 lpi->
spx->setSolutionPolishing((SPxSolver::SolutionPolish)
ival);
5308#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
5314 if ( lpi->
spx->getSense() == SPxLP::MINIMIZE )
5315 *
dval = lpi->
spx->getObjUpLimit();
5317 *
dval = lpi->
spx->getObjLoLimit();
5320 *
dval = lpi->
spx->terminationTime();
5354#if ((SOPLEX_VERSION == 160 && SOPLEX_SUBVERSION >= 5) || SOPLEX_VERSION > 160)
5362 if ( lpi->
spx->getSense() == SPxLP::MINIMIZE )
5363 lpi->
spx->setObjUpLimit(
dval);
5365 lpi->
spx->setObjLoLimit(
dval);
5373 lpi->
spx->setTerminationTime(
dval);
5421 return soplex::infinity;
5432 return (val >= soplex::infinity);
5450 const char* filename
5455 f =
fopen(filename,
"r");
5476 assert( lpi->
spx->preStrongbranchingBasisFreed() );
5489 std::string s =
x.what();
5520 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))
interface methods for specific LP solvers
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
#define AUTOPRICING_ITERSWITCH
static SCIP_RETCODE getRedCostEst(SPxSCIP *spx, int col, SCIP_Real *val)
static SPxLP::SPxSense spxObjsen(SCIP_OBJSEN objsen)
static SCIP_RETCODE lpiGetBInvVec(SCIP_LPI *lpi, SCIP_Real *rhs, SCIP_Real *coef)
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 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 BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(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
SLUFactor * factorization
@ 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