This just implements AbcFactorization when an AbcMatrix object is passed. More...
#include <AbcSimplexFactorization.hpp>
Public Member Functions | |
factorization | |
int | factorize (AbcSimplex *model, int solveType, bool valuesPass) |
When part of LP - given by basic variables. More... | |
Constructors, destructor | |
AbcSimplexFactorization (int numberRows=0) | |
Default constructor. More... | |
~AbcSimplexFactorization () | |
Destructor. More... | |
Copy method | |
AbcSimplexFactorization (const AbcSimplexFactorization &, int denseIfSmaller=0) | |
The copy constructor. More... | |
AbcSimplexFactorization & | operator= (const AbcSimplexFactorization &) |
The copy constructor. More... | |
void | setFactorization (AbcSimplexFactorization &rhs) |
Sets factorization. More... | |
rank one updates which do exist | |
double | checkReplacePart1 (CoinIndexedVector *regionSparse, int pivotRow) |
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial update already in U. More... | |
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 update in vector. More... | |
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. More... | |
void | replaceColumnPart3 (const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha) |
Replaces one Column to basis, partial update already in U. More... | |
void | replaceColumnPart3 (const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, CoinIndexedVector *partialUpdate, int pivotRow, double alpha) |
Replaces one Column to basis, partial update in vector. More... | |
various uses of factorization (return code number elements) | |
which user may want to know about | |
int | updateColumnFT (CoinIndexedVector ®ionSparseFT) |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room. More... | |
int | updateColumnFTPart1 (CoinIndexedVector ®ionSparseFT) |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room. More... | |
void | updateColumnFTPart2 (CoinIndexedVector ®ionSparseFT) |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room. More... | |
void | updateColumnFT (CoinIndexedVector ®ionSparseFT, CoinIndexedVector &partialUpdate, int which) |
Updates one column (FTRAN) Tries to do FT update puts partial update in vector. More... | |
int | updateColumn (CoinIndexedVector ®ionSparse) const |
Updates one column (FTRAN) More... | |
int | updateTwoColumnsFT (CoinIndexedVector ®ionSparseFT, CoinIndexedVector ®ionSparseOther) |
Updates one column (FTRAN) from regionFT Tries to do FT update number returned is negative if no room. More... | |
int | updateColumnTranspose (CoinIndexedVector ®ionSparse) const |
Updates one column (BTRAN) More... | |
void | updateColumnCpu (CoinIndexedVector ®ionSparse, int whichCpu) const |
Updates one column (FTRAN) More... | |
void | updateColumnTransposeCpu (CoinIndexedVector ®ionSparse, int whichCpu) const |
Updates one column (BTRAN) More... | |
void | updateFullColumn (CoinIndexedVector ®ionSparse) const |
Updates one full column (FTRAN) More... | |
void | updateFullColumnTranspose (CoinIndexedVector ®ionSparse) const |
Updates one full column (BTRAN) More... | |
void | updateWeights (CoinIndexedVector ®ionSparse) const |
Updates one column for dual steepest edge weights (FTRAN) More... | |
Lifted from CoinFactorization | |
int | numberElements () const |
Total number of elements in factorization. More... | |
int | maximumPivots () const |
Maximum number of pivots between factorizations. More... | |
void | maximumPivots (int value) |
Set maximum number of pivots between factorizations. More... | |
bool | usingFT () const |
Returns true if doing FT. More... | |
int | pivots () const |
Returns number of pivots since factorization. More... | |
void | setModel (AbcSimplex *model) |
Sets model. More... | |
void | setPivots (int value) const |
Sets number of pivots since factorization. More... | |
double | areaFactor () const |
Whether larger areas needed. More... | |
void | areaFactor (double value) |
Set whether larger areas needed. More... | |
double | zeroTolerance () const |
Zero tolerance. More... | |
void | zeroTolerance (double value) |
Set zero tolerance. More... | |
void | saferTolerances (double zeroTolerance, double pivotTolerance) |
Set tolerances to safer of existing and given. More... | |
int | status () const |
Returns status. More... | |
void | setStatus (int value) |
Sets status. More... | |
int | numberDense () const |
Returns number of dense rows. More... | |
bool | timeToRefactorize () const |
Total number of elements in factorization. More... | |
void | clearArrays () |
Get rid of all memory. More... | |
int | numberRows () const |
Number of Rows after factorization. More... | |
int | numberSlacks () const |
Number of slacks at last factorization. More... | |
double | pivotTolerance () const |
Pivot tolerance. More... | |
void | pivotTolerance (double value) |
Set pivot tolerance. More... | |
double | minimumPivotTolerance () const |
Minimum pivot tolerance. More... | |
void | minimumPivotTolerance (double value) |
Set minimum pivot tolerance. More... | |
double * | pivotRegion () const |
pivot region More... | |
void | almostDestructor () |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed. More... | |
void | setDenseThreshold (int number) |
So we can temporarily switch off dense. More... | |
int | getDenseThreshold () const |
Total number of elements in factorization. More... | |
void | forceOtherFactorization (int which) |
If nonzero force use of 1,dense 2,small 3,long. More... | |
void | goDenseOrSmall (int numberRows) |
Go over to dense code. More... | |
int | goDenseThreshold () const |
Get switch to dense if number rows <= this. More... | |
void | setGoDenseThreshold (int value) |
Set switch to dense if number rows <= this. More... | |
int | goSmallThreshold () const |
Get switch to small if number rows <= this. More... | |
void | setGoSmallThreshold (int value) |
Set switch to small if number rows <= this. More... | |
int | goLongThreshold () const |
Get switch to long/ordered if number rows >= this. More... | |
void | setGoLongThreshold (int value) |
Set switch to long/ordered if number rows >= this. More... | |
int | typeOfFactorization () const |
Returns type. More... | |
void | synchronize (const ClpFactorization *otherFactorization, const AbcSimplex *model) |
Synchronize stuff. More... | |
other stuff | |
void | goSparse () |
makes a row copy of L for speed and to allow very sparse problems More... | |
void | checkMarkArrays () const |
makes a row copy of L for speed and to allow very sparse problems More... | |
bool | needToReorder () const |
Says whether to redo pivot order. More... | |
CoinAbcAnyFactorization * | factorization () const |
Pointer to factorization. More... | |
Private Attributes | |
data | |
AbcSimplex * | model_ |
Pointer to model. More... | |
CoinAbcAnyFactorization * | coinAbcFactorization_ |
Pointer to factorization. More... | |
int | forceB_ |
If nonzero force use of 1,dense 2,small 3,long. More... | |
int | goDenseThreshold_ |
Switch to dense if number rows <= this. More... | |
int | goSmallThreshold_ |
Switch to small if number rows <= this. More... | |
int | goLongThreshold_ |
Switch to long/ordered if number rows >= this. More... | |
int | numberSlacks_ |
Number of slacks at last factorization. More... | |
This just implements AbcFactorization when an AbcMatrix object is passed.
Definition at line 27 of file AbcSimplexFactorization.hpp.
AbcSimplexFactorization::AbcSimplexFactorization | ( | int | numberRows = 0 | ) |
Default constructor.
AbcSimplexFactorization::~AbcSimplexFactorization | ( | ) |
Destructor.
AbcSimplexFactorization::AbcSimplexFactorization | ( | const AbcSimplexFactorization & | , |
int | denseIfSmaller = 0 |
||
) |
The copy constructor.
int AbcSimplexFactorization::factorize | ( | AbcSimplex * | model, |
int | solveType, | ||
bool | valuesPass | ||
) |
When part of LP - given by basic variables.
Actually does factorization. Arrays passed in have non negative value to say basic. If status is okay, basic variables have pivot row - this is only needed if increasingRows_ >1. Allows scaling If status is singular, then basic variables have pivot row and ones thrown out have -1 returns 0 -okay, -1 singular, -2 too many in basis, -99 memory
AbcSimplexFactorization& AbcSimplexFactorization::operator= | ( | const AbcSimplexFactorization & | ) |
The copy constructor.
void AbcSimplexFactorization::setFactorization | ( | AbcSimplexFactorization & | rhs | ) |
Sets factorization.
|
inline |
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial update already in U.
Definition at line 80 of file AbcSimplexFactorization.hpp.
|
inline |
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial update in vector.
Definition at line 91 of file AbcSimplexFactorization.hpp.
|
inline |
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots.
Definition at line 109 of file AbcSimplexFactorization.hpp.
void AbcSimplexFactorization::replaceColumnPart3 | ( | const AbcSimplex * | model, |
CoinIndexedVector * | regionSparse, | ||
CoinIndexedVector * | tableauColumn, | ||
int | pivotRow, | ||
double | alpha | ||
) |
Replaces one Column to basis, partial update already in U.
void AbcSimplexFactorization::replaceColumnPart3 | ( | const AbcSimplex * | model, |
CoinIndexedVector * | regionSparse, | ||
CoinIndexedVector * | tableauColumn, | ||
CoinIndexedVector * | partialUpdate, | ||
int | pivotRow, | ||
double | alpha | ||
) |
Replaces one Column to basis, partial update in vector.
|
inline |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room.
Definition at line 182 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room.
Definition at line 184 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN) Tries to do FT update number returned is negative if no room.
Definition at line 186 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN) Tries to do FT update puts partial update in vector.
Definition at line 191 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN)
Definition at line 196 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN) from regionFT Tries to do FT update number returned is negative if no room.
Also updates regionOther
Definition at line 202 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (BTRAN)
Definition at line 206 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (FTRAN)
Definition at line 209 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column (BTRAN)
Definition at line 216 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one full column (FTRAN)
Definition at line 223 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one full column (BTRAN)
Definition at line 226 of file AbcSimplexFactorization.hpp.
|
inline |
Updates one column for dual steepest edge weights (FTRAN)
Definition at line 229 of file AbcSimplexFactorization.hpp.
|
inline |
Total number of elements in factorization.
Definition at line 239 of file AbcSimplexFactorization.hpp.
|
inline |
Maximum number of pivots between factorizations.
Definition at line 243 of file AbcSimplexFactorization.hpp.
|
inline |
Set maximum number of pivots between factorizations.
Definition at line 247 of file AbcSimplexFactorization.hpp.
|
inline |
Returns true if doing FT.
Definition at line 251 of file AbcSimplexFactorization.hpp.
|
inline |
Returns number of pivots since factorization.
Definition at line 254 of file AbcSimplexFactorization.hpp.
|
inline |
Sets model.
Definition at line 258 of file AbcSimplexFactorization.hpp.
|
inline |
Sets number of pivots since factorization.
Definition at line 261 of file AbcSimplexFactorization.hpp.
|
inline |
Whether larger areas needed.
Definition at line 265 of file AbcSimplexFactorization.hpp.
|
inline |
Set whether larger areas needed.
Definition at line 269 of file AbcSimplexFactorization.hpp.
|
inline |
Zero tolerance.
Definition at line 273 of file AbcSimplexFactorization.hpp.
|
inline |
Set zero tolerance.
Definition at line 277 of file AbcSimplexFactorization.hpp.
void AbcSimplexFactorization::saferTolerances | ( | double | zeroTolerance, |
double | pivotTolerance | ||
) |
Set tolerances to safer of existing and given.
|
inline |
Returns status.
Definition at line 283 of file AbcSimplexFactorization.hpp.
|
inline |
Sets status.
Definition at line 287 of file AbcSimplexFactorization.hpp.
|
inline |
Returns number of dense rows.
Definition at line 296 of file AbcSimplexFactorization.hpp.
bool AbcSimplexFactorization::timeToRefactorize | ( | ) | const |
Total number of elements in factorization.
|
inline |
Get rid of all memory.
Definition at line 304 of file AbcSimplexFactorization.hpp.
|
inline |
Number of Rows after factorization.
Definition at line 308 of file AbcSimplexFactorization.hpp.
|
inline |
Number of slacks at last factorization.
Definition at line 312 of file AbcSimplexFactorization.hpp.
|
inline |
Pivot tolerance.
Definition at line 315 of file AbcSimplexFactorization.hpp.
|
inline |
Set pivot tolerance.
Definition at line 319 of file AbcSimplexFactorization.hpp.
|
inline |
Minimum pivot tolerance.
Definition at line 323 of file AbcSimplexFactorization.hpp.
|
inline |
Set minimum pivot tolerance.
Definition at line 327 of file AbcSimplexFactorization.hpp.
|
inline |
pivot region
Definition at line 331 of file AbcSimplexFactorization.hpp.
|
inline |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
Delete all stuff (leaves as after CoinFactorization())
Definition at line 338 of file AbcSimplexFactorization.hpp.
void AbcSimplexFactorization::setDenseThreshold | ( | int | number | ) |
So we can temporarily switch off dense.
int AbcSimplexFactorization::getDenseThreshold | ( | ) | const |
Total number of elements in factorization.
void AbcSimplexFactorization::forceOtherFactorization | ( | int | which | ) |
If nonzero force use of 1,dense 2,small 3,long.
void AbcSimplexFactorization::goDenseOrSmall | ( | int | numberRows | ) |
Go over to dense code.
|
inline |
Get switch to dense if number rows <= this.
Definition at line 349 of file AbcSimplexFactorization.hpp.
|
inline |
Set switch to dense if number rows <= this.
Definition at line 353 of file AbcSimplexFactorization.hpp.
|
inline |
Get switch to small if number rows <= this.
Definition at line 357 of file AbcSimplexFactorization.hpp.
|
inline |
Set switch to small if number rows <= this.
Definition at line 361 of file AbcSimplexFactorization.hpp.
|
inline |
Get switch to long/ordered if number rows >= this.
Definition at line 365 of file AbcSimplexFactorization.hpp.
|
inline |
Set switch to long/ordered if number rows >= this.
Definition at line 369 of file AbcSimplexFactorization.hpp.
|
inline |
Returns type.
Definition at line 373 of file AbcSimplexFactorization.hpp.
void AbcSimplexFactorization::synchronize | ( | const ClpFactorization * | otherFactorization, |
const AbcSimplex * | model | ||
) |
Synchronize stuff.
void AbcSimplexFactorization::goSparse | ( | ) |
makes a row copy of L for speed and to allow very sparse problems
|
inline |
makes a row copy of L for speed and to allow very sparse problems
Definition at line 385 of file AbcSimplexFactorization.hpp.
|
inline |
Says whether to redo pivot order.
Definition at line 393 of file AbcSimplexFactorization.hpp.
|
inline |
Pointer to factorization.
Definition at line 396 of file AbcSimplexFactorization.hpp.
|
private |
Pointer to model.
Definition at line 410 of file AbcSimplexFactorization.hpp.
|
private |
Pointer to factorization.
Definition at line 413 of file AbcSimplexFactorization.hpp.
|
private |
If nonzero force use of 1,dense 2,small 3,long.
Definition at line 427 of file AbcSimplexFactorization.hpp.
|
private |
Switch to dense if number rows <= this.
Definition at line 429 of file AbcSimplexFactorization.hpp.
|
private |
Switch to small if number rows <= this.
Definition at line 431 of file AbcSimplexFactorization.hpp.
|
private |
Switch to long/ordered if number rows >= this.
Definition at line 433 of file AbcSimplexFactorization.hpp.
|
private |
Number of slacks at last factorization.
Definition at line 435 of file AbcSimplexFactorization.hpp.