Loading...
Searching...
No Matches
ClpGubDynamicMatrix Class Reference

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

`#include <ClpGubDynamicMatrix.hpp>`

Inheritance diagram for ClpGubDynamicMatrix:
[legend]
Collaboration diagram for ClpGubDynamicMatrix:
[legend]

## Public Member Functions

Main functions provided
virtual void | partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
| Partial pricing.
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=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming.
virtual void | useEffectiveRhs (ClpSimplex *model, bool cheapest=true)
| Sets up an effective RHS and does gub crash if needed.
virtual int | updatePivot (ClpSimplex *model, double oldInValue, double oldOutValue)
| update information for a pivot (and effective rhs)
void | insertNonBasic (int sequence, int iSet)
| Add a new variable to a set.
virtual double * | rhsOffset (ClpSimplex *model, bool forceRefresh=false, bool check=false)
| Returns effective RHS offset if it is being used.
virtual void | times (double scalar, const double *x, double *y) const
| Return `y + A * scalar *x` in `y`.
virtual int | checkFeasible (ClpSimplex *model, double &sum) const
| Just for debug Returns sum and number of primal infeasibilities.
void | cleanData (ClpSimplex *model)
| Cleans data after setWarmStart.
virtual void | times (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
| And for scaling.
Constructors, destructor
| ClpGubDynamicMatrix ()
| Default constructor.
virtual | ~ClpGubDynamicMatrix ()
| Destructor.
Copy method
| ClpGubDynamicMatrix (const ClpGubDynamicMatrix &)
| The copy constructor.
| ClpGubDynamicMatrix (ClpSimplex *model, int numberSets, int numberColumns, const int *starts, const double *lower, const double *upper, const CoinBigIndex *startColumn, const int *row, const double *element, const double *cost, const double *lowerColumn=NULL, const double *upperColumn=NULL, const unsigned char *status=NULL)
| This is the real constructor.
ClpGubDynamicMatrix & | operator= (const ClpGubDynamicMatrix &)
virtual ClpMatrixBase * | clone () const
| Clone.
Public Member Functions inherited from ClpGubMatrix
virtual ClpMatrixBase * | reverseOrderedCopy () const
| Returns a new matrix in reverse order without gaps (GUB wants NULL).
virtual int | countBasis (const int *whichColumn, int &numberColumnBasic)
| Returns number of elements in column part of basis.
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.
virtual void | unpack (const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
| Unpacks a column into an CoinIndexedvector.
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.
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.
virtual void | add (const ClpSimplex *model, double *array, int column, double multiplier) const
| Adds multiple of a column into an array.
virtual int | hiddenRows () const
| Returns number of hidden rows e.g. gub.
virtual void | transposeTimes (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A + y` in `z`.
virtual void | transposeTimesByRow (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A + y` in `z`.
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.
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.
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.
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.
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

virtual void | correctSequence (const ClpSimplex *model, int &sequenceIn, int &sequenceOut)
| Correct sequence in and out to give true value.
virtual void | transposeTimes (double scalar, const double *x, double *y) const
| Return `y + x * scalar * A` in `y`.
virtual void | transposeTimes (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale, double *spare=NULL) const
| And for scaling.
| ClpGubMatrix ()
| Default constructor.
virtual | ~ClpGubMatrix ()
| Destructor.
| ClpGubMatrix (const ClpGubMatrix &)
| The copy constructor.
| ClpGubMatrix (const CoinPackedMatrix &)
| The copy constructor from an CoinPackedMatrix.
| ClpGubMatrix (const ClpGubMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
| Subset constructor (without gaps).
| ClpGubMatrix (const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
| ClpGubMatrix (CoinPackedMatrix *matrix)
| This takes over ownership (for space reasons).
| 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.
ClpGubMatrix & | operator= (const ClpGubMatrix &)
virtual ClpMatrixBase * | subsetClone (int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
| Subset clone (without gaps).
void | redoSet (ClpSimplex *model, int newKey, int oldKey, int iSet)
| redoes next_ for a set.
ClpSimplex::Status | getStatus (int sequence) const
| Status.
void | setStatus (int sequence, ClpSimplex::Status status)
void | setFlagged (int sequence)
| To flag a variable.
void | clearFlagged (int sequence)
bool | flagged (int sequence) const
void | setAbove (int sequence)
| To say key is above ub.
void | setFeasible (int sequence)
| To say key is feasible.
void | setBelow (int sequence)
| To say key is below lb.
double | weight (int sequence) const
int * | start () const
| Starts.
int * | end () const
| End.
double * | lower () const
| Lower bounds on sets.
double * | upper () const
| Upper bounds on sets.
int * | keyVariable () const
| Key variable of set.
int * | backward () const
| Backward pointer to set number.
int | numberSets () const
| Number of sets (gub rows).
void | switchOffCheck ()
| Switches off dj checking each factorization (for BIG models).
Public Member Functions inherited from ClpPackedMatrix
virtual CoinPackedMatrix * | getPackedMatrix () const
| Return a complete CoinPackedMatrix.
virtual bool | isColOrdered () const
| Whether the packed matrix is column major ordered or not.
virtual CoinBigIndex | getNumElements () const
| Number of entries in the packed matrix.
virtual int | getNumCols () const
| Number of columns.
virtual int | getNumRows () const
| Number of rows.
virtual const double * | getElements () const
| A vector containing the elements in the packed matrix.
double * | getMutableElements () const
| Mutable elements.
virtual const int * | getIndices () const
| A vector containing the minor indices of the elements in the packed matrix.
virtual const CoinBigIndex * | getVectorStarts () const
virtual const int * | getVectorLengths () const
| The lengths of the major-dimension vectors.
virtual int | getVectorLength (int index) const
| The length of a single major-dimension vector.
virtual void | deleteCols (const int numDel, const int *indDel)
| Delete the columns whose indices are listed in `indDel`.
virtual void | deleteRows (const int numDel, const int *indDel)
| Delete the rows whose indices are listed in `indDel`.
virtual void | appendCols (int number, const CoinPackedVectorBase *const *columns)
| Append Columns.
virtual void | appendRows (int number, const CoinPackedVectorBase *const *rows)
| Append Rows.
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.
virtual void | replaceVector (const int index, const int numReplace, const double *newElements)
| Replace the elements of a vector.
virtual void | modifyCoefficient (int row, int column, double newElement, bool keepZero=false)
| Modify one element of packed matrix.
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.
virtual void | scaleRowCopy (ClpModel *model) const
| Scales rowCopy if column copy scaled Only called if scales already exist.
void | createScaledMatrix (ClpSimplex *model) const
| Creates scaled column copy if scales exist.
virtual ClpMatrixBase * | scaledColumnCopy (ClpModel *model) const
| Realy really scales column copy Only called if scales already exist.
virtual bool | allElementsInRange (ClpModel *model, double smallest, double largest, int check=15)
| Checks if all elements are in valid range.
virtual void | rangeOfElements (double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
| Returns largest and smallest elements of both signs.
virtual void | releasePackedMatrix () const
| Allow any parts of a created CoinPackedMatrix to be deleted.
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).
virtual bool | canDoPartialPricing () const
| Says whether it can do partial pricing.
virtual int | refresh (ClpSimplex *model)
| makes sure active columns correct
virtual void | reallyScale (const double *rowScale, const double *columnScale)
virtual void | setDimensions (int numrows, int numcols)
| Set the dimensions of the matrix.
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`.
void | transposeTimesByColumn (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A in `z`.`
virtual bool | canCombine (const ClpSimplex *model, const CoinIndexedVector *pi) const
| Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster.
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.
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.
void | useEffectiveRhs (ClpSimplex *model)
| Sets up an effective RHS.
CoinPackedMatrix * | matrix () const
| Returns CoinPackedMatrix (non const).
void | setMatrixNull ()
| Just sets matrix_ to NULL so it can be used elsewhere.
void | makeSpecialColumnCopy ()
| Say we want special column copy.
void | releaseSpecialColumnCopy ()
| Say we don't want special column copy.
bool | zeros () const
| Are there zeros?
bool | wantsSpecialColumnCopy () const
| Do we want special column copy.
int | flags () const
| Flags.
void | checkGaps ()
| Sets flags_ correctly.
int | numberActiveColumns () const
| number of active columns (normally same as number of columns)
void | setNumberActiveColumns (int value)
| Set number of active columns (normally same as number of columns).
| ClpPackedMatrix ()
| Default constructor.
virtual | ~ClpPackedMatrix ()
| Destructor.
| ClpPackedMatrix (const ClpPackedMatrix &)
| The copy constructor.
| ClpPackedMatrix (const CoinPackedMatrix &)
| The copy constructor from an CoinPackedMatrix.
| ClpPackedMatrix (const ClpPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
| Subset constructor (without gaps).
| ClpPackedMatrix (const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
| ClpPackedMatrix (CoinPackedMatrix *matrix)
| This takes over ownership (for space reasons).
ClpPackedMatrix & | operator= (const ClpPackedMatrix &)
virtual void | copy (const ClpPackedMatrix *from)
| Copy contents - resizing if necessary - otherwise re-use memory.
void | specialRowCopy (ClpSimplex *model, const ClpMatrixBase *rowCopy)
| make special row copy
void | specialColumnCopy (ClpSimplex *model)
| make special column copy
Public Member Functions inherited from ClpMatrixBase
virtual bool | canGetRowCopy () const
| Returns true if can create row copy.
virtual void | createVariable (ClpSimplex *model, int &bestSequence)
| Creates a variable.
double | reducedCost (ClpSimplex *model, int sequence) const
| Returns reduced cost of a variable.
virtual void | times (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
| Return `y + A * x * scalar` in `y`.
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).
virtual void | transposeTimes (double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
| Return `y + x * scalar * A` in `y`.
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).
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.
virtual void | backToBasics ()
| Gets rid of any mutable by products.
int | type () const
| Returns type.
void | setType (int newtype)
| Sets type.
void | useEffectiveRhs (ClpSimplex *model)
| Sets up an effective RHS.
int | lastRefresh () const
| If rhsOffset used this is iteration last refreshed.
int | refreshFrequency () const
| If rhsOffset used this is refresh frequency (0==off).
void | setRefreshFrequency (int value)
bool | skipDualCheck () const
| whether to skip dual checks most of time
void | setSkipDualCheck (bool yes)
int | minimumObjectsScan () const
| Partial pricing tuning parameter - minimum number of "objects" to scan.
void | setMinimumObjectsScan (int value)
int | minimumGoodReducedCosts () const
| Partial pricing tuning parameter - minimum number of negative reduced costs to get.
void | setMinimumGoodReducedCosts (int value)
double | startFraction () const
| Current start of search space in matrix (as fraction).
void | setStartFraction (double value)
double | endFraction () const
| Current end of search space in matrix (as fraction).
void | setEndFraction (double value)
double | savedBestDj () const
| Current best reduced cost.
void | setSavedBestDj (double value)
int | originalWanted () const
| Initial number of negative reduced costs wanted.
void | setOriginalWanted (int value)
int | currentWanted () const
| Current number of negative reduced costs which we still need.
void | setCurrentWanted (int value)
int | savedBestSequence () const
| Current best sequence.
void | setSavedBestSequence (int value)
virtual | ~ClpMatrixBase ()
| Destructor (has to be public).

## Protected Attributes

Data members
The data members are protected to allow access for derived classes.
double | objectiveOffset_
| Saved value of objective offset.
CoinBigIndex * | startColumn_
| Starts of each column.
int * | row_
| rows
double * | element_
| elements
double * | cost_
| costs
int * | fullStart_
| full starts
int * | id_
| ids of active columns (just index here)
unsigned char * | dynamicStatus_
| for status and which bound
double * | lowerColumn_
| Optional lower bounds on columns.
double * | upperColumn_
| Optional upper bounds on columns.
double * | lowerSet_
| Optional true lower bounds on sets.
double * | upperSet_
| Optional true upper bounds on sets.
int | numberGubColumns_
| size
int | firstAvailable_
| first free
int | savedFirstAvailable_
| saved first free
int | firstDynamic_
| first dynamic
int | lastDynamic_
| number of columns in dynamic model
CoinBigIndex | numberElements_
| size of working matrix (max)
Protected Attributes inherited from ClpGubMatrix
double | sumDualInfeasibilities_
| Sum of dual infeasibilities.
double | sumPrimalInfeasibilities_
| Sum of primal infeasibilities.
double | sumOfRelaxedDualInfeasibilities_
| Sum of Dual infeasibilities using tolerance based on error in duals.
double | sumOfRelaxedPrimalInfeasibilities_
| Sum of Primal infeasibilities using tolerance based on error in primals.
double | infeasibilityWeight_
| Infeasibility weight when last full pass done.
int * | start_
| Starts.
int * | end_
| End.
double * | lower_
| Lower bounds on sets.
double * | upper_
| Upper bounds on sets.
unsigned char * | status_
| Status of slacks.
unsigned char * | saveStatus_
| Saved status of slacks.
int * | savedKeyVariable_
| Saved key variables.
int * | backward_
| Backward pointer to set number.
int * | backToPivotRow_
| Backward pointer to pivot row !!!
double * | changeCost_
| Change in costs for keys.
int * | keyVariable_
| Key variable of set.
int * | next_
| Next basic variable in set - starts at key and end with -(set+1).
int * | toIndex_
| Backward pointer to index in CoinIndexedVector.
int * | fromIndex_
ClpSimplex * | model_
| Pointer back to model.
int | numberDualInfeasibilities_
| Number of dual infeasibilities.
int | numberPrimalInfeasibilities_
| Number of primal infeasibilities.
int | noCheck_
| If pricing will declare victory (i.e.
int | numberSets_
| Number of sets (gub rows).
int | saveNumber_
| Number in vector without gub extension.
int | possiblePivotKey_
| Pivot row of possible next key.
int | gubSlackIn_
| Gub slack in (set number or -1).
int | firstGub_
| First gub variables (same as start_[0] at present).
int | lastGub_
| last gub variable (same as end_[numberSets_-1] at present)
int | gubType_
| type of gub - 0 not contiguous, 1 contiguous add 8 bit to say no ubs on individual variables
Protected Attributes inherited from ClpPackedMatrix
CoinPackedMatrix * | matrix_
| Data.
int | numberActiveColumns_
| number of active columns (normally same as number of columns)
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.
ClpPackedMatrix2 * | rowCopy_
| Special row copy.
ClpPackedMatrix3 * | columnCopy_
| Special column copy.
Protected Attributes inherited from ClpMatrixBase
double * | rhsOffset_
| Effective RHS offset if it is being used.
double | startFraction_
| Current start of search space in matrix (as fraction).
double | endFraction_
| Current end of search space in matrix (as fraction).
double | savedBestDj_
| Best reduced cost so far.
int | originalWanted_
| Initial number of negative reduced costs wanted.
int | currentWanted_
| Current number of negative reduced costs which we still need.
int | savedBestSequence_
| Saved best sequence in pricing.
int | type_
| type (may be useful)
int | lastRefresh_
| If rhsOffset used this is iteration last refreshed.
int | refreshFrequency_
| If rhsOffset used this is refresh frequency (0==off).
int | minimumObjectsScan_
| Partial pricing tuning parameter - minimum number of "objects" to scan.
int | minimumGoodReducedCosts_
| Partial pricing tuning parameter - minimum number of negative reduced costs to get.
int | trueSequenceIn_
| True sequence in (i.e. from larger problem).
int | trueSequenceOut_
| True sequence out (i.e. from larger problem).
bool | skipDualCheck_
| whether to skip dual checks most of time

## gets and sets

enum | DynamicStatus { inSmall = 0x01 , atUpperBound = 0x02 , atLowerBound = 0x03 }
| enums for status of various sorts More...
bool | flagged (int i) const
| Whether flagged.
void | setFlagged (int i)
void | unsetFlagged (int i)
void | setDynamicStatus (int sequence, DynamicStatus status)
DynamicStatus | getDynamicStatus (int sequence) const
double | objectiveOffset () const
| Saved value of objective offset.
CoinBigIndex * | startColumn () const
| Starts of each column.
int * | row () const
| rows
double * | element () const
| elements
double * | cost () const
| costs
int * | fullStart () const
| full starts
int * | id () const
| ids of active columns (just index here)
double * | lowerColumn () const
| Optional lower bounds on columns.
double * | upperColumn () const
| Optional upper bounds on columns.
double * | lowerSet () const
| Optional true lower bounds on sets.
double * | upperSet () const
| Optional true upper bounds on sets.
int | numberGubColumns () const
| size
int | firstAvailable () const
| first free
void | setFirstAvailable (int value)
| set first free
int | firstDynamic () const
| first dynamic
int | lastDynamic () const
| number of columns in dynamic model
CoinBigIndex | numberElements () const
| size of working matrix (max)
unsigned char * | gubRowStatus () const
| Status region for gub slacks.
unsigned char * | dynamicStatus () const
| Status region for gub variables.
int | whichSet (int sequence) const
| Returns which set a variable is in.

## Additional Inherited Members

void | checkFlags (int type) const
| Check validity.
| ClpMatrixBase ()
| Default constructor.
| ClpMatrixBase (const ClpMatrixBase &)
ClpMatrixBase & | operator= (const ClpMatrixBase &)

## Detailed Description

This implements Gub rows plus a ClpPackedMatrix.

This a dynamic version which stores the gub part and dynamically creates matrix. All bounds are assumed to be zero and infinity

This is just a simple example for real column generation

Definition at line 19 of file ClpGubDynamicMatrix.hpp.

## Member Enumeration Documentation

## DynamicStatus

enum ClpGubDynamicMatrix::DynamicStatus

enums for status of various sorts

Enumerator
inSmall |
atUpperBound |
atLowerBound |

Definition at line 97 of file ClpGubDynamicMatrix.hpp.

## Constructor & Destructor Documentation

## ClpGubDynamicMatrix() [1/3]

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( |  | ) |

Default constructor.

## ~ClpGubDynamicMatrix()

virtual ClpGubDynamicMatrix::~ClpGubDynamicMatrix | ( |  | ) |

virtual

Destructor.

## ClpGubDynamicMatrix() [2/3]

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( | const ClpGubDynamicMatrix & |  | ) |

The copy constructor.

## ClpGubDynamicMatrix() [3/3]

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( | ClpSimplex * | model,
|  | int | numberSets,
|  | int | numberColumns,
|  | const int * | starts,
|  | const double * | lower,
|  | const double * | upper,
|  | const CoinBigIndex * | startColumn,
|  | const int * | row,
|  | const double * | element,
|  | const double * | cost,
|  | const double * | lowerColumn = NULL,
|  | const double * | upperColumn = NULL,
|  | const unsigned char * | status = NULL )

This is the real constructor.

It assumes factorization frequency will not be changed. This resizes model !!!!

## Member Function Documentation

## partialPricing()

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

virtual

Partial pricing.

Reimplemented from ClpGubMatrix.

## synchronize()

virtual int ClpGubDynamicMatrix::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=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming.

Reimplemented from ClpGubMatrix.

## useEffectiveRhs()

virtual void ClpGubDynamicMatrix::useEffectiveRhs | ( | ClpSimplex * | model,
|  | bool | cheapest = true )

virtual

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

Reimplemented from ClpGubMatrix.

## updatePivot()

virtual int ClpGubDynamicMatrix::updatePivot | ( | ClpSimplex * | model,
|  | double | oldInValue,
|  | double | oldOutValue )

virtual

update information for a pivot (and effective rhs)

Reimplemented from ClpGubMatrix.

## insertNonBasic()

void ClpGubDynamicMatrix::insertNonBasic | ( | int | sequence,
|  | int | iSet )

Add a new variable to a set.

## rhsOffset()

virtual double * ClpGubDynamicMatrix::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 ClpGubMatrix.

## times() [1/2]

virtual void ClpGubDynamicMatrix::times | ( | double | scalar,
|  | const double * | x,
|  | double * | y ) const

virtual

Return `y + A * scalar *x` in `y`.

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

Reimplemented from ClpPackedMatrix.

## checkFeasible()

virtual int ClpGubDynamicMatrix::checkFeasible | ( | ClpSimplex * | model,
|  | double & | sum ) const

virtual

Just for debug Returns sum and number of primal infeasibilities.

Recomputes keys

Reimplemented from ClpMatrixBase.

## cleanData()

void ClpGubDynamicMatrix::cleanData | ( | ClpSimplex * | model | ) |

Cleans data after setWarmStart.

## operator=()

ClpGubDynamicMatrix & ClpGubDynamicMatrix::operator= | ( | const ClpGubDynamicMatrix & |  | ) |

## clone()

virtual ClpMatrixBase * ClpGubDynamicMatrix::clone | ( |  | ) | const

virtual

Clone.

Reimplemented from ClpGubMatrix.

## flagged()

bool ClpGubDynamicMatrix::flagged | ( | int | i | ) | const

inline

Whether flagged.

Definition at line 103 of file ClpGubDynamicMatrix.hpp.

## setFlagged()

void ClpGubDynamicMatrix::setFlagged | ( | int | i | ) |

inline

Definition at line 107 of file ClpGubDynamicMatrix.hpp.

## unsetFlagged()

void ClpGubDynamicMatrix::unsetFlagged | ( | int | i | ) |

inline

Definition at line 111 of file ClpGubDynamicMatrix.hpp.

## setDynamicStatus()

void ClpGubDynamicMatrix::setDynamicStatus | ( | int | sequence,
|  | DynamicStatus | status )

inline

Definition at line 115 of file ClpGubDynamicMatrix.hpp.

## getDynamicStatus()

DynamicStatus ClpGubDynamicMatrix::getDynamicStatus | ( | int | sequence | ) | const

inline

Definition at line 121 of file ClpGubDynamicMatrix.hpp.

## objectiveOffset()

double ClpGubDynamicMatrix::objectiveOffset | ( |  | ) | const

inline

Saved value of objective offset.

Definition at line 126 of file ClpGubDynamicMatrix.hpp.

## startColumn()

CoinBigIndex * ClpGubDynamicMatrix::startColumn | ( |  | ) | const

inline

Starts of each column.

Definition at line 131 of file ClpGubDynamicMatrix.hpp.

## row()

int * ClpGubDynamicMatrix::row | ( |  | ) | const

inline

rows

Definition at line 136 of file ClpGubDynamicMatrix.hpp.

## element()

double * ClpGubDynamicMatrix::element | ( |  | ) | const

inline

elements

Definition at line 141 of file ClpGubDynamicMatrix.hpp.

## cost()

double * ClpGubDynamicMatrix::cost | ( |  | ) | const

inline

costs

Definition at line 146 of file ClpGubDynamicMatrix.hpp.

## fullStart()

int * ClpGubDynamicMatrix::fullStart | ( |  | ) | const

inline

full starts

Definition at line 151 of file ClpGubDynamicMatrix.hpp.

## id()

int * ClpGubDynamicMatrix::id | ( |  | ) | const

inline

ids of active columns (just index here)

Definition at line 156 of file ClpGubDynamicMatrix.hpp.

## lowerColumn()

double * ClpGubDynamicMatrix::lowerColumn | ( |  | ) | const

inline

Optional lower bounds on columns.

Definition at line 161 of file ClpGubDynamicMatrix.hpp.

## upperColumn()

double * ClpGubDynamicMatrix::upperColumn | ( |  | ) | const

inline

Optional upper bounds on columns.

Definition at line 166 of file ClpGubDynamicMatrix.hpp.

## lowerSet()

double * ClpGubDynamicMatrix::lowerSet | ( |  | ) | const

inline

Optional true lower bounds on sets.

Definition at line 171 of file ClpGubDynamicMatrix.hpp.

## upperSet()

double * ClpGubDynamicMatrix::upperSet | ( |  | ) | const

inline

Optional true upper bounds on sets.

Definition at line 176 of file ClpGubDynamicMatrix.hpp.

## numberGubColumns()

int ClpGubDynamicMatrix::numberGubColumns | ( |  | ) | const

inline

size

Definition at line 181 of file ClpGubDynamicMatrix.hpp.

## firstAvailable()

int ClpGubDynamicMatrix::firstAvailable | ( |  | ) | const

inline

first free

Definition at line 186 of file ClpGubDynamicMatrix.hpp.

## setFirstAvailable()

void ClpGubDynamicMatrix::setFirstAvailable | ( | int | value | ) |

inline

set first free

Definition at line 191 of file ClpGubDynamicMatrix.hpp.

## firstDynamic()

int ClpGubDynamicMatrix::firstDynamic | ( |  | ) | const

inline

first dynamic

Definition at line 196 of file ClpGubDynamicMatrix.hpp.

## lastDynamic()

int ClpGubDynamicMatrix::lastDynamic | ( |  | ) | const

inline

number of columns in dynamic model

Definition at line 201 of file ClpGubDynamicMatrix.hpp.

## numberElements()

CoinBigIndex ClpGubDynamicMatrix::numberElements | ( |  | ) | const

inline

size of working matrix (max)

Definition at line 206 of file ClpGubDynamicMatrix.hpp.

## gubRowStatus()

unsigned char * ClpGubDynamicMatrix::gubRowStatus | ( |  | ) | const

inline

Status region for gub slacks.

Definition at line 211 of file ClpGubDynamicMatrix.hpp.

## dynamicStatus()

unsigned char * ClpGubDynamicMatrix::dynamicStatus | ( |  | ) | const

inline

Status region for gub variables.

Definition at line 216 of file ClpGubDynamicMatrix.hpp.

## whichSet()

int ClpGubDynamicMatrix::whichSet | ( | int | sequence | ) | const

Returns which set a variable is in.

## times() [2/2]

virtual void ClpPackedMatrix::times | ( | double | scalar,
|  | const double * | x,
|  | double * | y,
|  | const double * | rowScale,
|  | const double * | columnScale ) const

virtual

And for scaling.

Reimplemented from ClpPackedMatrix.

## Member Data Documentation

## objectiveOffset_

double ClpGubDynamicMatrix::objectiveOffset_

protected

Saved value of objective offset.

Definition at line 229 of file ClpGubDynamicMatrix.hpp.

## startColumn_

CoinBigIndex* ClpGubDynamicMatrix::startColumn_

protected

Starts of each column.

Definition at line 231 of file ClpGubDynamicMatrix.hpp.

## row_

int* ClpGubDynamicMatrix::row_

protected

rows

Definition at line 233 of file ClpGubDynamicMatrix.hpp.

## element_

double* ClpGubDynamicMatrix::element_

protected

elements

Definition at line 235 of file ClpGubDynamicMatrix.hpp.

## cost_

double* ClpGubDynamicMatrix::cost_

protected

costs

Definition at line 237 of file ClpGubDynamicMatrix.hpp.

## fullStart_

int* ClpGubDynamicMatrix::fullStart_

protected

full starts

Definition at line 239 of file ClpGubDynamicMatrix.hpp.

## id_

int* ClpGubDynamicMatrix::id_

protected

ids of active columns (just index here)

Definition at line 241 of file ClpGubDynamicMatrix.hpp.

## dynamicStatus_

unsigned char* ClpGubDynamicMatrix::dynamicStatus_

protected

for status and which bound

Definition at line 243 of file ClpGubDynamicMatrix.hpp.

## lowerColumn_

double* ClpGubDynamicMatrix::lowerColumn_

protected

Optional lower bounds on columns.

Definition at line 245 of file ClpGubDynamicMatrix.hpp.

## upperColumn_

double* ClpGubDynamicMatrix::upperColumn_

protected

Optional upper bounds on columns.

Definition at line 247 of file ClpGubDynamicMatrix.hpp.

## lowerSet_

double* ClpGubDynamicMatrix::lowerSet_

protected

Optional true lower bounds on sets.

Definition at line 249 of file ClpGubDynamicMatrix.hpp.

## upperSet_

double* ClpGubDynamicMatrix::upperSet_

protected

Optional true upper bounds on sets.

Definition at line 251 of file ClpGubDynamicMatrix.hpp.

## numberGubColumns_

int ClpGubDynamicMatrix::numberGubColumns_

protected

size

Definition at line 253 of file ClpGubDynamicMatrix.hpp.

## firstAvailable_

int ClpGubDynamicMatrix::firstAvailable_

protected

first free

Definition at line 255 of file ClpGubDynamicMatrix.hpp.

## savedFirstAvailable_

int ClpGubDynamicMatrix::savedFirstAvailable_

protected

saved first free

Definition at line 257 of file ClpGubDynamicMatrix.hpp.

## firstDynamic_

int ClpGubDynamicMatrix::firstDynamic_

protected

first dynamic

Definition at line 259 of file ClpGubDynamicMatrix.hpp.

## lastDynamic_

int ClpGubDynamicMatrix::lastDynamic_

protected

number of columns in dynamic model

Definition at line 261 of file ClpGubDynamicMatrix.hpp.

## numberElements_

CoinBigIndex ClpGubDynamicMatrix::numberElements_

protected

size of working matrix (max)

Definition at line 263 of file ClpGubDynamicMatrix.hpp.

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

- Clp/src/ClpGubDynamicMatrix.hpp