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>

Public Member Functions

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

Data
SPxSteepPR steep
 steepest edge pricer More...
 
SPxParMultPR parmult
 partial multiple pricer More...
 
SPxDevexPR devex
 devex pricer More...
 
SPxPricerthepricer
 the currently used pricer More...
 
Real hybridFactor
 factor between dim and coDim of the problem to decide about the pricer More...
 

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 More...
 
SPxSolverthesolver
 the solver More...
 
Real theeps
 violation bound More...
 

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

◆ SPxHybridPR() [1/2]

default constructor

Definition at line 100 of file spxhybridpr.h.

Referenced by SPxHybridPR::clone().

◆ SPxHybridPR() [2/2]

SPxHybridPR ( const SPxHybridPR old)

copy constructor

Definition at line 106 of file spxhybridpr.h.

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

◆ ~SPxHybridPR()

virtual ~SPxHybridPR ( )
virtual

destructor

Definition at line 161 of file spxhybridpr.h.

Member Function Documentation

◆ addedCoVecs()

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.

◆ addedVecs()

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.

◆ clear()

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.

◆ clone()

virtual SPxPricer* clone ( ) const
virtual

clone function for polymorphism

Implements SPxPricer.

Definition at line 164 of file spxhybridpr.h.

References SPxHybridPR::SPxHybridPR().

◆ entered4()

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.

◆ isConsistent()

◆ left4()

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.

◆ load()

◆ operator=()

◆ selectEnter()

SPxId selectEnter ( )
virtual

selects the entering algorithm

Implements SPxPricer.

Definition at line 115 of file spxhybridpr.cpp.

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

◆ selectLeave()

int selectLeave ( )
virtual

selects the leaving algorithm

Implements SPxPricer.

Definition at line 105 of file spxhybridpr.cpp.

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

◆ setEpsilon()

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.

◆ setRep()

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.

◆ setType()

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

◆ devex

◆ hybridFactor

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().

◆ parmult

◆ steep

◆ thepricer