Scippy

SoPlex

Sequential object-oriented simPlex

SPxGeometSC Class Reference

Geometric mean row/column scaling.This SPxScaler implementation performs geometric mean scaling of the LPs rows and columns. More...

#include <spxgeometsc.h>

Inheritance diagram for SPxGeometSC:

Public Member Functions

Construction / destruction
 SPxGeometSC (int maxIters=8, Real minImpr=0.85, Real goodEnough=1e3)
 default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth)
 
 SPxGeometSC (const SPxGeometSC &old)
 copy constructor
 
SPxGeometSCoperator= (const SPxGeometSC &)
 assignment operator
 
virtual ~SPxGeometSC ()
 destructor
 
virtual SPxScalerclone () const
 clone function for polymorphism
 
Scaling
virtual void scale (SPxLP &lp)
 Scale the loaded SPxLP.
 
- Public Member Functions inherited from SPxScaler
 SPxScaler (const char *name, bool colFirst=false, bool doBoth=true, SPxOut *spxout=NULL)
 constructor
 
 SPxScaler (const SPxScaler &)
 copy constructor
 
SPxScaleroperator= (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 unscalePrimal (Vector &x) const
 unscale dense primal solution vector given in x.
 
virtual void unscaleSlacks (Vector &s) const
 unscale dense slack vector given in s.
 
virtual void unscaleDual (Vector &pi) const
 unscale dense dual solution vector given in pi.
 
virtual void unscaleRedCost (Vector &r) const
 unscale dense reduced cost vector given in r.
 
virtual Real minAbsColscale () const
 absolute smallest column scaling factor
 
virtual Real maxAbsColscale () const
 absolute biggest column scaling factor
 
virtual Real minAbsRowscale () const
 absolute smallest row scaling factor
 
virtual Real maxAbsRowscale () const
 absolute biggest row scaling factor
 
virtual Real maxColRatio (const SPxLP &lp) const
 maximum ratio between absolute biggest and smallest element in any column.
 
virtual Real maxRowRatio (const SPxLP &lp) const
 maximum ratio between absolute biggest and smallest element in any row.
 
virtual bool isConsistent () const
 consistency check
 

Protected Member Functions

Private helpers
virtual Real computeScale (Real mini, Real maxi) const
 Returns $\sqrt{\mbox{mini}\cdot\mbox{maxi}}$.
 
- Protected Member Functions inherited from SPxScaler
virtual void setup (SPxLP &lp)
 setup scale array for the LP.
 
virtual Real computeScalingVecs (const SVSet *vecset, const DataArray< Real > &coScaleval, DataArray< Real > &scaleval)
 iterates through vecset and calls computeScale() for each vector.
 
virtual void applyScaling (SPxLP &lp)
 applies m_colscale and m_rowscale to the lp.
 

Protected Attributes

Data
const int m_maxIterations
 maximum number of scaling iterations.
 
const Real m_minImprovement
 improvement nesseccary to carry on.
 
const Real m_goodEnoughRatio
 no scaling needed if ratio is less than this.
 
- Protected Attributes inherited from SPxScaler
const char * m_name
 Name of the scaler.
 
DataArray< Realm_colscale
 column scaling factors
 
DataArray< Realm_rowscale
 row scaling factors
 
bool m_colFirst
 do column scaling first
 
bool m_doBoth
 do columns and rows
 
SPxOutspxout
 message handler
 

Detailed Description

Geometric mean row/column scaling.

This SPxScaler implementation performs geometric mean scaling of the LPs rows and columns.

Definition at line 35 of file spxgeometsc.h.

Constructor & Destructor Documentation

SPxGeometSC ( int  maxIters = 8,
Real  minImpr = 0.85,
Real  goodEnough = 1e3 
)
explicit

default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth)

Parameters
maxItersarbitrary small number, we choose 8
minImprBixby said Fourer said in MP 23, 274 ff. that 0.9 is a good value.
goodEnoughif the max/min ratio is allready less then 1000/1 we do not scale.

Definition at line 30 of file spxgeometsc.cpp.

Referenced by SPxGeometSC::clone().

SPxGeometSC ( const SPxGeometSC old)

copy constructor

Definition at line 37 of file spxgeometsc.cpp.

virtual ~SPxGeometSC ( )
virtual

destructor

Definition at line 66 of file spxgeometsc.h.

Member Function Documentation

virtual SPxScaler* clone ( ) const
virtual

clone function for polymorphism

Implements SPxScaler.

Definition at line 69 of file spxgeometsc.h.

References SPxGeometSC::SPxGeometSC().

Real computeScale ( Real  mini,
Real  maxi 
) const
protectedvirtual

Returns $\sqrt{\mbox{mini}\cdot\mbox{maxi}}$.

Reimplemented from SPxScaler.

Definition at line 54 of file spxgeometsc.cpp.

References soplex::spxSqrt().

SPxGeometSC & operator= ( const SPxGeometSC rhs)

assignment operator

Definition at line 44 of file spxgeometsc.cpp.

References SPxScaler::operator=().

Member Data Documentation

const Real m_goodEnoughRatio
protected

no scaling needed if ratio is less than this.

Definition at line 44 of file spxgeometsc.h.

Referenced by SPxGeometSC::scale().

const int m_maxIterations
protected

maximum number of scaling iterations.

Definition at line 42 of file spxgeometsc.h.

Referenced by SPxGeometSC::scale().

const Real m_minImprovement
protected

improvement nesseccary to carry on.

Definition at line 43 of file spxgeometsc.h.

Referenced by SPxGeometSC::scale().