6 #ifndef AbcSimplexFactorization_H
7 #define AbcSimplexFactorization_H
17 #ifndef ABC_USE_COIN_FACTORIZATION
43 #ifdef EARLY_FACTORIZE
77 #ifdef ABC_LONG_FACTORIZATION
88 #ifdef ABC_LONG_FACTORIZATION
95 #ifdef MOVE_REPLACE_PART1A
112 #ifdef ABC_LONG_FACTORIZATION
117 #ifdef ABC_LONG_FACTORIZATION
118 inline void clearHiddenArrays()
128 #ifdef ABC_LONG_FACTORIZATION
139 #ifdef ABC_LONG_FACTORIZATION
143 #ifdef EARLY_FACTORIZE
144 inline int replaceColumns (
const AbcSimplex * model,
147 int firstPivot,
int lastPivot,
bool cleanUp)
210 #ifndef ABC_USE_COIN_FACTORIZATION
217 #ifndef ABC_USE_COIN_FACTORIZATION
230 #ifndef ABC_USE_COIN_FACTORIZATION
291 inline void setParallelMode(
int value)
300 #if CLP_FACTORIZATION_NEW_TIMING>1
301 void statsRefactor(
char when)
const;
384 #ifndef ABC_USE_COIN_FACTORIZATION
395 #ifndef ABC_USE_COIN_FACTORIZATION
412 #ifndef ABC_USE_COIN_FACTORIZATION
417 #ifdef CLP_FACTORIZATION_NEW_TIMING
418 mutable double shortestAverage_;
420 mutable double totalInR_;
421 mutable double totalInIncreasingU_;
422 mutable int endLengthU_;
423 mutable int lastNumberPivots_;
424 mutable int effectiveStartNumberU_;
void goDenseOrSmall(int numberRows)
Go over to dense code.
void updateColumnFTPart2(CoinIndexedVector ®ionSparseFT)
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room...
int factorize(AbcSimplex *model, int solveType, bool valuesPass)
When part of LP - given by basic variables.
void updateColumnTransposeCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (BTRAN)
void areaFactor(double value)
Set whether larger areas needed.
void zeroTolerance(double value)
Set zero tolerance.
int maximumPivots() const
Maximum number of pivots between factorizations.
double pivotTolerance() const
Pivot tolerance.
void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha)
Replaces one Column to basis, partial update already in U.
double zeroTolerance() const
Zero tolerance.
Abstract base class which also has some scalars so can be used from Dense or Simp.
CoinSimplexInt numberDense() const
Number of dense rows after factorization.
virtual void updateColumnCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (FTRAN)
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
int status() const
Returns status.
CoinAbcAnyFactorization * coinAbcFactorization_
Pointer to factorization.
virtual void clearArrays()
Get rid of all memory.
int goSmallThreshold_
Switch to small if number rows <= this.
int updateColumn(CoinIndexedVector ®ionSparse) const
Updates one column (FTRAN)
double minimumPivotTolerance() const
Minimum pivot tolerance.
int numberRows() const
Number of Rows after factorization.
virtual CoinFactorizationDouble * pivotRegion() const
Returns status.
CoinAbcAnyFactorization * factorization() const
Pointer to factorization.
double zeroTolerance() const
Zero tolerance.
double checkReplacePart1(CoinIndexedVector *regionSparse, CoinIndexedVector *partialUpdate, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
void setDenseThreshold(int number)
So we can temporarily switch off dense.
int maximumPivots() const
Maximum number of pivots between factorizations.
int goSmallThreshold() const
Get switch to small if number rows <= this.
int pivots() const
Returns number of pivots since factorization.
virtual int checkReplacePart2(int pivotRow, double btranAlpha, double ftranAlpha, double ftAlpha, double acceptablePivot=1.0e-8)=0
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots.
bool usingFT() const
Returns true if doing FT.
void setFactorization(AbcSimplexFactorization &rhs)
Sets factorization.
virtual double checkReplacePart1b(CoinIndexedVector *, int)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
void maximumPivots(int value)
Set maximum number of pivots between factorizations.
int getDenseThreshold() const
Total number of elements in factorization.
bool timeToRefactorize() const
Total number of elements in factorization.
virtual void updateWeights(CoinIndexedVector ®ionSparse) const =0
Updates one column for dual steepest edge weights (FTRAN)
int goDenseThreshold_
Switch to dense if number rows <= this.
int goDenseThreshold() const
Get switch to dense if number rows <= this.
void setModel(AbcSimplex *model)
Sets model.
void updateFullColumn(CoinIndexedVector ®ionSparse) const
Updates one full column (FTRAN)
void setStatus(int value)
Sets status.
virtual void checkMarkArrays() const
Returns status.
double * pivotRegion() const
pivot region
virtual int updateColumnFT(CoinIndexedVector ®ionSparse)=0
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negati...
virtual int updateColumnFTPart1(CoinIndexedVector ®ionSparse)=0
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negati...
void pivotTolerance(double value)
Set pivot tolerance.
virtual int updateColumn(CoinIndexedVector ®ionSparse) const =0
This version has same effect as above with FTUpdate==false so number returned is always >=0...
void setPivots(int value) const
Sets number of pivots since factorization.
virtual void updateFullColumnTranspose(CoinIndexedVector ®ionSparse) const =0
Updates one column (BTRAN) from unpacked regionSparse.
int updateColumnFTPart1(CoinIndexedVector ®ionSparseFT)
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room...
void saferTolerances(double zeroTolerance, double pivotTolerance)
Set tolerances to safer of existing and given.
AbcSimplex * model_
Pointer to model.
virtual void checkReplacePart1a(CoinIndexedVector *, int)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
int updateTwoColumnsFT(CoinIndexedVector ®ionSparseFT, CoinIndexedVector ®ionSparseOther)
Updates one column (FTRAN) from regionFT Tries to do FT update number returned is negative if no room...
int status() const
Returns status.
void synchronize(const ClpFactorization *otherFactorization, const AbcSimplex *model)
Synchronize stuff.
void setGoLongThreshold(int value)
Set switch to long/ordered if number rows >= this.
void forceOtherFactorization(int which)
If nonzero force use of 1,dense 2,small 3,long.
double pivotTolerance() const
Pivot tolerance.
~AbcSimplexFactorization()
Destructor.
void clearArrays()
Get rid of all memory.
virtual int updateColumnTranspose(CoinIndexedVector ®ionSparse) const =0
Updates one column (BTRAN) from unpacked regionSparse.
void setGoDenseThreshold(int value)
Set switch to dense if number rows <= this.
int updateColumnFT(CoinIndexedVector ®ionSparseFT)
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room...
virtual int numberElements() const =0
Total number of elements in factorization.
int pivots() const
Returns number of pivots since factorization.
int numberSlacks_
Number of slacks at last factorization.
int forceB_
If nonzero force use of 1,dense 2,small 3,long.
int numberRows() const
Number of Rows after factorization.
bool needToReorder() const
Says whether to redo pivot order.
virtual int updateTwoColumnsFT(CoinIndexedVector ®ionFT, CoinIndexedVector ®ionOther)=0
does FTRAN on two unpacked columns
void checkMarkArrays() const
makes a row copy of L for speed and to allow very sparse problems
void updateFullColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one full column (BTRAN)
int typeOfFactorization() const
Returns type.
This just implements AbcFactorization when an AbcMatrix object is passed.
void almostDestructor()
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
void setStatus(int value)
Sets status.
void minimumPivotTolerance(double value)
Set minimum pivot tolerance.
void updateColumnCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (FTRAN)
int goLongThreshold() const
Get switch to long/ordered if number rows >= this.
void updateColumnFT(CoinIndexedVector ®ionSparseFT, CoinIndexedVector &partialUpdate, int which)
Updates one column (FTRAN) Tries to do FT update puts partial update in vector.
void updateWeights(CoinIndexedVector ®ionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
virtual double checkReplacePart1(CoinIndexedVector *, int)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
void setGoSmallThreshold(int value)
Set switch to small if number rows <= this.
double areaFactor() const
Whether larger areas needed.
This deals with Factorization and Updates.
int checkReplacePart2(int pivotRow, double btranAlpha, double ftranAlpha, double ftAlpha)
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots.
AbcSimplexFactorization(int numberRows=0)
Default constructor.
double areaFactor() const
Area factor.
virtual void updateColumnTransposeCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (BTRAN)
int goLongThreshold_
Switch to long/ordered if number rows >= this.
AbcSimplexFactorization & operator=(const AbcSimplexFactorization &)
The copy constructor.
int numberElements() const
Total number of elements in factorization.
virtual void updateFullColumn(CoinIndexedVector ®ionSparse) const =0
This version does FTRAN on array when indices not set up.
int updateColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one column (BTRAN)
int numberDense() const
Returns number of dense rows.
virtual void updateColumnFTPart2(CoinIndexedVector ®ionSparse)=0
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negati...
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
This just implements CoinFactorization when an ClpMatrixBase object is passed.
double minimumPivotTolerance() const
Minimum pivot tolerance.
int numberSlacks() const
Number of slacks at last factorization.
void setPivots(int value)
Sets number of pivots since factorization.
double checkReplacePart1(CoinIndexedVector *regionSparse, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...