SoPlex Documentation
Loading...
Searching...
No Matches

Steepest edge pricer. More...

#include <spxsteeppr.h>

Inheritance diagram for SPxSteepPR< R >:
SPxPricer< R > SPxSteepExPR< R >

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

Private Attributes

Data
SSVectorBase< R > workVec
 working vector
 
SSVectorBase< R > workRhs
 working vector
 
Array< typename SPxPricer< R >::IdxElement > prices
 temporary array of precomputed pricing values
 
Array< typename SPxPricer< R >::IdxElement > pricesCo
 temporary array of precomputed pricing values
 
DIdxSet bestPrices
 array of best pricing candidates
 
DIdxSet bestPricesCo
 array of best pricing candidates
 
pi_p
 
Setup setup
 setup type.
 
bool refined
 has a refinement step already been tried?
 

Additional Inherited Members

- Protected Attributes inherited from SPxPricer< R >
IdxCompare compare
 
const char * m_name
 name of the pricer
 
SPxSolverBase< R > * thesolver
 the solver
 
thetolerance
 violation bound
 
std::shared_ptr< Tolerances_tolerances
 tolerances used by the solver
 

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

template<class R >
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]

template<class R >
SPxSteepPR ( const char * name = "Steep",
Setup mode = DEFAULT )

Definition at line 130 of file spxsteeppr.h.

References SPxSteepPR< R >::isConsistent().

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

◆ SPxSteepPR() [2/2]

template<class R >
SPxSteepPR ( const SPxSteepPR< R > & old)

copy constructor

Definition at line 141 of file spxsteeppr.h.

References SPxSteepPR< R >::isConsistent().

◆ ~SPxSteepPR()

template<class R >
virtual ~SPxSteepPR ( )
virtual

destructor

Definition at line 169 of file spxsteeppr.h.

Member Function Documentation

◆ addedCoVecs()

template<class R >
virtual void addedCoVecs ( int n)
virtual

n covectors have been added to loaded LP.

Reimplemented from SPxPricer< R >.

◆ addedVecs()

template<class R >
virtual void addedVecs ( int n)
virtual

n vectors have been added to loaded LP.

Reimplemented from SPxPricer< R >.

◆ buildBestPriceVectorEnterCoDim()

template<class R >
SPxId buildBestPriceVectorEnterCoDim ( R & best,
R feastol )
private

◆ buildBestPriceVectorEnterDim()

template<class R >
SPxId buildBestPriceVectorEnterDim ( R & best,
R feastol )
private

build up vector of pricing values for later use

◆ buildBestPriceVectorLeave()

template<class R >
int buildBestPriceVectorLeave ( R feastol)
private

prepare data structures for hyper sparse pricing

◆ clear()

template<class R >
virtual void clear ( )
virtual

clear solver and preferences

Reimplemented from SPxPricer< R >.

◆ clone()

template<class R >
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.

References SPxSteepPR< R >::SPxSteepPR().

◆ entered4()

template<class R >
virtual void entered4 ( SPxId id,
int n )
virtual

Reimplemented from SPxPricer< R >.

◆ isConsistent()

◆ left4()

template<class R >
virtual void left4 ( int n,
SPxId id )
virtual

Reimplemented from SPxPricer< R >.

◆ load()

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

sets the solver

Reimplemented from SPxPricer< R >.

◆ operator=()

◆ removedCoVec()

template<class R >
virtual void removedCoVec ( int i)
virtual

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

Reimplemented from SPxPricer< R >.

◆ removedCoVecs()

template<class R >
virtual void removedCoVecs ( const int perm[])
virtual

n covectors have been removed from loaded LP.

◆ removedVec()

template<class R >
virtual void removedVec ( int i)
virtual

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

Reimplemented from SPxPricer< R >.

◆ removedVecs()

template<class R >
virtual void removedVecs ( const int perm[])
virtual

n vectors have been removed from loaded LP.

◆ selectEnter()

template<class R >
virtual SPxId selectEnter ( )
virtual

Implements SPxPricer< R >.

◆ selectEnterDenseCoDim()

template<class R >
SPxId selectEnterDenseCoDim ( R & best,
R tol )
private

implementation of selectEnter() in dense case

◆ selectEnterDenseDim()

template<class R >
SPxId selectEnterDenseDim ( R & best,
R tol )
private

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

◆ selectEnterHyperCoDim()

template<class R >
SPxId selectEnterHyperCoDim ( R & best,
R feastol )
private

implementation of hyper sparse pricing in the entering Simplex

◆ selectEnterHyperDim()

template<class R >
SPxId selectEnterHyperDim ( R & best,
R feastol )
private

implementation of hyper sparse pricing in the entering Simplex

◆ selectEnterSparseCoDim()

template<class R >
SPxId selectEnterSparseCoDim ( R & best,
R tol )
private

implementation of sparse pricing for the entering Simplex

◆ selectEnterSparseDim()

template<class R >
SPxId selectEnterSparseDim ( R & best,
R tol )
private

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

◆ selectEnterX()

template<class R >
SPxId selectEnterX ( R tol)
private

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

◆ selectLeave()

template<class R >
virtual int selectLeave ( )
virtual

Implements SPxPricer< R >.

◆ selectLeaveHyper()

template<class R >
int selectLeaveHyper ( R tol)
private

implementation of hyper sparse pricing in the leaving Simplex

◆ selectLeaveSparse()

template<class R >
int selectLeaveSparse ( R tol)
private

implementation of sparse pricing in the leaving Simplex

◆ selectLeaveX()

template<class R >
int selectLeaveX ( R tol)
private

implementation of full pricing

◆ setRep()

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

set row/column representation

Reimplemented from SPxPricer< R >.

◆ setType()

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

set entering/leaving algorithm

Reimplemented from SPxPricer< R >.

◆ setupWeights()

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

setup steepest edge weights

Member Data Documentation

◆ bestPrices

template<class R >
DIdxSet bestPrices
private

array of best pricing candidates

Definition at line 86 of file spxsteeppr.h.

◆ bestPricesCo

template<class R >
DIdxSet bestPricesCo
private

array of best pricing candidates

Definition at line 88 of file spxsteeppr.h.

◆ pi_p

template<class R >
R pi_p
private

Definition at line 90 of file spxsteeppr.h.

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

◆ prices

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

temporary array of precomputed pricing values

Definition at line 82 of file spxsteeppr.h.

◆ pricesCo

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

temporary array of precomputed pricing values

Definition at line 84 of file spxsteeppr.h.

◆ refined

template<class R >
bool refined
private

has a refinement step already been tried?

Definition at line 94 of file spxsteeppr.h.

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

◆ setup

template<class R >
Setup setup
private

setup type.

Definition at line 92 of file spxsteeppr.h.

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

◆ workRhs

template<class R >
SSVectorBase<R> workRhs
private

working vector

Definition at line 80 of file spxsteeppr.h.

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

◆ workVec

template<class R >
SSVectorBase<R> workVec
private

working vector

Definition at line 78 of file spxsteeppr.h.

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