|
Steepest edge pricer.Class SPxSteepPR implements a steepest edge pricer to be used with SoPlex.
More...
#include <spxsteeppr.h>
|
int | buildBestPriceVectorLeave (Real feastol) |
| prepare data structures for hyper sparse pricing
|
|
int | selectLeaveX (Real tol) |
| implementation of full pricing
|
|
int | selectLeaveSparse (Real tol) |
| implementation of sparse pricing in the leaving Simplex
|
|
int | selectLeaveHyper (Real tol) |
| implementation of hyper sparse pricing in the leaving Simplex
|
|
SPxId | buildBestPriceVectorEnterDim (Real &best, Real feastol) |
| build up vector of pricing values for later use
|
|
SPxId | buildBestPriceVectorEnterCoDim (Real &best, Real feastol) |
|
SPxId | selectEnterX (Real tol) |
| choose the best entering index among columns and rows but prefer sparsity
|
|
SPxId | selectEnterSparseDim (Real &best, Real tol) |
| implementation of sparse pricing for the entering Simplex (slack variables)
|
|
SPxId | selectEnterSparseCoDim (Real &best, Real tol) |
| implementation of sparse pricing for the entering Simplex
|
|
SPxId | selectEnterDenseDim (Real &best, Real tol) |
| implementation of selectEnter() in dense case (slack variables)
|
|
SPxId | selectEnterDenseCoDim (Real &best, Real tol) |
| implementation of selectEnter() in dense case
|
|
SPxId | selectEnterHyperDim (Real &best, Real feastol) |
| implementation of hyper sparse pricing in the entering Simplex
|
|
SPxId | selectEnterHyperCoDim (Real &best, Real feastol) |
| implementation of hyper sparse pricing in the entering Simplex
|
|
|
void | setupPrefsX (Real mult, Real, Real, Real shift, Real coshift) |
|
void | setupPrefs (SPxSolver::Type) |
|
Steepest edge pricer.
Class SPxSteepPR implements a steepest edge pricer to be used with SoPlex.
See SPxPricer for a class documentation.
Definition at line 41 of file spxsteeppr.h.
How to setup the direction multipliers.
Possible settings are EXACT for starting with exactly computed values, or DEFAULT for starting with multipliers set to 1. The latter is the default.
Enumerator |
---|
EXACT |
starting with exactly computed values
|
DEFAULT |
starting with multipliers set to 1
|
Definition at line 53 of file spxsteeppr.h.
void addedCoVecs |
( |
int |
n | ) |
|
|
virtual |
n covectors have been added to loaded LP.
Reimplemented from SPxPricer.
Definition at line 1128 of file spxsteeppr.cpp.
References SPxSteepPR::coPref, SPxPricer::coWeights, VectorBase< R >::dim(), SPxSolver::dim(), SPxSteepPR::leavePref, SPxSteepPR::prefSetup, DVectorBase< R >::reDim(), SSVectorBase< R >::reDim(), DataArray< T >::reSize(), SPxSteepPR::setupPrefs(), SPxPricer::thesolver, SPxSolver::type(), and SPxSteepPR::workVec.
Referenced by SPxHybridPR::addedCoVecs().
n vectors have been added to loaded LP.
Reimplemented from SPxPricer.
Definition at line 1113 of file spxsteeppr.cpp.
References SPxSolver::coDim(), VectorBase< R >::dim(), SPxSolver::ENTER, SPxSteepPR::pref, SPxSteepPR::prefSetup, DVectorBase< R >::reDim(), DataArray< T >::reSize(), SPxSteepPR::setupPrefs(), SPxPricer::thesolver, SPxSolver::type(), and SPxPricer::weights.
Referenced by SPxHybridPR::addedVecs().
SPxId buildBestPriceVectorEnterCoDim |
( |
Real & |
best, |
|
|
Real |
feastol |
|
) |
| |
|
private |
Definition at line 700 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), DataArray< T >::append(), SPxSteepPR::bestPricesCo, IdxSet::clear(), DataArray< T >::clear(), SPxPricer::compare, SPxPricer::IdxCompare::elements, DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), DataArray< T >::get_ptr(), HYPERPRICINGSIZE, SPxSolver::id(), IdxSet::index(), SPxSolver::infeasibilitiesCo, SPxSolver::isInfeasibleCo, SPxPricer::NOT_VIOLATED, SPxSteepPR::pref, SPxSteepPR::pricesCo, IdxSet::remove(), IdxSet::size(), DataArray< T >::size(), soplex::SPxQuicksortPart(), SPxSolver::test(), SPxPricer::thesolver, SPxPricer::VIOLATED, SPxPricer::VIOLATED_AND_CHECKED, and SPxPricer::weights.
Referenced by SPxSteepPR::selectEnterX().
build up vector of pricing values for later use
Definition at line 646 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), DataArray< T >::append(), SPxSteepPR::bestPrices, IdxSet::clear(), DataArray< T >::clear(), SPxSolver::coId(), SPxPricer::compare, SPxSteepPR::coPref, SPxSolver::coTest(), SPxPricer::coWeights, SPxPricer::IdxCompare::elements, DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), DataArray< T >::get_ptr(), HYPERPRICINGSIZE, IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, SPxPricer::NOT_VIOLATED, SPxSteepPR::prices, IdxSet::remove(), IdxSet::size(), DataArray< T >::size(), soplex::SPxQuicksortPart(), SPxPricer::thesolver, SPxPricer::VIOLATED, and SPxPricer::VIOLATED_AND_CHECKED.
Referenced by SPxSteepPR::selectEnterX().
int buildBestPriceVectorLeave |
( |
Real |
feastol | ) |
|
|
private |
prepare data structures for hyper sparse pricing
Definition at line 311 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), DataArray< T >::append(), SPxSteepPR::bestPrices, IdxSet::clear(), DataArray< T >::clear(), SPxPricer::compare, SPxPricer::coWeights, SPxPricer::IdxCompare::elements, SPxSolver::fTest(), DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), DataArray< T >::get_ptr(), HYPERPRICINGSIZE, IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, SPxSteepPR::leavePref, SPxSteepPR::prices, IdxSet::size(), DataArray< T >::size(), soplex::SPxQuicksortPart(), SPxPricer::thesolver, and SPxPricer::VIOLATED_AND_CHECKED.
Referenced by SPxSteepPR::selectLeave().
void entered4 |
( |
SPxId |
id, |
|
|
int |
n |
|
) |
| |
|
virtual |
Reimplemented from SPxPricer.
Definition at line 582 of file spxsteeppr.cpp.
References SPxSolver::basis(), SPxSolver::coPvec(), SPxPricer::coWeights, UpdateVector::delta(), SPxSolver::ENTER, SPxSolver::epsilon(), SPxSolver::fVec(), VectorBase< R >::get_const_ptr(), VectorBase< R >::get_ptr(), UpdateVector::idx(), IdxSet::index(), soplex::infinity, SPxBasis::iteration(), SPxSteepPR::pi_p, SPxSolver::pVec(), IdxSet::size(), SPxPricer::thesolver, SPxSolver::type(), SSVectorBase< R >::values(), SPxSolver::vector(), SPxPricer::weights, and SPxSteepPR::workVec.
bool isConsistent |
( |
| ) |
const |
|
virtual |
Reimplemented from SPxPricer.
Definition at line 1186 of file spxsteeppr.cpp.
References SPxSolver::basis(), SPxSolver::coDim(), SPxBasis::coSolve(), SPxPricer::coWeights, SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::epsilon(), SPxSteepPR::EXACT, SPxSolver::LEAVE, SPxSolver::leavetol(), VectorBase< R >::length2(), MSG_ERROR, MSGinconsistent, SPxSteepPR::setup, SPxPricer::thesolver, SPxSolver::type(), SPxSolver::unitVector(), and SPxPricer::weights.
Referenced by SPxHybridPR::isConsistent(), SPxSteepExPR::operator=(), SPxSteepPR::operator=(), SPxSteepPR::selectEnter(), SPxSteepPR::selectLeave(), SPxSteepExPR::SPxSteepExPR(), and SPxSteepPR::SPxSteepPR().
void left4 |
( |
int |
n, |
|
|
SPxId |
id |
|
) |
| |
|
virtual |
Reimplemented from SPxPricer.
Definition at line 261 of file spxsteeppr.cpp.
References SPxSolver::basis(), SPxSteepPR::coPref, SPxSolver::coPvec(), SPxPricer::coWeights, UpdateVector::delta(), SPxSolver::fVec(), VectorBase< R >::get_const_ptr(), VectorBase< R >::get_ptr(), UpdateVector::idx(), soplex::infinity, SPxSolver::isCoId(), SPxSolver::isId(), SPxBasis::iteration(), SPxSolver::LEAVE, SPxSteepPR::leavePref, SSVectorBase< R >::length2(), MSG_ERROR, SPxLPBase< R >::number(), SPxSteepPR::pref, IdxSet::size(), soplex::spxAbs(), SPxPricer::theeps, SPxPricer::thesolver, SPxSolver::type(), SSVectorBase< R >::values(), and SPxSteepPR::workVec.
sets the solver
Reimplemented from SPxPricer.
Definition at line 40 of file spxsteeppr.cpp.
References SSVectorBase< R >::clear(), SPxSolver::coDim(), SPxSteepPR::coPref, SPxSolver::dim(), SPxSteepPR::leavePref, SPxSteepPR::pref, SPxSteepPR::prefSetup, SSVectorBase< R >::reDim(), DataArray< T >::reSize(), SPxPricer::thesolver, SPxSteepPR::workRhs, and SPxSteepPR::workVec.
Referenced by SPxHybridPR::load(), and SPxAutoPR::load().
assignment operator
Definition at line 163 of file spxsteeppr.h.
References SPxSteepPR::coPref, SPxSteepPR::isConsistent(), SPxSteepPR::leavePref, SPxPricer::operator=(), SPxSteepPR::pi_p, SPxSteepPR::pref, SPxSteepPR::prefSetup, SPxSteepPR::refined, SPxSteepPR::setup, SPxSteepPR::workRhs, and SPxSteepPR::workVec.
Referenced by SPxSteepExPR::operator=().
void removedCoVec |
( |
int |
i | ) |
|
|
virtual |
void removedCoVecs |
( |
const int |
perm[] | ) |
|
|
virtual |
void removedVecs |
( |
const int |
perm[] | ) |
|
|
virtual |
Implements SPxPricer.
Definition at line 754 of file spxsteeppr.cpp.
References SPxSolver::basis(), UpdateVector::delta(), SPxSolver::fVec(), SPxSteepPR::isConsistent(), SPxId::isValid(), SSVectorBase< R >::length2(), MSG_INFO3, SPxSteepPR::pi_p, SPxSteepPR::refined, SPxSteepPR::selectEnterX(), SPxSolver::setup4coSolve(), SSVectorBase< R >::setup_and_assign(), SPxBasis::solve4update(), SPxSolver::spxout, STEEP_REFINETOL, SPxPricer::theeps, SPxPricer::thesolver, SPxSolver::vector(), SPxSteepPR::workRhs, and SPxSteepPR::workVec.
implementation of hyper sparse pricing in the entering Simplex
Definition at line 900 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), SPxSteepPR::bestPricesCo, DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), SPxSolver::id(), IdxSet::index(), soplex::infinity, SPxSolver::isInfeasibleCo, SPxPricer::NOT_VIOLATED, SPxSteepPR::pref, IdxSet::remove(), IdxSet::size(), SPxSolver::test(), SPxPricer::thesolver, SPxSolver::updateViolsCo, SPxPricer::VIOLATED, SPxPricer::VIOLATED_AND_CHECKED, and SPxPricer::weights.
Referenced by SPxSteepPR::selectEnterX().
implementation of hyper sparse pricing in the entering Simplex
Definition at line 820 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), SPxSteepPR::bestPrices, SPxSolver::coId(), SPxSteepPR::coPref, SPxSolver::coTest(), SPxPricer::coWeights, DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), IdxSet::index(), soplex::infinity, SPxSolver::isInfeasible, SPxPricer::NOT_VIOLATED, IdxSet::remove(), IdxSet::size(), SPxPricer::thesolver, SPxSolver::updateViols, SPxPricer::VIOLATED, and SPxPricer::VIOLATED_AND_CHECKED.
Referenced by SPxSteepPR::selectEnterX().
implementation of sparse pricing for the entering Simplex
Definition at line 1019 of file spxsteeppr.cpp.
References DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), SPxSolver::id(), IdxSet::index(), SPxSolver::infeasibilitiesCo, SPxSolver::isInfeasibleCo, SPxPricer::NOT_VIOLATED, SPxSteepPR::pref, IdxSet::remove(), IdxSet::size(), SPxSolver::test(), SPxPricer::thesolver, and SPxPricer::weights.
Referenced by SPxSteepPR::selectEnterX().
implementation of sparse pricing for the entering Simplex (slack variables)
Definition at line 980 of file spxsteeppr.cpp.
References SPxSolver::coId(), SPxSteepPR::coPref, SPxSolver::coTest(), SPxPricer::coWeights, DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), IdxSet::index(), SPxSolver::infeasibilities, SPxSolver::isInfeasible, SPxPricer::NOT_VIOLATED, IdxSet::remove(), IdxSet::size(), and SPxPricer::thesolver.
Referenced by SPxSteepPR::selectEnterX().
choose the best entering index among columns and rows but prefer sparsity
Definition at line 784 of file spxsteeppr.cpp.
References SPxSolver::basis(), SPxSteepPR::bestPrices, SPxSteepPR::bestPricesCo, SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxSolver::hyperPricingEnter, soplex::infinity, SPxId::isValid(), SPxBasis::lastUpdate(), SPxSteepPR::refined, SPxSteepPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterHyperDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseDim(), IdxSet::size(), SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingEnterCo, SPARSITY_TRADEOFF, and SPxPricer::thesolver.
Referenced by SPxSteepPR::selectEnter().
Implements SPxPricer.
Definition at line 358 of file spxsteeppr.cpp.
References SPxSolver::basis(), SPxSteepPR::bestPrices, SPxSteepPR::buildBestPriceVectorLeave(), SPxSolver::coPvec(), SPxBasis::coSolve(), UpdateVector::delta(), SPxSolver::hyperPricingLeave, SPxSteepPR::isConsistent(), SSVectorBase< R >::isConsistent(), SPxBasis::lastUpdate(), MSG_INFO3, SPxSteepPR::refined, SPxSteepPR::selectLeaveHyper(), SPxSteepPR::selectLeaveSparse(), SPxSteepPR::selectLeaveX(), SPxSolver::setup4solve(), SSVectorBase< R >::setup_and_assign(), IdxSet::size(), SPxSolver::sparsePricingLeave, SPxSolver::spxout, STEEP_REFINETOL, SPxPricer::theeps, SPxPricer::thesolver, SPxSolver::unitVector(), SPxSteepPR::workRhs, and SPxSteepPR::workVec.
int selectLeaveHyper |
( |
Real |
tol | ) |
|
|
private |
implementation of hyper sparse pricing in the leaving Simplex
Definition at line 490 of file spxsteeppr.cpp.
References DIdxSet::addIdx(), SPxSteepPR::bestPrices, SPxPricer::coWeights, SPxSolver::fTest(), DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), IdxSet::index(), soplex::infinity, SPxSolver::isInfeasible, SPxSteepPR::leavePref, MSG_WARNING, SPxPricer::NOT_VIOLATED, IdxSet::remove(), IdxSet::size(), SPxPricer::thesolver, SPxSolver::updateViols, SPxPricer::VIOLATED, and SPxPricer::VIOLATED_AND_CHECKED.
Referenced by SPxSteepPR::selectLeave().
int selectLeaveSparse |
( |
Real |
tol | ) |
|
|
private |
implementation of sparse pricing in the leaving Simplex
Definition at line 445 of file spxsteeppr.cpp.
References SPxPricer::coWeights, SPxSolver::fTest(), DataArray< T >::get_const_ptr(), VectorBase< R >::get_const_ptr(), IdxSet::index(), SPxSolver::infeasibilities, soplex::infinity, SPxSolver::isInfeasible, SPxSteepPR::leavePref, MSG_WARNING, SPxPricer::NOT_VIOLATED, IdxSet::remove(), IdxSet::size(), SPxPricer::thesolver, SPxPricer::VIOLATED, and SPxPricer::VIOLATED_AND_CHECKED.
Referenced by SPxSteepPR::selectLeave().
int selectLeaveX |
( |
Real |
tol | ) |
|
|
private |
set entering/leaving algorithm
Reimplemented from SPxPricer.
Definition at line 58 of file spxsteeppr.cpp.
References SPxSteepPR::bestPrices, SPxSteepPR::bestPricesCo, IdxSet::clear(), SSVectorBase< R >::clear(), SPxSolver::coDim(), SPxSteepPR::coPref, SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::epsilon(), SPxSolver::hyperPricingEnter, SPxSolver::hyperPricingLeave, SPxSolver::LEAVE, SPxSteepPR::pref, SPxSteepPR::prices, SPxSteepPR::pricesCo, SPxSteepPR::refined, DataArray< T >::reMax(), DataArray< T >::reSize(), SSVectorBase< R >::setEpsilon(), DIdxSet::setMax(), SPxSteepPR::setupPrefs(), SPxSteepPR::setupWeights(), SPxSolver::sparsePricingEnter, SPxSolver::sparsePricingEnterCo, SPxSolver::sparsePricingLeave, SPxPricer::thesolver, SPxSteepPR::workRhs, and SPxSteepPR::workVec.
setup steepest edge weights
Definition at line 92 of file spxsteeppr.cpp.
References SPxBasis::baseId(), SPxSolver::basis(), SPxSolver::coDim(), SPxSteepPR::coPref, SPxBasis::coSolve(), SPxPricer::coWeights, SPxSteepPR::DEFAULT, VectorBase< R >::dim(), SPxSolver::dim(), SPxSolver::ENTER, SPxSolver::epsilon(), SPxSolver::isId(), SPxSolver::LEAVE, SPxSteepPR::leavePref, VectorBase< R >::length2(), SVectorBase< R >::length2(), MSG_INFO1, SPxLPBase< R >::number(), SPxSteepPR::pref, DVectorBase< R >::reDim(), SPxSteepPR::setup, SPxSolver::spxout, SPxPricer::thesolver, SPxSolver::unitVector(), SPxSolver::vector(), SPxPricer::weights, and SPxPricer::weightsAreSetup.
Referenced by SPxSteepPR::setType().
preference multiplier for selecting as pivot
Definition at line 83 of file spxsteeppr.h.
Referenced by SPxSteepPR::addedCoVecs(), SPxSteepPR::buildBestPriceVectorEnterDim(), SPxSteepPR::left4(), SPxSteepPR::load(), SPxSteepPR::operator=(), SPxSteepPR::selectEnterDenseDim(), SPxSteepPR::selectEnterHyperDim(), SPxSteepPR::selectEnterSparseDim(), SPxSteepPR::setType(), SPxSteepPR::setupPrefsX(), and SPxSteepPR::setupWeights().
preference multiplier for selecting as pivot
Definition at line 85 of file spxsteeppr.h.
Referenced by SPxSteepPR::addedVecs(), SPxSteepPR::buildBestPriceVectorEnterCoDim(), SPxSteepPR::left4(), SPxSteepPR::load(), SPxSteepPR::operator=(), SPxSteepPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterHyperCoDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxSteepPR::setType(), SPxSteepPR::setupPrefsX(), and SPxSteepPR::setupWeights().
|