Go to the documentation of this file.
6 #ifndef ClpPrimalColumnSteepest_H
7 #define ClpPrimalColumnSteepest_H
125 inline int mode()
const
198 return ((
reference_[i >> 5] >> (i & 31)) & 1) != 0;
207 value &= ~(1 << bit);
This solves LPs using the simplex method.
virtual void saveWeights(ClpSimplex *model, int mode)
Save weights - this may initialize weights as well mode is - 1) before factorization 2) after factori...
CoinIndexedVector * alternateWeights() const
alternate weight array
int mode_
0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on f...
void checkAccuracy(int sequence, double relativeTolerance, CoinIndexedVector *rowArray1, CoinIndexedVector *rowArray2)
Checks accuracy - just for debug.
int partialPricing(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, int numberWanted, int numberLook)
Update djs doing partial pricing (dantzig)
int transposeTimes2(const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, CoinIndexedVector *spare, double scaleFactor)
Updates two arrays for steepest.
CoinIndexedVector * infeasible_
square of infeasibility array (just for infeasible columns)
double * savedWeights_
save weight array (so we can use checkpoint)
double * weights_
weight array
int numberSwitched_
Number of times switched from partial dantzig to 0/2.
virtual int pivotColumn(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Returns pivot column, -1 if none.
void redoInfeasibilities()
redo infeasibilities
ClpPrimalColumnSteepest(int mode=3)
Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 ...
void setPersistence(Persistence life)
Set/ get persistence.
void justDjs(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Just update djs.
void djsAndDevex2(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update djs, weights for Devex using pivot row.
void djsAndDevex(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update djs, weights for Devex using djs.
void initializeWeights()
Initialize weights.
virtual void switchOffSprint()
Switch off sprint idea.
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
int pivotColumnOldMethod(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
For quadratic or funny nonlinearities.
virtual bool looksOptimal() const
Returns true if would not find any column.
CoinIndexedVector * infeasible() const
square of infeasibility array (just for infeasible columns)
const double * weights() const
Weights.
Primal Column Pivot Abstract Base Class.
virtual ClpPrimalColumnPivot * clone(bool copyData=true) const
Clone.
Persistence persistence() const
ClpPrimalColumnSteepest & operator=(const ClpPrimalColumnSteepest &rhs)
Assignment operator.
ClpSimplex * model()
Returns model.
virtual void clearArrays()
Gets rid of all arrays.
CoinIndexedVector * alternateWeights_
alternate weight array (so we can unroll)
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
void djsAndSteepest2(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update djs, weights for Steepest using pivot row.
void justDevex(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update weights for Devex.
int infeasibilitiesState_
virtual void unrollWeights()
Gets rid of last update.
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 - also checks accuracy.
void setReference(int i, bool trueFalse)
void djsAndSteepest(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update djs, weights for Steepest using djs sets best sequence (possibly)
Persistence persistence_
Life of weights.
virtual ~ClpPrimalColumnSteepest()
Destructor.
bool reference(int i) const
reference would be faster using ClpSimplex's status_, but I prefer to keep modularity.
int state_
Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.
Primal Column Pivot Steepest Edge Algorithm Class.
Persistence
enums for persistence
unsigned int * reference_
void justSteepest(CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Update weights for Steepest.
void setMode(int mode)
Set mode.