Scippy

SoPlex

Sequential object-oriented simPlex

SPxSteepPR Class Reference

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

#include <spxsteeppr.h>

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 More...
 
Construction / destruction
 SPxSteepPR (const char *name="Steep", Setup mode=DEFAULT)
 
 SPxSteepPR (const SPxSteepPR &old)
 copy constructor More...
 
SPxSteepPRoperator= (const SPxSteepPR &rhs)
 assignment operator More...
 
virtual ~SPxSteepPR ()
 destructor More...
 
virtual SPxPricerclone () const
 clone function for polymorphism More...
 
Access / modification
virtual void load (SPxSolver *base)
 sets the solver More...
 
virtual void clear ()
 clear solver and preferences More...
 
virtual void setType (SPxSolver::Type)
 set entering/leaving algorithm More...
 
virtual void setRep (SPxSolver::Representation rep)
 set row/column representation More...
 
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. More...
 
virtual void addedCoVecs (int n)
 n covectors have been added to loaded LP. More...
 
virtual void removedVec (int i)
 the i'th vector has been removed from the loaded LP. More...
 
virtual void removedCoVec (int i)
 the i'th covector has been removed from the loaded LP. More...
 
virtual void removedVecs (const int perm[])
 n vectors have been removed from loaded LP. More...
 
virtual void removedCoVecs (const int perm[])
 n covectors have been removed from loaded LP. More...
 
Consistency check
virtual bool isConsistent () const
 
- Public Member Functions inherited from SPxPricer
virtual const char * getName () const
 get name of pricer. More...
 
virtual SPxSolversolver () const
 returns loaded SPxSolver object. More...
 
virtual Real epsilon () const
 returns violation bound theeps. More...
 
virtual void setEpsilon (Real eps)
 sets violation bound. More...
 
virtual void removedVecs (const int *)
 vectors given by perm have been removed from loaded LP. More...
 
virtual void removedCoVecs (const int *)
 covectors given by perm have been removed from loaded LP. More...
 
 SPxPricer (const char *p_name)
 constructor More...
 
 SPxPricer (const SPxPricer &old)
 copy constructor More...
 
SPxPriceroperator= (const SPxPricer &rhs)
 assignment operator More...
 
virtual ~SPxPricer ()
 destructor. More...
 

Private Member Functions

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

Private Attributes

Data
SSVector workVec
 working vector More...
 
SSVector workRhs
 working vector More...
 
DataArray< IdxElementprices
 temporary array of precomputed pricing values More...
 
DataArray< IdxElementpricesCo
 temporary array of precomputed pricing values More...
 
DIdxSet bestPrices
 array of best pricing candidates More...
 
DIdxSet bestPricesCo
 array of best pricing candidates More...
 
Real pi_p
 
Setup setup
 setup type. More...
 
bool refined
 has a refinement step already been tried? More...
 

Additional Inherited Members

- Protected Attributes inherited from SPxPricer
IdxCompare compare
 
const char * m_name
 name of the pricer More...
 
SPxSolverthesolver
 the solver More...
 
Real theeps
 violation bound More...
 

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

◆ Setup

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() [1/2]

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

Definition at line 120 of file spxsteeppr.h.

References SPxSteepPR::isConsistent().

Referenced by SPxSteepPR::clone().

◆ SPxSteepPR() [2/2]

SPxSteepPR ( const SPxSteepPR old)

copy constructor

Definition at line 131 of file spxsteeppr.h.

References SPxSteepPR::isConsistent().

◆ ~SPxSteepPR()

virtual ~SPxSteepPR ( )
virtual

destructor

Definition at line 159 of file spxsteeppr.h.

Member Function Documentation

◆ addedCoVecs()

void addedCoVecs ( int  n)
virtual

◆ addedVecs()

void addedVecs ( int  n)
virtual

n vectors have been added to loaded LP.

Reimplemented from SPxPricer.

Definition at line 995 of file spxsteeppr.cpp.

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

Referenced by SPxHybridPR::addedVecs(), and SPxSteepPR::clone().

◆ buildBestPriceVectorEnterCoDim()

◆ buildBestPriceVectorEnterDim()

◆ buildBestPriceVectorLeave()

◆ clear()

void clear ( )
virtual

clear solver and preferences

Reimplemented from SPxPricer.

Definition at line 33 of file spxsteeppr.cpp.

References SPxPricer::thesolver.

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

◆ clone()

◆ entered4()

◆ isConsistent()

◆ left4()

◆ load()

void load ( SPxSolver base)
virtual

◆ operator=()

◆ removedCoVec()

void removedCoVec ( int  i)
virtual

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

Reimplemented from SPxPricer.

Definition at line 1047 of file spxsteeppr.cpp.

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

Referenced by SPxSteepPR::clone().

◆ removedCoVecs()

void removedCoVecs ( const int  perm[])
virtual

n covectors have been removed from loaded LP.

Definition at line 1055 of file spxsteeppr.cpp.

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

Referenced by SPxSteepPR::clone().

◆ removedVec()

void removedVec ( int  i)
virtual

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

Reimplemented from SPxPricer.

Definition at line 1019 of file spxsteeppr.cpp.

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

Referenced by SPxSteepPR::clone().

◆ removedVecs()

void removedVecs ( const int  perm[])
virtual

n vectors have been removed from loaded LP.

Definition at line 1027 of file spxsteeppr.cpp.

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

Referenced by SPxSteepPR::clone().

◆ selectEnter()

◆ selectEnterDenseCoDim()

SPxId selectEnterDenseCoDim ( Real best,
Real  tol 
)
private

◆ selectEnterDenseDim()

SPxId selectEnterDenseDim ( Real best,
Real  tol 
)
private

◆ selectEnterHyperCoDim()

◆ selectEnterHyperDim()

◆ selectEnterSparseCoDim()

◆ selectEnterSparseDim()

SPxId selectEnterSparseDim ( Real best,
Real  tol 
)
private

◆ selectEnterX()

◆ selectLeave()

◆ selectLeaveHyper()

◆ selectLeaveSparse()

◆ selectLeaveX()

int selectLeaveX ( Real  tol)
private

◆ setRep()

◆ setType()

◆ setupWeights()

Member Data Documentation

◆ bestPrices

◆ bestPricesCo

DIdxSet bestPricesCo
private

◆ pi_p

Real pi_p
private

◆ prices

DataArray<IdxElement> prices
private

temporary array of precomputed pricing values

Definition at line 72 of file spxsteeppr.h.

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

◆ pricesCo

DataArray<IdxElement> pricesCo
private

temporary array of precomputed pricing values

Definition at line 74 of file spxsteeppr.h.

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

◆ refined

bool refined
private

has a refinement step already been tried?

Definition at line 84 of file spxsteeppr.h.

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

◆ setup

Setup setup
private

setup type.

Definition at line 82 of file spxsteeppr.h.

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

◆ workRhs

SSVector workRhs
private

◆ workVec