Scippy

SoPlex

Sequential object-oriented simPlex

SPxSteepPR< R > Class Template 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< R >
enum  ViolationType { NOT_VIOLATED = 0, VIOLATED = 1, VIOLATED_AND_CHECKED = 2 }
 

Public Member Functions

void setupWeights (typename SPxSolverBase< R >::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 SPxPricer< R > * clone () const
 clone function for polymorphism More...
 
Access / modification
virtual void load (SPxSolverBase< R > *base)
 sets the solver More...
 
virtual void clear ()
 clear solver and preferences More...
 
virtual void setType (typename SPxSolverBase< R >::Type)
 set entering/leaving algorithm More...
 
virtual void setRep (typename SPxSolverBase< R >::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< R >
virtual const char * getName () const
 get name of pricer. More...
 
virtual SPxSolverBase< R > * solver () const
 returns loaded SPxSolverBase object. More...
 
virtual void setPricingTolerance (R tol)
 sets pricing tolerance. More...
 
virtual R pricingTolerance () const
 returns the pricing tolerance More...
 
virtual void setTolerances (std::shared_ptr< Tolerances > newTolerances)
 set the _tolerances member variable 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 (R feastol)
 prepare data structures for hyper sparse pricing More...
 
int selectLeaveX (R tol)
 implementation of full pricing More...
 
int selectLeaveSparse (R tol)
 implementation of sparse pricing in the leaving Simplex More...
 
int selectLeaveHyper (R tol)
 implementation of hyper sparse pricing in the leaving Simplex More...
 
SPxId buildBestPriceVectorEnterDim (R &best, R feastol)
 build up vector of pricing values for later use More...
 
SPxId buildBestPriceVectorEnterCoDim (R &best, R feastol)
 
SPxId selectEnterX (R tol)
 choose the best entering index among columns and rows but prefer sparsity More...
 
SPxId selectEnterSparseDim (R &best, R tol)
 implementation of sparse pricing for the entering Simplex (slack variables) More...
 
SPxId selectEnterSparseCoDim (R &best, R tol)
 implementation of sparse pricing for the entering Simplex More...
 
SPxId selectEnterDenseDim (R &best, R tol)
 implementation of selectEnter() in dense case (slack variables) More...
 
SPxId selectEnterDenseCoDim (R &best, R tol)
 implementation of selectEnter() in dense case More...
 
SPxId selectEnterHyperDim (R &best, R feastol)
 implementation of hyper sparse pricing in the entering Simplex More...
 
SPxId selectEnterHyperCoDim (R &best, R feastol)
 implementation of hyper sparse pricing in the entering Simplex More...
 

Private Attributes

Data
SSVectorBase< R > workVec
 working vector More...
 
SSVectorBase< R > workRhs
 working vector More...
 
Array< typename SPxPricer< R >::IdxElementprices
 temporary array of precomputed pricing values More...
 
Array< typename SPxPricer< R >::IdxElementpricesCo
 temporary array of precomputed pricing values More...
 
DIdxSet bestPrices
 array of best pricing candidates More...
 
DIdxSet bestPricesCo
 array of best pricing candidates More...
 
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< R >
IdxCompare compare
 
const char * m_name
 name of the pricer More...
 
SPxSolverBase< R > * thesolver
 the solver More...
 
thetolerance
 violation bound More...
 
std::shared_ptr< Tolerances_tolerances
 tolerances used by the solver More...
 

Detailed Description

template<class R>
class soplex::SPxSteepPR< R >

Steepest edge pricer.

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

See SPxPricer for a class documentation.

Definition at line 51 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 63 of file spxsteeppr.h.

Constructor & Destructor Documentation

◆ SPxSteepPR() [1/2]

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

Definition at line 130 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::clone().

◆ SPxSteepPR() [2/2]

SPxSteepPR ( const SPxSteepPR< R > &  old)

copy constructor

Definition at line 141 of file spxsteeppr.h.

◆ ~SPxSteepPR()

virtual ~SPxSteepPR ( )
virtual

destructor

Definition at line 169 of file spxsteeppr.h.

Member Function Documentation

◆ addedCoVecs()

virtual void addedCoVecs ( int  n)
virtual

n covectors have been added to loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ addedVecs()

virtual void addedVecs ( int  n)
virtual

n vectors have been added to loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ buildBestPriceVectorEnterCoDim()

SPxId buildBestPriceVectorEnterCoDim ( R &  best,
feastol 
)
private

◆ buildBestPriceVectorEnterDim()

SPxId buildBestPriceVectorEnterDim ( R &  best,
feastol 
)
private

build up vector of pricing values for later use

◆ buildBestPriceVectorLeave()

int buildBestPriceVectorLeave ( feastol)
private

prepare data structures for hyper sparse pricing

◆ clear()

virtual void clear ( )
virtual

clear solver and preferences

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ clone()

virtual SPxPricer<R>* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer< R >.

Reimplemented in SPxSteepExPR< R >, and SPxSteepExPR< BP >.

Definition at line 172 of file spxsteeppr.h.

◆ entered4()

virtual void entered4 ( SPxId  id,
int  n 
)
virtual

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ isConsistent()

◆ left4()

virtual void left4 ( int  n,
SPxId  id 
)
virtual

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ load()

virtual void load ( SPxSolverBase< R > *  base)
virtual

sets the solver

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ operator=()

SPxSteepPR& operator= ( const SPxSteepPR< R > &  rhs)

assignment operator

Definition at line 152 of file spxsteeppr.h.

Referenced by SPxSteepExPR< BP >::operator=().

◆ removedCoVec()

virtual void removedCoVec ( int  i)
virtual

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

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ removedCoVecs()

virtual void removedCoVecs ( const int  perm[])
virtual

n covectors have been removed from loaded LP.

Referenced by SPxSteepPR< BP >::clone().

◆ removedVec()

virtual void removedVec ( int  i)
virtual

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

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ removedVecs()

virtual void removedVecs ( const int  perm[])
virtual

n vectors have been removed from loaded LP.

Referenced by SPxSteepPR< BP >::clone().

◆ selectEnter()

virtual SPxId selectEnter ( )
virtual

Implements SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ selectEnterDenseCoDim()

SPxId selectEnterDenseCoDim ( R &  best,
tol 
)
private

implementation of selectEnter() in dense case

◆ selectEnterDenseDim()

SPxId selectEnterDenseDim ( R &  best,
tol 
)
private

implementation of selectEnter() in dense case (slack variables)

◆ selectEnterHyperCoDim()

SPxId selectEnterHyperCoDim ( R &  best,
feastol 
)
private

implementation of hyper sparse pricing in the entering Simplex

◆ selectEnterHyperDim()

SPxId selectEnterHyperDim ( R &  best,
feastol 
)
private

implementation of hyper sparse pricing in the entering Simplex

◆ selectEnterSparseCoDim()

SPxId selectEnterSparseCoDim ( R &  best,
tol 
)
private

implementation of sparse pricing for the entering Simplex

◆ selectEnterSparseDim()

SPxId selectEnterSparseDim ( R &  best,
tol 
)
private

implementation of sparse pricing for the entering Simplex (slack variables)

◆ selectEnterX()

SPxId selectEnterX ( tol)
private

choose the best entering index among columns and rows but prefer sparsity

◆ selectLeave()

virtual int selectLeave ( )
virtual

Implements SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ selectLeaveHyper()

int selectLeaveHyper ( tol)
private

implementation of hyper sparse pricing in the leaving Simplex

◆ selectLeaveSparse()

int selectLeaveSparse ( tol)
private

implementation of sparse pricing in the leaving Simplex

◆ selectLeaveX()

int selectLeaveX ( tol)
private

implementation of full pricing

◆ setRep()

virtual void setRep ( typename SPxSolverBase< R >::Representation  rep)
virtual

set row/column representation

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ setType()

virtual void setType ( typename SPxSolverBase< R >::Type  )
virtual

set entering/leaving algorithm

Reimplemented from SPxPricer< R >.

Referenced by SPxSteepPR< BP >::clone().

◆ setupWeights()

void setupWeights ( typename SPxSolverBase< R >::Type  type)

setup steepest edge weights

Member Data Documentation

◆ bestPrices

DIdxSet bestPrices
private

array of best pricing candidates

Definition at line 86 of file spxsteeppr.h.

◆ bestPricesCo

DIdxSet bestPricesCo
private

array of best pricing candidates

Definition at line 88 of file spxsteeppr.h.

◆ pi_p

R pi_p
private

Definition at line 90 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::operator=().

◆ prices

Array<typename SPxPricer<R>::IdxElement> prices
private

temporary array of precomputed pricing values

Definition at line 82 of file spxsteeppr.h.

◆ pricesCo

Array<typename SPxPricer<R>::IdxElement> pricesCo
private

temporary array of precomputed pricing values

Definition at line 84 of file spxsteeppr.h.

◆ refined

bool refined
private

has a refinement step already been tried?

Definition at line 94 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::operator=().

◆ setup

Setup setup
private

setup type.

Definition at line 92 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::operator=().

◆ workRhs

SSVectorBase<R> workRhs
private

working vector

Definition at line 80 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::operator=().

◆ workVec

SSVectorBase<R> workVec
private

working vector

Definition at line 78 of file spxsteeppr.h.

Referenced by SPxSteepPR< BP >::operator=().