116 explicit SPxScaler(
const char* name,
bool colFirst =
false,
bool doBoth =
true,
132 virtual const char*
getName()
const;
134 virtual void setOrder(
bool colFirst);
136 virtual void setBoth(
bool both);
140 spxout = &newOutstream;
145 virtual void setIntParam(
int param,
const char* name =
"intparam");
243 #endif // _SPXSCALER_H_ virtual void unscaleDualray(const SPxLPBase< Real > &lp, Vector &ray) const
unscale dual ray given in ray.
virtual void setup(SPxLPBase< Real > &lp)
clear and setup scaling arrays in the LP
virtual void setBoth(bool both)
set wether column and row scaling should be performed
virtual void setOrder(bool colFirst)
set scaling order
virtual void unscalePrimal(const SPxLPBase< Real > &lp, Vector &x) const
unscale dense primal solution vector given in x.
virtual Real lhsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns unscaled left hand side i of lp
virtual void getRowUnscaled(const SPxLPBase< Real > &lp, int i, DSVector &vec) const
returns unscaled row i
virtual Real scaleElement(const SPxLPBase< Real > &lp, int row, int col, Real val) const
returns scaled LP element in row and col.
friend std::ostream & operator<<(std::ostream &s, const SPxScaler &sc)
virtual void getLhsUnscaled(const SPxLPBase< Real > &lp, Vector &vec) const
returns unscaled left hand side vector of lp
virtual void unscaleRedCost(const SPxLPBase< Real > &lp, Vector &r) const
unscale dense reduced cost vector given in r.
virtual Real maxRowRatio(const SPxLPBase< Real > &lp) const
maximum ratio between absolute biggest and smallest element in any row.
virtual void unscaleDual(const SPxLPBase< Real > &lp, Vector &pi) const
unscale dense dual solution vector given in pi.
virtual Real scaleUpper(const SPxLPBase< Real > &lp, int col, Real upper) const
returns scaled upper bound of column col.
virtual ~SPxScaler()
destructor.
virtual bool isConsistent() const
consistency check
virtual Real getRowMaxAbsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns maximum absolute value of unscaled row i
virtual void getUpperUnscaled(const SPxLPBase< Real > &lp, Vector &vec) const
returns unscaled upper bound vector of lp
virtual Real scaleLhs(const SPxLPBase< Real > &lp, int row, Real lhs) const
returns scaled left hand side of row row.
Dense vector for linear algebra.
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.
virtual void setOutstream(SPxOut &newOutstream)
set message handler
virtual int computeScaleExp(const SVector &vec, const DataArray< int > &oldScaleExp) const
compute a single scaling vector , e.g. of a newly added row
virtual SPxScaler * clone() const =0
clone function for polymorphism
virtual void unscale(SPxLPBase< Real > &lp)
unscale SPxLP
SPxOut * spxout
message handler
virtual Real upperUnscaled(const SPxLPBase< Real > &lp, int i) const
returns unscaled upper bound i
Wrapper for several output streams. A verbosity level is used to decide which stream to use and wheth...
virtual void getLowerUnscaled(const SPxLPBase< Real > &lp, Vector &vec) const
gets unscaled lower bound vector
virtual Real maxAbsColscale() const
absolute biggest column scaling factor
virtual int getColScaleExp(int i) const
returns scaling factor for column i
virtual void scaleObj(const SPxLPBase< Real > &lp, VectorReal &origObj) const
apply scaling to objective function vector origObj.
virtual void getRhsUnscaled(const SPxLPBase< Real > &lp, Vector &vec) const
gets unscaled right hand side vector
virtual Real minAbsColscale() const
absolute smallest column scaling factor
virtual void setRealParam(Real param, const char *name="realparam")
set real parameter
virtual Real maxObjUnscaled(const SPxLPBase< Real > &lp, int i) const
returns unscaled objective function coefficient of i
void computeExpVec(const std::vector< Real > &vec, DataArray< int > &vecExp)
round vector entries to power of 2
DataArray< int > * m_activeRowscaleExp
pointer to currently active row scaling factors
Debugging, floating point type and parameter definitions.
virtual const char * getName() const
get name of scaler
virtual Real minAbsRowscale() const
absolute smallest row scaling factor
virtual Real scaleLower(const SPxLPBase< Real > &lp, int col, Real lower) const
returns scaled lower bound of column col.
virtual void scale(SPxLPBase< Real > &lp, bool persistent=true)=0
scale SPxLP.
Everything should be within this namespace.
virtual Real lowerUnscaled(const SPxLPBase< Real > &lp, int i) const
returns unscaled lower bound i
virtual Real rhsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns unscaled right hand side i
virtual Real getColMinAbsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns minumum absolute value of unscaled column i
bool m_colFirst
do column scaling first
SPxScaler(const char *name, bool colFirst=false, bool doBoth=true, SPxOut *spxout=NULL)
constructor
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
virtual Real getRowMinAbsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns minimum absolute value of unscaled row i
virtual Real maxAbsRowscale() const
absolute biggest row scaling factor
virtual int getRowScaleExp(int i) const
returns scaling factor for row i
virtual void getColUnscaled(const SPxLPBase< Real > &lp, int i, DSVector &vec) const
gets unscaled column i
virtual Real getCoefUnscaled(const SPxLPBase< Real > &lp, int row, int col) const
returns unscaled coefficient of lp
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.
virtual Real scaleRhs(const SPxLPBase< Real > &lp, int row, Real rhs) const
returns scaled right hand side of row row.
Save arrays of data objects.
virtual void unscaleSlacks(const SPxLPBase< Real > &lp, Vector &s) const
unscale dense slack vector given in s.
virtual void unscalePrimalray(const SPxLPBase< Real > &lp, Vector &ray) const
unscale primal ray given in ray.
virtual Real getColMaxAbsUnscaled(const SPxLPBase< Real > &lp, int i) const
returns maximum absolute value of unscaled column i
virtual void getMaxObjUnscaled(const SPxLPBase< Real > &lp, Vector &vec) const
gets unscaled objective function
const char * m_name
Name of the scaler.
virtual void setIntParam(int param, const char *name="intparam")
set int parameter
SPxScaler & operator=(const SPxScaler &)
assignment operator