SoPlex
|
Geometric mean row/column scaling. More...
#include <spxgeometsc.h>
Public Member Functions | |
Construction / destruction | |
SPxGeometSC (bool equilibrate=false, int maxIters=8, R minImpr=0.85, R goodEnough=1e3) | |
default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth) | |
SPxGeometSC (const SPxGeometSC &old) | |
copy constructor | |
SPxGeometSC & | operator= (const SPxGeometSC &) |
assignment operator | |
virtual | ~SPxGeometSC () |
destructor | |
virtual SPxScaler< R > * | clone () const override |
clone function for polymorphism | |
Scaling | |
virtual void | scale (SPxLPBase< R > &lp, bool persistent=true) override |
Scale the loaded SPxLPBase<R>. | |
![]() | |
virtual int | computeScaleExp (const SVectorBase< R > &vec, const DataArray< int > &oldScaleExp) const |
compute a single scaling vector , e.g. of a newly added row | |
virtual void | applyScaling (SPxLPBase< R > &lp) |
applies m_colscale and m_rowscale to the lp . | |
SPxScaler (const char *name, bool colFirst=false, bool doBoth=true, SPxOut *spxout=nullptr) | |
constructor | |
SPxScaler (const SPxScaler &) | |
copy constructor | |
SPxScaler & | operator= (const SPxScaler &) |
assignment operator | |
virtual | ~SPxScaler () |
destructor. | |
virtual const char * | getName () const |
get name of scaler | |
virtual void | setOrder (bool colFirst) |
set scaling order | |
virtual void | setBoth (bool both) |
set wether column and row scaling should be performed | |
virtual void | setOutstream (SPxOut &newOutstream) |
set message handler | |
virtual void | setRealParam (R param, const char *name="realparam") |
set R parameter | |
virtual void | setIntParam (int param, const char *name="intparam") |
set int parameter | |
virtual void | setTolerances (std::shared_ptr< Tolerances > &tolerances) |
set tolerances | |
const std::shared_ptr< Tolerances > | tolerances () const |
get the _tolerances member variable | |
virtual void | unscale (SPxLPBase< R > &lp) |
unscale SPxLP | |
virtual int | getColScaleExp (int i) const |
returns scaling factor for column i | |
virtual int | getRowScaleExp (int i) const |
returns scaling factor for row i | |
virtual void | getColUnscaled (const SPxLPBase< R > &lp, int i, DSVectorBase< R > &vec) const |
gets unscaled column i | |
virtual R | getColMaxAbsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns maximum absolute value of unscaled column i | |
virtual R | getColMinAbsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns minumum absolute value of unscaled column i | |
virtual R | upperUnscaled (const SPxLPBase< R > &lp, int i) const |
returns unscaled upper bound i | |
virtual void | getUpperUnscaled (const SPxLPBase< R > &lp, VectorBase< R > &vec) const |
returns unscaled upper bound vector of lp | |
virtual R | lowerUnscaled (const SPxLPBase< R > &lp, int i) const |
returns unscaled lower bound i | |
virtual void | getLowerUnscaled (const SPxLPBase< R > &lp, VectorBase< R > &vec) const |
gets unscaled lower bound vector | |
virtual R | maxObjUnscaled (const SPxLPBase< R > &lp, int i) const |
returns unscaled objective function coefficient of i | |
virtual void | getMaxObjUnscaled (const SPxLPBase< R > &lp, VectorBase< R > &vec) const |
gets unscaled objective function | |
virtual void | getRowUnscaled (const SPxLPBase< R > &lp, int i, DSVectorBase< R > &vec) const |
returns unscaled row i | |
virtual R | getRowMaxAbsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns maximum absolute value of unscaled row i | |
virtual R | getRowMinAbsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns minimum absolute value of unscaled row i | |
virtual R | rhsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns unscaled right hand side i | |
virtual void | getRhsUnscaled (const SPxLPBase< R > &lp, VectorBase< R > &vec) const |
gets unscaled right hand side vector | |
virtual R | lhsUnscaled (const SPxLPBase< R > &lp, int i) const |
returns unscaled left hand side i of lp | |
virtual void | getLhsUnscaled (const SPxLPBase< R > &lp, VectorBase< R > &vec) const |
returns unscaled left hand side vector of lp | |
virtual R | getCoefUnscaled (const SPxLPBase< R > &lp, int row, int col) const |
returns unscaled coefficient of lp | |
virtual void | unscalePrimal (const SPxLPBase< R > &lp, VectorBase< R > &x) const |
unscale dense primal solution vector given in x . | |
virtual void | unscaleSlacks (const SPxLPBase< R > &lp, VectorBase< R > &s) const |
unscale dense slack vector given in s . | |
virtual void | unscaleDual (const SPxLPBase< R > &lp, VectorBase< R > &pi) const |
unscale dense dual solution vector given in pi . | |
virtual void | unscaleRedCost (const SPxLPBase< R > &lp, VectorBase< R > &r) const |
unscale dense reduced cost vector given in r . | |
virtual void | unscalePrimalray (const SPxLPBase< R > &lp, VectorBase< R > &ray) const |
unscale primal ray given in ray . | |
virtual void | unscaleDualray (const SPxLPBase< R > &lp, VectorBase< R > &ray) const |
unscale dual ray given in ray . | |
virtual void | scaleObj (const SPxLPBase< R > &lp, VectorBase< R > &origObj) const |
apply scaling to objective function vector origObj . | |
virtual R | scaleObj (const SPxLPBase< R > &lp, int i, R origObj) const |
returns scaled objective function coefficient origObj . | |
virtual R | scaleElement (const SPxLPBase< R > &lp, int row, int col, R val) const |
returns scaled LP element in row and col . | |
virtual R | scaleLower (const SPxLPBase< R > &lp, int col, R lower) const |
returns scaled lower bound of column col . | |
virtual R | scaleUpper (const SPxLPBase< R > &lp, int col, R upper) const |
returns scaled upper bound of column col . | |
virtual R | scaleLhs (const SPxLPBase< R > &lp, int row, R lhs) const |
returns scaled left hand side of row row . | |
virtual R | scaleRhs (const SPxLPBase< R > &lp, int row, R rhs) const |
returns scaled right hand side of row row . | |
virtual R | minAbsColscale () const |
absolute smallest column scaling factor | |
virtual R | maxAbsColscale () const |
absolute biggest column scaling factor | |
virtual R | minAbsRowscale () const |
absolute smallest row scaling factor | |
virtual R | maxAbsRowscale () const |
absolute biggest row scaling factor | |
virtual R | maxColRatio (const SPxLPBase< R > &lp) const |
maximum ratio between absolute biggest and smallest element in any column. | |
virtual R | maxRowRatio (const SPxLPBase< R > &lp) const |
maximum ratio between absolute biggest and smallest element in any row. | |
void | computeExpVec (const std::vector< R > &vec, DataArray< int > &vecExp) |
round vector entries to power of 2 | |
virtual bool | isConsistent () const |
consistency check | |
Protected Attributes | |
Data | |
const bool | postequilibration |
equilibrate after geometric scaling? | |
const int | m_maxIterations |
maximum number of scaling iterations. | |
const R | m_minImprovement |
improvement necessary to carry on. (Bixby said Fourer said in MP 23, 274 ff. that 0.9 is a good value) | |
const R | m_goodEnoughRatio |
no scaling needed if ratio is less than this. | |
![]() | |
const char * | m_name |
Name of the scaler. | |
DataArray< int > * | m_activeColscaleExp |
pointer to currently active column scaling factors | |
DataArray< int > * | m_activeRowscaleExp |
pointer to currently active row scaling factors | |
bool | m_colFirst |
do column scaling first | |
bool | m_doBoth |
do columns and rows | |
SPxOut * | spxout |
message handler | |
std::shared_ptr< Tolerances > | _tolerances |
the tolerances | |
Additional Inherited Members | |
![]() | |
virtual void | setup (SPxLPBase< R > &lp) |
clear and setup scaling arrays in the LP | |
Geometric mean row/column scaling.
This SPxScaler implementation performs geometric mean scaling of the LPs rows and columns.
Definition at line 45 of file spxgeometsc.h.
|
explicit |
default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth)
Referenced by clone(), operator=(), and SPxGeometSC().
SPxGeometSC | ( | const SPxGeometSC< R > & | old | ) |
copy constructor
References SPxGeometSC().
|
virtual |
destructor
Definition at line 71 of file spxgeometsc.h.
|
overridevirtual |
clone function for polymorphism
Implements SPxScaler< R >.
Definition at line 74 of file spxgeometsc.h.
References SPxGeometSC(), and SPxScaler< R >::SPxScaler().
SPxGeometSC & operator= | ( | const SPxGeometSC< R > & | ) |
assignment operator
References SPxGeometSC().
|
overridevirtual |
Scale the loaded SPxLPBase<R>.
Implements SPxScaler< R >.
|
protected |
no scaling needed if ratio is less than this.
Definition at line 55 of file spxgeometsc.h.
|
protected |
maximum number of scaling iterations.
Definition at line 53 of file spxgeometsc.h.
|
protected |
improvement necessary to carry on. (Bixby said Fourer said in MP 23, 274 ff. that 0.9 is a good value)
Definition at line 54 of file spxgeometsc.h.
|
protected |
equilibrate after geometric scaling?
Definition at line 52 of file spxgeometsc.h.