31 return doBoth ?
"bi-Equilibrium" :
"uni-Equilibrium";
39 for(
int i = 0; i < vecset->
num(); ++i )
41 const SVector& vec = (*vecset)[i];
45 for(
int j = 0; j < vec.
size(); ++j )
58 spxFrexp(1.0 / maxi, &(scaleExp[i]));
86 MSG_INFO1( (*
spxout), (*
spxout) <<
"Equilibrium scaling LP" << (persistent ?
" (persistent)" :
"") << std::endl; )
112 bool colFirst = colratio < rowratio;
117 <<
" col-ratio= " << colratio
118 <<
" row-ratio= " << rowratio
Rational spxAbs(const Rational &r)
Absolute.
virtual void setup(SPxLPBase< Real > &lp)
clear and setup scaling arrays in the LP
virtual void scale(SPxLPBase< Real > &lp, bool persistent=false)
Scale the loaded SPxLP.
virtual R minAbsNzo(bool unscaled=true) const
Absolute smallest non-zero element in (possibly scaled) LP.
static const char * makename(bool doBoth)
int size() const
Number of used indices.
virtual Real maxRowRatio(const SPxLPBase< Real > &lp) const
maximum ratio between absolute biggest and smallest element in any row.
R & value(int n)
Reference to value of n 'th nonzero.
SPxEquiliSC(bool doBoth=true)
default constructor (this scaler makes no use of inherited member m_colFirst)
Saving LPs in a form suitable for SoPlex.
Real spxFrexp(Real y, int *exp)
Wrapper for different output streams and verbosity levels.
DataArray< int > * m_activeColscaleExp
pointer to currently active column scaling factors
virtual void applyScaling(SPxLPBase< Real > &lp)
applies m_colscale and m_rowscale to the lp.
Real spxLdexp(Real x, int exp)
returns x * 2^exp
SPxOut * spxout
message handler
bool GT(Real a, Real b, Real eps=Param::epsilon())
returns true iff a > b + eps
int & index(int n)
Reference to index of n 'th nonzero.
#define MSG_INFO2(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO2.
virtual Real maxAbsColscale() const
absolute biggest column scaling factor
virtual Real minAbsColscale() const
absolute smallest column scaling factor
Preconfigured SoPlex LP solver.
#define MSG_INFO3(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO3.
DataArray< int > * m_activeRowscaleExp
pointer to currently active row scaling factors
virtual Real minAbsRowscale() const
absolute smallest row scaling factor
Everything should be within this namespace.
Saving LPs in a form suitable for SoPlex.
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
virtual Real maxAbsRowscale() const
absolute biggest row scaling factor
#define MSG_INFO1(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO1.
SPxEquiliSC & operator=(const SPxEquiliSC &)
assignment operator
const SVSetBase< R > * colSet() const
Returns the complete SVSetBase.
bool m_doBoth
do columns and rows
virtual Real maxColRatio(const SPxLPBase< Real > &lp) const
maximum ratio between absolute biggest and smallest element in any column.
const SVSetBase< R > * rowSet() const
Returns the complete SVSet.
Equilibrium row/column scaling.This SPxScaler implementation performs equilibrium scaling of the LPs ...
static void computeScalingExpVec(const SVSet *vecset, const DataArray< int > &coScaleExp, DataArray< int > &scaleExp)
int num() const
Current number of SVectorBases.
virtual R maxAbsNzo(bool unscaled=true) const
Absolute biggest non-zero element in (in rational case possibly scaled) LP.
SPxScaler & operator=(const SPxScaler &)
assignment operator