Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ClpPrimalColumnPivot Class Reference

#include <ClpPrimalColumnPivot.hpp>

Inheritance diagram for ClpPrimalColumnPivot:

ClpPrimalColumnDantzig ClpPrimalQuadraticDantzig List of all members.

Public Member Functions

Algorithmic methods
virtual int pivotColumn (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
virtual void updateWeights (CoinIndexedVector *input)
 Updates weights - part 1 (may be empty).

virtual void saveWeights (ClpSimplex *model, int mode)=0
virtual int pivotRow (double &way)
virtual void clearArrays ()
 Gets rid of all arrays (may be empty).

virtual bool looksOptimal () const
 Returns true if would not find any column.

Constructors and destructors
 ClpPrimalColumnPivot ()
 Default Constructor.

 ClpPrimalColumnPivot (const ClpPrimalColumnPivot &)
 Copy constructor.

ClpPrimalColumnPivotoperator= (const ClpPrimalColumnPivot &rhs)
 Assignment operator.

virtual ~ClpPrimalColumnPivot ()
 Destructor.

virtual ClpPrimalColumnPivotclone (bool copyData=true) const=0
 Clone.

Other
ClpSimplexmodel ()
 Returns model.

int type ()
 Returns type (above 63 is extra information).

virtual int numberSprintColumns (int &numberIterations) const
virtual void switchOffSprint ()
 Switch off sprint idea.


Protected Attributes

Protected member data
ClpSimplexmodel_
 Pointer to model.

int type_
 Type of column pivot algorithm.


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 22 of file ClpPrimalColumnPivot.hpp.


Member Function Documentation

int ClpPrimalColumnPivot::numberSprintColumns int &  numberIterations  )  const [virtual]
 

Returns number of extra columns for sprint algorithm - 0 means off. Also number of iterations before recompute

Definition at line 74 of file ClpPrimalColumnPivot.cpp.

Referenced by ClpSimplexPrimal::primal().

00075 {
00076   return 0;
00077 }

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 ClpPrimalColumnDantzig, and ClpPrimalQuadraticDantzig.

Referenced by ClpSimplexPrimal::primalColumn(), and ClpSimplexPrimalQuadratic::primalQuadratic2().

virtual int ClpPrimalColumnPivot::pivotRow double &  way  )  [inline, virtual]
 

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 73 of file ClpPrimalColumnPivot.hpp.

00074   {way=0;return -2;};

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, and ClpPrimalQuadraticDantzig.

Definition at line 54 of file ClpPrimalColumnPivot.cpp.

References model_.

Referenced by ClpSimplex::ClpSimplex(), ClpSimplex::originalModel(), ClpSimplexPrimalQuadratic::statusOfProblemInPrimal(), ClpSimplexPrimal::statusOfProblemInPrimal(), and ClpSimplexPrimal::whileIterating().

00055 {
00056   model_=model;
00057 }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:37:42 2003 for CLP by doxygen 1.3.5