Scippy

SoPlex

Sequential object-oriented simPlex

Steepest edge pricer.Class SPxSteepPR implements a steepest edge pricer to be used with SoPlex. More...

#include <spxsteeppr.h>

Inheritance diagram for SPxSteepPR:

Public Types

Types
enum  Setup { EXACT, DEFAULT }
 How to setup the direction multipliers. More...
 
- Public Types inherited from SPxPricer
enum  ViolationType { NOT_VIOLATED = 0, VIOLATED = 1, VIOLATED_AND_CHECKED = 2 }
 

Public Member Functions

void setupWeights (SPxSolver::Type type)
 setup steepest edge weights
 
Construction / destruction
 SPxSteepPR (const char *name="Steep", Setup mode=DEFAULT)
 
 SPxSteepPR (const SPxSteepPR &old)
 copy constructor
 
SPxSteepPRoperator= (const SPxSteepPR &rhs)
 assignment operator
 
virtual ~SPxSteepPR ()
 destructor
 
virtual SPxPricerclone () const
 clone function for polymorphism
 
Access / modification
virtual void load (SPxSolver *base)
 sets the solver
 
virtual void clear ()
 clear solver and preferences
 
virtual void setType (SPxSolver::Type)
 set entering/leaving algorithm
 
virtual void setRep (SPxSolver::Representation rep)
 set row/column representation
 
virtual int selectLeave ()
 
virtual void left4 (int n, SPxId id)
 
virtual SPxId selectEnter ()
 
virtual void entered4 (SPxId id, int n)
 
virtual void addedVecs (int n)
 n vectors have been added to loaded LP.
 
virtual void addedCoVecs (int n)
 n covectors have been added to loaded LP.
 
virtual void removedVec (int i)
 the i'th vector has been removed from the loaded LP.
 
virtual void removedCoVec (int i)
 the i'th covector has been removed from the loaded LP.
 
virtual void removedVecs (const int perm[])
 n vectors have been removed from loaded LP.
 
virtual void removedCoVecs (const int perm[])
 n covectors have been removed from loaded LP.
 
Consistency check
virtual bool isConsistent () const
 
- Public Member Functions inherited from SPxPricer
virtual const char * getName () const
 get name of pricer.
 
virtual SPxSolversolver () const
 returns loaded SPxSolver object.
 
virtual Real epsilon () const
 returns violation bound theeps.
 
virtual void setEpsilon (Real eps)
 sets violation bound.
 
virtual void removedVecs (const int *)
 vectors given by perm have been removed from loaded LP.
 
virtual void removedCoVecs (const int *)
 covectors given by perm have been removed from loaded LP.
 
virtual void getNdualNorms (int &nrows, int &ncols) const
 get number of available norms
 
virtual bool getDualNorms (int &nrows, int &ncols, Real *norms) const
 export norms from pricer
 
virtual bool setDualNorms (int nrows, int ncols, Real *norms)
 import norms into pricer
 
 SPxPricer (const char *p_name)
 constructor
 
 SPxPricer (const SPxPricer &old)
 copy constructor
 
SPxPriceroperator= (const SPxPricer &rhs)
 assignment operator
 
virtual ~SPxPricer ()
 destructor.
 

Private Member Functions

int buildBestPriceVectorLeave (Real feastol)
 prepare data structures for hyper sparse pricing
 
int selectLeaveX (Real tol)
 implementation of full pricing
 
int selectLeaveSparse (Real tol)
 implementation of sparse pricing in the leaving Simplex
 
int selectLeaveHyper (Real tol)
 implementation of hyper sparse pricing in the leaving Simplex
 
SPxId buildBestPriceVectorEnterDim (Real &best, Real feastol)
 build up vector of pricing values for later use
 
SPxId buildBestPriceVectorEnterCoDim (Real &best, Real feastol)
 
SPxId selectEnterX (Real tol)
 choose the best entering index among columns and rows but prefer sparsity
 
SPxId selectEnterSparseDim (Real &best, Real tol)
 implementation of sparse pricing for the entering Simplex (slack variables)
 
SPxId selectEnterSparseCoDim (Real &best, Real tol)
 implementation of sparse pricing for the entering Simplex
 
SPxId selectEnterDenseDim (Real &best, Real tol)
 implementation of selectEnter() in dense case (slack variables)
 
SPxId selectEnterDenseCoDim (Real &best, Real tol)
 implementation of selectEnter() in dense case
 
SPxId selectEnterHyperDim (Real &best, Real feastol)
 implementation of hyper sparse pricing in the entering Simplex
 
SPxId selectEnterHyperCoDim (Real &best, Real feastol)
 implementation of hyper sparse pricing in the entering Simplex
 
Preferences
void setupPrefsX (Real mult, Real, Real, Real shift, Real coshift)
 
void setupPrefs (SPxSolver::Type)
 

Private Attributes

Data
SSVector workVec
 working vector
 
SSVector workRhs
 working vector
 
DataArray< IdxElement > prices
 temporary array of precomputed pricing values
 
DataArray< IdxElement > pricesCo
 temporary array of precomputed pricing values
 
DIdxSet bestPrices
 array of best pricing candidates
 
DIdxSet bestPricesCo
 array of best pricing candidates
 
Real pi_p
 
int prefSetup
 
DataArray< RealcoPref
 preference multiplier for selecting as pivot
 
DataArray< Realpref
 preference multiplier for selecting as pivot
 
DataArray< RealleavePref
 
Setup setup
 setup type.
 
bool refined
 has a refinement step already been tried?
 

Additional Inherited Members

- Protected Attributes inherited from SPxPricer
IdxCompare compare
 
const char * m_name
 name of the pricer
 
SPxSolverthesolver
 the solver
 
Real theeps
 violation bound
 
DVector weights
 vector to store pricing weights or norms
 
DVector coWeights
 
bool weightsAreSetup
 are the weights already set up?
 

Detailed Description

Steepest edge pricer.

Class SPxSteepPR implements a steepest edge pricer to be used with SoPlex.

See SPxPricer for a class documentation.

Definition at line 41 of file spxsteeppr.h.

Member Enumeration Documentation

enum Setup

How to setup the direction multipliers.

Possible settings are EXACT for starting with exactly computed values, or DEFAULT for starting with multipliers set to 1. The latter is the default.

Enumerator
EXACT 

starting with exactly computed values

DEFAULT 

starting with multipliers set to 1

Definition at line 53 of file spxsteeppr.h.

Constructor & Destructor Documentation

SPxSteepPR ( const char *  name = "Steep",
Setup  mode = DEFAULT 
)

Definition at line 136 of file spxsteeppr.h.

References SPxSteepPR::isConsistent().

Referenced by SPxSteepPR::clone().

SPxSteepPR ( const SPxSteepPR old)

copy constructor

Definition at line 148 of file spxsteeppr.h.

References SPxSteepPR::isConsistent().

virtual ~SPxSteepPR ( )
virtual

destructor

Definition at line 184 of file spxsteeppr.h.

Member Function Documentation

void clear ( )
virtual

clear solver and preferences

Reimplemented from SPxPricer.

Definition at line 33 of file spxsteeppr.cpp.

References SPxSteepPR::prefSetup, SPxPricer::thesolver, and SPxPricer::weightsAreSetup.

Referenced by SPxHybridPR::clear(), and SPxAutoPR::clear().

virtual SPxPricer* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer.

Reimplemented in SPxSteepExPR.

Definition at line 187 of file spxsteeppr.h.

References SPxSteepPR::SPxSteepPR().

void removedCoVec ( int  i)
virtual

the i'th covector has been removed from the loaded LP.

Reimplemented from SPxPricer.

Definition at line 1166 of file spxsteeppr.cpp.

References SPxPricer::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSteepPR::prefSetup, DVectorBase< R >::reDim(), and SPxPricer::thesolver.

void removedCoVecs ( const int  perm[])
virtual

n covectors have been removed from loaded LP.

Definition at line 1174 of file spxsteeppr.cpp.

References SPxPricer::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSteepPR::prefSetup, DVectorBase< R >::reDim(), and SPxPricer::thesolver.

void removedVec ( int  i)
virtual

the i'th vector has been removed from the loaded LP.

Reimplemented from SPxPricer.

Definition at line 1143 of file spxsteeppr.cpp.

References SPxSolver::coDim(), VectorBase< R >::dim(), SPxSteepPR::prefSetup, DVectorBase< R >::reDim(), SPxPricer::thesolver, and SPxPricer::weights.

void removedVecs ( const int  perm[])
virtual
SPxId selectEnterDenseCoDim ( Real best,
Real  tol 
)
private
SPxId selectEnterDenseDim ( Real best,
Real  tol 
)
private
int selectLeaveX ( Real  tol)
private

implementation of full pricing

Todo:
this was an assert! is an assertion correct?

Definition at line 402 of file spxsteeppr.cpp.

References SPxPricer::coWeights, SPxSolver::dim(), SPxSolver::fTest(), DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), soplex::infinity, SPxSteepPR::leavePref, MSG_WARNING, and SPxPricer::thesolver.

Referenced by SPxSteepPR::selectLeave().

void setupPrefsX ( Real  mult,
Real  ,
Real  ,
Real  shift,
Real  coshift 
)
private

Member Data Documentation

DIdxSet bestPricesCo
private
Real pi_p
private
DataArray<IdxElement> prices
private

temporary array of precomputed pricing values

Definition at line 71 of file spxsteeppr.h.

Referenced by SPxSteepPR::buildBestPriceVectorEnterDim(), SPxSteepPR::buildBestPriceVectorLeave(), and SPxSteepPR::setType().

DataArray<IdxElement> pricesCo
private

temporary array of precomputed pricing values

Definition at line 73 of file spxsteeppr.h.

Referenced by SPxSteepPR::buildBestPriceVectorEnterCoDim(), and SPxSteepPR::setType().

bool refined
private

has a refinement step already been tried?

Definition at line 91 of file spxsteeppr.h.

Referenced by SPxSteepPR::operator=(), SPxSteepPR::selectEnter(), SPxSteepPR::selectEnterX(), SPxSteepPR::selectLeave(), and SPxSteepPR::setType().

Setup setup
private

setup type.

Definition at line 89 of file spxsteeppr.h.

Referenced by SPxSteepPR::isConsistent(), SPxSteepPR::operator=(), and SPxSteepPR::setupWeights().

SSVector workRhs
private