SoPlex Documentation
Loading...
Searching...
No Matches

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

Private Member Functions

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

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()

template<class R >
SolBase ( )
private

default constructor only for friends

Definition at line 244 of file solbase.h.

References SolBase< R >::invalidate().

Member Function Documentation

◆ dlcmSizeDual()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
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()

template<class R >
bool hasDualFarkas ( ) const

is a dual farkas ray available?

Definition at line 121 of file solbase.h.

References SolBase< R >::_hasDualFarkas.

◆ hasPrimalRay()

template<class R >
bool hasPrimalRay ( ) const

is a primal unbounded ray available?

Definition at line 84 of file solbase.h.

References SolBase< R >::_hasPrimalRay.

◆ invalidate()

template<class R >
void invalidate ( )

◆ isDualFeasible()

template<class R >
bool isDualFeasible ( ) const

is a dual solution available?

Definition at line 99 of file solbase.h.

References SolBase< R >::_isDualFeasible.

◆ isPrimalFeasible()

template<class R >
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()

template<class R >
int totalSizeDual ( const int base = 2) const

◆ totalSizePrimal()

template<class R >
int totalSizePrimal ( const int base = 2) const

Friends And Related Symbol Documentation

◆ SolBase

template<class R >
template<class S >
friend class SolBase
friend

Definition at line 58 of file solbase.h.

◆ SoPlexBase

template<class R >
template<class T >
friend class SoPlexBase
friend

Definition at line 54 of file solbase.h.

Member Data Documentation

◆ _dual

◆ _dualFarkas

◆ _hasDualFarkas

◆ _hasPrimalRay

◆ _isDualFeasible

◆ _isPrimalFeasible

◆ _objVal

template<class R >
R _objVal
private

Definition at line 236 of file solbase.h.

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

◆ _primal

◆ _primalRay

◆ _redCost

template<class R >
VectorBase<R> _redCost
private

◆ _slacks

template<class R >
VectorBase<R> _slacks
private