Scippy

SoPlex

Sequential object-oriented simPlex

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>

Inheritance diagram for SPxAutoPR:

Public Member Functions

Constructors / destructors
 SPxAutoPR ()
 default constructor
 
 SPxAutoPR (const SPxAutoPR &old)
 copy constructor
 
SPxAutoPRoperator= (const SPxAutoPR &rhs)
 assignment operator
 
virtual ~SPxAutoPR ()
 destructor
 
virtual SPxPricerclone () const
 clone function for polymorphism
 
Access / modification
void setSwitchIters (int iters)
 set max number of iterations before switching pricers
 
void clear ()
 clear the data
 
void setEpsilon (Real eps)
 set epsilon of internal pricers
 
virtual void load (SPxSolver *base)
 set the solver
 
virtual void setType (SPxSolver::Type)
 set entering/leaving algorithm
 
virtual void setRep (SPxSolver::Representation)
 set row/column representation
 
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
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 addedVecs (int)
 n vectors have been added to loaded LP.
 
virtual void addedCoVecs (int)
 n covectors have been added to loaded LP.
 
virtual void removedVec (int)
 vector i was removed from loaded LP.
 
virtual void removedVecs (const int *)
 vectors given by perm have been removed from loaded LP.
 
virtual void removedCoVec (int)
 covector i was 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
 
virtual bool isConsistent () const
 
 SPxPricer (const char *p_name)
 constructor
 
 SPxPricer (const SPxPricer &old)
 copy constructor
 
SPxPriceroperator= (const SPxPricer &rhs)
 assignment operator
 
virtual ~SPxPricer ()
 destructor.
 

Private Member Functions

bool setActivePricer (SPxSolver::Type type)
 switches active pricing method
 

Private Attributes

int switchIters
 number of iterations before switching pricers
 
SPxPriceractivepricer
 pointer to currently selected pricer
 
SPxDevexPR devex
 internal Devex pricer
 
SPxSteepPR steep
 internal Steepest edge pricer
 

Additional Inherited Members

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

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 40 of file spxautopr.h.

Constructor & Destructor Documentation

SPxAutoPR ( )

default constructor

Definition at line 57 of file spxautopr.h.

Referenced by SPxAutoPR::clone().

SPxAutoPR ( const SPxAutoPR old)

copy constructor

Definition at line 65 of file spxautopr.h.

References SPxAutoPR::activepricer, SPxAutoPR::devex, and SPxAutoPR::steep.

virtual ~SPxAutoPR ( )
virtual

destructor

Definition at line 97 of file spxautopr.h.

Member Function Documentation

void clear ( )
virtual

clear the data

Reimplemented from SPxPricer.

Definition at line 33 of file spxautopr.cpp.

References SPxPricer::clear(), SPxSteepPR::clear(), SPxAutoPR::devex, SPxAutoPR::steep, and SPxPricer::thesolver.

virtual SPxPricer* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer.

Definition at line 100 of file spxautopr.h.

References SPxAutoPR::SPxAutoPR().

void entered4 ( SPxId  id,
int  n 
)
virtual

Reimplemented from SPxPricer.

Definition at line 100 of file spxautopr.cpp.

References SPxAutoPR::activepricer, and SPxPricer::entered4().

void left4 ( int  n,
SPxId  id 
)
virtual

Reimplemented from SPxPricer.

Definition at line 87 of file spxautopr.cpp.

References SPxAutoPR::activepricer, and SPxPricer::left4().

void load ( SPxSolver base)
virtual
SPxAutoPR& operator= ( const SPxAutoPR rhs)

assignment operator

Definition at line 78 of file spxautopr.h.

References SPxAutoPR::activepricer, SPxAutoPR::devex, SPxPricer::operator=(), SPxAutoPR::steep, and SPxAutoPR::switchIters.

bool setActivePricer ( SPxSolver::Type  type)
private
void setEpsilon ( Real  eps)
virtual

set epsilon of internal pricers

Reimplemented from SPxPricer.

Definition at line 40 of file spxautopr.cpp.

References SPxAutoPR::devex, SPxPricer::setEpsilon(), SPxAutoPR::steep, and SPxPricer::theeps.

void setRep ( SPxSolver::Representation  rep)
virtual

set row/column representation

Reimplemented from SPxPricer.

Definition at line 52 of file spxautopr.cpp.

References SPxAutoPR::devex, SPxDevexPR::setRep(), SPxSteepPR::setRep(), and SPxAutoPR::steep.

void setSwitchIters ( int  iters)

set max number of iterations before switching pricers

void setType ( SPxSolver::Type  tp)
virtual

set entering/leaving algorithm

Reimplemented from SPxPricer.

Definition at line 47 of file spxautopr.cpp.

References SPxAutoPR::activepricer, and SPxPricer::setType().

Referenced by SPxAutoPR::load().

Member Data Documentation

int switchIters
private

number of iterations before switching pricers

Definition at line 44 of file spxautopr.h.

Referenced by SPxAutoPR::operator=(), and SPxAutoPR::setActivePricer().