6#ifndef ClpFactorization_H
7#define ClpFactorization_H
9#include "CoinPragma.hpp"
11#include "CoinFactorization.hpp"
15class CoinOtherFactorization;
16#ifndef CLP_MULTIPLE_FACTORIZATIONS
17#define CLP_MULTIPLE_FACTORIZATIONS 4
19#ifdef CLP_MULTIPLE_FACTORIZATIONS
20#include "CoinDenseFactorization.hpp"
26#ifndef CLP_FACTORIZATION_NEW_TIMING
27#define CLP_FACTORIZATION_NEW_TIMING 1
36 :
public CoinFactorization
71#ifdef CLP_MULTIPLE_FACTORIZATIONS
90 CoinIndexedVector *regionSparse,
91 CoinIndexedVector *tableauColumn,
94 bool checkBeforeModifying =
false,
95 double acceptablePivot = 1.0e-8);
96#if ABOCA_LITE_FACTORIZATION
98 void replaceColumn1(CoinIndexedVector *regionSparse,
int pivotRow);
100 int replaceColumn2(CoinIndexedVector *regionSparse,
114 CoinIndexedVector *regionSparse2);
118 CoinIndexedVector *regionSparse2,
119 bool noPermute =
false)
const;
126 CoinIndexedVector *regionSparse2,
127 CoinIndexedVector *regionSparse3,
128 bool noPermuteRegion3 =
false);
131 CoinIndexedVector *regionSparse2,
132 bool noPermute =
false)
const;
136 CoinIndexedVector *regionSparse2)
const;
142 CoinIndexedVector *regionSparse2,
143 CoinIndexedVector *regionSparse3)
const;
145#ifdef CLP_MULTIPLE_FACTORIZATIONS
293#if CLP_FACTORIZATION_NEW_TIMING > 1
294 void statsRefactor(
char when)
const;
412#ifndef COIN_FAST_CODE
473#ifndef COIN_FAST_CODE
479 inline void goDense() {}
521#ifdef CLP_MULTIPLE_FACTORIZATIONS
539#ifdef CLP_FACTORIZATION_NEW_TIMING
#define CLP_MULTIPLE_FACTORIZATIONS
This just implements CoinFactorization when an ClpMatrixBase object is passed.
int numberElements() const
Total number of elements in factorization.
int numberDense() const
Returns number of dense rows.
void doStatistics(bool trueFalse) const
To switch statistics on or off.
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.
void pivotTolerance(double value)
Set pivot tolerance.
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
void saferTolerances(double zeroTolerance, double pivotTolerance)
Set tolerances to safer of existing and given.
int * permute() const
Returns address of permute region.
int factorize(ClpSimplex *model, int solveType, bool valuesPass)
When part of LP - given by basic variables.
bool networkBasis() const
Says if a network basis.
void setDenseThreshold(int value)
Sets dense threshold.
double pivotTolerance() const
Pivot tolerance.
double shortestAverage_
For guessing when to re-factorize.
double zeroTolerance() const
Zero tolerance.
int status() const
Returns status.
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 N...
int forceB_
If nonzero force use of 1,dense 2,small 3,osl.
ClpNetworkBasis * networkBasis_
Pointer to network basis.
bool needToReorder() const
Says whether to redo pivot order.
int sparseThreshold() const
get sparse threshold
ClpFactorization(const CoinFactorization &)
The copy constructor from an CoinFactorization.
void setPersistenceFlag(int value)
void sparseThreshold(int value)
Set sparse threshold.
int * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
int denseThreshold() const
Gets dense threshold.
double adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
CoinOtherFactorization * coinFactorizationB_
Pointer to CoinOtherFactorization.
CoinBigIndex numberElementsR() const
Returns number in R area.
CoinFactorization * coinFactorizationA_
Pointer to CoinFactorization.
void zeroTolerance(double value)
Set zero tolerance.
int updateColumnForDebug(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const
For debug (no statistics update)
int goOslThreshold() const
Get switch to osl if number rows <= this.
void getWeights(int *weights) const
Fills weighted row list.
void setGoDenseThreshold(int value)
Set switch to dense if number rows <= this.
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 checkBeforeModify...
~ClpFactorization()
Destructor.
bool doStatistics_
To switch statistics on or off.
void messageLevel(int value)
Set level of detail of messages.
int updateColumnFT(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2)
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room ...
int pivots() const
Returns number of pivots since factorization.
ClpFactorization(const ClpFactorization &, int denseIfSmaller=0)
The copy constructor.
int effectiveStartNumberU_
bool timeToRefactorize() const
int messageLevel() const
Level of detail of messages.
CoinBigIndex numberElementsU() const
Returns number in U area.
void almostDestructor()
Delete all stuff (leaves as after CoinFactorization())
void relaxAccuracyCheck(double value)
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
ClpFactorization & operator=(const ClpFactorization &)
void setBiasLU(int value)
int isDenseOrSmall() const
Return 1 if dense code.
int goDenseThreshold_
Switch to dense if number rows <= this.
CoinBigIndex numberElementsL() const
Returns number in L area.
int updateColumnTranspose(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const
Updates one column (BTRAN) from region2 region1 starts as zero and is zero at end.
void setGoSmallThreshold(int value)
Set switch to small if number rows <= this.
void setGoOslThreshold(int value)
Set switch to osl if number rows <= this.
void areaFactor(double value)
Set whether larger areas needed.
int maximumPivots() const
Maximum number of pivots between factorizations.
int persistenceFlag() const
Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 bu...
void setFactorization(ClpFactorization &factorization)
Sets factorization.
int goSmallThreshold() const
Get switch to small if number rows <= this.
int goOslThreshold_
Switch to osl if number rows <= this.
int goDenseThreshold() const
Get switch to dense if number rows <= this.
double totalInIncreasingU_
CoinFactorization * coinFactorization() const
Return coinFactorizationA_.
void maximumPivots(int value)
Set maximum number of pivots between factorizations.
void clearArrays()
Get rid of all memory.
void goDenseOrSmall(int numberRows)
Go over to dense or small code if small enough.
int numberRows() const
Number of Rows after factorization.
ClpFactorization(const CoinOtherFactorization &)
The copy constructor from an CoinOtherFactorization.
void setDefaultValues()
Sets default values.
void setStatus(int value)
Sets status.
void cleanUp()
Cleans up i.e. gets rid of network basis.
void forceOtherFactorization(int which)
If nonzero force use of 1,dense 2,small 3,osl.
double areaFactor() const
Whether larger areas needed.
void setForrestTomlin(bool value)
true if Forrest Tomlin update, false if PFI
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.
ClpFactorization()
Default constructor.
int goSmallThreshold_
Switch to small if number rows <= this.
Abstract base class for Clp Matrices.
This deals with Factorization and Updates for network structures.
This solves LPs using the simplex method.