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);
145 int stallNumRecovers;
213 (*
spxout) <<
"starting value = " <<
value() << std::endl
214 <<
"starting shift = " <<
shift() << std::endl;
233 stallNumRecovers = 0;
237 bool tightened =
false;
259 int enterCycleCount = 0;
260 int enterFacPivotCount = 0;
267 stallRefShift =
shift();
268 stallRefValue =
value();
274 Real minpricertol = 0.01 * maxpricertol;
379 Real newpricertol = minpricertol;
405 if (newpricertol < minpricertol)
406 newpricertol = minpricertol;
415 MSG_INFO3( (*
spxout), (*spxout) <<
" --- solve(enter) triggers refactorization" << std::endl; )
436 enterFacPivotCount++;
450 <<
") reached" << std::endl; )
473 <<
"entering algorithm" << std::endl; );
496 MSG_INFO3( (*
spxout), (*
spxout) <<
" --- stalling detected - trying to recover by switching to LEAVING algorithm." << std::endl; )
504 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to stalling in entering algorithm." << std::endl; );
514 stallRefShift =
shift();
515 stallRefValue =
value();
525 <<
", value: " <<
value()
526 <<
", shift: " <<
shift()
529 <<
", opttol: " <<
opttol()
531 <<
"ISOLVE56 stop: " << stop
533 <<
", solver status: " <<
m_status <<
" (" <<
int(
m_status) <<
")" << std::endl;
551 (*
spxout) <<
" --- maxInfeas: " << maxinfeas
552 <<
", shift: " <<
shift()
553 <<
", entertol: " <<
entertol() << std::endl;
562 else if( loopCount > 2 )
575 <<
")" << std::endl; )
600 int leaveCycleCount = 0;
601 int leaveFacPivotCount = 0;
608 stallRefShift =
shift();
609 stallRefValue =
value();
615 Real minpricertol = 0.01 * maxpricertol;
642 if (leaveNum < 0 && instableLeaveNum >= 0 &&
lastUpdate() == 0)
649 (*
spxout) <<
" --- trying instable leave iteration" << std::endl;
682 Real newpricertol = minpricertol;
707 if (newpricertol < minpricertol)
708 newpricertol = minpricertol;
738 leaveFacPivotCount++;
752 <<
") reached" << std::endl; )
774 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to cycling in leaving algorithm" << std::endl; );
797 MSG_INFO3( (*
spxout), (*
spxout) <<
" --- stalling detected - trying to recover by switching to ENTERING algorithm." << std::endl; )
805 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- abort solving due to stalling in leaving algorithm" << std::endl; );
815 stallRefShift =
shift();
816 stallRefValue =
value();
826 <<
", value: " <<
value()
827 <<
", shift: " <<
shift()
830 <<
", opttol: " <<
opttol()
832 <<
"ISOLVE57 stop: " << stop
834 <<
", solver status: " <<
m_status <<
" (" <<
int(
m_status) <<
")" << std::endl;
839 if(
shift() < minShift )
854 <<
", shift: " <<
shift()
856 <<
", cycle count: " << cycleCount << std::endl;
874 (*
spxout) <<
" --- maxInfeas: " << maxinfeas
875 <<
", shift: " <<
shift()
876 <<
", leavetol: " <<
leavetol() << std::endl;
888 else if (loopCount > 2)
901 <<
")" << std::endl; )
929 tightenedtype =
type();
931 if( tightenedtype ==
ENTER )
959 MSG_INFO2( (*
spxout), (*
spxout) <<
" --- reloaded basis singular, resetting original tolerances" << std::endl; )
961 if( tightenedtype ==
ENTER )
976 stallNumRecovers = 0;
985 if( tightenedtype ==
ENTER )
1003 if( tightenedtype ==
ENTER )
1028 (*spxout) <<
")" << std::endl;
1031 #ifdef ENABLE_ADDITIONAL_CHECKS
1041 for(
int row = 0; row <
nRows(); ++row )
1045 for( c = 0; c < rowvec.
size(); ++c )
1046 val += rowvec.
value( c ) * sol[rowvec.
index( c )];
1054 <<
" is violated by solution" << std::endl
1055 <<
" lhs:" <<
lhs( row )
1056 <<
" <= val:" << val
1057 <<
" <= rhs:" <<
rhs( row ) << std::endl; )
1062 for( c = 0; c <
nRows(); ++c )
1067 assert( c <
nRows() );
1070 <<
" fVec:" <<
fVec()[c]
1071 <<
" fRhs:" <<
fRhs()[c]
1072 <<
" fTest:" <<
fTest()[c] << std::endl; )
1076 for(
int col = 0; col <
nCols(); ++col )
1084 <<
" is violated by solution" << std::endl
1085 <<
" lower:" <<
lower( col )
1086 <<
" <= val:" << sol[col]
1087 <<
" <= upper:" <<
upper( col ) << std::endl; )
1091 for( c = 0; c <
nRows() ; ++c)
1096 assert( c <
nRows() );
1098 <<
" fVec:" <<
fVec()[c]
1099 <<
" fRhs:" <<
fRhs()[c]
1100 <<
" fTest:" <<
fTest()[c] << std::endl; )
1126 int nSuccessfulPivots;
1132 bool success =
false;
1154 for(
int i = 0; i <
nRows(); ++i )
1161 slackcandidates.
addIdx(i);
1168 for(
int i = 0; i <
nCols(); ++i )
1175 continuousvars.
addIdx(i);
1182 nSuccessfulPivots = 0;
1184 for(
int i = slackcandidates.
size() - 1; i >= 0 && !stop; --i )
1186 polishId =
coId(slackcandidates.
index(i));
1187 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << rowstatus[slackcandidates.
index(i)]; )
1188 success =
enter(polishId,
true);
1191 assert(
EQrel(
value(), origval, alloweddeviation));
1192 assert(
LErel(
shift(), origshift, alloweddeviation));
1196 MSG_DEBUG( std::cout <<
" -> success!"; )
1197 ++nSuccessfulPivots;
1198 slackcandidates.
remove(i);
1208 for(
int i = continuousvars.
size() - 1; i >= 0 && !stop; --i )
1210 polishId =
id(continuousvars.
index(i));
1211 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << colstatus[continuousvars.
index(i)]; )
1212 success =
enter(polishId,
true);
1215 assert(
EQrel(
value(), origval, alloweddeviation));
1216 assert(
LErel(
shift(), origshift, alloweddeviation));
1220 MSG_DEBUG( std::cout <<
" -> success!"; )
1221 ++nSuccessfulPivots;
1222 continuousvars.
remove(i);
1232 if( nSuccessfulPivots == 0 )
1243 for(
int i = 0; i <
nCols() && !stop; ++i )
1255 nSuccessfulPivots = 0;
1256 for(
int i = candidates.
size() - 1; i >= 0 && !stop; --i )
1258 polishId =
id(candidates.
index(i));
1259 MSG_DEBUG( std::cout <<
"try pivoting: " << polishId <<
" stat: " << colstatus[candidates.
index(i)]; )
1260 success =
enter(polishId,
true);
1263 assert(
EQrel(
value(), origval, alloweddeviation));
1264 assert(
LErel(
shift(), origshift, alloweddeviation));
1268 MSG_DEBUG( std::cout <<
" -> success!"; )
1269 ++nSuccessfulPivots;
1279 if( nSuccessfulPivots == 0 )
1297 bool useIntegrality =
false;
1300 useIntegrality =
true;
1308 for(
int i = 0; i <
dim(); ++i )
1325 basiccandidates.
addIdx(i);
1331 nSuccessfulPivots = 0;
1332 for(
int i = basiccandidates.
size() - 1; i >= 0 && !stop; --i)
1336 success =
leave(basiccandidates.
index(i),
true);
1339 assert(
EQrel(
value(), origval, alloweddeviation));
1340 assert(
LErel(
shift(), origshift, alloweddeviation));
1344 MSG_DEBUG( std::cout <<
" -> success!"; )
1345 ++nSuccessfulPivots;
1346 basiccandidates.
remove(i);
1355 if( nSuccessfulPivots == 0 )
1366 for(
int i = 0; i <
dim(); ++i )
1382 basiccandidates.
addIdx(i);
1388 nSuccessfulPivots = 0;
1389 for(
int i = basiccandidates.
size() - 1; i >= 0 && !stop; --i )
1392 success =
leave(basiccandidates.
index(i),
true);
1395 assert(
EQrel(
value(), origval, alloweddeviation));
1396 assert(
LErel(
shift(), origshift, alloweddeviation));
1400 MSG_DEBUG( std::cout <<
" -> success!"; )
1401 ++nSuccessfulPivots;
1402 basiccandidates.
remove(i);
1411 if( nSuccessfulPivots == 0 )
1419 (*
spxout) <<
" --- finished solution polishing (" <<
polishCount <<
" pivots)" << std::endl; )
1438 << tmp.
length() << std::endl; )
1458 << tmp.
length() << std::endl; )
1468 for (
int i = 0; i <
dim(); ++i)
1477 <<
", leavetol()=" <<
leavetol() << std::endl; )
1481 for (
int i = 0; i <
coDim(); ++i)
1488 <<
", theTest[i]=" <<
theTest[i]
1489 <<
", leavetol()=" <<
leavetol() << std::endl; )
1502 (*spxout) <<
"type | time | iters | facts | shift | violation | obj value ";
1504 (*
spxout) <<
" | condition";
1505 (*spxout) << std::endl;
1510 (*spxout) << std::fixed << std::setw(7) << std::setprecision(1) <<
time() <<
" |";
1511 (*spxout) << std::scientific << std::setprecision(2);
1512 (*spxout) << std::setw(8) <<
iteration() <<
" | " 1516 << std::setprecision(8) <<
value();
1527 (*spxout) << std::endl;
1536 #ifdef ENABLE_ADDITIONAL_CHECKS 1547 #ifdef ENABLE_ADDITIONAL_CHECKS 1559 #ifdef ENABLE_ADDITIONAL_CHECKS 1564 << cr.
length() << std::endl; )
1567 << fr.
length() << std::endl; )
1601 <<
") reached" << std::endl; )
1633 <<
") reached" << std::endl; )
1635 (*
spxout) <<
" --- objective value limit reached" << std::endl
1636 <<
" (value: " <<
value()
1637 <<
", limit: " <<
objLimit <<
")" << std::endl
1638 <<
" (spxSense: " <<
int(
spxSense())
1639 <<
", rep: " <<
int(
rep())
1640 <<
", type: " <<
int(
type()) <<
")" << std::endl;
1682 Real iterationFrac = 0.6;
1694 Real degeneracyLevel = 0;
1695 Real degeneracyLB = 0.1;
1696 Real degeneracyUB = 0.9;
1698 if( (degeneracyLevel < degeneracyUB && degeneracyLevel > degeneracyLB) &&
iteration() >
nRows()*0.2 )
1742 for (
int i = 0; i <
nCols(); ++i)
1766 for (
int j = 0; j <
dim(); ++j)
1792 for (i =
nCols() - 1; i >= 0; --i)
1794 if (
baseId(i).isSPxRowId())
1823 for (i =
dim() - 1; i >= 0; --i)
1825 if (
baseId(i).isSPxColId())
1831 for (i =
dim() - 1; i >= 0; --i)
1833 if (
baseId(i).isSPxColId())
1900 for (i =
nRows() - 1; i >= 0; --i)
1905 p_vector[i] =
lhs(i);
1909 p_vector[i] =
rhs(i);
1924 for (i =
dim() - 1; i >= 0; --i)
1926 if (
baseId(i).isSPxRowId())
1948 for (
int j = 0; j <
dim(); ++j)
1968 for (
int i =
nCols() - 1; i >= 0; --i)
1970 if (
baseId(i).isSPxRowId())
1999 for (
int i =
dim() - 1; i >= 0; --i)
2001 if (
baseId(i).isSPxColId())
2033 for (
int i =
dim() - 1; i >= 0; --i)
2035 if (
baseId(i).isSPxRowId())
2099 *p_value = this->
value();
virtual void unShift(void)
remove shift as much as possible.
const VectorBase< Real > & 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< Real > & 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< Real > & 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< Real > & 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< Real > & 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< Real > & 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.
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< Real > & 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< Real > & 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