Scippy

SoPlex

Sequential object-oriented simPlex

SPxVectorST Class 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 SPxStarterclone () const
 clone function for polymorphism More...
 
Modification
void primal (const Vector &v)
 sets up primal solution vector. More...
 
void dual (const Vector &v)
 sets up primal solution vector. More...
 
- Public Member Functions inherited from SPxWeightST
 SPxWeightST ()
 default constructor. More...
 
 SPxWeightST (const SPxWeightST &old)
 copy constructor More...
 
SPxWeightSToperator= (const SPxWeightST &rhs)
 assignment operator More...
 
virtual ~SPxWeightST ()
 destructor. More...
 
void generate (SPxSolver &base)
 generates start basis for loaded basis. More...
 
virtual bool isConsistent () const
 consistency check. More...
 
- Public Member Functions inherited from SPxStarter
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 (SPxSolver &base)
 sets up variable weights. More...
 
Protected helpers

Private Attributes

Data
DVector 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
DataArray< RealrowWeight
 weight value for LP rows. More...
 
DataArray< RealcolWeight
 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
const char * m_name
 name of the starter More...
 

Detailed Description

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 44 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 52 of file spxvectorst.h.

Constructor & Destructor Documentation

◆ SPxVectorST() [1/2]

default constructor.

Definition at line 77 of file spxvectorst.h.

References SPxStarter::m_name.

Referenced by SPxVectorST::clone().

◆ SPxVectorST() [2/2]

SPxVectorST ( const SPxVectorST old)

copy constructor

Definition at line 83 of file spxvectorst.h.

References SPxWeightST::isConsistent().

◆ ~SPxVectorST()

virtual ~SPxVectorST ( )
virtual

destructor.

Definition at line 105 of file spxvectorst.h.

Member Function Documentation

◆ clone()

virtual SPxStarter* clone ( ) const
virtual

clone function for polymorphism

Reimplemented from SPxWeightST.

Reimplemented in SPxSumST.

Definition at line 108 of file spxvectorst.h.

References SPxVectorST::SPxVectorST().

◆ dual()

void dual ( const Vector v)

sets up primal solution vector.

Definition at line 124 of file spxvectorst.h.

References SPxVectorST::DVEC.

◆ operator=()

SPxVectorST& operator= ( const SPxVectorST rhs)

assignment operator

Definition at line 91 of file spxvectorst.h.

References SPxWeightST::isConsistent(), SPxWeightST::operator=(), SPxVectorST::state, and SPxVectorST::vec.

Referenced by SPxSumST::operator=().

◆ primal()

void primal ( const Vector v)

sets up primal solution vector.

Definition at line 118 of file spxvectorst.h.

References SPxVectorST::PVEC.

Referenced by SPxSumST::setupWeights().

◆ setupWeights()

Member Data Documentation

◆ state

enum { ... } state

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

Referenced by SPxVectorST::operator=(), and SPxVectorST::setupWeights().

◆ vec

DVector vec
private

the current (approximate) primal or dual vector

Definition at line 59 of file spxvectorst.h.

Referenced by SPxVectorST::operator=(), and SPxVectorST::setupWeights().