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... | |
| SPxAutoPR & | operator= (const SPxAutoPR &rhs) |
| assignment operator More... | |
| virtual | ~SPxAutoPR () |
| destructor More... | |
| virtual SPxPricer * | 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 | setEpsilon (Real eps) |
| set epsilon of internal pricers More... | |
| virtual void | load (SPxSolver *base) |
| set the solver More... | |
| virtual void | setType (SPxSolver::Type) |
| set entering/leaving algorithm More... | |
| virtual void | setRep (SPxSolver::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 | |
| virtual const char * | getName () const |
| get name of pricer. More... | |
| virtual SPxSolver * | solver () const |
| returns loaded SPxSolver object. More... | |
| virtual Real | epsilon () const |
| returns violation bound theeps. 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 void | getNdualNorms (int &nrows, int &ncols) const |
| get number of available norms More... | |
| virtual bool | getDualNorms (int &nrows, int &ncols, Real *norms) const |
| export norms from pricer More... | |
| virtual bool | setDualNorms (int nrows, int ncols, Real *norms) |
| import norms into pricer More... | |
| virtual bool | isConsistent () const |
| SPxPricer (const char *p_name) | |
| constructor More... | |
| SPxPricer (const SPxPricer &old) | |
| copy constructor More... | |
| SPxPricer & | operator= (const SPxPricer &rhs) |
| assignment operator More... | |
| virtual | ~SPxPricer () |
| destructor. More... | |
Private Member Functions | |
| bool | setActivePricer (SPxSolver::Type type) |
| switches active pricing method More... | |
Private Attributes | |
| int | switchIters |
| number of iterations before switching pricers More... | |
| SPxPricer * | activepricer |
| pointer to currently selected pricer More... | |
| SPxDevexPR | devex |
| internal Devex pricer More... | |
| SPxSteepExPR | steep |
| internal Steepest edge 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... | |
| SPxSolver * | thesolver |
| the solver More... | |
| Real | theeps |
| violation bound More... | |
| DVector | weights |
| vector to store pricing weights or norms More... | |
| DVector | coWeights |
| bool | weightsAreSetup |
| are the weights already set up? More... | |
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 41 of file spxautopr.h.
| SPxAutoPR | ( | ) |
copy constructor
Definition at line 66 of file spxautopr.h.
References SPxAutoPR::activepricer, SPxAutoPR::devex, and SPxAutoPR::steep.
|
virtual |
destructor
Definition at line 98 of file spxautopr.h.
|
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.
Referenced by SPxAutoPR::clone().
|
virtual |
clone function for polymorphism
Implements SPxPricer.
Definition at line 101 of file spxautopr.h.
References SPxAutoPR::clear(), SPxAutoPR::entered4(), SPxAutoPR::left4(), SPxAutoPR::load(), SPxAutoPR::selectEnter(), SPxAutoPR::selectLeave(), SPxAutoPR::setEpsilon(), SPxAutoPR::setRep(), SPxAutoPR::setSwitchIters(), SPxAutoPR::setType(), and SPxAutoPR::SPxAutoPR().
|
virtual |
Reimplemented from SPxPricer.
Definition at line 100 of file spxautopr.cpp.
References SPxAutoPR::activepricer, and SPxPricer::entered4().
Referenced by SPxAutoPR::clone().
|
virtual |
Reimplemented from SPxPricer.
Definition at line 87 of file spxautopr.cpp.
References SPxAutoPR::activepricer, and SPxPricer::left4().
Referenced by SPxAutoPR::clone().
|
virtual |
set the solver
Reimplemented from SPxPricer.
Definition at line 25 of file spxautopr.cpp.
References SPxAutoPR::devex, SPxDevexPR::load(), SPxSteepPR::load(), SPxAutoPR::setType(), SPxAutoPR::steep, SPxPricer::thesolver, and SPxSolver::type().
Referenced by SPxAutoPR::clone().
assignment operator
Definition at line 79 of file spxautopr.h.
References SPxAutoPR::activepricer, SPxAutoPR::devex, SPxPricer::operator=(), SPxAutoPR::steep, and SPxAutoPR::switchIters.
|
virtual |
Implements SPxPricer.
Definition at line 92 of file spxautopr.cpp.
References SPxAutoPR::activepricer, SPxSolver::ENTER, SPxPricer::getName(), MSG_INFO1, SPxPricer::selectEnter(), SPxAutoPR::setActivePricer(), SPxSolver::spxout, and SPxPricer::thesolver.
Referenced by SPxAutoPR::clone().
|
virtual |
Implements SPxPricer.
Definition at line 79 of file spxautopr.cpp.
References SPxAutoPR::activepricer, SPxPricer::getName(), SPxSolver::LEAVE, MSG_INFO1, SPxPricer::selectLeave(), SPxAutoPR::setActivePricer(), SPxSolver::spxout, and SPxPricer::thesolver.
Referenced by SPxAutoPR::clone().
|
private |
switches active pricing method
Definition at line 58 of file spxautopr.cpp.
References SPxAutoPR::activepricer, SPxAutoPR::devex, SPxSolver::iterations(), SPxPricer::setType(), SPxAutoPR::steep, SPxAutoPR::switchIters, and SPxPricer::thesolver.
Referenced by SPxAutoPR::selectEnter(), and SPxAutoPR::selectLeave().
|
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.
Referenced by SPxAutoPR::clone().
|
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.
Referenced by SPxAutoPR::clone().
| void setSwitchIters | ( | int | iters | ) |
set max number of iterations before switching pricers
Referenced by SPxAutoPR::clone().
|
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::clone(), and SPxAutoPR::load().
|
private |
pointer to currently selected pricer
Definition at line 46 of file spxautopr.h.
Referenced by SPxAutoPR::entered4(), SPxAutoPR::left4(), SPxAutoPR::operator=(), SPxAutoPR::selectEnter(), SPxAutoPR::selectLeave(), SPxAutoPR::setActivePricer(), SPxAutoPR::setType(), and SPxAutoPR::SPxAutoPR().
|
private |
internal Devex pricer
Definition at line 47 of file spxautopr.h.
Referenced by SPxAutoPR::clear(), SPxAutoPR::load(), SPxAutoPR::operator=(), SPxAutoPR::setActivePricer(), SPxAutoPR::setEpsilon(), SPxAutoPR::setRep(), and SPxAutoPR::SPxAutoPR().
|
private |
internal Steepest edge pricer
Definition at line 48 of file spxautopr.h.
Referenced by SPxAutoPR::clear(), SPxAutoPR::load(), SPxAutoPR::operator=(), SPxAutoPR::setActivePricer(), SPxAutoPR::setEpsilon(), SPxAutoPR::setRep(), and SPxAutoPR::SPxAutoPR().
|
private |
number of iterations before switching pricers
Definition at line 45 of file spxautopr.h.
Referenced by SPxAutoPR::operator=(), and SPxAutoPR::setActivePricer().