Scippy

SoPlex

Sequential object-oriented simPlex

SolBase< R > Class Template Reference

Class for storing a primal-dual solution with basis information. More...

#include <solbase.h>

Public Member Functions

bool isPrimalFeasible () const
 is the stored solution primal feasible? More...
 
bool getPrimalSol (VectorBase< R > &vector) const
 gets the primal solution vector; returns true on success More...
 
bool getSlacks (VectorBase< R > &vector) const
 gets the vector of slack values; returns true on success More...
 
bool hasPrimalRay () const
 is a primal unbounded ray available? More...
 
bool getPrimalRaySol (VectorBase< R > &vector) const
 gets the primal unbounded ray if available; returns true on success More...
 
bool isDualFeasible () const
 is a dual solution available? More...
 
bool getDualSol (VectorBase< R > &vector) const
 gets the dual solution vector; returns true on success More...
 
bool getRedCostSol (VectorBase< R > &vector) const
 gets the vector of reduced cost values if available; returns true on success More...
 
bool hasDualFarkas () const
 is a dual farkas ray available? More...
 
bool getDualFarkasSol (VectorBase< R > &vector) const
 gets the Farkas proof if available; returns true on success More...
 
int totalSizePrimal (const int base=2) const
 returns total size of primal solution More...
 
int totalSizeDual (const int base=2) const
 returns total size of dual solution More...
 
int dlcmSizePrimal (const int base=2) const
 returns size of least common multiple of denominators in primal solution More...
 
int dlcmSizeDual (const int base=2) const
 returns size of least common multiple of denominators in dual solution More...
 
int dmaxSizePrimal (const int base=2) const
 returns size of largest denominator in primal solution More...
 
int dmaxSizeDual (const int base=2) const
 returns size of largest denominator in dual solution More...
 
void invalidate ()
 invalidate solution More...
 

Private Member Functions

 SolBase ()
 default constructor only for friends More...
 
SolBase< R > & operator= (const SolBase< R > &sol)
 assignment operator only for friends More...
 
template<class S >
SolBase< R > & operator= (const SolBase< S > &sol)
 assignment operator only for friends More...
 

Private Attributes

VectorBase< R > _primal
 
VectorBase< R > _slacks
 
VectorBase< R > _primalRay
 
VectorBase< R > _dual
 
VectorBase< R > _redCost
 
VectorBase< R > _dualFarkas
 
_objVal
 
unsigned int _isPrimalFeasible: 1
 
unsigned int _hasPrimalRay: 1
 
unsigned int _isDualFeasible: 1
 
unsigned int _hasDualFarkas: 1
 

Friends

template<class T >
class SoPlexBase
 
template<class S >
class SolBase
 

Detailed Description

template<class R>
class soplex::SolBase< R >

Class for storing a primal-dual solution with basis information.

Definition at line 52 of file solbase.h.

Constructor & Destructor Documentation

◆ SolBase()

SolBase ( )
private

default constructor only for friends

Definition at line 244 of file solbase.h.

References SolBase< R >::invalidate().

Member Function Documentation

◆ dlcmSizeDual()

int dlcmSizeDual ( const int  base = 2) const

returns size of least common multiple of denominators in dual solution

Definition at line 178 of file solbase.h.

References SolBase< R >::_dual, SolBase< R >::_dualFarkas, SolBase< R >::_hasDualFarkas, SolBase< R >::_isDualFeasible, and soplex::dlcmSizeRational().

◆ dlcmSizePrimal()

int dlcmSizePrimal ( const int  base = 2) const

returns size of least common multiple of denominators in primal solution

Definition at line 164 of file solbase.h.

References SolBase< R >::_hasPrimalRay, SolBase< R >::_isPrimalFeasible, SolBase< R >::_primal, SolBase< R >::_primalRay, and soplex::dlcmSizeRational().

◆ dmaxSizeDual()

int dmaxSizeDual ( const int  base = 2) const

returns size of largest denominator in dual solution

Definition at line 206 of file solbase.h.

References SolBase< R >::_dual, SolBase< R >::_dualFarkas, SolBase< R >::_hasDualFarkas, SolBase< R >::_isDualFeasible, and soplex::dmaxSizeRational().

◆ dmaxSizePrimal()

int dmaxSizePrimal ( const int  base = 2) const

returns size of largest denominator in primal solution

Definition at line 192 of file solbase.h.

References SolBase< R >::_hasPrimalRay, SolBase< R >::_isPrimalFeasible, SolBase< R >::_primal, SolBase< R >::_primalRay, and soplex::dmaxSizeRational().

◆ getDualFarkasSol()

bool getDualFarkasSol ( VectorBase< R > &  vector) const

gets the Farkas proof if available; returns true on success

Definition at line 127 of file solbase.h.

References SolBase< R >::_dualFarkas, and SolBase< R >::_hasDualFarkas.

◆ getDualSol()

bool getDualSol ( VectorBase< R > &  vector) const

gets the dual solution vector; returns true on success

Definition at line 105 of file solbase.h.

References SolBase< R >::_dual, and SolBase< R >::_isDualFeasible.

◆ getPrimalRaySol()

bool getPrimalRaySol ( VectorBase< R > &  vector) const

gets the primal unbounded ray if available; returns true on success

Definition at line 90 of file solbase.h.

References SolBase< R >::_hasPrimalRay, and SolBase< R >::_primalRay.

◆ getPrimalSol()

bool getPrimalSol ( VectorBase< R > &  vector) const

gets the primal solution vector; returns true on success

Definition at line 68 of file solbase.h.

References SolBase< R >::_isPrimalFeasible, and SolBase< R >::_primal.

◆ getRedCostSol()

bool getRedCostSol ( VectorBase< R > &  vector) const

gets the vector of reduced cost values if available; returns true on success

Definition at line 113 of file solbase.h.

References SolBase< R >::_isDualFeasible, and SolBase< R >::_redCost.

◆ getSlacks()

bool getSlacks ( VectorBase< R > &  vector) const

gets the vector of slack values; returns true on success

Definition at line 76 of file solbase.h.

References SolBase< R >::_isPrimalFeasible, and SolBase< R >::_slacks.

◆ hasDualFarkas()

bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 121 of file solbase.h.

References SolBase< R >::_hasDualFarkas.

◆ hasPrimalRay()

bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 84 of file solbase.h.

References SolBase< R >::_hasPrimalRay.

◆ invalidate()

void invalidate ( )

◆ isDualFeasible()

bool isDualFeasible ( ) const

is a dual solution available?

Definition at line 99 of file solbase.h.

References SolBase< R >::_isDualFeasible.

◆ isPrimalFeasible()

bool isPrimalFeasible ( ) const

is the stored solution primal feasible?

Definition at line 62 of file solbase.h.

References SolBase< R >::_isPrimalFeasible.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ totalSizeDual()

int totalSizeDual ( const int  base = 2) const

◆ totalSizePrimal()

int totalSizePrimal ( const int  base = 2) const

Friends And Related Function Documentation

◆ SolBase

friend class SolBase
friend

Definition at line 58 of file solbase.h.

◆ SoPlexBase

friend class SoPlexBase
friend

Definition at line 54 of file solbase.h.

Member Data Documentation

◆ _dual

◆ _dualFarkas

◆ _hasDualFarkas

◆ _hasPrimalRay

◆ _isDualFeasible

◆ _isPrimalFeasible

◆ _objVal

R _objVal
private

Definition at line 236 of file solbase.h.

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

◆ _primal

◆ _primalRay

◆ _redCost

VectorBase<R> _redCost
private

Definition at line 233 of file solbase.h.

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

◆ _slacks

VectorBase<R> _slacks
private

Definition at line 230 of file solbase.h.

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