|
Weighted pricing.Class SPxWeightPR is an implemantation class of SPxPricer that uses weights for columns and rows for selecting the Simplex pivots. The weights are computed by methods computeCP() and computeRP() which may be overridden by derived classes.
More...
#include <spxweightpr.h>
Weighted pricing.
Class SPxWeightPR is an implemantation class of SPxPricer that uses weights for columns and rows for selecting the Simplex pivots. The weights are computed by methods computeCP() and computeRP() which may be overridden by derived classes.
The weights are interpreted as follows: The higher a value is, the more likely the corresponding row or column is set on one of its bounds.
See SPxPricer for a class documentation.
Definition at line 41 of file spxweightpr.h.
void addedCoVecs |
( |
int |
n | ) |
|
|
virtual |
n covectors have been added to the loaded LP.
Reimplemented from SPxPricer.
Definition at line 269 of file spxweightpr.cpp.
References SPxSolver::COLUMN, SPxWeightPR::computeCP(), SPxWeightPR::computeLeavePenalty(), SPxWeightPR::computeRP(), SPxWeightPR::cPenalty, VectorBase< R >::dim(), SPxSolver::LEAVE, SPxWeightPR::leavePenalty, DVectorBase< R >::reDim(), SPxWeightPR::rPenalty, and SPxPricer::solver().
Referenced by SPxWeightPR::clone().
n vectors have been added to the loaded LP.
Reimplemented from SPxPricer.
Definition at line 247 of file spxweightpr.cpp.
References SPxWeightPR::computeCP(), SPxWeightPR::computeLeavePenalty(), SPxWeightPR::computeRP(), SPxWeightPR::cPenalty, VectorBase< R >::dim(), SPxSolver::LEAVE, SPxWeightPR::leavePenalty, DVectorBase< R >::reDim(), SPxSolver::ROW, SPxWeightPR::rPenalty, and SPxPricer::solver().
Referenced by SPxWeightPR::clone().
clone function for polymorphism
Implements SPxPricer.
Definition at line 134 of file spxweightpr.h.
References SPxWeightPR::addedCoVecs(), SPxWeightPR::addedVecs(), SPxWeightPR::isConsistent(), SPxWeightPR::load(), SPxWeightPR::removedCoVec(), SPxWeightPR::removedCoVecs(), SPxWeightPR::removedVec(), SPxWeightPR::removedVecs(), SPxWeightPR::selectEnter(), SPxWeightPR::selectLeave(), SPxWeightPR::setRep(), SPxWeightPR::setType(), and SPxWeightPR::SPxWeightPR().
void computeCP |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
|
private |
void computeLeavePenalty |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
|
private |
compute leave penalties.
Definition at line 48 of file spxweightpr.cpp.
References SPxBasis::baseId(), SPxSolver::basis(), SPxWeightPR::cPenalty, SPxWeightPR::leavePenalty, SPxLPBase< R >::number(), SPxId::ROW_ID, SPxWeightPR::rPenalty, SPxPricer::solver(), and SPxPricer::thesolver.
Referenced by SPxWeightPR::addedCoVecs(), SPxWeightPR::addedVecs(), and SPxWeightPR::setType().
void computeRP |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
|
private |
compute weights for rows.
- Todo:
- TK04NOV98 here is a bug. solver()->rowVector(i).length() could be zero, so solver()->rowVector(i).length2() is also zero and we get an arithmetic exception.
Definition at line 62 of file spxweightpr.cpp.
References ASSERT_WARN, SPxPricer::epsilon(), SVectorBase< R >::length2(), SPxLPBase< R >::maxObj(), SPxWeightPR::objlength, SPxLPBase< R >::rowVector(), SPxWeightPR::rPenalty, and SPxPricer::solver().
Referenced by SPxWeightPR::addedCoVecs(), SPxWeightPR::addedVecs(), and SPxWeightPR::load().
bool isConsistent |
( |
| ) |
const |
|
virtual |
sets the solver
Reimplemented from SPxPricer.
Definition at line 88 of file spxweightpr.cpp.
References SPxWeightPR::computeCP(), SPxWeightPR::computeRP(), SPxWeightPR::cPenalty, VectorBase< R >::length(), SPxLPBase< R >::maxObj(), SPxLPBase< R >::nCols(), SPxLPBase< R >::nRows(), SPxWeightPR::objlength, DVectorBase< R >::reDim(), SPxWeightPR::rPenalty, SPxPricer::solver(), and SPxPricer::thesolver.
Referenced by SPxWeightPR::clone().
void removedCoVec |
( |
int |
i | ) |
|
|
virtual |
void removedCoVecs |
( |
const int |
perm[] | ) |
|
|
virtual |
void removedVecs |
( |
const int |
perm[] | ) |
|
|
virtual |
Implements SPxPricer.
Definition at line 156 of file spxweightpr.cpp.
References SPxSolver::basis(), SPxLPBase< R >::cId(), SPxBasis::Desc::colStatus(), SPxSolver::coTest(), SPxWeightPR::cPenalty, SPxBasis::Desc::D_FREE, SPxBasis::Desc::D_ON_BOTH, SPxBasis::Desc::D_ON_LOWER, SPxBasis::Desc::D_ON_UPPER, SPxBasis::Desc::D_UNDEFINED, SPxBasis::desc(), soplex::infinity, SPxWeightPR::isConsistent(), SPxBasis::Desc::P_FIXED, SPxBasis::Desc::P_FREE, SPxBasis::Desc::P_ON_LOWER, SPxBasis::Desc::P_ON_UPPER, SPxSolver::rep(), SPxLPBase< R >::rId(), SPxSolver::ROW, SPxBasis::Desc::rowStatus(), SPxWeightPR::rPenalty, SPxPricer::solver(), SPxSolver::test(), and SPxPricer::theeps.
Referenced by SPxWeightPR::clone().
Implements SPxPricer.
Definition at line 100 of file spxweightpr.cpp.
References SPxSolver::COLUMN, SPxSolver::dim(), SPxSolver::fTest(), VectorBase< R >::get_const_ptr(), soplex::infinity, SPxWeightPR::isConsistent(), SPxWeightPR::leavePenalty, SPxSolver::rep(), SPxPricer::solver(), SPxPricer::theeps, and SPxPricer::thesolver.
Referenced by SPxWeightPR::clone().
column penalties
Definition at line 49 of file spxweightpr.h.
Referenced by SPxWeightPR::addedCoVecs(), SPxWeightPR::addedVecs(), SPxWeightPR::computeCP(), SPxWeightPR::computeLeavePenalty(), SPxWeightPR::isConsistent(), SPxWeightPR::load(), SPxWeightPR::operator=(), SPxWeightPR::removedCoVec(), SPxWeightPR::removedCoVecs(), SPxWeightPR::removedVec(), SPxWeightPR::removedVecs(), SPxWeightPR::selectEnter(), SPxWeightPR::setRep(), and SPxWeightPR::SPxWeightPR().
row penalties
Definition at line 51 of file spxweightpr.h.
Referenced by SPxWeightPR::addedCoVecs(), SPxWeightPR::addedVecs(), SPxWeightPR::computeLeavePenalty(), SPxWeightPR::computeRP(), SPxWeightPR::isConsistent(), SPxWeightPR::load(), SPxWeightPR::operator=(), SPxWeightPR::removedCoVec(), SPxWeightPR::removedCoVecs(), SPxWeightPR::removedVec(), SPxWeightPR::removedVecs(), SPxWeightPR::selectEnter(), SPxWeightPR::setRep(), and SPxWeightPR::SPxWeightPR().
|