29 #define MAXSTALLS 10000 30 #define MAXSTALLRECOVERS 10 31 #define MAXREFACPIVOTS 10 51 bool reached = maxViolRedCost <
opttol() && maxViolBounds <
feastol() && maxViolConst <
feastol();
59 <<
" new tolerance = " << newpricertol
61 <<
" maxViolRedCost= " << maxViolRedCost
62 <<
" maxViolBounds= " << maxViolBounds
63 <<
" maxViolConst= " << maxViolConst
65 <<
" sumViolRedCost= " << sumViolRedCost
66 <<
" sumViolBounds= " << sumViolBounds
67 <<
" sumViolConst= " << sumViolConst
84 for(
int j = 0; j <
nCols(); ++j )
92 minbound =
MINIMUM(minbound, abslow);
93 maxbound =
MAXIMUM(maxbound, abslow);
98 minbound =
MINIMUM(minbound, absupp);
99 maxbound =
MAXIMUM(maxbound, absupp);
102 minobj =
MINIMUM(minobj, absobj);
103 maxobj =
MAXIMUM(maxobj, absobj);
107 for(
int i = 0; i <
nRows(); ++i )
114 minside =
MINIMUM(minside, abslhs);
115 maxside =
MAXIMUM(maxside, abslhs);
120 minside =
MINIMUM(minside, absrhs);
121 maxside =
MAXIMUM(maxside, absrhs);
148 int stallNumRecovers;
216 (*
spxout) <<
"starting value = " <<
value() << std::endl
217 <<
"starting shift = " <<
shift() << std::endl;
236 stallNumRecovers = 0;
240 bool tightened =
false;
262 int enterCycleCount = 0;
263 int enterFacPivotCount = 0;
270 stallRefShift =
shift();
271 stallRefValue =
value();
277 Real minpricertol = 0.01 * maxpricertol;
382 Real newpricertol = minpricertol;
408 if (newpricertol < minpricertol)
409 newpricertol = minpricertol;
418 MSG_INFO3( (*
spxout), (*spxout) <<
" --- solve(enter) triggers refactorization" << std::endl; )
439 enterFacPivotCount++;
453 <<
") reached" << std::endl; )
476 <<
"entering algorithm" << std::endl; );
499 MSG_INFO3( (*
spxout), (*
spxout) <<
" --- stalling detected - trying to recover by switching to LEAVING algorithm." << std::endl; )
507 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to stalling in entering algorithm." << std::endl; );
517 stallRefShift =
shift();
518 stallRefValue =
value();
528 <<
", value: " <<
value()
529 <<
", shift: " <<
shift()
532 <<
", opttol: " <<
opttol()
534 <<
"ISOLVE56 stop: " << stop
536 <<
", solver status: " <<
m_status <<
" (" <<
int(
m_status) <<
")" << std::endl;
554 (*
spxout) <<
" --- maxInfeas: " << maxinfeas
555 <<
", shift: " <<
shift()
556 <<
", entertol: " <<
entertol() << std::endl;
565 else if( loopCount > 2 )
578 <<
")" << std::endl; )
603 int leaveCycleCount = 0;
604 int leaveFacPivotCount = 0;
611 stallRefShift =
shift();
612 stallRefValue =
value();
618 Real minpricertol = 0.01 * maxpricertol;
645 if (leaveNum < 0 && instableLeaveNum >= 0 &&
lastUpdate() == 0)
652 (*
spxout) <<
" --- trying instable leave iteration" << std::endl;
685 Real newpricertol = minpricertol;
710 if (newpricertol < minpricertol)
711 newpricertol = minpricertol;
741 leaveFacPivotCount++;
755 <<
") reached" << std::endl; )
777 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to cycling in leaving algorithm" << std::endl; );
800 MSG_INFO3( (*
spxout), (*
spxout) <<
" --- stalling detected - trying to recover by switching to ENTERING algorithm." << std::endl; )
808 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to stalling in leaving algorithm" << std::endl; );
818 stallRefShift =
shift();
819 stallRefValue =
value();
829 <<
", value: " <<
value()
830 <<
", shift: " <<
shift()
833 <<
", opttol: " <<
opttol()
835 <<
"ISOLVE57 stop: " << stop
837 <<
", solver status: " <<
m_status <<
" (" <<
int(
m_status) <<
")" << std::endl;
842 if(
shift() < minShift )
857 <<
", shift: " <<
shift()
859 <<
", cycle count: " << cycleCount << std::endl;
877 (*
spxout) <<
" --- maxInfeas: " << maxinfeas
878 <<
", shift: " <<
shift()
879 <<
", leavetol: " <<
leavetol() << std::endl;
891 else if (loopCount > 2)
904 <<
")" << std::endl; )
932 tightenedtype =
type();
934 if( tightenedtype ==
ENTER )
962 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- reloaded basis singular, resetting original tolerances" << std::endl; )
964 if( tightenedtype ==
ENTER )
979 stallNumRecovers = 0;
988 if( tightenedtype ==
ENTER )
1006 if( tightenedtype ==
ENTER )
1031 (*spxout) <<
")" << std::endl;
1034 #ifdef ENABLE_ADDITIONAL_CHECKS
1044 for(
int row = 0; row <
nRows(); ++row )
1048 for( c = 0; c < rowvec.
size(); ++c )
1049 val += rowvec.
value( c ) * sol[rowvec.
index( c )];
1057 <<
" is violated by solution" << std::endl
1058 <<
" lhs:" <<
lhs( row )
1059 <<
" <= val:" << val
1060 <<
" <= rhs:" <<
rhs( row ) << std::endl; )
1065 for( c = 0; c <
nRows(); ++c )
1070 assert( c <
nRows() );
1073 <<
" fVec:" <<
fVec()[c]
1074 <<
" fRhs:" <<
fRhs()[c]
1075 <<
" fTest:" <<
fTest()[c] << std::endl; )
1079 for(
int col = 0; col <
nCols(); ++col )
1087 <<
" is violated by solution" << std::endl
1088 <<
" lower:" <<
lower( col )
1089 <<
" <= val:" << sol[col]
1090 <<
" <= upper:" <<
upper( col ) << std::endl; )
1094 for( c = 0; c <
nRows() ; ++c)
1099 assert( c <
nRows() );
1101 <<
" fVec:" <<
fVec()[c]
1102 <<
" fRhs:" <<
fRhs()[c]
1103 <<
" fTest:" <<
fTest()[c] << std::endl; )
1129 int nSuccessfulPivots;
1135 bool success =
false;
1157 for(
int i = 0; i <
nRows(); ++i )
1164 slackcandidates.
addIdx(i);
1171 for(
int i = 0; i <
nCols(); ++i )
1178 continuousvars.
addIdx(i);
1185 nSuccessfulPivots = 0;
1187 for(
int i = slackcandidates.
size() - 1; i >= 0 && !stop; --i )
1189 polishId =
coId(slackcandidates.
index(i));
1190 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << rowstatus[slackcandidates.
index(i)]; )
1191 success =
enter(polishId,
true);
1194 assert(
EQrel(
value(), origval, alloweddeviation));
1195 assert(
LErel(
shift(), origshift, alloweddeviation));
1199 MSG_DEBUG( std::cout <<
" -> success!"; )
1200 ++nSuccessfulPivots;
1201 slackcandidates.
remove(i);
1211 for(
int i = continuousvars.
size() - 1; i >= 0 && !stop; --i )
1213 polishId =
id(continuousvars.
index(i));
1214 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << colstatus[continuousvars.
index(i)]; )
1215 success =
enter(polishId,
true);
1218 assert(
EQrel(
value(), origval, alloweddeviation));
1219 assert(
LErel(
shift(), origshift, alloweddeviation));
1223 MSG_DEBUG( std::cout <<
" -> success!"; )
1224 ++nSuccessfulPivots;
1225 continuousvars.
remove(i);
1235 if( nSuccessfulPivots == 0 )
1246 for(
int i = 0; i <
nCols() && !stop; ++i )
1258 nSuccessfulPivots = 0;
1259 for(
int i = candidates.
size() - 1; i >= 0 && !stop; --i )
1261 polishId =
id(candidates.
index(i));
1262 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << colstatus[candidates.
index(i)]; )
1263 success =
enter(polishId,
true);
1266 assert(
EQrel(
value(), origval, alloweddeviation));
1267 assert(
LErel(
shift(), origshift, alloweddeviation));
1271 MSG_DEBUG( std::cout <<
" -> success!"; )
1272 ++nSuccessfulPivots;
1282 if( nSuccessfulPivots == 0 )
1300 bool useIntegrality =
false;
1303 useIntegrality =
true;
1311 for(
int i = 0; i <
dim(); ++i )
1328 basiccandidates.
addIdx(i);
1334 nSuccessfulPivots = 0;
1335 for(
int i = basiccandidates.
size() - 1; i >= 0 && !stop; --i)
1339 success =
leave(basiccandidates.
index(i),
true);
1342 assert(
EQrel(
value(), origval, alloweddeviation));
1343 assert(
LErel(
shift(), origshift, alloweddeviation));
1347 MSG_DEBUG( std::cout <<
" -> success!"; )
1348 ++nSuccessfulPivots;
1349 basiccandidates.
remove(i);
1358 if( nSuccessfulPivots == 0 )
1369 for(
int i = 0; i <
dim(); ++i )
1385 basiccandidates.
addIdx(i);
1391 nSuccessfulPivots = 0;
1392 for(
int i = basiccandidates.
size() - 1; i >= 0 && !stop; --i )
1395 success =
leave(basiccandidates.
index(i),
true);
1398 assert(
EQrel(
value(), origval, alloweddeviation));
1399 assert(
LErel(
shift(), origshift, alloweddeviation));
1403 MSG_DEBUG( std::cout <<
" -> success!"; )
1404 ++nSuccessfulPivots;
1405 basiccandidates.
remove(i);
1414 if( nSuccessfulPivots == 0 )
1422 (*
spxout) <<
" --- finished solution polishing (" <<
polishCount <<
" pivots)" << std::endl; )
1441 << tmp.
length() << std::endl; )
1461 << tmp.
length() << std::endl; )
1471 for (
int i = 0; i <
dim(); ++i)
1480 <<
", leavetol()=" <<
leavetol() << std::endl; )
1484 for (
int i = 0; i <
coDim(); ++i)
1491 <<
", theTest[i]=" <<
theTest[i]
1492 <<
", leavetol()=" <<
leavetol() << std::endl; )
1505 (*spxout) <<
"type | time | iters | facts | shift | violation | obj value ";
1507 (*
spxout) <<
" | condition";
1508 (*spxout) << std::endl;
1513 (*spxout) << std::fixed << std::setw(7) << std::setprecision(1) <<
time() <<
" |";
1514 (*spxout) << std::scientific << std::setprecision(2);
1515 (*spxout) << std::setw(8) <<
iteration() <<
" | " 1519 << std::setprecision(8) <<
value();
1530 (*spxout) << std::endl;
1539 #ifdef ENABLE_ADDITIONAL_CHECKS 1550 #ifdef ENABLE_ADDITIONAL_CHECKS 1562 #ifdef ENABLE_ADDITIONAL_CHECKS 1567 << cr.
length() << std::endl; )
1570 << fr.
length() << std::endl; )
1604 <<
") reached" << std::endl; )
1636 <<
") reached" << std::endl; )
1638 (*
spxout) <<
" --- objective value limit reached" << std::endl
1639 <<
" (value: " <<
value()
1640 <<
", limit: " <<
objLimit <<
")" << std::endl
1641 <<
" (spxSense: " <<
int(
spxSense())
1642 <<
", rep: " <<
int(
rep())
1643 <<
", type: " <<
int(
type()) <<
")" << std::endl;
1685 Real iterationFrac = 0.6;
1697 Real degeneracyLevel = 0;
1698 Real degeneracyLB = 0.1;
1699 Real degeneracyUB = 0.9;
1701 if( (degeneracyLevel < degeneracyUB && degeneracyLevel > degeneracyLB) &&
iteration() >
nRows()*0.2 )
1745 for (
int i = 0; i <
nCols(); ++i)
1769 for (
int j = 0; j <
dim(); ++j)
1795 for (i =
nCols() - 1; i >= 0; --i)
1797 if (
baseId(i).isSPxRowId())
1826 for (i =
dim() - 1; i >= 0; --i)
1828 if (
baseId(i).isSPxColId())
1834 for (i =
dim() - 1; i >= 0; --i)
1836 if (
baseId(i).isSPxColId())
1903 for (i =
nRows() - 1; i >= 0; --i)
1908 p_vector[i] =
lhs(i);
1912 p_vector[i] =
rhs(i);
1927 for (i =
dim() - 1; i >= 0; --i)
1929 if (
baseId(i).isSPxRowId())
1951 for (
int j = 0; j <
dim(); ++j)
1971 for (
int i =
nCols() - 1; i >= 0; --i)
1973 if (
baseId(i).isSPxRowId())
2002 for (
int i =
dim() - 1; i >= 0; --i)
2004 if (
baseId(i).isSPxColId())
2036 for (
int i =
dim() - 1; i >= 0; --i)
2038 if (
baseId(i).isSPxRowId())
2102 *p_value = this->
value();
virtual void unShift(void)
remove shift as much as possible.
const VectorBase< R > & rhs() const
Returns right hand side vector.
void computeFtest()
compute basis feasibility test vector.
virtual void entered4(SPxId, int)
performs entering pivot.
int iterDegenCheck
number of calls to change() since last degeneracy check
Real boundrange
absolute range of all bounds in the problem
Rational spxAbs(const Rational &r)
Absolute.
virtual void setType(SPxSolver::Type)
sets Simplex type.
SPxId coId(int i) const
id of i 'th covector.
int iteration() const
returns number of basis changes since last load().
bool enter(SPxId &id, bool polish=false)
Exception class for things that should NEVER happen.This class is derived from the SoPlex exception b...
Vector & multWithBase(Vector &x) const
Vector-basis product.
SoPlex start basis generation base class.
virtual Real shift() const
total current shift amount.
int iterations() const
get number of iterations of current solution.
Basis is not known to be dual nor primal feasible.
void coSolve(Vector &x, const Vector &rhs)
Cosolves linear system with basis matrix.
virtual SPxId selectEnter()=0
selects Id to enter basis.
primal variable is fixed to both bounds
virtual Real getDelta()
get allowed bound violation
int boundflips
number of performed bound flips
primal or dual variable is undefined
const VectorBase< R > & upper() const
Returns upper bound vector.
const Vector & fTest() const
Violations of fVec.
virtual Status getPrimal(Vector &vector) const
get solution vector for primal variables.
DIdxSet updateViols
store indices that were changed in the previous iteration and must be checked in hyper pricing ...
SPxOut * spxout
message handler
bool sparsePricingLeave
These values enable or disable sparse pricing.
THREADLOCAL const Real infinity
bool leave(int i, bool polish=false)
Pricing pricing() const
return current Pricing.
Real objrange
absolute range of all objective coefficients in the problem
virtual void qualRedCostViolation(Real &maxviol, Real &sumviol) const
get violation of optimality criterion.
Abstract pricer base class.
int size() const
Number of used indices.
Real leavetol() const
feasibility tolerance maintained by ratio test during LEAVE algorithm.
SSVector * solveVector3
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic so...
void computeTest()
compute test vector in ENTERing Simplex.
int updateCount
number of calls to change() since last factorize()
minimize number of basic slack variables, i.e. more variables in between bounds
Basis is optimal, i.e. dual and primal feasible.
Real feastol() const
allowed primal feasibility tolerance.
Status & rowStatus(int i)
int lastIndex() const
returns index in basis where last update was done.
bool sparsePricingEnterCo
true if sparsePricing is turned on in the entering Simplex
virtual void qualBoundViolation(Real &maxviol, Real &sumviol) const
get violations of bounds.
bool LT(Real a, Real b, Real eps=Param::epsilon())
returns true iff a < b + eps
void setType(Type tp)
set LEAVE or ENTER algorithm.
Abstract ratio test base class.
solve() aborted due to iteration limit.
DataArray< int > isInfeasible
0: index not violated, 1: index violated, 2: index violated and among candidate list ...
No Problem has been loaded.
Real length() const
Floating point approximation of euclidian norm (without any approximation guarantee).
int number(const SPxRowId &id) const
Returns the row number of the row with identifier id.
void clear()
removes all indices.
virtual bool noViols(Real tol) const
check for violations above tol and immediately return false w/o checking the remaining values ...
int lastUpdate() const
returns number of basis changes since last refactorization.
int dim() const
dimension of basis matrix.
Vector & multBaseWith(Vector &x) const
Basis-vector product.
Real getFastCondition(int type=0)
LP has been proven to be primal infeasible.
R & value(int n)
Reference to value of n 'th nonzero.
bool isTimeLimitReached(const bool forceCheck=false)
returns whether current time limit is reached; call to time() may be skipped unless forceCheck is tru...
Ids for LP columns.Class SPxColId provides DataKeys for the column indices of an SPxLP.
Real time() const
time spent in last call to method solve().
int getDecompIterationLimit() const
returns the iteration limit for the decomposition simplex initialisation
static void setScientific(std::ostream &stream, int precision=8)
Sets the precision of the stream to 16 and the floatfield to scientifix.
void setDegenCompOffset(int iterOffset)
sets the offset for the number of iterations before the degeneracy is computed
void setPrimal(Vector &p_vector)
virtual Real value()
current objective value.
virtual void computeLeaveCoPrhs()
compute theCoPrhs for leaving Simplex.
int lastIterCount
number of calls to change() before halting the simplex
maximize number of basic slack variables, i.e. more variables on bounds
dual variable is left free, but unset
Real getDegeneracyLevel(Vector degenvec)
get level of dual degeneracy
Wrapper for different output streams and verbosity levels.
int nRows() const
Returns number of rows in LP.
virtual void start()=0
start timer, resume accounting user, system and real time.
virtual Real stop()=0
stop timer, return accounted user time.
std::ostream & getCurrentStream() const
Returns the stream for the current verbosity.
const Vector & fRhs() const
right-hand side vector for fVec
virtual int getFactorCount() const =0
get number of factorizations
primal variable is set to its upper bound
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
UpdateVector & coPvec() const
copricing vector.
void remove(int n, int m)
removes indices at position numbers n through m.
virtual Status getDualfarkas(Vector &vector) const
get dual farkas proof of infeasibility.
int m_numCycle
actual number of degenerate steps so far.
int maxIters
maximum allowed iterations.
Real m_entertol
feasibility tolerance maintained during entering algorithm
SPxStatus status() const
returns current SPxStatus.
SSVector * coSolveVector3
when 3 systems are to be solved at a time; typically reserved for bound flipping ratio test (basic so...
bool isColBasic(int i) const
is the i 'th column vector basic ?
void setSlacks(Vector &p_vector)
void setStatus(SPxStatus stat)
sets basis SPxStatus to stat.
Status status() const
Status of solution process.
bool GT(Real a, Real b, Real eps=Param::epsilon())
returns true iff a > b + eps
virtual void left4(int, SPxId)
performs leaving pivot.
SPxSense spxSense() const
Returns the optimization sense.
int & index(int n)
Reference to index of n 'th nonzero.
Real m_pricingViol
maximal feasibility violation of current solution
Real entertol() const
feasibility tolerance maintained by ratio test during ENTER algorithm.
void performSolutionPolishing()
int size() const
returns the number of used indices.
LP has been solved to optimality.
#define MSG_INFO2(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO2.
virtual bool precisionReached(Real &newpricertol) const
is the solution precise enough, or should we increase delta() ?
SPxId id(int i) const
id of i 'th vector.
UpdateVector & fVec() const
feasibility vector.
bool isSPxColId() const
is id a column id?
dual variable is set to its upper bound
solve() aborted due to commence decomposition simplex
solve() aborted due to time limit.
void addIdx(int i)
adds index i to the index set
bool isBasic(SPxBasis::Desc::Status stat) const
does stat describe a basic index ?
primal variable is left free, but unset
Real siderange
absolute range of all side in the problem
void setDual(Vector &p_vector)
solve() aborted to exit decomposition simplex
const VectorBase< R > & lhs() const
Returns left hand side vector.
bool getComputeDegeneracy() const
returns whether the degeneracy is computed in each iteration
Real getEstimatedCondition()
int primalCount
number of primal iterations
Dynamic index set.Class DIdxSet provides dynamic IdxSet in the sense, that no restrictions are posed ...
int getDegenCompOffset() const
gets the offset for the number of iterations before the degeneracy is computed
bool sparsePricingEnter
true if sparsePricing is turned on in the entering Simplex for slack variables
int leaveCycles
the number of degenerate steps during the leaving algorithm
virtual void generate(SPxSolver &base)=0
generates start basis for loaded basis.
const VectorBase< R > & maxRowObj() const
Timer * theTime
time spent in last call to method solve()
virtual void setDelta(Real newDelta)
set allowed bound violation
Status & colStatus(int i)
Real m_leavetol
feasibility tolerance maintained during leaving algorithm
#define MSG_INFO3(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO3.
Real m_pricingViolCo
maximal feasibility violation of current solution in coDim
Real epsilon() const
values are considered to be 0.
Debugging, floating point type and parameter definitions.
virtual void loadBasis(const SPxBasis::Desc &)
set a start basis.
virtual void setEpsilon(Real eps)
sets violation bound.
Status getResult(Real *value=0, Vector *primal=0, Vector *slacks=0, Vector *dual=0, Vector *reduCost=0)
get all results of last solve.
int totalboundflips
total number of bound flips
int polishCount
number of solution polishing iterations
SolutionPolish polishObj
objective of solution polishing
UpdateVector & pVec() const
pricing vector.
SSVector * solveVector2
when 2 systems are to be solved at a time; typically for speepest edge weights
bool isInitialized() const
has the internal data been initialized?
Status m_status
status of algorithm.
Exception base class.This class implements a base class for our SoPlex exceptions We provide a what()...
Everything should be within this namespace.
virtual void setType(SPxSolver::Type)
sets pricing type.
virtual bool terminate()
Termination criterion.
bool EQrel(Real a, Real b, Real eps=Param::epsilon())
returns true iff |relDiff(a,b)| <= eps
Real theCumulativeTime
cumulative time spent in all calls to method solve()
Real dualDegenSum
the sum of the dual degeneracy percentage
SPxId lastLeft() const
returns SPxId of last vector that left the basis.
virtual void printDisplayLine(const bool force=false, const bool forceHead=false)
print display line of flying table
solve() aborted due to detection of cycling.
int prevIteration() const
returns the number of iterations prior to the last break in execution
virtual SPxSolver * solver() const
returns loaded LP solver.
#define MSG_WARNING(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::WARNING.
primal variable is set to its lower bound
const VectorBase< R > & maxObj() const
Returns objective vector for maximization problem.
virtual void clearUpdateVecs(void)
int leaveCount
number of LEAVE iterations
nothing known on loaded problem.
don't perform modifications on optimal basis
const SVectorBase< R > & rowVector(int i) const
Gets row vector of row i.
void computeFrhs()
compute feasibility vector from scratch.
virtual Real epsilon() const
returns violation bound theeps.
void clear()
Set vector to 0.
bool isSPxRowId() const
is id a row id?
SPxRatioTester * theratiotester
bool isValid() const
returns TRUE iff the id is a valid column or row identifier.
dual variable is set to its lower bound
int enterCycles
the number of degenerate steps during the entering algorithm
DSVector primalRay
stores primal ray in case of unboundedness
int size() const
return nr. of elements.
Type type() const
return current Type.
DataArray< int > isInfeasibleCo
0: index not violated, 1: index violated, 2: index violated and among candidate list ...
virtual SPxSolver * solver() const
returns loaded SPxSolver object.
int coDim() const
codimension.
virtual Status getRedCost(Vector &vector) const
get vector of reduced costs.
bool hyperPricingEnter
true if hyper sparse pricing is turned on in the entering Simplex
#define MSG_INFO1(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO1.
DSVector dualFarkas
stores dual farkas proof in case of infeasibility
int nCols() const
Returns number of columns in LP.
int enterCount
number of ENTER iterations
const SLinSolver * slinSolver() const
return loaded SLinSolver.
int printCondition
printing the current condition number in the log (0 - off, 1 - estimate,exact, 2 - exact)";ratio esti...
bool LErel(Real a, Real b, Real eps=Param::epsilon())
returns true iff relDiff(a,b) <= eps
bool isCoBasic(int i) const
is the i 'th covector basic ?
DataArray< int > integerVariables
supplementary variable information, 0: continous variable, 1: integer variable
dual variable has two bounds
Real maxTime
maximum allowed time.
virtual int selectLeave()=0
returns selected index to leave basis.
bool recomputedVectors
flag to perform clean up step to reduce numerical errors only once
Exception class for status exceptions during the computationsThis class is derived from the SoPlex ex...
virtual void init()
intialize data structures.
SPxId lastEntered() const
returns SPxId of last vector included to the basis.
Ids for LP rows.Class SPxRowId provides DataKeys for the row indices of an SPxLP. ...
virtual void computeEnterCoPrhs()
compute theCoPrhs for entering Simplex.
void forceRecompNonbasicValue()
virtual void qualConstraintViolation(Real &maxviol, Real &sumviol) const
get violation of constraints.
void solve(Vector &x, const Vector &rhs)
Textbook ratio test for SoPlex.
Real opttol() const
allowed optimality, i.e., dual feasibility tolerance.
virtual void reset()=0
initialize timer, set timing accounts to zero.
bool isRowBasic(int i) const
is the i 'th row vector basic ?
int index(int n) const
access n 'th index.
Real objLimit
< the number of calls to the method isTimeLimitReached()
void setDecompIterationLimit(int iterationLimit)
sets the iteration limit for the decomposition simplex initialisation
void computePvec()
compute entire pVec().
virtual void load(SPxSolver *lp, bool initSlackBasis=true)
loads the LP lp to the basis.
bool getStartingDecompBasis
flag to indicate whether the simplex is solved to get the starting improved dual simplex basis ...
const SPxBasis & basis() const
Return current basis.
int iterCount
number of calls to change() since last manipulation
Status
Status of a variable.
SSVector * coSolveVector2
when 2 systems are to be solved at a time; typically for speepest edge weights
const VectorBase< R > & obj() const
Returns the vector of objective coefficients.
virtual Status solve()
solve loaded LP.
LP has been proven to be primal unbounded.
virtual Real maxInfeas() const
maximal infeasibility of basis
DIdxSet infeasibilitiesCo
bool hyperPricingLeave
true if hyper sparse pricing is turned on in the leaving Simplex
const VectorBase< R > & lower() const
Returns (internal and possibly scaled) lower bound vector.
const Desc & desc() const
Representation rep() const
return the current basis representation.
solve() aborted due to objective limit.
columnwise representation.
void setRedCost(Vector &p_vector)
virtual Status getDual(Vector &vector) const
get current solution vector for dual variables.
Basis is singular, numerical troubles?
virtual Status getPrimalray(Vector &vector) const
get primal ray in case of unboundedness.
virtual void factorize()
Factorize basis matrix.
Basis is primal feasible.
int lastDegenCheck() const
returns the number of iterations since the last degeneracy check
LP has a usable Basis (maybe LP is changed).
bool matrixIsSetup
true iff the pointers in matrix are set up correctly.
virtual Status getSlacks(Vector &vector) const
get vector of slack variables.
void setBasisStatus(SPxBasis::SPxStatus stat)
set the lp solver's basis status.
LP has been proven to be primal unbounded.
LP has been proven to be primal infeasible.
No Problem has been loaded to the basis.
void computeCoTest()
compute coTest vector.
void calculateProblemRanges()
determine ranges of problem values for bounds, sides and objective to assess numerical difficulties ...
Real primalDegenSum
the sum of the primal degeneracy percentage