Clp  1.17.8
List of all members
ClpFactorization Class Reference

This just implements CoinFactorization when an ClpMatrixBase object is passed. More...

#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. 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...
 
ClpFactorizationoperator= (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...
 
void updateTwoColumnsTranspose (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, CoinIndexedVector *regionSparse3) const
 Updates two columns (BTRAN) from regionSparse2 and 3 regionSparse starts as zero and is zero at end Note - if regionSparse2 packed on input - will be packed on output - same for 3. 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...
 
CoinFactorization * coinFactorization () const
 Return coinFactorizationA_. 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...
 
void doStatistics (bool trueFalse) const
 To switch statistics on or off. More...
 
bool networkBasis () const
 Says if a network basis. More...
 
void getWeights (int *weights) const
 Fills weighted row list. More...
 

Private Attributes

data
ClpNetworkBasisnetworkBasis_
 Pointer to network basis. More...
 
CoinFactorization * coinFactorizationA_
 Pointer to CoinFactorization. More...
 
CoinOtherFactorization * coinFactorizationB_
 Pointer to CoinOtherFactorization. More...
 
int forceB_
 If nonzero force use of 1,dense 2,small 3,osl. More...
 
int goOslThreshold_
 Switch to osl if number rows <= this. More...
 
int goSmallThreshold_
 Switch to small if number rows <= this. More...
 
int goDenseThreshold_
 Switch to dense if number rows <= this. More...
 
double shortestAverage_
 For guessing when to re-factorize. More...
 
double totalInR_
 
double totalInIncreasingU_
 
int endLengthU_
 
int lastNumberPivots_
 
int effectiveStartNumberU_
 
bool doStatistics_
 To switch statistics on or off. More...
 

Detailed Description

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 34 of file ClpFactorization.hpp.

Constructor & Destructor Documentation

◆ ClpFactorization() [1/4]

ClpFactorization::ClpFactorization ( )

Default constructor.

◆ ~ClpFactorization()

ClpFactorization::~ClpFactorization ( )

Destructor.

◆ ClpFactorization() [2/4]

ClpFactorization::ClpFactorization ( const CoinFactorization &  )

The copy constructor from an CoinFactorization.

◆ ClpFactorization() [3/4]

ClpFactorization::ClpFactorization ( const ClpFactorization ,
int  denseIfSmaller = 0 
)

The copy constructor.

◆ ClpFactorization() [4/4]

ClpFactorization::ClpFactorization ( const CoinOtherFactorization &  )

The copy constructor from an CoinOtherFactorization.

Member Function Documentation

◆ factorize()

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

◆ operator=()

ClpFactorization& ClpFactorization::operator= ( const ClpFactorization )

◆ replaceColumn()

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

◆ updateColumnFT()

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.

◆ updateColumn()

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.

◆ updateTwoColumnsFT()

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

◆ updateColumnForDebug()

int ClpFactorization::updateColumnForDebug ( CoinIndexedVector *  regionSparse,
CoinIndexedVector *  regionSparse2,
bool  noPermute = false 
) const

For debug (no statistics update)

◆ updateColumnTranspose()

int ClpFactorization::updateColumnTranspose ( CoinIndexedVector *  regionSparse,
CoinIndexedVector *  regionSparse2 
) const

Updates one column (BTRAN) from region2 region1 starts as zero and is zero at end.

◆ updateTwoColumnsTranspose()

void ClpFactorization::updateTwoColumnsTranspose ( CoinIndexedVector *  regionSparse,
CoinIndexedVector *  regionSparse2,
CoinIndexedVector *  regionSparse3 
) const

Updates two columns (BTRAN) from regionSparse2 and 3 regionSparse starts as zero and is zero at end Note - if regionSparse2 packed on input - will be packed on output - same for 3.

◆ numberElements()

int ClpFactorization::numberElements ( ) const
inline

Total number of elements in factorization.

Definition at line 149 of file ClpFactorization.hpp.

◆ permute()

int* ClpFactorization::permute ( ) const
inline

Returns address of permute region.

Definition at line 157 of file ClpFactorization.hpp.

◆ pivotColumn()

int* ClpFactorization::pivotColumn ( ) const
inline

Returns address of pivotColumn region (also used for permuting)

Definition at line 165 of file ClpFactorization.hpp.

◆ maximumPivots() [1/2]

int ClpFactorization::maximumPivots ( ) const
inline

Maximum number of pivots between factorizations.

Definition at line 173 of file ClpFactorization.hpp.

◆ maximumPivots() [2/2]

void ClpFactorization::maximumPivots ( int  value)
inline

Set maximum number of pivots between factorizations.

Definition at line 181 of file ClpFactorization.hpp.

◆ pivots()

int ClpFactorization::pivots ( ) const
inline

Returns number of pivots since factorization.

Definition at line 189 of file ClpFactorization.hpp.

◆ areaFactor() [1/2]

double ClpFactorization::areaFactor ( ) const
inline

Whether larger areas needed.

Definition at line 197 of file ClpFactorization.hpp.

◆ areaFactor() [2/2]

void ClpFactorization::areaFactor ( double  value)
inline

Set whether larger areas needed.

Definition at line 205 of file ClpFactorization.hpp.

◆ zeroTolerance() [1/2]

double ClpFactorization::zeroTolerance ( ) const
inline

Zero tolerance.

Definition at line 211 of file ClpFactorization.hpp.

◆ zeroTolerance() [2/2]

void ClpFactorization::zeroTolerance ( double  value)
inline

Set zero tolerance.

Definition at line 219 of file ClpFactorization.hpp.

◆ saferTolerances()

void ClpFactorization::saferTolerances ( double  zeroTolerance,
double  pivotTolerance 
)

Set tolerances to safer of existing and given.

◆ sparseThreshold() [1/2]

int ClpFactorization::sparseThreshold ( ) const
inline

get sparse threshold

Definition at line 229 of file ClpFactorization.hpp.

◆ sparseThreshold() [2/2]

void ClpFactorization::sparseThreshold ( int  value)
inline

Set sparse threshold.

Definition at line 237 of file ClpFactorization.hpp.

◆ status()

int ClpFactorization::status ( ) const
inline

Returns status.

Definition at line 243 of file ClpFactorization.hpp.

◆ setStatus()

void ClpFactorization::setStatus ( int  value)
inline

Sets status.

Definition at line 251 of file ClpFactorization.hpp.

◆ numberDense()

int ClpFactorization::numberDense ( ) const
inline

Returns number of dense rows.

Definition at line 259 of file ClpFactorization.hpp.

◆ numberElementsU()

CoinBigIndex ClpFactorization::numberElementsU ( ) const
inline

Returns number in U area.

Definition at line 268 of file ClpFactorization.hpp.

◆ numberElementsL()

CoinBigIndex ClpFactorization::numberElementsL ( ) const
inline

Returns number in L area.

Definition at line 276 of file ClpFactorization.hpp.

◆ numberElementsR()

CoinBigIndex ClpFactorization::numberElementsR ( ) const
inline

Returns number in R area.

Definition at line 284 of file ClpFactorization.hpp.

◆ timeToRefactorize()

bool ClpFactorization::timeToRefactorize ( ) const

◆ messageLevel() [1/2]

int ClpFactorization::messageLevel ( ) const
inline

Level of detail of messages.

Definition at line 297 of file ClpFactorization.hpp.

◆ messageLevel() [2/2]

void ClpFactorization::messageLevel ( int  value)
inline

Set level of detail of messages.

Definition at line 305 of file ClpFactorization.hpp.

◆ clearArrays()

void ClpFactorization::clearArrays ( )
inline

Get rid of all memory.

Definition at line 311 of file ClpFactorization.hpp.

◆ numberRows()

int ClpFactorization::numberRows ( ) const
inline

Number of Rows after factorization.

Definition at line 319 of file ClpFactorization.hpp.

◆ denseThreshold()

int ClpFactorization::denseThreshold ( ) const
inline

Gets dense threshold.

Definition at line 327 of file ClpFactorization.hpp.

◆ setDenseThreshold()

void ClpFactorization::setDenseThreshold ( int  value)
inline

Sets dense threshold.

Definition at line 335 of file ClpFactorization.hpp.

◆ pivotTolerance() [1/2]

double ClpFactorization::pivotTolerance ( ) const
inline

Pivot tolerance.

Definition at line 341 of file ClpFactorization.hpp.

◆ pivotTolerance() [2/2]

void ClpFactorization::pivotTolerance ( double  value)
inline

Set pivot tolerance.

Definition at line 350 of file ClpFactorization.hpp.

◆ relaxAccuracyCheck()

void ClpFactorization::relaxAccuracyCheck ( double  value)
inline

Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.

Definition at line 358 of file ClpFactorization.hpp.

◆ persistenceFlag()

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 368 of file ClpFactorization.hpp.

◆ setPersistenceFlag()

void ClpFactorization::setPersistenceFlag ( int  value)
inline

Definition at line 375 of file ClpFactorization.hpp.

◆ almostDestructor()

void ClpFactorization::almostDestructor ( )
inline

Delete all stuff (leaves as after CoinFactorization())

Definition at line 381 of file ClpFactorization.hpp.

◆ adjustedAreaFactor()

double ClpFactorization::adjustedAreaFactor ( ) const
inline

Returns areaFactor but adjusted for dense.

Definition at line 389 of file ClpFactorization.hpp.

◆ setBiasLU()

void ClpFactorization::setBiasLU ( int  value)
inline

Definition at line 396 of file ClpFactorization.hpp.

◆ setForrestTomlin()

void ClpFactorization::setForrestTomlin ( bool  value)
inline

true if Forrest Tomlin update, false if PFI

Definition at line 402 of file ClpFactorization.hpp.

◆ setDefaultValues()

void ClpFactorization::setDefaultValues ( )
inline

Sets default values.

Definition at line 408 of file ClpFactorization.hpp.

◆ forceOtherFactorization()

void ClpFactorization::forceOtherFactorization ( int  which)

If nonzero force use of 1,dense 2,small 3,osl.

◆ goOslThreshold()

int ClpFactorization::goOslThreshold ( ) const
inline

Get switch to osl if number rows <= this.

Definition at line 421 of file ClpFactorization.hpp.

◆ setGoOslThreshold()

void ClpFactorization::setGoOslThreshold ( int  value)
inline

Set switch to osl if number rows <= this.

Definition at line 426 of file ClpFactorization.hpp.

◆ goDenseThreshold()

int ClpFactorization::goDenseThreshold ( ) const
inline

Get switch to dense if number rows <= this.

Definition at line 431 of file ClpFactorization.hpp.

◆ setGoDenseThreshold()

void ClpFactorization::setGoDenseThreshold ( int  value)
inline

Set switch to dense if number rows <= this.

Definition at line 436 of file ClpFactorization.hpp.

◆ goSmallThreshold()

int ClpFactorization::goSmallThreshold ( ) const
inline

Get switch to small if number rows <= this.

Definition at line 441 of file ClpFactorization.hpp.

◆ setGoSmallThreshold()

void ClpFactorization::setGoSmallThreshold ( int  value)
inline

Set switch to small if number rows <= this.

Definition at line 446 of file ClpFactorization.hpp.

◆ goDenseOrSmall()

void ClpFactorization::goDenseOrSmall ( int  numberRows)

Go over to dense or small code if small enough.

◆ setFactorization()

void ClpFactorization::setFactorization ( ClpFactorization factorization)

Sets factorization.

◆ isDenseOrSmall()

int ClpFactorization::isDenseOrSmall ( ) const
inline

Return 1 if dense code.

Definition at line 455 of file ClpFactorization.hpp.

◆ coinFactorization()

CoinFactorization* ClpFactorization::coinFactorization ( ) const
inline

Return coinFactorizationA_.

Definition at line 460 of file ClpFactorization.hpp.

◆ goSparse()

void ClpFactorization::goSparse ( )

makes a row copy of L for speed and to allow very sparse problems

◆ cleanUp()

void ClpFactorization::cleanUp ( )

Cleans up i.e. gets rid of network basis.

◆ needToReorder()

bool ClpFactorization::needToReorder ( ) const

Says whether to redo pivot order.

◆ doStatistics()

void ClpFactorization::doStatistics ( bool  trueFalse) const
inline

To switch statistics on or off.

Definition at line 492 of file ClpFactorization.hpp.

◆ networkBasis()

bool ClpFactorization::networkBasis ( ) const
inline

Says if a network basis.

Definition at line 498 of file ClpFactorization.hpp.

◆ getWeights()

void ClpFactorization::getWeights ( int *  weights) const

Fills weighted row list.

Member Data Documentation

◆ networkBasis_

ClpNetworkBasis* ClpFactorization::networkBasis_
private

Pointer to network basis.

Definition at line 519 of file ClpFactorization.hpp.

◆ coinFactorizationA_

CoinFactorization* ClpFactorization::coinFactorizationA_
private

Pointer to CoinFactorization.

Definition at line 523 of file ClpFactorization.hpp.

◆ coinFactorizationB_

CoinOtherFactorization* ClpFactorization::coinFactorizationB_
private

Pointer to CoinOtherFactorization.

Definition at line 525 of file ClpFactorization.hpp.

◆ forceB_

int ClpFactorization::forceB_
private

If nonzero force use of 1,dense 2,small 3,osl.

Definition at line 531 of file ClpFactorization.hpp.

◆ goOslThreshold_

int ClpFactorization::goOslThreshold_
private

Switch to osl if number rows <= this.

Definition at line 533 of file ClpFactorization.hpp.

◆ goSmallThreshold_

int ClpFactorization::goSmallThreshold_
private

Switch to small if number rows <= this.

Definition at line 535 of file ClpFactorization.hpp.

◆ goDenseThreshold_

int ClpFactorization::goDenseThreshold_
private

Switch to dense if number rows <= this.

Definition at line 537 of file ClpFactorization.hpp.

◆ shortestAverage_

double ClpFactorization::shortestAverage_
mutableprivate

For guessing when to re-factorize.

Definition at line 541 of file ClpFactorization.hpp.

◆ totalInR_

double ClpFactorization::totalInR_
mutableprivate

Definition at line 542 of file ClpFactorization.hpp.

◆ totalInIncreasingU_

double ClpFactorization::totalInIncreasingU_
mutableprivate

Definition at line 543 of file ClpFactorization.hpp.

◆ endLengthU_

int ClpFactorization::endLengthU_
mutableprivate

Definition at line 544 of file ClpFactorization.hpp.

◆ lastNumberPivots_

int ClpFactorization::lastNumberPivots_
mutableprivate

Definition at line 545 of file ClpFactorization.hpp.

◆ effectiveStartNumberU_

int ClpFactorization::effectiveStartNumberU_
mutableprivate

Definition at line 546 of file ClpFactorization.hpp.

◆ doStatistics_

bool ClpFactorization::doStatistics_
mutableprivate

To switch statistics on or off.

Definition at line 549 of file ClpFactorization.hpp.


The documentation for this class was generated from the following file: