Clp
1.15.10
|
This just implements CoinFactorization when an ClpMatrixBase object is passed. More...
#include <ClpFactorization.hpp>
Public Member Functions | |
factorization | |
int | factorize (ClpSimplex *model, int solveType, bool valuesPass) |
When part of LP - given by basic variables. More... | |
Constructors, destructor | |
ClpFactorization () | |
Default constructor. More... | |
~ClpFactorization () | |
Destructor. More... | |
Copy method | |
ClpFactorization (const CoinFactorization &) | |
The copy constructor from an CoinFactorization. More... | |
ClpFactorization (const ClpFactorization &, int denseIfSmaller=0) | |
The copy constructor. More... | |
ClpFactorization (const CoinOtherFactorization &) | |
The copy constructor from an CoinOtherFactorization. More... | |
ClpFactorization & | operator= (const ClpFactorization &) |
rank one updates which do exist | |
int | replaceColumn (const ClpSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double pivotCheck, bool checkBeforeModifying=false, double acceptablePivot=1.0e-8) |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If checkBeforeModifying is true will do all accuracy checks before modifying factorization. More... | |
various uses of factorization (return code number elements) | |
which user may want to know about | |
int | updateColumnFT (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) |
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room region1 starts as zero and is zero at end. More... | |
int | updateColumn (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const |
Updates one column (FTRAN) from region2 region1 starts as zero and is zero at end. More... | |
int | updateTwoColumnsFT (CoinIndexedVector *regionSparse1, CoinIndexedVector *regionSparse2, CoinIndexedVector *regionSparse3, bool noPermuteRegion3=false) |
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room. More... | |
int | updateColumnForDebug (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const |
For debug (no statistics update) More... | |
int | updateColumnTranspose (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const |
Updates one column (BTRAN) from region2 region1 starts as zero and is zero at end. More... | |
Lifted from CoinFactorization | |
int | numberElements () const |
Total number of elements in factorization. More... | |
int * | permute () const |
Returns address of permute region. More... | |
int * | pivotColumn () const |
Returns address of pivotColumn region (also used for permuting) More... | |
int | maximumPivots () const |
Maximum number of pivots between factorizations. More... | |
void | maximumPivots (int value) |
Set maximum number of pivots between factorizations. More... | |
int | pivots () const |
Returns 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 | sparseThreshold () const |
get sparse threshold More... | |
void | sparseThreshold (int value) |
Set sparse threshold. More... | |
int | status () const |
Returns status. More... | |
void | setStatus (int value) |
Sets status. More... | |
int | numberDense () const |
Returns number of dense rows. More... | |
CoinBigIndex | numberElementsU () const |
Returns number in U area. More... | |
CoinBigIndex | numberElementsL () const |
Returns number in L area. More... | |
CoinBigIndex | numberElementsR () const |
Returns number in R area. More... | |
bool | timeToRefactorize () const |
int | messageLevel () const |
Level of detail of messages. More... | |
void | messageLevel (int value) |
Set level of detail of messages. More... | |
void | clearArrays () |
Get rid of all memory. More... | |
int | numberRows () const |
Number of Rows after factorization. More... | |
int | denseThreshold () const |
Gets dense threshold. More... | |
void | setDenseThreshold (int value) |
Sets dense threshold. More... | |
double | pivotTolerance () const |
Pivot tolerance. More... | |
void | pivotTolerance (double value) |
Set pivot tolerance. More... | |
void | relaxAccuracyCheck (double value) |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed. More... | |
int | persistenceFlag () const |
Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 but give a bit extra if bigger needed. More... | |
void | setPersistenceFlag (int value) |
void | almostDestructor () |
Delete all stuff (leaves as after CoinFactorization()) More... | |
double | adjustedAreaFactor () const |
Returns areaFactor but adjusted for dense. More... | |
void | setBiasLU (int value) |
void | setForrestTomlin (bool value) |
true if Forrest Tomlin update, false if PFI More... | |
void | setDefaultValues () |
Sets default values. More... | |
void | forceOtherFactorization (int which) |
If nonzero force use of 1,dense 2,small 3,osl. More... | |
int | goOslThreshold () const |
Get switch to osl if number rows <= this. More... | |
void | setGoOslThreshold (int value) |
Set switch to osl if number rows <= this. 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... | |
void | goDenseOrSmall (int numberRows) |
Go over to dense or small code if small enough. More... | |
void | setFactorization (ClpFactorization &factorization) |
Sets factorization. More... | |
int | isDenseOrSmall () const |
Return 1 if dense code. More... | |
other stuff | |
void | goSparse () |
makes a row copy of L for speed and to allow very sparse problems More... | |
void | cleanUp () |
Cleans up i.e. gets rid of network basis. More... | |
bool | needToReorder () const |
Says whether to redo pivot order. More... | |
bool | networkBasis () const |
Says if a network basis. More... | |
void | getWeights (int *weights) const |
Fills weighted row list. More... | |
This just implements CoinFactorization when an ClpMatrixBase object is passed.
If a network then has a dummy CoinFactorization and a genuine ClpNetworkBasis object
Definition at line 32 of file ClpFactorization.hpp.
ClpFactorization::ClpFactorization | ( | ) |
Default constructor.
ClpFactorization::~ClpFactorization | ( | ) |
Destructor.
ClpFactorization::ClpFactorization | ( | const CoinFactorization & | ) |
The copy constructor from an CoinFactorization.
ClpFactorization::ClpFactorization | ( | const ClpFactorization & | , |
int | denseIfSmaller = 0 |
||
) |
The copy constructor.
ClpFactorization::ClpFactorization | ( | const CoinOtherFactorization & | ) |
The copy constructor from an CoinOtherFactorization.
int ClpFactorization::factorize | ( | ClpSimplex * | 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
ClpFactorization& ClpFactorization::operator= | ( | const ClpFactorization & | ) |
int ClpFactorization::replaceColumn | ( | const ClpSimplex * | model, |
CoinIndexedVector * | regionSparse, | ||
CoinIndexedVector * | tableauColumn, | ||
int | pivotRow, | ||
double | pivotCheck, | ||
bool | checkBeforeModifying = false , |
||
double | acceptablePivot = 1.0e-8 |
||
) |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If checkBeforeModifying is true will do all accuracy checks before modifying factorization.
Whether to set this depends on speed considerations. You could just do this on first iteration after factorization and thereafter re-factorize partial update already in U
int ClpFactorization::updateColumnFT | ( | CoinIndexedVector * | regionSparse, |
CoinIndexedVector * | regionSparse2 | ||
) |
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room region1 starts as zero and is zero at end.
int ClpFactorization::updateColumn | ( | CoinIndexedVector * | regionSparse, |
CoinIndexedVector * | regionSparse2, | ||
bool | noPermute = false |
||
) | const |
Updates one column (FTRAN) from region2 region1 starts as zero and is zero at end.
int ClpFactorization::updateTwoColumnsFT | ( | CoinIndexedVector * | regionSparse1, |
CoinIndexedVector * | regionSparse2, | ||
CoinIndexedVector * | regionSparse3, | ||
bool | noPermuteRegion3 = false |
||
) |
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room.
Also updates region3 region1 starts as zero and is zero at end
int ClpFactorization::updateColumnForDebug | ( | CoinIndexedVector * | regionSparse, |
CoinIndexedVector * | regionSparse2, | ||
bool | noPermute = false |
||
) | const |
For debug (no statistics update)
int ClpFactorization::updateColumnTranspose | ( | CoinIndexedVector * | regionSparse, |
CoinIndexedVector * | regionSparse2 | ||
) | const |
Updates one column (BTRAN) from region2 region1 starts as zero and is zero at end.
|
inline |
Total number of elements in factorization.
Definition at line 133 of file ClpFactorization.hpp.
|
inline |
Returns address of permute region.
Definition at line 138 of file ClpFactorization.hpp.
|
inline |
Returns address of pivotColumn region (also used for permuting)
Definition at line 143 of file ClpFactorization.hpp.
|
inline |
Maximum number of pivots between factorizations.
Definition at line 148 of file ClpFactorization.hpp.
|
inline |
Set maximum number of pivots between factorizations.
Definition at line 153 of file ClpFactorization.hpp.
|
inline |
Returns number of pivots since factorization.
Definition at line 158 of file ClpFactorization.hpp.
|
inline |
Whether larger areas needed.
Definition at line 163 of file ClpFactorization.hpp.
|
inline |
Set whether larger areas needed.
Definition at line 168 of file ClpFactorization.hpp.
|
inline |
Zero tolerance.
Definition at line 172 of file ClpFactorization.hpp.
|
inline |
Set zero tolerance.
Definition at line 177 of file ClpFactorization.hpp.
void ClpFactorization::saferTolerances | ( | double | zeroTolerance, |
double | pivotTolerance | ||
) |
Set tolerances to safer of existing and given.
|
inline |
get sparse threshold
Definition at line 184 of file ClpFactorization.hpp.
|
inline |
Set sparse threshold.
Definition at line 189 of file ClpFactorization.hpp.
|
inline |
Returns status.
Definition at line 193 of file ClpFactorization.hpp.
|
inline |
Sets status.
Definition at line 198 of file ClpFactorization.hpp.
|
inline |
Returns number of dense rows.
Definition at line 203 of file ClpFactorization.hpp.
|
inline |
Returns number in U area.
Definition at line 209 of file ClpFactorization.hpp.
|
inline |
Returns number in L area.
Definition at line 214 of file ClpFactorization.hpp.
|
inline |
Returns number in R area.
Definition at line 219 of file ClpFactorization.hpp.
|
inline |
Definition at line 224 of file ClpFactorization.hpp.
|
inline |
Level of detail of messages.
Definition at line 235 of file ClpFactorization.hpp.
|
inline |
Set level of detail of messages.
Definition at line 240 of file ClpFactorization.hpp.
|
inline |
Get rid of all memory.
Definition at line 244 of file ClpFactorization.hpp.
|
inline |
Number of Rows after factorization.
Definition at line 251 of file ClpFactorization.hpp.
|
inline |
Gets dense threshold.
Definition at line 256 of file ClpFactorization.hpp.
|
inline |
Sets dense threshold.
Definition at line 261 of file ClpFactorization.hpp.
|
inline |
Pivot tolerance.
Definition at line 265 of file ClpFactorization.hpp.
|
inline |
Set pivot tolerance.
Definition at line 271 of file ClpFactorization.hpp.
|
inline |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
Definition at line 276 of file ClpFactorization.hpp.
|
inline |
Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 but give a bit extra if bigger needed.
Definition at line 284 of file ClpFactorization.hpp.
|
inline |
Definition at line 288 of file ClpFactorization.hpp.
|
inline |
Delete all stuff (leaves as after CoinFactorization())
Definition at line 292 of file ClpFactorization.hpp.
|
inline |
Returns areaFactor but adjusted for dense.
Definition at line 299 of file ClpFactorization.hpp.
|
inline |
Definition at line 303 of file ClpFactorization.hpp.
|
inline |
true if Forrest Tomlin update, false if PFI
Definition at line 307 of file ClpFactorization.hpp.
|
inline |
Sets default values.
Definition at line 311 of file ClpFactorization.hpp.
void ClpFactorization::forceOtherFactorization | ( | int | which | ) |
If nonzero force use of 1,dense 2,small 3,osl.
|
inline |
Get switch to osl if number rows <= this.
Definition at line 323 of file ClpFactorization.hpp.
|
inline |
Set switch to osl if number rows <= this.
Definition at line 327 of file ClpFactorization.hpp.
|
inline |
Get switch to dense if number rows <= this.
Definition at line 331 of file ClpFactorization.hpp.
|
inline |
Set switch to dense if number rows <= this.
Definition at line 335 of file ClpFactorization.hpp.
|
inline |
Get switch to small if number rows <= this.
Definition at line 339 of file ClpFactorization.hpp.
|
inline |
Set switch to small if number rows <= this.
Definition at line 343 of file ClpFactorization.hpp.
void ClpFactorization::goDenseOrSmall | ( | int | numberRows | ) |
Go over to dense or small code if small enough.
void ClpFactorization::setFactorization | ( | ClpFactorization & | factorization | ) |
Sets factorization.
|
inline |
Return 1 if dense code.
Definition at line 351 of file ClpFactorization.hpp.
void ClpFactorization::goSparse | ( | ) |
makes a row copy of L for speed and to allow very sparse problems
void ClpFactorization::cleanUp | ( | ) |
Cleans up i.e. gets rid of network basis.
bool ClpFactorization::needToReorder | ( | ) | const |
Says whether to redo pivot order.
|
inline |
Says if a network basis.
Definition at line 383 of file ClpFactorization.hpp.
void ClpFactorization::getWeights | ( | int * | weights | ) | const |
Fills weighted row list.