Clp
1.17.3
|
Primal Column Pivot Steepest Edge Algorithm Class. More...
#include <ClpPEPrimalColumnSteepest.hpp>
Public Member Functions | |
virtual void | saveWeights (ClpSimplex *model, int mode) |
Save weights - this may initialize weights as well This is as parent but may initialize ClpPESimplex. More... | |
virtual void | updateWeights (CoinIndexedVector *input) |
Updates weights - as ordinary but checks for zero moves. More... | |
double | psi () const |
Constructors and destructors | |
ClpPEPrimalColumnSteepest (double psi=0.5, int mode=3) | |
Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2. More... | |
ClpPEPrimalColumnSteepest (const ClpPEPrimalColumnSteepest &rhs) | |
Copy constructor. More... | |
ClpPEPrimalColumnSteepest & | operator= (const ClpPEPrimalColumnSteepest &rhs) |
Assignment operator. More... | |
virtual | ~ClpPEPrimalColumnSteepest () |
Destructor. More... | |
virtual ClpPrimalColumnPivot * | clone (bool copyData=true) const |
Clone. More... | |
Algorithmic methods | |
virtual int | pivotColumn (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Returns pivot column, -1 if none. More... | |
![]() | |
int | pivotColumnOldMethod (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
For quadratic or funny nonlinearities. More... | |
void | justDjs (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Just update djs. More... | |
int | partialPricing (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, int numberWanted, int numberLook) |
Update djs doing partial pricing (dantzig) More... | |
void | djsAndDevex (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update djs, weights for Devex using djs. More... | |
void | djsAndSteepest (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update djs, weights for Steepest using djs sets best sequence (possibly) More... | |
void | djsAndDevex2 (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update djs, weights for Devex using pivot row. More... | |
void | djsAndSteepest2 (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update djs, weights for Steepest using pivot row. More... | |
void | justDevex (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update weights for Devex. More... | |
void | justSteepest (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2) |
Update weights for Steepest. More... | |
int | transposeTimes2 (const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, CoinIndexedVector *spare, double scaleFactor) |
Updates two arrays for steepest. More... | |
void | checkAccuracy (int sequence, double relativeTolerance, CoinIndexedVector *rowArray1, CoinIndexedVector *rowArray2) |
Checks accuracy - just for debug. More... | |
void | initializeWeights () |
Initialize weights. More... | |
void | redoInfeasibilities () |
redo infeasibilities More... | |
virtual void | unrollWeights () |
Gets rid of last update. More... | |
virtual void | clearArrays () |
Gets rid of all arrays. More... | |
virtual bool | looksOptimal () const |
Returns true if would not find any column. More... | |
virtual void | maximumPivotsChanged () |
Called when maximum pivots changes. More... | |
int | mode () const |
Mode. More... | |
void | setMode (int mode) |
Set mode. More... | |
CoinIndexedVector * | infeasible () const |
square of infeasibility array (just for infeasible columns) More... | |
const double * | weights () const |
Weights. More... | |
CoinIndexedVector * | alternateWeights () const |
alternate weight array 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... | |
ClpPrimalColumnSteepest (int mode=3) | |
Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2. More... | |
ClpPrimalColumnSteepest (const ClpPrimalColumnSteepest &rhs) | |
Copy constructor. More... | |
ClpPrimalColumnSteepest & | operator= (const ClpPrimalColumnSteepest &rhs) |
Assignment operator. More... | |
virtual | ~ClpPrimalColumnSteepest () |
Destructor. More... | |
bool | reference (int i) const |
reference would be faster using ClpSimplex's status_, but I prefer to keep modularity. More... | |
void | setReference (int i, bool trueFalse) |
void | setPersistence (Persistence life) |
Set/ get persistence. More... | |
Persistence | persistence () const |
![]() | |
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 | setLooksOptimal (bool flag) |
Sets optimality flag (for advanced use) More... | |
ClpPrimalColumnPivot () | |
Default Constructor. More... | |
ClpPrimalColumnPivot (const ClpPrimalColumnPivot &) | |
Copy constructor. More... | |
ClpPrimalColumnPivot & | operator= (const ClpPrimalColumnPivot &rhs) |
Assignment operator. More... | |
virtual | ~ClpPrimalColumnPivot () |
Destructor. More... | |
ClpSimplex * | model () |
Returns model. More... | |
void | setModel (ClpSimplex *newmodel) |
Sets model. More... | |
int | type () |
Returns type (above 63 is extra information) More... | |
Additional Inherited Members | |
![]() | |
enum | Persistence { normal = 0x00, keep = 0x01 } |
enums for persistence More... | |
![]() | |
double | devex_ |
double * | weights_ |
weight array More... | |
CoinIndexedVector * | infeasible_ |
square of infeasibility array (just for infeasible columns) More... | |
CoinIndexedVector * | alternateWeights_ |
alternate weight array (so we can unroll) More... | |
double * | savedWeights_ |
save weight array (so we can use checkpoint) More... | |
unsigned int * | reference_ |
int | state_ |
Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number. More... | |
int | mode_ |
0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2. More... | |
int | infeasibilitiesState_ |
Persistence | persistence_ |
Life of weights. More... | |
int | numberSwitched_ |
Number of times switched from partial dantzig to 0/2. More... | |
int | pivotSequence_ |
int | savedPivotSequence_ |
int | savedSequenceOut_ |
int | lastRectified_ |
int | sizeFactorization_ |
![]() | |
ClpSimplex * | model_ |
Pointer to model. More... | |
int | type_ |
Type of column pivot algorithm. More... | |
bool | looksOptimal_ |
Says if looks optimal (normally computed) More... | |
Primal Column Pivot Steepest Edge Algorithm Class.
See Forrest-Goldfarb paper for algorithm
Definition at line 29 of file ClpPEPrimalColumnSteepest.hpp.
ClpPEPrimalColumnSteepest::ClpPEPrimalColumnSteepest | ( | double | psi = 0.5 , |
int | mode = 3 |
||
) |
Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2.
By partial exact devex is meant that the weights are updated as normal but only part of the nonbasic variables are scanned. This can be faster on very easy problems.
ClpPEPrimalColumnSteepest::ClpPEPrimalColumnSteepest | ( | const ClpPEPrimalColumnSteepest & | rhs | ) |
Copy constructor.
|
virtual |
Destructor.
ClpPEPrimalColumnSteepest& ClpPEPrimalColumnSteepest::operator= | ( | const ClpPEPrimalColumnSteepest & | rhs | ) |
Assignment operator.
|
virtual |
Clone.
Reimplemented from ClpPrimalColumnSteepest.
|
virtual |
Returns pivot column, -1 if none.
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 Parts of operation split out into separate functions for profiling and speed
Reimplemented from ClpPrimalColumnSteepest.
|
virtual |
Save weights - this may initialize weights as well This is as parent but may initialize ClpPESimplex.
Reimplemented from ClpPrimalColumnSteepest.
|
virtual |
Updates weights - as ordinary but checks for zero moves.
Reimplemented from ClpPrimalColumnSteepest.
|
inline |
Definition at line 81 of file ClpPEPrimalColumnSteepest.hpp.