49#define SOPLEX_HYPERPRICINGTHRESHOLD 5000
50#define SOPLEX_HYPERPRICINGSIZE 100
51#define SOPLEX_SPARSITYFACTOR 0.6
52#define SOPLEX_DENSEROUNDS 5
53#define SOPLEX_SPARSITY_TRADEOFF 0.8
56#define SOPLEX_MAXNCLCKSKIPS 32
57#define SOPLEX_SAFETYFACTOR 1e-2
58#define SOPLEX_NINITCALLS 200
70class SPxBoundFlippingRT;
650 const NameSet* rowNames,
const NameSet* colNames,
const bool cpxFormat =
false)
const;
658 const NameSet* colNames =
nullptr,
const bool cpxFormat =
false,
659 const bool writeZeroObjective =
false)
const;
675 virtual Status solve(
volatile bool* interrupt =
nullptr,
bool polish =
true);
858 return this->
tolerances()->floatingPointFeastol() * this->entertolscale;
860 return this->
tolerances()->floatingPointOpttol() * this->entertolscale;
866 return this->
tolerances()->floatingPointOpttol() * this->leavetolscale;
868 return this->
tolerances()->floatingPointFeastol() * this->leavetolscale;
873 this->entertolscale = d;
878 this->leavetolscale = d;
1045 virtual void changeObj(
int i,
const R& newVal,
bool scale =
false);
1083 virtual void changeLower(
int i,
const R& newLower,
bool scale =
false);
1095 virtual void changeUpper(
int i,
const R& newUpper,
bool scale =
false);
1104 bool scale =
false);
1106 virtual void changeBounds(
int i,
const R& newLower,
const R& newUpper,
bool scale =
false);
1119 virtual void changeLhs(
int i,
const R& newLhs,
bool scale =
false);
1131 virtual void changeRhs(
int i,
const R& newRhs,
bool scale =
false);
1140 bool scale =
false);
1142 virtual void changeRange(
int i,
const R& newLhs,
const R& newRhs,
bool scale =
false);
1273 ? (*thevectors)[this->
number(rid)]
1281 ? (*thevectors)[this->
number(cid)]
1316 ? (*thecovectors)[this->
number(rid)]
1324 ? (*thecovectors)[this->
number(cid)]
1371 return (stat *
rep() > 0);
1703 (*theUbound)[i] = to;
1711 (*theLbound)[i] = to;
1719 (*theCoUbound)[i] = to;
1727 (*theCoLbound)[i] = to;
1758 int start = 0,
int incr = 1);
1762 int start = 0,
int incr = 1);
2011 R& leaveMax, R& leavebound,
int& leaveNum,
StableSum<R>& objChange);
2014 R& enterBound, R& newUBbound,
2018 R& enterUB, R& enterLB, R& enterVal, R& enterMax,
2143 const int colsSize = -1)
const;
2227 return basis().iteration();
2321 std::stringstream s;
2322 s <<
basis().statistics()
2323 <<
"Solution time : " << std::setw(10) << std::fixed << std::setprecision(
2324 2) <<
time() << std::endl
2325 <<
"Iterations : " << std::setw(10) <<
iterations() << std::endl;
2338 return this->
rId(i);
2343 return this->
cId(i);
2408#include "spxsolver.hpp"
2409#include "spxsolve.hpp"
2410#include "changesoplex.hpp"
2413#include "spxshift.hpp"
2414#include "spxbounds.hpp"
2415#include "spxchangebasis.hpp"
2416#include "spxvecs.hpp"
2417#include "spxwritestate.hpp"
2418#include "spxfileio.hpp"
2419#include "spxquality.hpp"
Save arrays of arbitrary types.
Safe arrays of data objects.
int info
user information to store values -1, 0, +1
bool isValid() const
returns TRUE, iff the DataKey is valid.
Sparse Linear Solver virtual base class.
const Desc & desc() const
R fillFactor
allowed increase in relative fill before refactorization
void setStatus(SPxStatus stat)
sets basis SPxStatus to stat.
R memFactor
allowed total increase in memory consumption before refactorization
SPxBasisBase(Timer::TYPE ttype=Timer::USER_TIME)
default constructor.
SPxStatus status() const
returns current SPxStatus.
R nonzeroFactor
allowed increase of nonzeros before refactorization.
Bound flipping ratio test ("long step dual") for SoPlex.
Fast shifting ratio test.
Generic Ids for LP rows or columns.
bool isValid() const
returns TRUE iff the id is a valid column or row identifier.
bool isSPxRowId() const
is id a row id?
const VectorBase< R > & rhs() const
Returns right hand side vector.
SPxSense spxSense() const
Returns the optimization sense.
const VectorBase< R > & lhs() const
Returns left hand side vector.
SPxSense
Optimization sense.
int number(const SPxRowId &id) const
Returns the row number of the row with identifier id.
const LPColSetBase< R > * lpcolset() const
Returns the LP as an LPColSetBase.
const VectorBase< R > & lower() const
Returns (internal and possibly scaled) lower bound vector.
virtual void clearRowObjs()
Clears row objective function values for all rows.
std::shared_ptr< Tolerances > _tolerances
SPxRowId rId(int n) const
Returns the row identifier for row n.
const LPRowSetBase< R > * lprowset() const
Returns the LP as an LPRowSetBase.
SPxColId cId(int n) const
Returns the column identifier for column n.
const VectorBase< R > & upper() const
Returns upper bound vector.
Wrapper for several output streams. A verbosity level is used to decide which stream to use and wheth...
Abstract pricer base class.
Abstract ratio test base class.
Sequential object-oriented SimPlex.
virtual void reLoad()
reload LP.
void setOutstream(SPxOut &newOutstream)
virtual void changeElement(int i, int j, const R &val, bool scale=false)
SPxId coId(int i) const
id of i 'th covector.
bool getDualNorms(int &nnormsRow, int &nnormsCol, R *norms) const
get dual norms
void scaleLeavetol(R d)
scale the leaving tolerance
virtual R terminationValue() const
return objective limit.
void setSolverStatus(typename SPxSolverBase< R >::Status stat)
setting the solver status external from the solve loop.
R entertol() const
feasibility tolerance maintained by ratio test during ENTER algorithm.
virtual void changeRange(int i, const R &newLhs, const R &newRhs, bool scale=false)
void resetClockStats()
resets clock average statistics
void shiftLPbound(int i, R to)
shift i 'th lpBound to to.
int storeBasisSimplexFreq
virtual void perturbMaxLeave(void)
perturb nonbasic bounds.
void shiftLCbound(int i, R to)
shift i 'th lcBound to to.
VectorBase< Real > theUCbound
bool isCoId(const SPxId &p_id) const
Is p_id a CoId.
VectorBase< Real > * theCoLbound
DSVectorBase< Real > primalRay
virtual void qualRedCostViolation(R &maxviol, R &sumviol) const
get violation of optimality criterion.
virtual void changeCol(SPxColId p_id, const LPColBase< R > &p_newCol, bool scale=false)
VectorBase< Real > * theFrhs
int iterations() const
get number of iterations of current solution.
virtual void changeElement(SPxRowId rid, SPxColId cid, const R &val, bool scale=false)
VectorBase< R > & lcBound()
lower bound for coPvec.
UpdateVector< Real > * theFvec
int primalIterations()
return number of iterations done with primal algorithm
const SPxPricer< Real > * pricer() const
virtual void changeMaxObj(int i, const R &newVal, bool scale=false)
void updateFtest()
update basis feasibility test vector.
virtual void changeRhs(int i, const R &newRhs, bool scale=false)
bool isInitialized() const
has the internal data been initialized?
UpdateVector< Real > * theCPvec
virtual void doRemoveRows(int perm[])
virtual void changeSense(typename SPxLPBase< R >::SPxSense sns)
virtual bool terminate()
Termination criterion.
const VectorBase< R > & ucBound() const
void updateCoTest()
recompute coTest vector.
virtual void setTester(SPxRatioTester< R > *tester, const bool destroy=false)
setup ratio-tester to use. If destroy is true, tester will be freed in destructor.
VectorBase< Real > theCoTest
bool isBasic(const SPxRowId &rid) const
is the rid 'th vector basic ?
void setup4solve(SSVectorBase< R > *p_y, SSVectorBase< R > *p_rhs)
Setup vectors to be solved within Simplex loop.
bool isCoBasic(int i) const
is the i 'th covector basic ?
SPxStarter< Real > * thestarter
virtual R value()
current objective value.
bool isBasic(const SPxColId &cid) const
is the cid 'th vector basic ?
SolutionPolish getSolutionPolishing()
return objective of solution polishing
R delta() const
guaranteed primal and dual bound violation for optimal solution, returning the maximum of floatingPoi...
VarStatus basisStatusToVarStatus(typename SPxBasisBase< R >::Desc::Status stat) const
converts basis status to VarStatus
int boundFlips() const
get number of bound flips.
virtual Status getPrimalSol(VectorBase< R > &vector) const
get solution vector for primal variables.
virtual void changeBounds(const VectorBase< R > &newLower, const VectorBase< R > &newUpper, bool scale=false)
DataArray< int > integerVariables
const VectorBase< R > & fTest() const
Violations of fVec.
virtual void setTerminationValue(R value=R(infinity))
set objective limit.
void shiftPvec()
Perform initial shifting to optain an feasible or pricable basis.
bool setDualNorms(int nnormsRow, int nnormsCol, R *norms)
set dual norms
virtual void computeFrhs1(const VectorBase< R > &, const VectorBase< R > &)
virtual R maxInfeas() const
maximal infeasibility of basis
SSVectorBase< Real > * coSolveVector2
virtual void qualBoundViolation(R &maxviol, R &sumviol) const
get violations of bounds.
Pricing pricing() const
return current Pricing.
const SVSetBase< Real > * thecovectors
void useFullPerturbation(bool full)
perturb entire problem or only the bounds relevant to the current pivot
virtual void changeMaxObj(SPxColId p_id, const R &p_newVal, bool scale=false)
overloading a virtual function
VarStatus getBasisColStatus(int col) const
gets basis status for a single column
virtual void changeObj(SPxColId p_id, const R &p_newVal, bool scale=false)
overloading a virtual function
SPxStarter< R > * starter() const
return current starter.
void setPrimalBounds()
setup feasibility bounds for entering algorithm
void setup4solve2(SSVectorBase< R > *p_y2, SSVectorBase< R > *p_rhs2)
Setup vectors to be solved within Simplex loop.
int getDisplayFreq()
get display frequency
virtual void setStarter(SPxStarter< R > *starter, const bool destroy=false)
setup starting basis generator to use. If destroy is true, starter will be freed in destructor.
Status getBasis(VarStatus rows[], VarStatus cols[], const int rowsSize=-1, const int colsSize=-1) const
get current basis, and return solver status.
void getLhs(VectorBase< R > &p_lhs) const
copy lhs value VectorBase<R> to p_lhs.
virtual Status getSlacks(VectorBase< R > &vector) const
get VectorBase<R> of slack variables.
bool updateNonbasicValue(R objChange)
void hyperPricing(bool h)
enable or disable hyper sparse pricing
void clearDualBounds(typename SPxBasisBase< R >::Desc::Status, R &, R &) const
bool isConsistent() const
check consistency.
virtual void changeCol(int i, const LPColBase< R > &newCol, bool scale=false)
virtual void perturbMaxEnter(void)
perturb basis bounds.
virtual void ungetEnterVal(SPxId enterId, typename SPxBasisBase< R >::Desc::Status enterStat, R leaveVal, const SVectorBase< R > &vec, StableSum< R > &objChange)
void setup4coSolve(SSVectorBase< R > *p_y, SSVectorBase< R > *p_rhs)
Setup vectors to be cosolved within Simplex loop.
SPxPricer< Real > * thepricer
virtual void computeLeaveCoPrhs()
compute theCoPrhs for leaving Simplex.
bool isRowBasic(int i) const
is the i 'th row vector basic ?
int coDim() const
codimension.
bool isId(const SPxId &p_id) const
Is p_id an SPxId ?
virtual void perturbMinEnter(void)
virtual Status getRedCostSol(VectorBase< R > &vector) const
get vector of reduced costs.
DataArray< VarStatus > oldBasisStatusRows
DataArray< VarStatus > & getOldBasisStatusCols()
virtual bool precisionReached(R &newpricertol) const
is the solution precise enough, or should we increase delta() ?
virtual Real terminationTime() const
return time limit.
virtual void qualSlackViolation(R &maxviol, R &sumviol) const
get the residuum |Ax-b|.
virtual void changeRhs(const VectorBase< R > &newRhs, bool scale=false)
bool performSolutionPolishing()
void setSolvingForBoosted(bool value)
virtual void clearRowObjs()
virtual void setTolerances(std::shared_ptr< Tolerances > newTolerances)
set the _tolerances member variable
void resetCumulativeTime()
reset cumulative time counter to zero.
bool isTimeLimitReached(const bool forceCheck=false)
returns whether current time limit is reached; call to time() may be skipped unless forceCheck is tru...
UpdateVector< R > & pVec() const
pricing vector.
void setMemFactor(R f)
set refactor threshold for memory growth in current factor update compared to the last factorization
void setDisplayFreq(int freq)
set display frequency
void forceRecompNonbasicValue()
virtual void changeLhs(SPxRowId p_id, const R &p_newLhs, bool scale=false)
void setSparsePricingFactor(R fac)
const SVectorBase< R > & vector(const SPxRowId &rid) const
void setup4coSolve2(SSVectorBase< R > *p_z, SSVectorBase< R > *p_rhs)
Setup vectors to be cosolved within Simplex loop.
SPxBasisBase< R >::SPxStatus getBasisStatus() const
gets basis status
const SVectorBase< R > & vector(const SPxId &p_id) const
VectorBase<R> associated to p_id.
void setRep(Representation p_rep)
switch to ROW or COLUMN representation if not already used.
virtual void reinitializeVecs()
setup all vecs fresh
SPxRowId rowId(int i) const
RowId of i 'th inequality.
const SVectorBase< R > & coVector(int i) const
i 'th covector of LP.
UpdateVector< Real > * theRPvec
DataArray< VarStatus > & getOldBasisStatusRows()
virtual Status solve(volatile bool *interrupt=nullptr, bool polish=true)
solve loaded LP.
void setMetricInformation(int type)
print basis metric within the usual output
virtual void setEnterBounds()
R coTest(int i, typename SPxBasisBase< R >::Desc::Status stat) const
test coVector i with status stat.
int remainingRoundsEnterCo
void setRedCost(VectorBase< R > &p_vector)
virtual const SVectorBase< R > * enterVector(const SPxId &p_id)
Get pointer to the id 'th vector.
void computePvec()
compute entire pVec().
void computeTest()
compute test VectorBase<R> in ENTERing Simplex.
VectorBase< R > & ucBound()
upper bound for coPvec.
void invalidateBasis()
invalidates the basis, triggers refactorization
virtual void setLeaveBounds()
virtual void changeUpper(int i, const R &newUpper, bool scale=false)
virtual void changeLowerStatus(int i, R newLower, R oldLower=0.0)
VarStatus getBasisRowStatus(int row) const
gets basis status for a single row
virtual void getEnterVals(SPxId id, R &enterTest, R &enterUB, R &enterLB, R &enterVal, R &enterMax, R &enterPric, typename SPxBasisBase< R >::Desc::Status &enterStat, R &enterRO, StableSum< R > &objChange)
const SVSetBase< Real > * thevectors
void computeCoTest()
compute coTest vector.
bool m_nonbasicValueUpToDate
@ OPTIMAL_UNSCALED_VIOLATIONS
SPxId id(int i) const
id of i 'th vector.
SPxSolverBase(Type type=LEAVE, Representation rep=ROW, Timer::TYPE ttype=Timer::USER_TIME)
default constructor.
DIdxSet infeasibilitiesCo
virtual void setupPupdate(void)
virtual void changeObj(const VectorBase< R > &newObj, bool scale=false)
scale determines whether the new data needs to be scaled according to the existing LP (persistent sca...
virtual R objValue()
get objective value of current solution.
void setDual(VectorBase< R > &p_vector)
SPxBasisBase< R >::Desc::Status covarStatus(int i) const
Status of i 'th covariable.
R perturbMin(const UpdateVector< R > &uvec, VectorBase< R > &low, VectorBase< R > &up, R eps, R delta, const typename SPxBasisBase< R >::Desc::Status *stat, int start, int incr)
bool enter(SPxId &id, bool polish=false)
void setEnterBound4Row(int, int)
void computeDualfarkas4Row(R direction, SPxId enterId)
const VectorBase< R > & coTest() const
violations of coPvec.
virtual bool read(std::istream &in, NameSet *rowNames=nullptr, NameSet *colNames=nullptr, DIdxSet *intVars=nullptr)
read LP from input stream.
void getRhs(VectorBase< R > &p_rhs) const
copy rhs value VectorBase<R> to p_rhs.
virtual void factorize()
Factorize basis matrix.
Representation rep() const
return the current basis representation.
Timer::TYPE getTiming()
set timing type
void calculateProblemRanges()
determine ranges of problem values for bounds, sides and objective to assess numerical difficulties
bool isColBasic(int i) const
is the i 'th column vector basic ?
virtual void doRemoveCols(int perm[])
bool isTerminationValueEnabled() const
true if objective limit should be used in the next solve
virtual void changeUpper(SPxColId p_id, const R &p_newUpper, bool scale=false)
overloading virtual function
R sumPrimalDegeneracy()
get the sum of primal degeneracy
virtual void changeRowObj(int i, const R &newVal, bool scale=false)
R getDegeneracyLevel(VectorBase< R > degenvec)
get level of dual degeneracy
const SLinSolver< R > * slinSolver() const
return loaded SLinSolver.
void computeEnterCoPrhs4Row(int i, int n)
const VectorBase< R > & lpBound() const
virtual void setBasisSolver(SLinSolver< R > *slu, const bool destroy=false)
setup linear solver to use. If destroy is true, slusolver will be freed in destructor.
void setFillFactor(R f)
set refactor threshold for fill-in in current factor update compared to fill-in in last factorization
int numCycle() const
actual number of degenerate simplex steps encountered so far.
void unscaleLPandReloadBasis()
unscales the LP and reloads the basis
virtual void loadLP(const SPxLPBase< R > &LP, bool initSlackBasis=true)
copy LP.
virtual void changeLower(SPxColId p_id, const R &p_newLower, bool scale=false)
SPxColId colId(int i) const
ColId of i 'th column.
bool isBasic(int i) const
is the i 'th vector basic ?
virtual void changeRange(SPxRowId p_id, const R &p_newLhs, const R &p_newRhs, bool scale=false)
UpdateVector< R > & fVec() const
feasibility vector.
VectorBase< R > & upBound()
upper bound for pVec.
int subversion() const
return the internal subversion of SPxSolverBase as number
virtual void changeMaxObj(const VectorBase< R > &newObj, bool scale=false)
virtual void changeRange(const VectorBase< R > &newLhs, const VectorBase< R > &newRhs, bool scale=false)
const SVectorBase< R > & coVector(const SPxId &p_id) const
coVector associated to p_id.
R computePvec(int i)
compute and return pVec()[i].
void scaleEntertol(R d)
scale the entering tolerance
DSVectorBase< Real > dualFarkas
void setNonzeroFactor(R f)
set refactor threshold for nonzeros in last factorized basis matrix compared to updated basis matrix
void computeFrhs()
compute feasibility vector from scratch.
VectorBase< Real > coWeights
void scaleTolerances(R d)
R perturbMax(const UpdateVector< R > &uvec, VectorBase< R > &low, VectorBase< R > &up, R eps, R delta, const typename SPxBasisBase< R >::Desc::Status *stat, int start, int incr)
R nonbasicValue()
Compute part of objective value.
virtual void changeUpper(const VectorBase< R > &newUpper, bool scale=false)
virtual void setPricer(SPxPricer< R > *pricer, const bool destroy=false)
setup pricer to use. If destroy is true, pricer will be freed in destructor.
SSVectorBase< Real > * coSolveVector2rhs
SPxSolverBase(const SPxSolverBase< R > &base)
copy constructor
virtual bool noViols(R tol) const
check for violations above tol and immediately return false w/o checking the remaining values
virtual void init()
intialize data structures.
SSVectorBase< Real > * solveVector3
void shiftUBbound(int i, R to)
shift i 'th ubBound to to.
UpdateVector< Real > * theCoPvec
void setType(Type tp)
set LEAVE or ENTER algorithm.
const SPxRatioTester< R > * ratiotester() const
return loaded SPxRatioTester.
int dualIterations()
return number of iterations done with primal algorithm
virtual void computeEnterCoPrhs()
compute theCoPrhs for entering Simplex.
const SVectorBase< R > & coVector(const SPxColId &cid) const
R test(int i, typename SPxBasisBase< R >::Desc::Status stat) const
test VectorBase<R> i with status stat.
const SPxBasisBase< R > & basis() const
Return current basis.
virtual void factorizeAndRecompute()
const SVectorBase< R > & vector(const SPxColId &cid) const
bool leave(int i, bool polish=false)
virtual void perturbMinLeave(void)
bool sparsePricingEnterCo
int version() const
return the version of SPxSolverBase as number like 123 for 1.2.3
Status getResult(R *value=0, VectorBase< R > *primal=0, VectorBase< R > *slacks=0, VectorBase< R > *dual=0, VectorBase< R > *reduCost=0)
get all results of last solve.
void getNdualNorms(int &nnormsRow, int &nnormsCol) const
get number of dual norms
R epsilon() const
values are considered to be 0.
virtual void reDim()
reset dimensions of vectors according to loaded LP.
void setPricing(Pricing pr)
set FULL or PARTIAL pricing.
void setEnterBound4Col(int, int)
VectorBase< R > & lbBound()
lower bound for fVec, writable.
DataArray< int > isInfeasibleCo
void localAddCols(int start)
DataArray< int > isInfeasible
SSVectorBase< Real > * solveVector3rhs
void computeFtest()
compute basis feasibility test vector.
void shiftFvec()
Perform initial shifting to optain an feasible or pricable basis.
void setSlacks(VectorBase< R > &p_vector)
virtual void unInit()
uninitialize data structures.
void setLeaveBound4Row(int i, int n)
int maxCycle() const
maximum number of degenerate simplex steps before we detect cycling.
virtual void changeLower(int i, const R &newLower, bool scale=false)
void setStoreBasisFreqForBoosting(int freq)
void localAddRows(int start)
SSVectorBase< Real > * solveVector2rhs
UpdateVector< Real > primVec
int polishIterations()
return number of iterations done with primal algorithm
VectorBase< R > & lpBound()
lower bound for pVec.
virtual void clear()
clear all data in solver.
int dim() const
dimension of basis matrix.
SolutionPolish
objective for solution polishing
void shiftUCbound(int i, R to)
shift i 'th ucBound to to.
void perturbMax(const UpdateVector< R > &vec, VectorBase< R > &low, VectorBase< R > &up, R eps, R delta, int start=0, int incr=1)
const LPRowSetBase< Real > & rows() const
SPxBasisBase< R >::Desc::Status varStatusToBasisStatusCol(int col, VarStatus stat) const
converts VarStatus to basis status for columns
SPxBasisBase< R > & basis()
VectorBase< Real > theLCbound
virtual void printDisplayLine(const bool force=false, const bool forceHead=false)
print display line of flying table
void computeDualfarkas4Col(R direction)
virtual Status getDualfarkas(VectorBase< R > &vector) const
get dual farkas proof of infeasibility.
void setSolutionPolishing(SolutionPolish _polishObj)
set objective of solution polishing (0: off, 1: max_basic_slack, 2: min_basic_slack)
void toggleTerminationValue(bool enable)
toggle objective limit for next solve
virtual void changeLhs(int i, const R &newLhs, bool scale=false)
void setBasis(const VarStatus rows[], const VarStatus cols[])
set the lp solver's basis.
R sumDualDegeneracy()
get the sum of dual degeneracy
void updateTest()
recompute test vector.
virtual void setTerminationTime(Real time=infinity)
set time limit.
SPxBasisBase< R >::Desc::Status varStatusToBasisStatusRow(int row, VarStatus stat) const
converts VarStatus to basis status for rows
VectorBase< Real > * theCoUbound
VectorBase< Real > weights
void computeLeaveCoPrhs4Row(int i, int n)
const SVectorBase< R > & coVector(const SPxRowId &rid) const
virtual void changeRow(int i, const LPRowBase< R > &newRow, bool scale=false)
VectorBase< Real > theLRbound
VectorBase< Real > dualRhs
const VectorBase< R > & lbBound() const
lower bound for fVec.
void setPrimal(VectorBase< R > &p_vector)
virtual void changeBounds(int i, const R &newLower, const R &newUpper, bool scale=false)
virtual void setTerminationIter(int iteration=-1)
set iteration limit.
VectorBase< Real > theTest
virtual void changeLower(const VectorBase< R > &newLower, bool scale=false)
void getUpper(VectorBase< R > &p_up) const
copy upper bound VectorBase<R> to p_up.
UpdateVector< R > & coPvec() const
copricing vector.
SSVectorBase< Real > * coSolveVector3
virtual void changeLhs(const VectorBase< R > &newLhs, bool scale=false)
UpdateVector< Real > addVec
virtual bool writeState(const char *filename, const NameSet *rowNames=nullptr, const NameSet *colNames=nullptr, const bool cpxFormat=false, const bool writeZeroObjective=false) const
VectorBase< Real > * theLbound
SPxSolverBase< R > & operator=(const SPxSolverBase< R > &base)
assignment operator
SPxRatioTester< Real > * theratiotester
SSVectorBase< Real > * solveVector2
virtual void changeUpperStatus(int i, R newUpper, R oldLower=0.0)
void setLeaveBound4Col(int i, int n)
VectorBase< Real > theURbound
bool isBasisValid(DataArray< VarStatus > rows, DataArray< VarStatus > cols)
check a given basis for validity.
virtual void rejectEnter(SPxId enterId, R enterTest, typename SPxBasisBase< R >::Desc::Status enterStat)
VectorBase< Real > primRhs
int dualDegeneratePivots()
get number of dual degenerate pivots
const VectorBase< R > & ubBound() const
upper bound for fVec.
int getMaxIters()
the maximum number of iterations
std::string statistics() const
returns statistical information in form of a string.
virtual bool readBasisFile(const char *filename, const NameSet *rowNames, const NameSet *colNames)
void shiftLBbound(int i, R to)
shift i 'th lbBound to to.
SPxBasisBase< R >::Desc::Status varStatus(int i) const
Status of i 'th variable.
SPxLPBase< R >::SPxSense sense() const
optimization sense.
virtual void rejectLeave(int leaveNum, SPxId leaveId, typename SPxBasisBase< R >::Desc::Status leaveStat, const SVectorBase< R > *newVec=nullptr)
R computeTest(int i)
compute and return test()[i] in ENTERing Simplex.
const VectorBase< R > & lcBound() const
virtual void changeLhsStatus(int i, R newLhs, R oldLhs=0.0)
virtual void changeRowObj(const VectorBase< R > &newObj, bool scale=false)
const VectorBase< R > & test() const
Violations of pVec.
const VectorBase< R > & upBound() const
Status status() const
Status of solution process.
const SVectorBase< Real > & vector(int i) const
bool m_pricingViolUpToDate
int primalDegeneratePivots()
get number of primal degenerate pivots
virtual void unShift(void)
remove shift as much as possible.
Type type() const
return current Type.
virtual R shift() const
total current shift amount.
VectorBase< R > & ubBound()
upper bound for fVec, writable.
void getLower(VectorBase< R > &p_low) const
copy lower bound VectorBase<R> to p_low.
DataArray< VarStatus > oldBasisStatusCols
Array< UnitVectorBase< Real > > unitVecs
SSVectorBase< Real > * coSolveVector3rhs
void computePrimalray4Col(R direction, SPxId enterId)
UpdateVector< Real > * thePvec
void computePrimalray4Row(R direction)
virtual void clearUpdateVecs(void)
void setIntegralityInformation(int ncols, int *intInfo)
pass integrality information about the variables to the solver
virtual void getLeaveVals(int i, typename SPxBasisBase< R >::Desc::Status &leaveStat, SPxId &leaveId, R &leaveMax, R &leavebound, int &leaveNum, StableSum< R > &objChange)
const VectorBase< R > & coPrhs() const
Right-hand side vector for coPvec.
virtual void doPupdate(void)
virtual void addedCols(int n)
void computeLeaveCoPrhs4Col(int i, int n)
virtual void addedRows(int n)
virtual void getEnterVals2(int leaveIdx, R enterMax, R &leaveBound, StableSum< R > &objChange)
bool isBasic(typename SPxBasisBase< R >::Desc::Status stat) const
does stat describe a basic index ?
bool isBasic(const SPxId &p_id) const
is the p_id 'th vector basic ?
virtual void computeFrhsXtra()
void setTiming(Timer::TYPE ttype)
set timing type
const SVectorBase< R > & unitVector(int i) const
return i 'th unit vector.
const std::shared_ptr< Tolerances > & tolerances() const
returns current tolerances
virtual void changeBounds(SPxColId p_id, const R &p_newLower, const R &p_newUpper, bool scale=false)
R leavetol() const
feasibility tolerance maintained by ratio test during LEAVE algorithm.
virtual void doRemoveCol(int i)
void setBasisStatus(typename SPxBasisBase< R >::SPxStatus stat)
set the lp solver's basis status.
void shiftUPbound(int i, R to)
shift i 'th upBound to to.
void computeFrhs2(VectorBase< R > &, VectorBase< R > &)
VectorBase< Real > * theUbound
virtual void changeRow(SPxRowId p_id, const LPRowBase< R > &p_newRow, bool scale=false)
virtual void qualConstraintViolation(R &maxviol, R &sumviol) const
get violation of constraints.
virtual void changeObj(int i, const R &newVal, bool scale=false)
const LPColSet & cols() const
virtual Status getPrimalray(VectorBase< R > &vector) const
get primal ray in case of unboundedness.
virtual void loadBasis(const typename SPxBasisBase< R >::Desc &)
set a start basis.
Representation
LP basis representation.
void perturbMin(const UpdateVector< R > &vec, VectorBase< R > &low, VectorBase< R > &up, R eps, R delta, int start=0, int incr=1)
Real cumulativeTime() const
cumulative time spent in all calls to method solve().
virtual void doRemoveRow(int i)
void initRep(Representation p_rep)
initialize ROW or COLUMN representation.
virtual R getBasisMetric(int type)
virtual void changeRhsStatus(int i, R newRhs, R oldRhs=0.0)
UpdateVector< Real > dualVec
virtual Status getDualSol(VectorBase< R > &vector) const
get current solution VectorBase<R> for dual variables.
virtual void changeRhs(SPxRowId p_id, const R &p_newRhs, bool scale=false)
void computeEnterCoPrhs4Col(int i, int n)
virtual int terminationIter() const
return iteration limit.
VectorBase< Real > theUBbound
bool m_pricingViolCoUpToDate
const VectorBase< R > & fRhs() const
right-hand side vector for fVec
VectorBase< Real > theLBbound
VectorBase< Real > * theCoPrhs
Real getMaxTime()
the maximum runtime
virtual void changeRowObj(SPxRowId p_id, const R &p_newVal, bool scale=false)
virtual bool writeBasisFile(const char *filename, const NameSet *rowNames, const NameSet *colNames, const bool cpxFormat=false) const
virtual void getLeaveVals2(R leaveMax, SPxId enterId, R &enterBound, R &newUBbound, R &newLBbound, R &newCoPrhs, StableSum< R > &objChange)
SoPlex start basis generation base class.
static Timer * switchTimer(Timer *timer, Timer::TYPE ttype)
Wrapper for the system time query methods.
Dense Vector with semi-sparse Vector for updates.
void setTolerances(std::shared_ptr< Tolerances > &tolerances)
set tolerances
Everything should be within this namespace.
std::ostream & operator<<(std::ostream &s, const VectorBase< R > &vec)
Output operator.
LPColSetBase< Real > LPColSet
SPxSolverBase< Real > SPxSolver
SVectorBase< Real > SVector
SOPLEX_THREADLOCAL const Real infinity
Debugging, floating point type and parameter definitions.
#define SOPLEX_SUBVERSION
Saving LPs in a form suitable for SoPlex.
Saving LPs in a form suitable for SoPlex.
Dense VectorBase<R> with semi-sparse VectorBase<R> for updates.