Clp  1.17.8
List of all members
ClpGubMatrix Class Reference

This implements Gub rows plus a ClpPackedMatrix. More...

#include <ClpGubMatrix.hpp>

+ Inheritance diagram for ClpGubMatrix:
+ Collaboration diagram for ClpGubMatrix:

Public Member Functions

Main functions provided
virtual ClpMatrixBasereverseOrderedCopy () const
 Returns a new matrix in reverse order without gaps (GUB wants NULL) More...
 
virtual int countBasis (const int *whichColumn, int &numberColumnBasic)
 Returns number of elements in column part of basis. More...
 
virtual void fillBasis (ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)
 Fills in column part of basis. More...
 
virtual void unpack (const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
 Unpacks a column into an CoinIndexedvector. More...
 
virtual void unpackPacked (ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
 Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const. More...
 
virtual void add (const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const
 Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector. More...
 
virtual void add (const ClpSimplex *model, double *array, int column, double multiplier) const
 Adds multiple of a column into an array. More...
 
virtual void partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
 Partial pricing. More...
 
virtual int hiddenRows () const
 Returns number of hidden rows e.g. gub. More...
 
Matrix times vector methods
virtual void transposeTimes (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
 Return x * scalar * A + y in z. More...
 
virtual void transposeTimesByRow (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
 Return x * scalar * A + y in z. More...
 
virtual void subsetTransposeTimes (const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const
 Return x *A in z but just for indices in y. More...
 
virtual int extendUpdated (ClpSimplex *model, CoinIndexedVector *update, int mode)
 expands an updated column to allow for extra rows which the main solver does not know about and returns number added if mode 0. More...
 
virtual void primalExpanded (ClpSimplex *model, int mode)
 mode=0 - Set up before "update" and "times" for primal solution using extended rows mode=1 - Cleanup primal solution after "times" using extended rows. More...
 
virtual void dualExpanded (ClpSimplex *model, CoinIndexedVector *array, double *other, int mode)
 mode=0 - Set up before "updateTranspose" and "transposeTimes" for duals using extended updates array (and may use other if dual values pass) mode=1 - Update dual solution after "transposeTimes" using extended rows. More...
 
virtual int generalExpanded (ClpSimplex *model, int mode, int &number)
 mode=0 - Create list of non-key basics in pivotVariable_ using number as numberBasic in and out mode=1 - Set all key variables as basic mode=2 - return number extra rows needed, number gives maximum number basic mode=3 - before replaceColumn mode=4 - return 1 if can do primal, 2 if dual, 3 if both mode=5 - save any status stuff (when in good state) mode=6 - restore status stuff mode=7 - flag given variable (normally sequenceIn) mode=8 - unflag all variables mode=9 - synchronize costs mode=10 - return 1 if there may be changing bounds on variable (column generation) mode=11 - make sure set is clean (used when a variable rejected - but not flagged) mode=12 - after factorize but before permute stuff mode=13 - at end of simplex to delete stuff More...
 
virtual int updatePivot (ClpSimplex *model, double oldInValue, double oldOutValue)
 update information for a pivot (and effective rhs) More...
 
virtual void useEffectiveRhs (ClpSimplex *model, bool cheapest=true)
 Sets up an effective RHS and does gub crash if needed. More...
 
virtual double * rhsOffset (ClpSimplex *model, bool forceRefresh=false, bool check=false)
 Returns effective RHS offset if it is being used. More...
 
virtual int synchronize (ClpSimplex *model, int mode)
 This is local to Gub to allow synchronization: mode=0 when status of basis is good mode=1 when variable is flagged mode=2 when all variables unflagged (returns number flagged) mode=3 just reset costs (primal) mode=4 correct number of dual infeasibilities mode=5 return 4 if time to re-factorize mode=6 - return 1 if there may be changing bounds on variable (column generation) mode=7 - do extra restores for column generation mode=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming. More...
 
virtual void correctSequence (const ClpSimplex *model, int &sequenceIn, int &sequenceOut)
 Correct sequence in and out to give true value. More...
 
virtual void transposeTimes (double scalar, const double *x, double *y) const
 Return y + x * scalar * A in y. More...
 
virtual void transposeTimes (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale, double *spare=NULL) const
 And for scaling. More...
 
virtual void transposeTimes (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
 Return x * scalar * A in z. More...
 
Constructors, destructor
 ClpGubMatrix ()
 Default constructor. More...
 
virtual ~ClpGubMatrix ()
 Destructor. More...
 
Copy method
 ClpGubMatrix (const ClpGubMatrix &)
 The copy constructor. More...
 
 ClpGubMatrix (const CoinPackedMatrix &)
 The copy constructor from an CoinPackedMatrix. More...
 
 ClpGubMatrix (const ClpGubMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
 Subset constructor (without gaps). More...
 
 ClpGubMatrix (const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
 
 ClpGubMatrix (CoinPackedMatrix *matrix)
 This takes over ownership (for space reasons) More...
 
 ClpGubMatrix (ClpPackedMatrix *matrix, int numberSets, const int *start, const int *end, const double *lower, const double *upper, const unsigned char *status=NULL)
 This takes over ownership (for space reasons) and is the real constructor. More...
 
ClpGubMatrixoperator= (const ClpGubMatrix &)
 
virtual ClpMatrixBaseclone () const
 Clone. More...
 
virtual ClpMatrixBasesubsetClone (int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
 Subset clone (without gaps). More...
 
void redoSet (ClpSimplex *model, int newKey, int oldKey, int iSet)
 redoes next_ for a set. More...
 
gets and sets
ClpSimplex::Status getStatus (int sequence) const
 Status. More...
 
void setStatus (int sequence, ClpSimplex::Status status)
 
void setFlagged (int sequence)
 To flag a variable. More...
 
void clearFlagged (int sequence)
 
bool flagged (int sequence) const
 
void setAbove (int sequence)
 To say key is above ub. More...
 
void setFeasible (int sequence)
 To say key is feasible. More...
 
void setBelow (int sequence)
 To say key is below lb. More...
 
double weight (int sequence) const
 
int * start () const
 Starts. More...
 
int * end () const
 End. More...
 
double * lower () const
 Lower bounds on sets. More...
 
double * upper () const
 Upper bounds on sets. More...
 
int * keyVariable () const
 Key variable of set. More...
 
int * backward () const
 Backward pointer to set number. More...
 
int numberSets () const
 Number of sets (gub rows) More...
 
void switchOffCheck ()
 Switches off dj checking each factorization (for BIG models) More...
 
- Public Member Functions inherited from ClpPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix () const
 Return a complete CoinPackedMatrix. More...
 
virtual bool isColOrdered () const
 Whether the packed matrix is column major ordered or not. More...
 
virtual CoinBigIndex getNumElements () const
 Number of entries in the packed matrix. More...
 
virtual int getNumCols () const
 Number of columns. More...
 
virtual int getNumRows () const
 Number of rows. More...
 
virtual const double * getElements () const
 A vector containing the elements in the packed matrix. More...
 
double * getMutableElements () const
 Mutable elements. More...
 
virtual const int * getIndices () const
 A vector containing the minor indices of the elements in the packed matrix. More...
 
virtual const CoinBigIndex * getVectorStarts () const
 
virtual const int * getVectorLengths () const
 The lengths of the major-dimension vectors. More...
 
virtual int getVectorLength (int index) const
 The length of a single major-dimension vector. More...
 
virtual void deleteCols (const int numDel, const int *indDel)
 Delete the columns whose indices are listed in indDel. More...
 
virtual void deleteRows (const int numDel, const int *indDel)
 Delete the rows whose indices are listed in indDel. More...
 
virtual void appendCols (int number, const CoinPackedVectorBase *const *columns)
 Append Columns. More...
 
virtual void appendRows (int number, const CoinPackedVectorBase *const *rows)
 Append Rows. More...
 
virtual int appendMatrix (int number, int type, const CoinBigIndex *starts, const int *index, const double *element, int numberOther=-1)
 Append a set of rows/columns to the end of the matrix. More...
 
virtual void replaceVector (const int index, const int numReplace, const double *newElements)
 Replace the elements of a vector. More...
 
virtual void modifyCoefficient (int row, int column, double newElement, bool keepZero=false)
 Modify one element of packed matrix. More...
 
virtual int scale (ClpModel *model, ClpSimplex *simplex=NULL) const
 Creates scales for column copy (rowCopy in model may be modified) returns non-zero if no scaling done. More...
 
virtual void scaleRowCopy (ClpModel *model) const
 Scales rowCopy if column copy scaled Only called if scales already exist. More...
 
void createScaledMatrix (ClpSimplex *model) const
 Creates scaled column copy if scales exist. More...
 
virtual ClpMatrixBasescaledColumnCopy (ClpModel *model) const
 Realy really scales column copy Only called if scales already exist. More...
 
virtual bool allElementsInRange (ClpModel *model, double smallest, double largest, int check=15)
 Checks if all elements are in valid range. More...
 
virtual void rangeOfElements (double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
 Returns largest and smallest elements of both signs. More...
 
virtual void releasePackedMatrix () const
 Allow any parts of a created CoinPackedMatrix to be deleted. More...
 
virtual CoinBigIndex * dubiousWeights (const ClpSimplex *model, int *inputWeights) const
 Given positive integer weights for each row fills in sum of weights for each column (and slack). More...
 
virtual bool canDoPartialPricing () const
 Says whether it can do partial pricing. More...
 
virtual int refresh (ClpSimplex *model)
 makes sure active columns correct More...
 
virtual void reallyScale (const double *rowScale, const double *columnScale)
 
virtual void setDimensions (int numrows, int numcols)
 Set the dimensions of the matrix. More...
 
virtual void times (double scalar, const double *x, double *y) const
 Return y + A * scalar *x in y. More...
 
virtual void times (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
 And for scaling. More...
 
virtual void transposeTimes (double scalar, const double *x, double *y) const
 Return y + x * scalar * A in y. More...
 
virtual void transposeTimes (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale, double *spare=NULL) const
 And for scaling. More...
 
void transposeTimesSubset (int number, const int *which, const double *pi, double *y, const double *rowScale, const double *columnScale, double *spare=NULL) const
 Return y - pi * A in y. More...
 
void transposeTimesByColumn (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
 Return x * scalar * A in z. More...
 
virtual bool canCombine (const ClpSimplex *model, const CoinIndexedVector *pi) const
 Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster. More...
 
virtual int transposeTimes2 (const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *spare, double *infeas, double *reducedCost, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
 Updates two arrays for steepest and does devex weights Returns nonzero if updates reduced cost and infeas - new infeas in dj1. More...
 
virtual void subsetTimes2 (const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
 Updates second array for steepest and does devex weights. More...
 
void useEffectiveRhs (ClpSimplex *model)
 Sets up an effective RHS. More...
 
CoinPackedMatrix * matrix () const
 Returns CoinPackedMatrix (non const) More...
 
void setMatrixNull ()
 Just sets matrix_ to NULL so it can be used elsewhere. More...
 
void makeSpecialColumnCopy ()
 Say we want special column copy. More...
 
void releaseSpecialColumnCopy ()
 Say we don't want special column copy. More...
 
bool zeros () const
 Are there zeros? More...
 
bool wantsSpecialColumnCopy () const
 Do we want special column copy. More...
 
int flags () const
 Flags. More...
 
void checkGaps ()
 Sets flags_ correctly. More...
 
int numberActiveColumns () const
 number of active columns (normally same as number of columns) More...
 
void setNumberActiveColumns (int value)
 Set number of active columns (normally same as number of columns) More...
 
 ClpPackedMatrix ()
 Default constructor. More...
 
virtual ~ClpPackedMatrix ()
 Destructor. More...
 
 ClpPackedMatrix (const ClpPackedMatrix &)
 The copy constructor. More...
 
 ClpPackedMatrix (const CoinPackedMatrix &)
 The copy constructor from an CoinPackedMatrix. More...
 
 ClpPackedMatrix (const ClpPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
 Subset constructor (without gaps). More...
 
 ClpPackedMatrix (const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
 
 ClpPackedMatrix (CoinPackedMatrix *matrix)
 This takes over ownership (for space reasons) More...
 
ClpPackedMatrixoperator= (const ClpPackedMatrix &)
 
virtual void copy (const ClpPackedMatrix *from)
 Copy contents - resizing if necessary - otherwise re-use memory. More...
 
void specialRowCopy (ClpSimplex *model, const ClpMatrixBase *rowCopy)
 make special row copy More...
 
void specialColumnCopy (ClpSimplex *model)
 make special column copy More...
 
- Public Member Functions inherited from ClpMatrixBase
virtual bool canGetRowCopy () const
 Returns true if can create row copy. More...
 
virtual void createVariable (ClpSimplex *model, int &bestSequence)
 Creates a variable. More...
 
virtual int checkFeasible (ClpSimplex *model, double &sum) const
 Just for debug if odd type matrix. More...
 
double reducedCost (ClpSimplex *model, int sequence) const
 Returns reduced cost of a variable. More...
 
virtual void times (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
 Return y + A * x * scalar in y. More...
 
virtual void times (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y, const double *COIN_RESTRICT rowScale, const double *COIN_RESTRICT columnScale) const
 And for scaling - default aborts for when scaling not supported (unless pointers NULL when as normal) More...
 
virtual void transposeTimes (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
 Return y + x * scalar * A in y. More...
 
virtual void transposeTimes (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y, const double *COIN_RESTRICT rowScale, const double *COIN_RESTRICT columnScale, double *COIN_RESTRICT spare=NULL) const
 And for scaling - default aborts for when scaling not supported (unless pointers NULL when as normal) More...
 
virtual void listTransposeTimes (const ClpSimplex *model, double *x, int *y, int number, double *z) const
 Return x *A in z but just for number indices in y. More...
 
virtual void backToBasics ()
 Gets rid of any mutable by products. More...
 
int type () const
 Returns type. More...
 
void setType (int newtype)
 Sets type. More...
 
void useEffectiveRhs (ClpSimplex *model)
 Sets up an effective RHS. More...
 
int lastRefresh () const
 If rhsOffset used this is iteration last refreshed. More...
 
int refreshFrequency () const
 If rhsOffset used this is refresh frequency (0==off) More...
 
void setRefreshFrequency (int value)
 
bool skipDualCheck () const
 whether to skip dual checks most of time More...
 
void setSkipDualCheck (bool yes)
 
int minimumObjectsScan () const
 Partial pricing tuning parameter - minimum number of "objects" to scan. More...
 
void setMinimumObjectsScan (int value)
 
int minimumGoodReducedCosts () const
 Partial pricing tuning parameter - minimum number of negative reduced costs to get. More...
 
void setMinimumGoodReducedCosts (int value)
 
double startFraction () const
 Current start of search space in matrix (as fraction) More...
 
void setStartFraction (double value)
 
double endFraction () const
 Current end of search space in matrix (as fraction) More...
 
void setEndFraction (double value)
 
double savedBestDj () const
 Current best reduced cost. More...
 
void setSavedBestDj (double value)
 
int originalWanted () const
 Initial number of negative reduced costs wanted. More...
 
void setOriginalWanted (int value)
 
int currentWanted () const
 Current number of negative reduced costs which we still need. More...
 
void setCurrentWanted (int value)
 
int savedBestSequence () const
 Current best sequence. More...
 
void setSavedBestSequence (int value)
 
virtual ~ClpMatrixBase ()
 Destructor (has to be public) More...
 

Protected Attributes

Data members

The data members are protected to allow access for derived classes.

double sumDualInfeasibilities_
 Sum of dual infeasibilities. More...
 
double sumPrimalInfeasibilities_
 Sum of primal infeasibilities. More...
 
double sumOfRelaxedDualInfeasibilities_
 Sum of Dual infeasibilities using tolerance based on error in duals. More...
 
double sumOfRelaxedPrimalInfeasibilities_
 Sum of Primal infeasibilities using tolerance based on error in primals. More...
 
double infeasibilityWeight_
 Infeasibility weight when last full pass done. More...
 
int * start_
 Starts. More...
 
int * end_
 End. More...
 
double * lower_
 Lower bounds on sets. More...
 
double * upper_
 Upper bounds on sets. More...
 
unsigned char * status_
 Status of slacks. More...
 
unsigned char * saveStatus_
 Saved status of slacks. More...
 
int * savedKeyVariable_
 Saved key variables. More...
 
int * backward_
 Backward pointer to set number. More...
 
int * backToPivotRow_
 Backward pointer to pivot row !!! More...
 
double * changeCost_
 Change in costs for keys. More...
 
int * keyVariable_
 Key variable of set. More...
 
int * next_
 Next basic variable in set - starts at key and end with -(set+1). More...
 
int * toIndex_
 Backward pointer to index in CoinIndexedVector. More...
 
int * fromIndex_
 
ClpSimplexmodel_
 Pointer back to model. More...
 
int numberDualInfeasibilities_
 Number of dual infeasibilities. More...
 
int numberPrimalInfeasibilities_
 Number of primal infeasibilities. More...
 
int noCheck_
 If pricing will declare victory (i.e. More...
 
int numberSets_
 Number of sets (gub rows) More...
 
int saveNumber_
 Number in vector without gub extension. More...
 
int possiblePivotKey_
 Pivot row of possible next key. More...
 
int gubSlackIn_
 Gub slack in (set number or -1) More...
 
int firstGub_
 First gub variables (same as start_[0] at present) More...
 
int lastGub_
 last gub variable (same as end_[numberSets_-1] at present) More...
 
int gubType_
 type of gub - 0 not contiguous, 1 contiguous add 8 bit to say no ubs on individual variables More...
 
- Protected Attributes inherited from ClpPackedMatrix
CoinPackedMatrix * matrix_
 Data. More...
 
int numberActiveColumns_
 number of active columns (normally same as number of columns) More...
 
int flags_
 Flags - 1 - has zero elements 2 - has gaps 4 - has special row copy 8 - has special column copy 16 - wants special column copy. More...
 
ClpPackedMatrix2rowCopy_
 Special row copy. More...
 
ClpPackedMatrix3columnCopy_
 Special column copy. More...
 
- Protected Attributes inherited from ClpMatrixBase
double * rhsOffset_
 Effective RHS offset if it is being used. More...
 
double startFraction_
 Current start of search space in matrix (as fraction) More...
 
double endFraction_
 Current end of search space in matrix (as fraction) More...
 
double savedBestDj_
 Best reduced cost so far. More...
 
int originalWanted_
 Initial number of negative reduced costs wanted. More...
 
int currentWanted_
 Current number of negative reduced costs which we still need. More...
 
int savedBestSequence_
 Saved best sequence in pricing. More...
 
int type_
 type (may be useful) More...
 
int lastRefresh_
 If rhsOffset used this is iteration last refreshed. More...
 
int refreshFrequency_
 If rhsOffset used this is refresh frequency (0==off) More...
 
int minimumObjectsScan_
 Partial pricing tuning parameter - minimum number of "objects" to scan. More...
 
int minimumGoodReducedCosts_
 Partial pricing tuning parameter - minimum number of negative reduced costs to get. More...
 
int trueSequenceIn_
 True sequence in (i.e. from larger problem) More...
 
int trueSequenceOut_
 True sequence out (i.e. from larger problem) More...
 
bool skipDualCheck_
 whether to skip dual checks most of time More...
 

Additional Inherited Members

- Protected Member Functions inherited from ClpPackedMatrix
void checkFlags (int type) const
 Check validity. More...
 
- Protected Member Functions inherited from ClpMatrixBase
 ClpMatrixBase ()
 Default constructor. More...
 
 ClpMatrixBase (const ClpMatrixBase &)
 
ClpMatrixBaseoperator= (const ClpMatrixBase &)
 

Detailed Description

This implements Gub rows plus a ClpPackedMatrix.

There will be a version using ClpPlusMinusOne matrix but there is no point doing one with ClpNetworkMatrix (although an embedded network is attractive).

Definition at line 21 of file ClpGubMatrix.hpp.

Constructor & Destructor Documentation

◆ ClpGubMatrix() [1/7]

ClpGubMatrix::ClpGubMatrix ( )

Default constructor.

◆ ~ClpGubMatrix()

virtual ClpGubMatrix::~ClpGubMatrix ( )
virtual

Destructor.

◆ ClpGubMatrix() [2/7]

ClpGubMatrix::ClpGubMatrix ( const ClpGubMatrix )

The copy constructor.

◆ ClpGubMatrix() [3/7]

ClpGubMatrix::ClpGubMatrix ( const CoinPackedMatrix &  )

The copy constructor from an CoinPackedMatrix.

◆ ClpGubMatrix() [4/7]

ClpGubMatrix::ClpGubMatrix ( const ClpGubMatrix wholeModel,
int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns 
)

Subset constructor (without gaps).

Duplicates are allowed and order is as given

◆ ClpGubMatrix() [5/7]

ClpGubMatrix::ClpGubMatrix ( const CoinPackedMatrix &  wholeModel,
int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns 
)

◆ ClpGubMatrix() [6/7]

ClpGubMatrix::ClpGubMatrix ( CoinPackedMatrix *  matrix)

This takes over ownership (for space reasons)

◆ ClpGubMatrix() [7/7]

ClpGubMatrix::ClpGubMatrix ( ClpPackedMatrix matrix,
int  numberSets,
const int *  start,
const int *  end,
const double *  lower,
const double *  upper,
const unsigned char *  status = NULL 
)

This takes over ownership (for space reasons) and is the real constructor.

Member Function Documentation

◆ reverseOrderedCopy()

virtual ClpMatrixBase* ClpGubMatrix::reverseOrderedCopy ( ) const
virtual

Returns a new matrix in reverse order without gaps (GUB wants NULL)

Reimplemented from ClpPackedMatrix.

◆ countBasis()

virtual int ClpGubMatrix::countBasis ( const int *  whichColumn,
int &  numberColumnBasic 
)
virtual

Returns number of elements in column part of basis.

Reimplemented from ClpPackedMatrix.

◆ fillBasis()

virtual void ClpGubMatrix::fillBasis ( ClpSimplex model,
const int *  whichColumn,
int &  numberColumnBasic,
int *  row,
int *  start,
int *  rowCount,
int *  columnCount,
CoinFactorizationDouble *  element 
)
virtual

Fills in column part of basis.

Reimplemented from ClpPackedMatrix.

◆ unpack()

virtual void ClpGubMatrix::unpack ( const ClpSimplex model,
CoinIndexedVector *  rowArray,
int  column 
) const
virtual

Unpacks a column into an CoinIndexedvector.

Reimplemented from ClpPackedMatrix.

◆ unpackPacked()

virtual void ClpGubMatrix::unpackPacked ( ClpSimplex model,
CoinIndexedVector *  rowArray,
int  column 
) const
virtual

Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const.

Bounds and objective could be modified if doing column generation (just for this variable)

Reimplemented from ClpPackedMatrix.

◆ add() [1/2]

virtual void ClpGubMatrix::add ( const ClpSimplex model,
CoinIndexedVector *  rowArray,
int  column,
double  multiplier 
) const
virtual

Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.

Reimplemented from ClpPackedMatrix.

◆ add() [2/2]

virtual void ClpGubMatrix::add ( const ClpSimplex model,
double *  array,
int  column,
double  multiplier 
) const
virtual

Adds multiple of a column into an array.

Reimplemented from ClpPackedMatrix.

◆ partialPricing()

virtual void ClpGubMatrix::partialPricing ( ClpSimplex model,
double  start,
double  end,
int &  bestSequence,
int &  numberWanted 
)
virtual

Partial pricing.

Reimplemented from ClpPackedMatrix.

Reimplemented in ClpGubDynamicMatrix.

◆ hiddenRows()

virtual int ClpGubMatrix::hiddenRows ( ) const
virtual

Returns number of hidden rows e.g. gub.

Reimplemented from ClpMatrixBase.

◆ transposeTimes() [1/4]

virtual void ClpGubMatrix::transposeTimes ( const ClpSimplex model,
double  scalar,
const CoinIndexedVector *  x,
CoinIndexedVector *  y,
CoinIndexedVector *  z 
) const
virtual

Return x * scalar * A + y in z.

Can use y as temporary array (will be empty at end) Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex

Reimplemented from ClpPackedMatrix.

◆ transposeTimesByRow()

virtual void ClpGubMatrix::transposeTimesByRow ( const ClpSimplex model,
double  scalar,
const CoinIndexedVector *  x,
CoinIndexedVector *  y,
CoinIndexedVector *  z 
) const
virtual

Return x * scalar * A + y in z.

Can use y as temporary array (will be empty at end) Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex. This version uses row copy

Reimplemented from ClpPackedMatrix.

◆ subsetTransposeTimes()

virtual void ClpGubMatrix::subsetTransposeTimes ( const ClpSimplex model,
const CoinIndexedVector *  x,
const CoinIndexedVector *  y,
CoinIndexedVector *  z 
) const
virtual

Return x *A in z but just for indices in y.

Note - z always packed mode

Reimplemented from ClpPackedMatrix.

◆ extendUpdated()

virtual int ClpGubMatrix::extendUpdated ( ClpSimplex model,
CoinIndexedVector *  update,
int  mode 
)
virtual

expands an updated column to allow for extra rows which the main solver does not know about and returns number added if mode 0.

If mode 1 deletes extra entries

This active in Gub

Reimplemented from ClpMatrixBase.

◆ primalExpanded()

virtual void ClpGubMatrix::primalExpanded ( ClpSimplex model,
int  mode 
)
virtual

mode=0 - Set up before "update" and "times" for primal solution using extended rows mode=1 - Cleanup primal solution after "times" using extended rows.

mode=2 - Check (or report on) primal infeasibilities

Reimplemented from ClpMatrixBase.

◆ dualExpanded()

virtual void ClpGubMatrix::dualExpanded ( ClpSimplex model,
CoinIndexedVector *  array,
double *  other,
int  mode 
)
virtual

mode=0 - Set up before "updateTranspose" and "transposeTimes" for duals using extended updates array (and may use other if dual values pass) mode=1 - Update dual solution after "transposeTimes" using extended rows.

mode=2 - Compute all djs and compute key dual infeasibilities mode=3 - Report on key dual infeasibilities mode=4 - Modify before updateTranspose in partial pricing

Reimplemented from ClpMatrixBase.

◆ generalExpanded()

virtual int ClpGubMatrix::generalExpanded ( ClpSimplex model,
int  mode,
int &  number 
)
virtual

mode=0 - Create list of non-key basics in pivotVariable_ using number as numberBasic in and out mode=1 - Set all key variables as basic mode=2 - return number extra rows needed, number gives maximum number basic mode=3 - before replaceColumn mode=4 - return 1 if can do primal, 2 if dual, 3 if both mode=5 - save any status stuff (when in good state) mode=6 - restore status stuff mode=7 - flag given variable (normally sequenceIn) mode=8 - unflag all variables mode=9 - synchronize costs mode=10 - return 1 if there may be changing bounds on variable (column generation) mode=11 - make sure set is clean (used when a variable rejected - but not flagged) mode=12 - after factorize but before permute stuff mode=13 - at end of simplex to delete stuff

Reimplemented from ClpMatrixBase.

◆ updatePivot()

virtual int ClpGubMatrix::updatePivot ( ClpSimplex model,
double  oldInValue,
double  oldOutValue 
)
virtual

update information for a pivot (and effective rhs)

Reimplemented from ClpMatrixBase.

Reimplemented in ClpGubDynamicMatrix.

◆ useEffectiveRhs()

virtual void ClpGubMatrix::useEffectiveRhs ( ClpSimplex model,
bool  cheapest = true 
)
virtual

Sets up an effective RHS and does gub crash if needed.

Reimplemented in ClpGubDynamicMatrix.

◆ rhsOffset()

virtual double* ClpGubMatrix::rhsOffset ( ClpSimplex model,
bool  forceRefresh = false,
bool  check = false 
)
virtual

Returns effective RHS offset if it is being used.

This is used for long problems or big gub or anywhere where going through full columns is expensive. This may re-compute

Reimplemented from ClpMatrixBase.

Reimplemented in ClpGubDynamicMatrix.

◆ synchronize()

virtual int ClpGubMatrix::synchronize ( ClpSimplex model,
int  mode 
)
virtual

This is local to Gub to allow synchronization: mode=0 when status of basis is good mode=1 when variable is flagged mode=2 when all variables unflagged (returns number flagged) mode=3 just reset costs (primal) mode=4 correct number of dual infeasibilities mode=5 return 4 if time to re-factorize mode=6 - return 1 if there may be changing bounds on variable (column generation) mode=7 - do extra restores for column generation mode=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming.

Reimplemented in ClpGubDynamicMatrix.

◆ correctSequence()

virtual void ClpGubMatrix::correctSequence ( const ClpSimplex model,
int &  sequenceIn,
int &  sequenceOut 
)
virtual

Correct sequence in and out to give true value.

Reimplemented from ClpPackedMatrix.

◆ operator=()

ClpGubMatrix& ClpGubMatrix::operator= ( const ClpGubMatrix )

◆ clone()

virtual ClpMatrixBase* ClpGubMatrix::clone ( ) const
virtual

Clone.

Reimplemented from ClpPackedMatrix.

Reimplemented in ClpGubDynamicMatrix.

◆ subsetClone()

virtual ClpMatrixBase* ClpGubMatrix::subsetClone ( int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns 
) const
virtual

Subset clone (without gaps).

Duplicates are allowed and order is as given

Reimplemented from ClpPackedMatrix.

◆ redoSet()

void ClpGubMatrix::redoSet ( ClpSimplex model,
int  newKey,
int  oldKey,
int  iSet 
)

redoes next_ for a set.


◆ getStatus()

ClpSimplex::Status ClpGubMatrix::getStatus ( int  sequence) const
inline

Status.

Definition at line 207 of file ClpGubMatrix.hpp.

◆ setStatus()

void ClpGubMatrix::setStatus ( int  sequence,
ClpSimplex::Status  status 
)
inline

Definition at line 211 of file ClpGubMatrix.hpp.

◆ setFlagged()

void ClpGubMatrix::setFlagged ( int  sequence)
inline

To flag a variable.

Definition at line 218 of file ClpGubMatrix.hpp.

◆ clearFlagged()

void ClpGubMatrix::clearFlagged ( int  sequence)
inline

Definition at line 222 of file ClpGubMatrix.hpp.

◆ flagged()

bool ClpGubMatrix::flagged ( int  sequence) const
inline

Definition at line 226 of file ClpGubMatrix.hpp.

◆ setAbove()

void ClpGubMatrix::setAbove ( int  sequence)
inline

To say key is above ub.

Definition at line 231 of file ClpGubMatrix.hpp.

◆ setFeasible()

void ClpGubMatrix::setFeasible ( int  sequence)
inline

To say key is feasible.

Definition at line 238 of file ClpGubMatrix.hpp.

◆ setBelow()

void ClpGubMatrix::setBelow ( int  sequence)
inline

To say key is below lb.

Definition at line 245 of file ClpGubMatrix.hpp.

◆ weight()

double ClpGubMatrix::weight ( int  sequence) const
inline

Definition at line 251 of file ClpGubMatrix.hpp.

◆ start()

int* ClpGubMatrix::start ( ) const
inline

Starts.

Definition at line 258 of file ClpGubMatrix.hpp.

◆ end()

int* ClpGubMatrix::end ( ) const
inline

End.

Definition at line 263 of file ClpGubMatrix.hpp.

◆ lower()

double* ClpGubMatrix::lower ( ) const
inline

Lower bounds on sets.

Definition at line 268 of file ClpGubMatrix.hpp.

◆ upper()

double* ClpGubMatrix::upper ( ) const
inline

Upper bounds on sets.

Definition at line 273 of file ClpGubMatrix.hpp.

◆ keyVariable()

int* ClpGubMatrix::keyVariable ( ) const
inline

Key variable of set.

Definition at line 278 of file ClpGubMatrix.hpp.

◆ backward()

int* ClpGubMatrix::backward ( ) const
inline

Backward pointer to set number.

Definition at line 283 of file ClpGubMatrix.hpp.

◆ numberSets()

int ClpGubMatrix::numberSets ( ) const
inline

Number of sets (gub rows)

Definition at line 288 of file ClpGubMatrix.hpp.

◆ switchOffCheck()

void ClpGubMatrix::switchOffCheck ( )

Switches off dj checking each factorization (for BIG models)

◆ transposeTimes() [2/4]

virtual void ClpPackedMatrix::transposeTimes

Return y + x * scalar * A in y.

Precondition
x must be of size numRows()
y must be of size numColumns()

◆ transposeTimes() [3/4]

virtual void ClpPackedMatrix::transposeTimes

And for scaling.

◆ transposeTimes() [4/4]

virtual void ClpPackedMatrix::transposeTimes

Return x * scalar * A in z.

Can use y as temporary array (will be empty at end) Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex

Member Data Documentation

◆ sumDualInfeasibilities_

double ClpGubMatrix::sumDualInfeasibilities_
protected

Sum of dual infeasibilities.

Definition at line 301 of file ClpGubMatrix.hpp.

◆ sumPrimalInfeasibilities_

double ClpGubMatrix::sumPrimalInfeasibilities_
protected

Sum of primal infeasibilities.

Definition at line 303 of file ClpGubMatrix.hpp.

◆ sumOfRelaxedDualInfeasibilities_

double ClpGubMatrix::sumOfRelaxedDualInfeasibilities_
protected

Sum of Dual infeasibilities using tolerance based on error in duals.

Definition at line 305 of file ClpGubMatrix.hpp.

◆ sumOfRelaxedPrimalInfeasibilities_

double ClpGubMatrix::sumOfRelaxedPrimalInfeasibilities_
protected

Sum of Primal infeasibilities using tolerance based on error in primals.

Definition at line 307 of file ClpGubMatrix.hpp.

◆ infeasibilityWeight_

double ClpGubMatrix::infeasibilityWeight_
protected

Infeasibility weight when last full pass done.

Definition at line 309 of file ClpGubMatrix.hpp.

◆ start_

int* ClpGubMatrix::start_
protected

Starts.

Definition at line 311 of file ClpGubMatrix.hpp.

◆ end_

int* ClpGubMatrix::end_
protected

End.

Definition at line 313 of file ClpGubMatrix.hpp.

◆ lower_

double* ClpGubMatrix::lower_
protected

Lower bounds on sets.

Definition at line 315 of file ClpGubMatrix.hpp.

◆ upper_

double* ClpGubMatrix::upper_
protected

Upper bounds on sets.

Definition at line 317 of file ClpGubMatrix.hpp.

◆ status_

unsigned char* ClpGubMatrix::status_
mutableprotected

Status of slacks.

Definition at line 319 of file ClpGubMatrix.hpp.

◆ saveStatus_

unsigned char* ClpGubMatrix::saveStatus_
protected

Saved status of slacks.

Definition at line 321 of file ClpGubMatrix.hpp.

◆ savedKeyVariable_

int* ClpGubMatrix::savedKeyVariable_
protected

Saved key variables.

Definition at line 323 of file ClpGubMatrix.hpp.

◆ backward_

int* ClpGubMatrix::backward_
protected

Backward pointer to set number.

Definition at line 325 of file ClpGubMatrix.hpp.

◆ backToPivotRow_

int* ClpGubMatrix::backToPivotRow_
protected

Backward pointer to pivot row !!!

Definition at line 327 of file ClpGubMatrix.hpp.

◆ changeCost_

double* ClpGubMatrix::changeCost_
protected

Change in costs for keys.

Definition at line 329 of file ClpGubMatrix.hpp.

◆ keyVariable_

int* ClpGubMatrix::keyVariable_
mutableprotected

Key variable of set.

Definition at line 331 of file ClpGubMatrix.hpp.

◆ next_

int* ClpGubMatrix::next_
mutableprotected

Next basic variable in set - starts at key and end with -(set+1).

Now changes to -(nonbasic+1). next_ has extra space for 2* longest set

Definition at line 335 of file ClpGubMatrix.hpp.

◆ toIndex_

int* ClpGubMatrix::toIndex_
protected

Backward pointer to index in CoinIndexedVector.

Definition at line 337 of file ClpGubMatrix.hpp.

◆ fromIndex_

int* ClpGubMatrix::fromIndex_
protected

Definition at line 339 of file ClpGubMatrix.hpp.

◆ model_

ClpSimplex* ClpGubMatrix::model_
protected

Pointer back to model.

Definition at line 341 of file ClpGubMatrix.hpp.

◆ numberDualInfeasibilities_

int ClpGubMatrix::numberDualInfeasibilities_
protected

Number of dual infeasibilities.

Definition at line 343 of file ClpGubMatrix.hpp.

◆ numberPrimalInfeasibilities_

int ClpGubMatrix::numberPrimalInfeasibilities_
protected

Number of primal infeasibilities.

Definition at line 345 of file ClpGubMatrix.hpp.

◆ noCheck_

int ClpGubMatrix::noCheck_
protected

If pricing will declare victory (i.e.

no check every factorization). -1 - always check 0 - don't check 1 - in don't check mode but looks optimal

Definition at line 351 of file ClpGubMatrix.hpp.

◆ numberSets_

int ClpGubMatrix::numberSets_
protected

Number of sets (gub rows)

Definition at line 353 of file ClpGubMatrix.hpp.

◆ saveNumber_

int ClpGubMatrix::saveNumber_
protected

Number in vector without gub extension.

Definition at line 355 of file ClpGubMatrix.hpp.

◆ possiblePivotKey_

int ClpGubMatrix::possiblePivotKey_
protected

Pivot row of possible next key.

Definition at line 357 of file ClpGubMatrix.hpp.

◆ gubSlackIn_

int ClpGubMatrix::gubSlackIn_
protected

Gub slack in (set number or -1)

Definition at line 359 of file ClpGubMatrix.hpp.

◆ firstGub_

int ClpGubMatrix::firstGub_
protected

First gub variables (same as start_[0] at present)

Definition at line 361 of file ClpGubMatrix.hpp.

◆ lastGub_

int ClpGubMatrix::lastGub_
protected

last gub variable (same as end_[numberSets_-1] at present)

Definition at line 363 of file ClpGubMatrix.hpp.

◆ gubType_

int ClpGubMatrix::gubType_
protected

type of gub - 0 not contiguous, 1 contiguous add 8 bit to say no ubs on individual variables

Definition at line 366 of file ClpGubMatrix.hpp.


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