#include <ClpFactorization.hpp>
Collaboration diagram for ClpFactorization:
Public Member Functions | |
factorization | |
int | factorize (ClpSimplex *model, int solveType, bool valuesPass) |
When part of LP - given by basic variables. | |
Constructors, destructor | |
ClpFactorization () | |
Default constructor. | |
~ClpFactorization () | |
Destructor. | |
Copy method | |
ClpFactorization (const ClpFactorization &) | |
The copy constructor. | |
ClpFactorization (const CoinFactorization &) | |
The copy constructor from an CoinFactorization. | |
ClpFactorization (const CoinDenseFactorization &) | |
The copy constructor from an CoinDenseFactorization. | |
ClpFactorization & | operator= (const ClpFactorization &) |
The copy constructor. | |
rank one updates which do exist | |
int | replaceColumn (const ClpSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double pivotCheck, bool checkBeforeModifying=false) |
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. | |
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. | |
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. | |
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. | |
int | updateColumnForDebug (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const |
For debug (no statistics update). | |
int | updateColumnTranspose (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const |
Updates one column (BTRAN) from region2 region1 starts as zero and is zero at end. | |
Lifted from CoinFactorization | |
int | numberElements () const |
Total number of elements in factorization. | |
int * | permute () const |
Returns address of permute region. | |
int * | pivotColumn () const |
Returns address of pivotColumn region (also used for permuting). | |
int | maximumPivots () const |
Maximum number of pivots between factorizations. | |
void | maximumPivots (int value) |
Set maximum number of pivots between factorizations. | |
int | pivots () const |
Returns number of pivots since factorization. | |
double | areaFactor () const |
Whether larger areas needed. | |
void | areaFactor (double value) |
Set whether larger areas needed. | |
double | zeroTolerance () const |
Zero tolerance. | |
void | zeroTolerance (double value) |
Set zero tolerance. | |
int | sparseThreshold () const |
get sparse threshold | |
void | sparseThreshold (int value) |
Set sparse threshold. | |
int | status () const |
Returns status. | |
void | setStatus (int value) |
Sets status. | |
int | numberDense () const |
Returns number of dense rows. | |
bool | timeToRefactorize () const |
Total number of elements in factorization. | |
int | messageLevel () const |
Level of detail of messages. | |
void | messageLevel (int value) |
Set level of detail of messages. | |
void | clearArrays () |
Get rid of all memory. | |
int | numberRows () const |
Number of Rows after factorization. | |
int | denseThreshold () const |
Gets dense threshold. | |
void | setDenseThreshold (int value) |
Sets dense threshold. | |
double | pivotTolerance () const |
Pivot tolerance. | |
void | pivotTolerance (double value) |
Set pivot tolerance. | |
void | relaxAccuracyCheck (double value) |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed. | |
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. | |
void | setPersistenceFlag (int value) |
Total number of elements in factorization. | |
void | almostDestructor () |
Delete all stuff (leaves as after CoinFactorization()). | |
double | adjustedAreaFactor () const |
Returns areaFactor but adjusted for dense. | |
void | setBiasLU (int value) |
Total number of elements in factorization. | |
void | setForrestTomlin (bool value) |
true if Forrest Tomlin update, false if PFI | |
void | setDefaultValues () |
Sets default values. | |
int | goDenseThreshold () const |
Get switch to dense if number rows <= this. | |
void | setGoDenseThreshold (int value) |
Set switch to dense if number rows <= this. | |
void | goDense () |
Go over to dense code. | |
int | isDense () const |
Return 1 if dense code. | |
other stuff | |
void | goSparse () |
makes a row copy of L for speed and to allow very sparse problems | |
void | cleanUp () |
Cleans up i.e. gets rid of network basis. | |
bool | needToReorder () const |
Says whether to redo pivot order. | |
bool | networkBasis () const |
Says if a network basis. | |
void | getWeights (int *weights) const |
Fills weighted row list. | |
Private Attributes | |
data | |
ClpNetworkBasis * | networkBasis_ |
Pointer to network basis. | |
CoinFactorization * | coinFactorizationA_ |
Pointer to CoinFactorization. | |
CoinDenseFactorization * | coinFactorizationB_ |
Pointer to CoinDenseFactorization. | |
int | goDenseThreshold_ |
Switch to dense if number rows <= this. |
If a network then has a dummy CoinFactorization and a genuine ClpNetworkBasis object
Definition at line 22 of file ClpFactorization.hpp.
ClpFactorization::ClpFactorization | ( | ) |
Default constructor.
ClpFactorization::~ClpFactorization | ( | ) |
Destructor.
ClpFactorization::ClpFactorization | ( | const ClpFactorization & | ) |
The copy constructor.
ClpFactorization::ClpFactorization | ( | const CoinFactorization & | ) |
The copy constructor from an CoinFactorization.
ClpFactorization::ClpFactorization | ( | const CoinDenseFactorization & | ) |
The copy constructor from an CoinDenseFactorization.
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 & | ) |
The copy constructor.
int ClpFactorization::replaceColumn | ( | const ClpSimplex * | model, | |
CoinIndexedVector * | regionSparse, | |||
CoinIndexedVector * | tableauColumn, | |||
int | pivotRow, | |||
double | pivotCheck, | |||
bool | checkBeforeModifying = false | |||
) |
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.
int ClpFactorization::numberElements | ( | ) | const [inline] |
Total number of elements in factorization.
Definition at line 122 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::numberElements(), and CoinFactorization::numberElements().
int* ClpFactorization::permute | ( | ) | const [inline] |
Returns address of permute region.
Definition at line 126 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::permute(), and CoinFactorization::permute().
int* ClpFactorization::pivotColumn | ( | ) | const [inline] |
Returns address of pivotColumn region (also used for permuting).
Definition at line 130 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::permute(), and CoinFactorization::pivotColumn().
int ClpFactorization::maximumPivots | ( | ) | const [inline] |
Maximum number of pivots between factorizations.
Definition at line 134 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::maximumPivots(), and CoinFactorization::maximumPivots().
void ClpFactorization::maximumPivots | ( | int | value | ) | [inline] |
Set maximum number of pivots between factorizations.
Definition at line 138 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::maximumPivots(), and CoinFactorization::maximumPivots().
int ClpFactorization::pivots | ( | ) | const [inline] |
Returns number of pivots since factorization.
Definition at line 142 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::pivots(), and CoinFactorization::pivots().
double ClpFactorization::areaFactor | ( | ) | const [inline] |
Whether larger areas needed.
Definition at line 146 of file ClpFactorization.hpp.
References CoinFactorization::areaFactor(), and coinFactorizationA_.
void ClpFactorization::areaFactor | ( | double | value | ) | [inline] |
Set whether larger areas needed.
Definition at line 150 of file ClpFactorization.hpp.
References CoinFactorization::areaFactor(), and coinFactorizationA_.
double ClpFactorization::zeroTolerance | ( | ) | const [inline] |
Zero tolerance.
Definition at line 154 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::zeroTolerance(), and CoinFactorization::zeroTolerance().
void ClpFactorization::zeroTolerance | ( | double | value | ) | [inline] |
Set zero tolerance.
Definition at line 158 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::zeroTolerance(), and CoinFactorization::zeroTolerance().
int ClpFactorization::sparseThreshold | ( | ) | const [inline] |
get sparse threshold
Definition at line 162 of file ClpFactorization.hpp.
References coinFactorizationA_, and CoinFactorization::sparseThreshold().
void ClpFactorization::sparseThreshold | ( | int | value | ) | [inline] |
Set sparse threshold.
Definition at line 165 of file ClpFactorization.hpp.
References coinFactorizationA_, and CoinFactorization::sparseThreshold().
int ClpFactorization::status | ( | ) | const [inline] |
Returns status.
Definition at line 168 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::status(), and CoinFactorization::status().
void ClpFactorization::setStatus | ( | int | value | ) | [inline] |
Sets status.
Definition at line 172 of file ClpFactorization.hpp.
References coinFactorizationA_, coinFactorizationB_, CoinDenseFactorization::setStatus(), and CoinFactorization::setStatus().
int ClpFactorization::numberDense | ( | ) | const [inline] |
Returns number of dense rows.
Definition at line 176 of file ClpFactorization.hpp.
References coinFactorizationA_, and CoinFactorization::numberDense().
bool ClpFactorization::timeToRefactorize | ( | ) | const [inline] |
int ClpFactorization::messageLevel | ( | ) | const [inline] |
void ClpFactorization::messageLevel | ( | int | value | ) | [inline] |
void ClpFactorization::clearArrays | ( | ) | [inline] |
int ClpFactorization::numberRows | ( | ) | const [inline] |
int ClpFactorization::denseThreshold | ( | ) | const [inline] |
void ClpFactorization::setDenseThreshold | ( | int | value | ) | [inline] |
double ClpFactorization::pivotTolerance | ( | ) | const [inline] |
void ClpFactorization::pivotTolerance | ( | double | value | ) | [inline] |
void ClpFactorization::relaxAccuracyCheck | ( | double | value | ) | [inline] |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
Definition at line 233 of file ClpFactorization.hpp.
int ClpFactorization::persistenceFlag | ( | ) | const [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 240 of file ClpFactorization.hpp.
void ClpFactorization::setPersistenceFlag | ( | int | value | ) | [inline] |
void ClpFactorization::almostDestructor | ( | ) | [inline] |
Delete all stuff (leaves as after CoinFactorization()).
Definition at line 245 of file ClpFactorization.hpp.
double ClpFactorization::adjustedAreaFactor | ( | ) | const [inline] |
void ClpFactorization::setBiasLU | ( | int | value | ) | [inline] |
void ClpFactorization::setForrestTomlin | ( | bool | value | ) | [inline] |
void ClpFactorization::setDefaultValues | ( | ) | [inline] |
int ClpFactorization::goDenseThreshold | ( | ) | const [inline] |
void ClpFactorization::setGoDenseThreshold | ( | int | value | ) | [inline] |
void ClpFactorization::goDense | ( | ) |
Go over to dense code.
int ClpFactorization::isDense | ( | ) | const [inline] |
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.
bool ClpFactorization::networkBasis | ( | ) | const [inline] |
void ClpFactorization::getWeights | ( | int * | weights | ) | const |
Fills weighted row list.
ClpNetworkBasis* ClpFactorization::networkBasis_ [private] |
Pointer to CoinFactorization.
Definition at line 328 of file ClpFactorization.hpp.
Referenced by areaFactor(), maximumPivots(), numberDense(), numberElements(), permute(), pivotColumn(), pivots(), setStatus(), sparseThreshold(), status(), and zeroTolerance().
Pointer to CoinDenseFactorization.
Definition at line 330 of file ClpFactorization.hpp.
Referenced by maximumPivots(), numberElements(), permute(), pivotColumn(), pivots(), setStatus(), status(), and zeroTolerance().
int ClpFactorization::goDenseThreshold_ [private] |