Weighted start basis. More...
#include <spxweightst.h>
Public Member Functions | |
Construction / destruction | |
SPxWeightST () | |
default constructor. More... | |
SPxWeightST (const SPxWeightST &old) | |
copy constructor More... | |
SPxWeightST & | operator= (const SPxWeightST &rhs) |
assignment operator More... | |
virtual | ~SPxWeightST () |
destructor. More... | |
virtual SPxStarter< R > * | clone () const |
clone function for polymorphism More... | |
Generation of a start basis | |
void | generate (SPxSolverBase< R > &base) |
generates start basis for loaded basis. More... | |
Debugging | |
virtual bool | isConsistent () const |
consistency check. More... | |
Public Member Functions inherited from SPxStarter< R > | |
virtual void | setTolerances (const std::shared_ptr< Tolerances > &tolerances) |
set the tolerances to be used by the starter More... | |
virtual const std::shared_ptr< Tolerances > & | tolerances () const |
get the toelrances used by the starter More... | |
virtual const char * | getName () const |
get name of starter. More... | |
SPxStarter (const char *name) | |
constructor More... | |
SPxStarter (const SPxStarter &old) | |
copy constructor More... | |
SPxStarter & | operator= (const SPxStarter &rhs) |
assignment operator More... | |
virtual | ~SPxStarter () |
destructor. More... | |
Protected Member Functions | |
Protected helpers | |
virtual void | setupWeights (SPxSolverBase< R > &base) |
sets up variable weights. More... | |
Protected Attributes | |
Protected data | |
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... | |
std::shared_ptr< Tolerances > | _tolerances |
tolerances for the starter More... | |
Private Member Functions | |
Private helpers | |
void | setPrimalStatus (typename SPxBasisBase< R >::Desc &, const SPxSolverBase< R > &, const SPxId &) |
Private Attributes | |
Private data | |
DataArray< int > | forbidden |
Array< R > * | weight |
Array< R > * | coWeight |
Weighted start basis.
Class SPxWeightST is an implementation of a SPxStarter for generating a Simplex starting basis. Using method setupWeights() it sets up arrays weight and coWeight, or equivalently rowWeight and colWeight. (rowWeight and colWeight are just pointers initialized to weight and coWeight according to the representation of SoPlex base
passed to method generate().)
The weight values are then used to setup a starting basis for the LP: vectors with low values are likely to become dual (i.e. basic for a column basis) and such with high values are likely to become primal (i.e. nonbasic for a column basis).
However, if a variable having an upper and lower bound is to become primal, there is still a choice for setting it either to its upper or lower bound. Members rowRight and colUp are used to determine where to set a primal variable. If rowRight[i] is set to a nonzero value, the right-hand side inequality is set tightly for the i
'th to become primal. Analogously, If colUp[j] is nonzero, the j
'th variable will be set to its upper bound if it becomes primal.
Definition at line 66 of file spxweightst.h.
SPxWeightST | ( | ) |
default constructor.
Definition at line 120 of file spxweightst.h.
References SPxWeightST< R >::coWeight, SPxWeightST< R >::isConsistent(), and SPxWeightST< R >::weight.
Referenced by SPxWeightST< R >::clone().
SPxWeightST | ( | const SPxWeightST< R > & | old | ) |
copy constructor
Definition at line 128 of file spxweightst.h.
References SPxWeightST< R >::colWeight, SPxWeightST< R >::coWeight, SPxWeightST< R >::isConsistent(), SPxWeightST< R >::rowWeight, and SPxWeightST< R >::weight.
|
virtual |
destructor.
Definition at line 185 of file spxweightst.h.
References SPxWeightST< R >::coWeight, and SPxWeightST< R >::weight.
|
virtual |
clone function for polymorphism
Implements SPxStarter< R >.
Reimplemented in SPxSumST< R >, and SPxVectorST< R >.
Definition at line 191 of file spxweightst.h.
References SPxWeightST< R >::SPxWeightST().
|
virtual |
generates start basis for loaded basis.
Implements SPxStarter< R >.
|
virtual |
consistency check.
Reimplemented from SPxStarter< R >.
Referenced by SPxSumST< R >::operator=(), SPxVectorST< R >::operator=(), SPxWeightST< R >::operator=(), SPxSumST< R >::SPxSumST(), SPxVectorST< R >::SPxVectorST(), and SPxWeightST< R >::SPxWeightST().
SPxWeightST & operator= | ( | const SPxWeightST< R > & | rhs | ) |
assignment operator
Definition at line 155 of file spxweightst.h.
References SPxWeightST< R >::colUp, SPxWeightST< R >::colWeight, SPxWeightST< R >::coWeight, SPxWeightST< R >::forbidden, SPxWeightST< R >::isConsistent(), SPxStarter< R >::operator=(), SPxWeightST< R >::rowRight, SPxWeightST< R >::rowWeight, and SPxWeightST< R >::weight.
Referenced by SPxVectorST< R >::operator=().
|
private |
|
protectedvirtual |
sets up variable weights.
This method is called in order to setup the weights for all variables. It has been declared virtual
in order to allow for derived classes to compute other weight values.
Reimplemented in SPxSumST< R >, and SPxVectorST< R >.
|
protected |
set primal variable to upper bound.
Definition at line 100 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=().
|
protected |
weight value for LP columns.
Definition at line 96 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=(), and SPxWeightST< R >::SPxWeightST().
|
private |
Definition at line 78 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=(), SPxWeightST< R >::SPxWeightST(), and SPxWeightST< R >::~SPxWeightST().
|
private |
Definition at line 74 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=().
|
protected |
set variable to rhs?.
Definition at line 98 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=().
|
protected |
weight value for LP rows.
Definition at line 94 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=(), and SPxWeightST< R >::SPxWeightST().
|
private |
Definition at line 76 of file spxweightst.h.
Referenced by SPxWeightST< R >::operator=(), SPxWeightST< R >::SPxWeightST(), and SPxWeightST< R >::~SPxWeightST().