Dantzig pricer.Class SPxDantzigPR is an implementation class of an SPxPricer implementing Dantzig's default pricing strategy, i.e., maximal/minimal reduced cost or maximally violated constraint. More...
#include <spxdantzigpr.h>
Public Member Functions | |
Constructors / destructors | |
SPxDantzigPR () | |
default constructor More... | |
SPxDantzigPR (const SPxDantzigPR &old) | |
copy constructor More... | |
SPxDantzigPR & | operator= (const SPxDantzigPR &rhs) |
assignment operator More... | |
virtual | ~SPxDantzigPR () |
destructor More... | |
virtual SPxPricer * | clone () const |
clone function for polymorphism More... | |
Select enter/leave | |
virtual int | selectLeave () |
virtual SPxId | selectEnter () |
Public Member Functions inherited from SPxPricer | |
virtual const char * | getName () const |
get name of pricer. More... | |
virtual void | load (SPxSolver *p_solver) |
loads LP. More... | |
virtual void | clear () |
unloads LP. More... | |
virtual SPxSolver * | solver () const |
returns loaded SPxSolver object. More... | |
virtual Real | epsilon () const |
returns violation bound theeps. More... | |
virtual void | setEpsilon (Real eps) |
sets violation bound. More... | |
virtual void | setType (SPxSolver::Type) |
sets pricing type. More... | |
virtual void | setRep (SPxSolver::Representation) |
sets basis representation. More... | |
virtual void | left4 (int, SPxId) |
performs leaving pivot. More... | |
virtual void | entered4 (SPxId, int) |
performs entering pivot. 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... | |
SPxPricer & | operator= (const SPxPricer &rhs) |
assignment operator More... | |
virtual | ~SPxPricer () |
destructor. More... | |
Private Member Functions | |
int | selectLeaveSparse () |
SPxId | selectEnterX () |
SPxId | selectEnterSparseDim (Real &best, SPxId &id) |
SPxId | selectEnterSparseCoDim (Real &best, SPxId &id) |
SPxId | selectEnterDenseDim (Real &best, SPxId &id) |
SPxId | selectEnterDenseCoDim (Real &best, SPxId &id) |
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... | |
Dantzig pricer.
Class SPxDantzigPR is an implementation class of an SPxPricer implementing Dantzig's default pricing strategy, i.e., maximal/minimal reduced cost or maximally violated constraint.
See SPxPricer for a class documentation.
Definition at line 38 of file spxdantzigpr.h.
SPxDantzigPR | ( | ) |
default constructor
Definition at line 59 of file spxdantzigpr.h.
Referenced by SPxDantzigPR::clone().
SPxDantzigPR | ( | const SPxDantzigPR & | old | ) |
copy constructor
Definition at line 63 of file spxdantzigpr.h.
|
virtual |
destructor
Definition at line 77 of file spxdantzigpr.h.
|
virtual |
clone function for polymorphism
Implements SPxPricer.
Definition at line 80 of file spxdantzigpr.h.
References SPxDantzigPR::selectEnter(), SPxDantzigPR::selectLeave(), and SPxDantzigPR::SPxDantzigPR().
SPxDantzigPR& operator= | ( | const SPxDantzigPR & | rhs | ) |
assignment operator
Definition at line 67 of file spxdantzigpr.h.
References SPxPricer::operator=().
|
virtual |
Implements SPxPricer.
Definition at line 92 of file spxdantzigpr.cpp.
References SPxDantzigPR::selectEnterX(), and SPxPricer::thesolver.
Referenced by SPxDantzigPR::clone().
selectEnter() in dense case
Definition at line 218 of file spxdantzigpr.cpp.
References SPxSolver::coDim(), SPxSolver::id(), SPxSolver::test(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectEnterX().
selectEnter() in dense case (slack variables)
Definition at line 193 of file spxdantzigpr.cpp.
References SPxSolver::coId(), SPxSolver::coTest(), SPxSolver::dim(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectEnterX().
sparse pricing method for entering Simplex
Definition at line 160 of file spxdantzigpr.cpp.
References SPxSolver::id(), IdxSet::index(), SPxSolver::infeasibilitiesCo, SPxSolver::isInfeasibleCo, IdxSet::remove(), IdxSet::size(), SPxSolver::test(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectEnterX().
sparse pricing method for entering Simplex (slack variables)
Definition at line 126 of file spxdantzigpr.cpp.
References SPxSolver::coId(), SPxSolver::coTest(), IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, IdxSet::remove(), IdxSet::size(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectEnterX().
|
private |
choose the best entering index among columns and rows but prefer sparsity
Definition at line 104 of file spxdantzigpr.cpp.
References SPxId::isValid(), SPxDantzigPR::selectEnterDenseCoDim(), SPxDantzigPR::selectEnterDenseDim(), SPxDantzigPR::selectEnterSparseCoDim(), SPxDantzigPR::selectEnterSparseDim(), SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingEnterCo, SPARSITY_TRADEOFF, SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectEnter().
|
virtual |
Implements SPxPricer.
Definition at line 27 of file spxdantzigpr.cpp.
References SPxSolver::dim(), SPxSolver::fTest(), SPxDantzigPR::selectLeaveSparse(), SPxSolver::sparsePricingLeave, SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::clone().
|
private |
sparse pricing method for leaving Simplex
Definition at line 58 of file spxdantzigpr.cpp.
References SPxSolver::fTest(), IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, IdxSet::remove(), IdxSet::size(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxDantzigPR::selectLeave().