Clp  1.17.8
List of all members
ClpPrimalColumnPivot Class Referenceabstract

Primal Column Pivot Abstract Base Class. More...

#include <ClpPrimalColumnPivot.hpp>

+ Inheritance diagram for ClpPrimalColumnPivot:
+ Collaboration diagram for ClpPrimalColumnPivot:

Public Member Functions

Algorithmic methods
virtual int pivotColumn (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
 Returns pivot column, -1 if none. More...
 
virtual void updateWeights (CoinIndexedVector *input)
 Updates weights - part 1 (may be empty) More...
 
virtual void saveWeights (ClpSimplex *model, int mode)=0
 Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (will save model) May also recompute infeasibility stuff 1) before factorization 2) after good factorization (if weights empty may initialize) 3) after something happened but no factorization (e.g. More...
 
virtual int pivotRow (double &way)
 Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (will be checked) way should be -1 to go to lower bound, +1 to upper bound. More...
 
virtual void clearArrays ()
 Gets rid of all arrays (may be empty) More...
 
virtual bool looksOptimal () const
 Returns true if would not find any column. More...
 
virtual void setLooksOptimal (bool flag)
 Sets optimality flag (for advanced use) More...
 
Constructors and destructors
 ClpPrimalColumnPivot ()
 Default Constructor. More...
 
 ClpPrimalColumnPivot (const ClpPrimalColumnPivot &)
 Copy constructor. More...
 
ClpPrimalColumnPivotoperator= (const ClpPrimalColumnPivot &rhs)
 Assignment operator. More...
 
virtual ~ClpPrimalColumnPivot ()
 Destructor. More...
 
virtual ClpPrimalColumnPivotclone (bool copyData=true) const =0
 Clone. More...
 
Other
ClpSimplexmodel ()
 Returns model. More...
 
void setModel (ClpSimplex *newmodel)
 Sets model. More...
 
int type ()
 Returns type (above 63 is extra information) More...
 
virtual int numberSprintColumns (int &numberIterations) const
 Returns number of extra columns for sprint algorithm - 0 means off. More...
 
virtual void switchOffSprint ()
 Switch off sprint idea. More...
 
virtual void maximumPivotsChanged ()
 Called when maximum pivots changes. More...
 

Protected Attributes

Protected member data
ClpSimplexmodel_
 Pointer to model. More...
 
int type_
 Type of column pivot algorithm. More...
 
bool looksOptimal_
 Says if looks optimal (normally computed) More...
 

Detailed Description

Primal Column Pivot Abstract Base Class.

Abstract Base Class for describing an interface to an algorithm to choose column pivot in primal simplex algorithm. For some algorithms e.g. Dantzig choice then some functions may be null. For Dantzig the only one of any importance is pivotColumn.

If you wish to inherit from this look at ClpPrimalColumnDantzig.cpp as that is simplest version.

Definition at line 25 of file ClpPrimalColumnPivot.hpp.

Constructor & Destructor Documentation

◆ ClpPrimalColumnPivot() [1/2]

ClpPrimalColumnPivot::ClpPrimalColumnPivot ( )

Default Constructor.

◆ ClpPrimalColumnPivot() [2/2]

ClpPrimalColumnPivot::ClpPrimalColumnPivot ( const ClpPrimalColumnPivot )

Copy constructor.

◆ ~ClpPrimalColumnPivot()

virtual ClpPrimalColumnPivot::~ClpPrimalColumnPivot ( )
virtual

Destructor.

Member Function Documentation

◆ pivotColumn()

virtual int ClpPrimalColumnPivot::pivotColumn ( CoinIndexedVector *  updates,
CoinIndexedVector *  spareRow1,
CoinIndexedVector *  spareRow2,
CoinIndexedVector *  spareColumn1,
CoinIndexedVector *  spareColumn2 
)
pure virtual

Returns pivot column, -1 if none.

Normally updates reduced costs using result of last iteration before selecting incoming column.

The Packed CoinIndexedVector updates has cost updates - for normal LP that is just +-weight where a feasibility changed. It also has reduced cost from last iteration in pivot row

Inside pivotColumn the pivotRow_ and reduced cost from last iteration are also used.

So in the simplest case i.e. feasible we compute the row of the tableau corresponding to last pivot and add a multiple of this to current reduced costs.

We can use other arrays to help updates

Implemented in ClpPEPrimalColumnSteepest, ClpPEPrimalColumnDantzig, ClpPrimalColumnSteepest, ClpPrimalColumnDantzig, and ClpPrimalQuadraticDantzig.

◆ updateWeights()

virtual void ClpPrimalColumnPivot::updateWeights ( CoinIndexedVector *  input)
virtual

Updates weights - part 1 (may be empty)

Reimplemented in ClpPrimalColumnSteepest, and ClpPEPrimalColumnSteepest.

◆ saveWeights()

virtual void ClpPrimalColumnPivot::saveWeights ( ClpSimplex model,
int  mode 
)
pure virtual

Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (will save model) May also recompute infeasibility stuff 1) before factorization 2) after good factorization (if weights empty may initialize) 3) after something happened but no factorization (e.g.

check for infeasible) 4) as 2 but restore weights from previous snapshot 5) forces some initialization e.g. weights Also sets model

Implemented in ClpPrimalColumnDantzig, ClpPrimalColumnSteepest, ClpPEPrimalColumnSteepest, ClpPEPrimalColumnDantzig, and ClpPrimalQuadraticDantzig.

◆ pivotRow()

virtual int ClpPrimalColumnPivot::pivotRow ( double &  way)
inlinevirtual

Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (will be checked) way should be -1 to go to lower bound, +1 to upper bound.

Definition at line 76 of file ClpPrimalColumnPivot.hpp.

◆ clearArrays()

virtual void ClpPrimalColumnPivot::clearArrays ( )
virtual

Gets rid of all arrays (may be empty)

Reimplemented in ClpPrimalColumnSteepest.

◆ looksOptimal()

virtual bool ClpPrimalColumnPivot::looksOptimal ( ) const
inlinevirtual

Returns true if would not find any column.

Reimplemented in ClpPrimalColumnSteepest.

Definition at line 84 of file ClpPrimalColumnPivot.hpp.

◆ setLooksOptimal()

virtual void ClpPrimalColumnPivot::setLooksOptimal ( bool  flag)
inlinevirtual

Sets optimality flag (for advanced use)

Definition at line 89 of file ClpPrimalColumnPivot.hpp.

◆ operator=()

ClpPrimalColumnPivot& ClpPrimalColumnPivot::operator= ( const ClpPrimalColumnPivot rhs)

Assignment operator.

◆ clone()

virtual ClpPrimalColumnPivot* ClpPrimalColumnPivot::clone ( bool  copyData = true) const
pure virtual

◆ model()

ClpSimplex* ClpPrimalColumnPivot::model ( )
inline

Returns model.

Definition at line 117 of file ClpPrimalColumnPivot.hpp.

◆ setModel()

void ClpPrimalColumnPivot::setModel ( ClpSimplex newmodel)
inline

Sets model.

Definition at line 122 of file ClpPrimalColumnPivot.hpp.

◆ type()

int ClpPrimalColumnPivot::type ( )
inline

Returns type (above 63 is extra information)

Definition at line 128 of file ClpPrimalColumnPivot.hpp.

◆ numberSprintColumns()

virtual int ClpPrimalColumnPivot::numberSprintColumns ( int &  numberIterations) const
virtual

Returns number of extra columns for sprint algorithm - 0 means off.

Also number of iterations before recompute

Reimplemented in ClpPrimalColumnSteepest.

◆ switchOffSprint()

virtual void ClpPrimalColumnPivot::switchOffSprint ( )
virtual

Switch off sprint idea.

Reimplemented in ClpPrimalColumnSteepest.

◆ maximumPivotsChanged()

virtual void ClpPrimalColumnPivot::maximumPivotsChanged ( )
inlinevirtual

Called when maximum pivots changes.

Reimplemented in ClpPrimalColumnSteepest.

Definition at line 140 of file ClpPrimalColumnPivot.hpp.

Member Data Documentation

◆ model_

ClpSimplex* ClpPrimalColumnPivot::model_
protected

Pointer to model.

Definition at line 150 of file ClpPrimalColumnPivot.hpp.

◆ type_

int ClpPrimalColumnPivot::type_
protected

Type of column pivot algorithm.

Definition at line 152 of file ClpPrimalColumnPivot.hpp.

◆ looksOptimal_

bool ClpPrimalColumnPivot::looksOptimal_
protected

Says if looks optimal (normally computed)

Definition at line 154 of file ClpPrimalColumnPivot.hpp.


The documentation for this class was generated from the following file: