Scippy

SoPlex

Sequential object-oriented simPlex

SPxVectorST< R > Class Template Reference

Solution vector based start basis.This version of SPxWeightST can be used to construct a starting basis for an LP to be solved with SoPlex if an approximate solution vector or dual vector (possibly optained by a heuristic) is available. This is done by setting up weights for the SPxWeightST it is derived from. More...

#include <spxvectorst.h>

Public Member Functions

Construction / destruction
 SPxVectorST ()
 default constructor. More...
 
 SPxVectorST (const SPxVectorST &old)
 copy constructor More...
 
SPxVectorSToperator= (const SPxVectorST &rhs)
 assignment operator More...
 
virtual ~SPxVectorST ()
 destructor. More...
 
virtual SPxStarter< R > * clone () const
 clone function for polymorphism More...
 
Modification
void primal (const VectorBase< R > &v)
 sets up primal solution vector. More...
 
void dual (const VectorBase< R > &v)
 sets up primal solution vector. More...
 
- Public Member Functions inherited from SPxWeightST< R >
 SPxWeightST ()
 default constructor. More...
 
 SPxWeightST (const SPxWeightST &old)
 copy constructor More...
 
SPxWeightSToperator= (const SPxWeightST &rhs)
 assignment operator More...
 
virtual ~SPxWeightST ()
 destructor. More...
 
void generate (SPxSolverBase< R > &base)
 generates start basis for loaded basis. More...
 
virtual bool isConsistent () const
 consistency check. More...
 
- Public Member Functions inherited from SPxStarter< R >
virtual const char * getName () const
 get name of starter. More...
 
 SPxStarter (const char *name)
 constructor More...
 
 SPxStarter (const SPxStarter &old)
 copy constructor More...
 
SPxStarteroperator= (const SPxStarter &rhs)
 assignment operator More...
 
virtual ~SPxStarter ()
 destructor. More...
 

Protected Member Functions

Protected helpers
void setupWeights (SPxSolverBase< R > &base)
 sets up variable weights. More...
 
Protected helpers

Private Attributes

Data
VectorBase< R > vec
 the current (approximate) primal or dual vector More...
 

Types

enum soplex::SPxVectorST::{ NONE, PVEC, DVECstate
 specifies whether to work on the primal, the dual, or not at all. More...
 

Additional Inherited Members

- Protected Attributes inherited from SPxWeightST< R >
Array< R > rowWeight
 weight value for LP rows. More...
 
Array< R > colWeight
 weight value for LP columns. More...
 
DataArray< bool > rowRight
 set variable to rhs?. More...
 
DataArray< bool > colUp
 set primal variable to upper bound. More...
 
- Protected Attributes inherited from SPxStarter< R >
const char * m_name
 name of the starter More...
 

Detailed Description

template<class R>
class soplex::SPxVectorST< R >

Solution vector based start basis.

This version of SPxWeightST can be used to construct a starting basis for an LP to be solved with SoPlex if an approximate solution vector or dual vector (possibly optained by a heuristic) is available. This is done by setting up weights for the SPxWeightST it is derived from.

The primal vector to be used is loaded by calling method primal() while dual() setups for the dual vector. Methods primal() or dual() must be called before generate() is called by SoPlex to set up a starting basis. If more than one call of method primal() or dual() occurred only the most recent one is valid for generating the starting base.

Definition at line 45 of file spxvectorst.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

specifies whether to work on the primal, the dual, or not at all.

Enumerator
NONE 
PVEC 
DVEC 

Definition at line 53 of file spxvectorst.h.

Constructor & Destructor Documentation

◆ SPxVectorST() [1/2]

default constructor.

Definition at line 78 of file spxvectorst.h.

References SPxStarter< R >::m_name.

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

◆ SPxVectorST() [2/2]

SPxVectorST ( const SPxVectorST< R > &  old)

copy constructor

Definition at line 84 of file spxvectorst.h.

References SPxWeightST< R >::isConsistent().

◆ ~SPxVectorST()

virtual ~SPxVectorST ( )
virtual

destructor.

Definition at line 106 of file spxvectorst.h.

Member Function Documentation

◆ clone()

virtual SPxStarter<R>* clone ( ) const
virtual

clone function for polymorphism

Reimplemented from SPxWeightST< R >.

Reimplemented in SPxSumST< R >.

Definition at line 109 of file spxvectorst.h.

References SPxVectorST< R >::SPxVectorST().

◆ dual()

void dual ( const VectorBase< R > &  v)

sets up primal solution vector.

Definition at line 125 of file spxvectorst.h.

References SPxVectorST< R >::DVEC.

◆ operator=()

SPxVectorST& operator= ( const SPxVectorST< R > &  rhs)

◆ primal()

void primal ( const VectorBase< R > &  v)

sets up primal solution vector.

Definition at line 119 of file spxvectorst.h.

References SPxVectorST< R >::PVEC.

◆ setupWeights()

void setupWeights ( SPxSolverBase< R > &  base)
protectedvirtual

sets up variable weights.

Reimplemented from SPxWeightST< R >.

Member Data Documentation

◆ state

enum { ... } state

specifies whether to work on the primal, the dual, or not at all.

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

◆ vec

VectorBase<R> vec
private

the current (approximate) primal or dual vector

Definition at line 60 of file spxvectorst.h.

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