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