Scippy

SoPlex

Sequential object-oriented simPlex

SPxHybridPR Class Reference

Hybrid pricer.The hybrid pricer for SoPlex tries to guess the best pricing strategy to use for pricing the loaded LP with the loaded algorithm type and basis representation. Currently it does so by switching between SPxSteepPR, SPxDevexPR and SPxParMultPR. More...

#include <spxhybridpr.h>

Inheritance diagram for SPxHybridPR:

Public Member Functions

Access / modification
virtual void setEpsilon (Real eps)
 sets the epsilon
 
virtual void load (SPxSolver *solver)
 sets the solver
 
virtual void clear ()
 clears all pricers and unselects the current pricer
 
virtual void setType (SPxSolver::Type tp)
 sets entering or leaving algorithm
 
virtual void setRep (SPxSolver::Representation rep)
 sets row or column representation
 
virtual int selectLeave ()
 selects the leaving algorithm
 
virtual SPxId selectEnter ()
 selects the entering algorithm
 
virtual void left4 (int n, SPxId id)
 calls left4 on the current pricer
 
virtual void entered4 (SPxId id, int n)
 calls entered4 on the current pricer
 
virtual void addedVecs (int n)
 calls addedVecs(n) on all pricers
 
virtual void addedCoVecs (int n)
 calls addedCoVecs(n) on all pricers
 
Consistency check
virtual bool isConsistent () const
 consistency check
 
Construction / destruction
 SPxHybridPR ()
 default constructor
 
 SPxHybridPR (const SPxHybridPR &old)
 copy constructor
 
SPxHybridPRoperator= (const SPxHybridPR &rhs)
 assignment operator
 
virtual ~SPxHybridPR ()
 destructor
 
virtual SPxPricerclone () const
 clone function for polymorphism
 
- 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 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
 
 SPxPricer (const char *p_name)
 constructor
 
 SPxPricer (const SPxPricer &old)
 copy constructor
 
SPxPriceroperator= (const SPxPricer &rhs)
 assignment operator
 
virtual ~SPxPricer ()
 destructor.
 

Private Attributes

Data
SPxSteepPR steep
 steepest edge pricer
 
SPxParMultPR parmult
 partial multiple pricer
 
SPxDevexPR devex
 devex pricer
 
SPxPricerthepricer
 the currently used pricer
 
Real hybridFactor
 factor between dim and coDim of the problem to decide about the 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

Hybrid pricer.

The hybrid pricer for SoPlex tries to guess the best pricing strategy to use for pricing the loaded LP with the loaded algorithm type and basis representation. Currently it does so by switching between SPxSteepPR, SPxDevexPR and SPxParMultPR.

See SPxPricer for a class documentation.

Definition at line 43 of file spxhybridpr.h.

Constructor & Destructor Documentation

default constructor

Definition at line 100 of file spxhybridpr.h.

Referenced by SPxHybridPR::clone().

SPxHybridPR ( const SPxHybridPR old)

copy constructor

Definition at line 106 of file spxhybridpr.h.

References SPxHybridPR::devex, SPxHybridPR::parmult, SPxHybridPR::steep, and SPxHybridPR::thepricer.

virtual ~SPxHybridPR ( )
virtual

destructor

Definition at line 161 of file spxhybridpr.h.

Member Function Documentation

void addedCoVecs ( int  n)
virtual

calls addedCoVecs(n) on all pricers

Reimplemented from SPxPricer.

Definition at line 132 of file spxhybridpr.cpp.

References SPxDevexPR::addedCoVecs(), SPxSteepPR::addedCoVecs(), SPxPricer::addedCoVecs(), SPxHybridPR::devex, SPxHybridPR::parmult, and SPxHybridPR::steep.

void addedVecs ( int  n)
virtual

calls addedVecs(n) on all pricers

Reimplemented from SPxPricer.

Definition at line 125 of file spxhybridpr.cpp.

References SPxDevexPR::addedVecs(), SPxSteepPR::addedVecs(), SPxPricer::addedVecs(), SPxHybridPR::devex, SPxHybridPR::parmult, and SPxHybridPR::steep.

void clear ( )
virtual

clears all pricers and unselects the current pricer

Reimplemented from SPxPricer.

Definition at line 51 of file spxhybridpr.cpp.

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

virtual SPxPricer* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer.

Definition at line 164 of file spxhybridpr.h.

References SPxHybridPR::SPxHybridPR().

void entered4 ( SPxId  id,
int  n 
)
virtual

calls entered4 on the current pricer

Reimplemented from SPxPricer.

Definition at line 120 of file spxhybridpr.cpp.

References SPxPricer::entered4(), and SPxHybridPR::thepricer.

void left4 ( int  n,
SPxId  id 
)
virtual

calls left4 on the current pricer

Reimplemented from SPxPricer.

Definition at line 110 of file spxhybridpr.cpp.

References SPxPricer::left4(), and SPxHybridPR::thepricer.

SPxId selectEnter ( )
virtual

selects the entering algorithm

Implements SPxPricer.

Definition at line 115 of file spxhybridpr.cpp.

References SPxPricer::selectEnter(), and SPxHybridPR::thepricer.

int selectLeave ( )
virtual

selects the leaving algorithm

Implements SPxPricer.

Definition at line 105 of file spxhybridpr.cpp.

References SPxPricer::selectLeave(), and SPxHybridPR::thepricer.

void setEpsilon ( Real  eps)
virtual

sets the epsilon

Reimplemented from SPxPricer.

Definition at line 59 of file spxhybridpr.cpp.

References SPxHybridPR::devex, SPxHybridPR::parmult, SPxPricer::setEpsilon(), and SPxHybridPR::steep.

void setRep ( SPxSolver::Representation  rep)
virtual

sets row or column representation

Reimplemented from SPxPricer.

Definition at line 98 of file spxhybridpr.cpp.

References SPxHybridPR::devex, SPxHybridPR::parmult, SPxDevexPR::setRep(), SPxPricer::setRep(), SPxSteepPR::setRep(), and SPxHybridPR::steep.

void setType ( SPxSolver::Type  tp)
virtual

sets entering or leaving algorithm

Todo:
I changed from devex to steepest edge pricing here because of numerical difficulties, this should be investigated.

Reimplemented from SPxPricer.

Definition at line 66 of file spxhybridpr.cpp.

References SPxSolver::coDim(), SPxSolver::dim(), SPxSolver::FULL, SPxPricer::getName(), SPxHybridPR::hybridFactor, SPxSolver::LEAVE, MSG_INFO1, SPxHybridPR::parmult, SPxSolver::PARTIAL, SPxSolver::setPricing(), SPxPricer::setType(), SPxSolver::spxout, SPxHybridPR::steep, SPxHybridPR::thepricer, and SPxPricer::thesolver.

Referenced by SPxHybridPR::load().

Member Data Documentation

Real hybridFactor
private

factor between dim and coDim of the problem to decide about the pricer

Definition at line 57 of file spxhybridpr.h.

Referenced by SPxHybridPR::operator=(), and SPxHybridPR::setType().