Scippy

SoPlex

Sequential object-oriented simPlex

SPxWeightPR< R > Class Template Reference

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>

Public Member Functions

Construction / destruction
 SPxWeightPR ()
 default constructor More...
 
 SPxWeightPR (const SPxWeightPR &old)
 copy constructor More...
 
SPxWeightPRoperator= (const SPxWeightPR &rhs)
 assignment operator More...
 
virtual ~SPxWeightPR ()
 destructor More...
 
virtual SPxPricer< R > * clone () const
 clone function for polymorphism More...
 
Access / modification
virtual void load (SPxSolverBase< R > *base)
 sets the solver More...
 
void setType (typename SPxSolverBase< R >::Type tp)
 set entering/leaving algorithm More...
 
void setRep (typename SPxSolverBase< R >::Representation rep)
 set row/column representation More...
 
virtual int selectLeave ()
 
virtual SPxId selectEnter ()
 
virtual void addedVecs (int n)
 n vectors have been added to the loaded LP. More...
 
virtual void addedCoVecs (int n)
 n covectors have been added to the loaded LP. More...
 
virtual void removedVec (int i)
 the i'th vector has been removed from the loaded LP. More...
 
virtual void removedCoVec (int i)
 the i'th covector has been removed from the loaded LP. More...
 
virtual void removedVecs (const int perm[])
 n vectors have been removed from the loaded LP. More...
 
virtual void removedCoVecs (const int perm[])
 n covectors have been removed from the loaded LP. More...
 
Consistency check
virtual bool isConsistent () const
 checks for consistency More...
 
- Public Member Functions inherited from SPxPricer< R >
virtual const char * getName () const
 get name of pricer. More...
 
virtual void clear ()
 unloads LP. More...
 
virtual SPxSolverBase< R > * solver () const
 returns loaded SPxSolverBase object. More...
 
virtual void setPricingTolerance (R tol)
 sets pricing tolerance. More...
 
virtual R pricingTolerance () const
 returns the pricing tolerance More...
 
virtual void setTolerances (std::shared_ptr< Tolerances > newTolerances)
 set the _tolerances member variable More...
 
virtual void left4 (int, SPxId)
 performs leaving pivot. More...
 
virtual void entered4 (SPxId, int)
 performs entering pivot. More...
 
virtual void removedVecs (const int *)
 vectors given by perm have been 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 Member Functions

Private helpers
void computeLeavePenalty (int start, int end)
 compute leave penalties. More...
 
void computeCP (int start, int end)
 compute weights for columns. More...
 
void computeRP (int start, int end)
 compute weights for rows. More...
 

Private Attributes

Data
VectorBase< R > cPenalty
 column penalties More...
 
VectorBase< R > rPenalty
 row penalties More...
 
VectorBase< R > leavePenalty
 penalties for leaving alg More...
 
const R * penalty
 
const R * coPenalty
 
objlength
 length of objective vector. More...
 

Additional Inherited Members

- Public Types inherited from SPxPricer< R >
enum  ViolationType { NOT_VIOLATED = 0, VIOLATED = 1, VIOLATED_AND_CHECKED = 2 }
 
- Protected Attributes inherited from SPxPricer< R >
IdxCompare compare
 
const char * m_name
 name of the pricer More...
 
SPxSolverBase< R > * thesolver
 the solver More...
 
thetolerance
 violation bound More...
 
std::shared_ptr< Tolerances_tolerances
 tolerances used by the solver More...
 

Detailed Description

template<class R>
class soplex::SPxWeightPR< R >

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 51 of file spxweightpr.h.

Constructor & Destructor Documentation

◆ SPxWeightPR() [1/2]

default constructor

Definition at line 89 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::clone().

◆ SPxWeightPR() [2/2]

◆ ~SPxWeightPR()

virtual ~SPxWeightPR ( )
virtual

destructor

Definition at line 146 of file spxweightpr.h.

Member Function Documentation

◆ addedCoVecs()

virtual void addedCoVecs ( int  n)
virtual

n covectors have been added to the loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ addedVecs()

virtual void addedVecs ( int  n)
virtual

n vectors have been added to the loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ clone()

◆ computeCP()

void computeCP ( int  start,
int  end 
)
private

compute weights for columns.

◆ computeLeavePenalty()

void computeLeavePenalty ( int  start,
int  end 
)
private

compute leave penalties.

◆ computeRP()

void computeRP ( int  start,
int  end 
)
private

compute weights for rows.

◆ isConsistent()

virtual bool isConsistent ( ) const
virtual

checks for consistency

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ load()

virtual void load ( SPxSolverBase< R > *  base)
virtual

sets the solver

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ operator=()

◆ removedCoVec()

virtual void removedCoVec ( int  i)
virtual

the i'th covector has been removed from the loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ removedCoVecs()

virtual void removedCoVecs ( const int  perm[])
virtual

n covectors have been removed from the loaded LP.

Referenced by SPxWeightPR< R >::clone().

◆ removedVec()

virtual void removedVec ( int  i)
virtual

the i'th vector has been removed from the loaded LP.

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ removedVecs()

virtual void removedVecs ( const int  perm[])
virtual

n vectors have been removed from the loaded LP.

Referenced by SPxWeightPR< R >::clone().

◆ selectEnter()

virtual SPxId selectEnter ( )
virtual

Implements SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ selectLeave()

virtual int selectLeave ( )
virtual

Implements SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ setRep()

void setRep ( typename SPxSolverBase< R >::Representation  rep)
virtual

set row/column representation

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

◆ setType()

void setType ( typename SPxSolverBase< R >::Type  tp)
virtual

set entering/leaving algorithm

Reimplemented from SPxPricer< R >.

Referenced by SPxWeightPR< R >::clone().

Member Data Documentation

◆ coPenalty

const R* coPenalty
private

Definition at line 67 of file spxweightpr.h.

◆ cPenalty

VectorBase<R> cPenalty
private

column penalties

Definition at line 59 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::operator=(), and SPxWeightPR< R >::SPxWeightPR().

◆ leavePenalty

VectorBase<R> leavePenalty
private

penalties for leaving alg

Definition at line 63 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::operator=().

◆ objlength

R objlength
private

length of objective vector.

Definition at line 69 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::operator=().

◆ penalty

const R* penalty
private

Definition at line 65 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::operator=(), and SPxWeightPR< R >::SPxWeightPR().

◆ rPenalty

VectorBase<R> rPenalty
private

row penalties

Definition at line 61 of file spxweightpr.h.

Referenced by SPxWeightPR< R >::operator=(), and SPxWeightPR< R >::SPxWeightPR().