Scippy

SoPlex

Sequential object-oriented simPlex

SPxAutoPR< R > Class Template Reference

Auto pricer.This pricer switches between Devex and Steepest edge pricer based on the difficulty of the problem which is determined by the number of iterations. More...

#include <spxautopr.h>

Public Member Functions

Constructors / destructors
 SPxAutoPR ()
 default constructor More...
 
 SPxAutoPR (const SPxAutoPR &old)
 copy constructor More...
 
SPxAutoPRoperator= (const SPxAutoPR &rhs)
 assignment operator More...
 
virtual ~SPxAutoPR ()
 destructor More...
 
virtual SPxPricer< R > * clone () const
 clone function for polymorphism More...
 
Access / modification
void setSwitchIters (int iters)
 set max number of iterations before switching pricers More...
 
void clear ()
 clear the data More...
 
void setPricingTolerance (R tol)
 set tolerances of internal pricers More...
 
virtual void load (SPxSolverBase< R > *base)
 set the solver More...
 
virtual void setType (typename SPxSolverBase< R >::Type)
 set entering/leaving algorithm More...
 
virtual void setRep (typename SPxSolverBase< R >::Representation)
 set row/column representation More...
 
virtual int selectLeave ()
 
virtual SPxId selectEnter ()
 
virtual void left4 (int n, SPxId id)
 
virtual void entered4 (SPxId id, int n)
 
- 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 R pricingTolerance () const
 returns the pricing tolerance More...
 
virtual void setTolerances (std::shared_ptr< Tolerances > newTolerances)
 set the _tolerances member variable More...
 
virtual void addedVecs (int)
 n vectors have been added to loaded LP. More...
 
virtual void addedCoVecs (int)
 n covectors have been added to loaded LP. More...
 
virtual void removedVec (int)
 vector i was removed from loaded LP. More...
 
virtual void removedVecs (const int *)
 vectors given by perm have been removed from loaded LP. More...
 
virtual void removedCoVec (int)
 covector i was removed from loaded LP. More...
 
virtual void removedCoVecs (const int *)
 covectors given by perm have been removed from loaded LP. More...
 
virtual bool isConsistent () const
 
 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

bool setActivePricer (typename SPxSolverBase< R >::Type type)
 switches active pricing method More...
 

Private Attributes

int switchIters
 number of iterations before switching pricers More...
 
SPxPricer< R > * activepricer
 pointer to currently selected pricer More...
 
SPxDevexPR< R > devex
 internal Devex pricer More...
 
SPxSteepExPR< R > steep
 internal Steepest edge pricer More...
 

Additional Inherited Members

- Public Types inherited from SPxPricer< R >
enum  ViolationType { NOT_VIOLATED = 0, VIOLATED = 1, VIOLATED_AND_CHECKED = 2 }
 
- 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::SPxAutoPR< R >

Auto pricer.

This pricer switches between Devex and Steepest edge pricer based on the difficulty of the problem which is determined by the number of iterations.

See SPxPricer for a class documentation.

Definition at line 51 of file spxautopr.h.

Constructor & Destructor Documentation

◆ SPxAutoPR() [1/2]

SPxAutoPR ( )

default constructor

Definition at line 69 of file spxautopr.h.

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

◆ SPxAutoPR() [2/2]

SPxAutoPR ( const SPxAutoPR< R > &  old)

copy constructor

Definition at line 77 of file spxautopr.h.

◆ ~SPxAutoPR()

virtual ~SPxAutoPR ( )
virtual

destructor

Definition at line 111 of file spxautopr.h.

Member Function Documentation

◆ clear()

void clear ( )
virtual

clear the data

Reimplemented from SPxPricer< R >.

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

◆ clone()

virtual SPxPricer<R>* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer< R >.

Definition at line 114 of file spxautopr.h.

◆ entered4()

virtual void entered4 ( SPxId  id,
int  n 
)
virtual

Reimplemented from SPxPricer< R >.

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

◆ left4()

virtual void left4 ( int  n,
SPxId  id 
)
virtual

Reimplemented from SPxPricer< R >.

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

◆ load()

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

set the solver

Reimplemented from SPxPricer< R >.

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

◆ operator=()

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

assignment operator

Definition at line 91 of file spxautopr.h.

◆ selectEnter()

virtual SPxId selectEnter ( )
virtual

Implements SPxPricer< R >.

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

◆ selectLeave()

virtual int selectLeave ( )
virtual

Implements SPxPricer< R >.

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

◆ setActivePricer()

bool setActivePricer ( typename SPxSolverBase< R >::Type  type)
private

switches active pricing method

◆ setPricingTolerance()

void setPricingTolerance ( tol)
virtual

set tolerances of internal pricers

Reimplemented from SPxPricer< R >.

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

◆ setRep()

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

set row/column representation

Reimplemented from SPxPricer< R >.

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

◆ setSwitchIters()

void setSwitchIters ( int  iters)

set max number of iterations before switching pricers

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

◆ setType()

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

set entering/leaving algorithm

Reimplemented from SPxPricer< R >.

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

Member Data Documentation

◆ activepricer

SPxPricer<R>* activepricer
private

pointer to currently selected pricer

Definition at line 56 of file spxautopr.h.

Referenced by SPxAutoPR< BP >::operator=(), and SPxAutoPR< BP >::SPxAutoPR().

◆ devex

SPxDevexPR<R> devex
private

internal Devex pricer

Definition at line 57 of file spxautopr.h.

Referenced by SPxAutoPR< BP >::operator=(), and SPxAutoPR< BP >::SPxAutoPR().

◆ steep

SPxSteepExPR<R> steep
private

internal Steepest edge pricer

Definition at line 58 of file spxautopr.h.

Referenced by SPxAutoPR< BP >::operator=(), and SPxAutoPR< BP >::SPxAutoPR().

◆ switchIters

int switchIters
private

number of iterations before switching pricers

Definition at line 55 of file spxautopr.h.

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