Loading...
Searching...
No Matches
ClpDynamicExampleMatrix Class Reference

This implements a dynamic matrix when we have a limit on the number of "interesting rows". More...

`#include <ClpDynamicExampleMatrix.hpp>`

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

## Public Member Functions

Main functions provided
virtual void | partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
| Partial pricing.
virtual void | createVariable (ClpSimplex *model, int &bestSequence)
| Creates a variable.
virtual void | packDown (const int *in, int numberToPack)
| If addColumn forces compression then this allows descendant to know what to do.
Constructors, destructor
| ClpDynamicExampleMatrix ()
| Default constructor.

ClpDynamicExampleMatrix (ClpSimplex *model, int numberSets, int numberColumns, const CoinBigIndex *starts, const double *lower, const double *upper, const CoinBigIndex *startColumn, const int *row, const double *element, const double *cost, const double *columnLower=NULL, const double *columnUpper=NULL, const unsigned char *status=NULL, const unsigned char *dynamicStatus=NULL, int numberIds=0, const int *ids=NULL)

| This is the real constructor.
virtual | ~ClpDynamicExampleMatrix ()
| Destructor.
Copy method
| ClpDynamicExampleMatrix (const ClpDynamicExampleMatrix &)
| The copy constructor.
ClpDynamicExampleMatrix & | operator= (const ClpDynamicExampleMatrix &)
virtual ClpMatrixBase * | clone () const
| Clone.
gets and sets
CoinBigIndex * | startColumnGen () const
| Starts of each column.
int * | rowGen () const
| rows
double * | elementGen () const
| elements
double * | costGen () const
| costs
CoinBigIndex * | fullStartGen () const
| full starts
int * | idGen () const
| ids in next level matrix
double * | columnLowerGen () const
| Optional lower bounds on columns.
double * | columnUpperGen () const
| Optional upper bounds on columns.
int | numberColumns () const
| size
void | setDynamicStatusGen (int sequence, DynamicStatus status)
DynamicStatus | getDynamicStatusGen (int sequence) const
bool | flaggedGen (int i) const
| Whether flagged.
void | setFlaggedGen (int i)
void | unsetFlagged (int i)
Public Member Functions inherited from ClpDynamicMatrix
virtual int | updatePivot (ClpSimplex *model, double oldInValue, double oldOutValue)
| update information for a pivot (and effective rhs)
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`.
void | modifyOffset (int sequence, double amount)
| Modifies rhs offset.
double | keyValue (int iSet) const
| Gets key value when none in small.
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 int | refresh (ClpSimplex *model)
| Purely for column generation and similar ideas.
virtual double | reducedCost (ClpSimplex *model, int sequence) const
| Returns reduced cost of a variable.
void | gubCrash ()
| Does gub crash.
void | writeMps (const char *name)
| Writes out model (without names).
void | initialProblem ()
| Populates initial matrix from dynamic status.
int | addColumn (CoinBigIndex numberEntries, const int *row, const double *element, double cost, double lower, double upper, int iSet, DynamicStatus status)
| Adds in a column to gub structure (called from descendant) and returns sequence.
double | columnLower (int sequence) const
| Gets lower bound (to simplify coding).
double | columnUpper (int sequence) const
| Gets upper bound (to simplify coding).
virtual void | times (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
| And for scaling.
| ClpDynamicMatrix ()
| Default constructor.
| ClpDynamicMatrix (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 *columnLower=NULL, const double *columnUpper=NULL, const unsigned char *status=NULL, const unsigned char *dynamicStatus=NULL)
| This is the real constructor.
virtual | ~ClpDynamicMatrix ()
| Destructor.
| ClpDynamicMatrix (const ClpDynamicMatrix &)
| The copy constructor.
| ClpDynamicMatrix (const CoinPackedMatrix &)
| The copy constructor from an CoinPackedMatrix.
ClpDynamicMatrix & | operator= (const ClpDynamicMatrix &)
ClpSimplex::Status | getStatus (int sequence) const
| Status of row slacks.
void | setStatus (int sequence, ClpSimplex::Status status)
bool | flaggedSlack (int i) const
| Whether flagged slack.
void | setFlaggedSlack (int i)
void | unsetFlaggedSlack (int i)
int | numberSets () const
| Number of sets (dynamic rows).
int | numberGubEntries () const
| Number of possible gub variables.
int * | startSets () const
| Sets.
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 * | id () const
| ids of active columns (just index here)
double * | columnLower () const
| Optional lower bounds on columns.
double * | columnUpper () const
| Optional upper bounds on columns.
double * | lowerSet () const
| Lower bounds on sets.
double * | upperSet () const
| Upper bounds on sets.
int | numberGubColumns () const
| size
int | firstAvailable () const
| first free
int | firstDynamic () const
| first dynamic
int | lastDynamic () const
| number of columns in dynamic model
int | numberStaticRows () const
| number of rows in original model
CoinBigIndex | numberElements () const
| size of working matrix (max)
int * | keyVariable () const
void | switchOffCheck ()
| Switches off dj checking each factorization (for BIG models).
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.
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 ClpMatrixBase * | reverseOrderedCopy () const
| Returns a new matrix in reverse order without gaps.
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 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 | 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 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 void | reallyScale (const double *rowScale, const double *columnScale)
virtual void | setDimensions (int numrows, int numcols)
| Set the dimensions of the matrix.
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.
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`.
virtual void | transposeTimes (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A in `z`.`
void | transposeTimesByColumn (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A in `z`.`
virtual void | transposeTimesByRow (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
| Return `x * scalar * A 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 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.
virtual ClpMatrixBase * | subsetClone (int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
| Subset clone (without gaps).
void | specialRowCopy (ClpSimplex *model, const ClpMatrixBase *rowCopy)
| make special row copy
void | specialColumnCopy (ClpSimplex *model)
| make special column copy
virtual void | correctSequence (const ClpSimplex *model, int &sequenceIn, int &sequenceOut)
| Correct sequence in and out to give true value.
Public Member Functions inherited from ClpMatrixBase
virtual bool | canGetRowCopy () const
| Returns true if can create row copy.
virtual int | hiddenRows () const
| Returns number of hidden rows e.g. gub.
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.
virtual void | primalExpanded (ClpSimplex *model, int mode)
| utility primal function for dealing with dynamic constraints 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 int | checkFeasible (ClpSimplex *model, double &sum) const
| Just for debug if odd type matrix.
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.
int | numberColumns_
| size
CoinBigIndex * | startColumnGen_
| Starts of each column.
int * | rowGen_
| rows
double * | elementGen_
| elements
double * | costGen_
| costs
CoinBigIndex * | fullStartGen_
| start of each set
unsigned char * | dynamicStatusGen_
| for status and which bound
int * | idGen_
| identifier for each variable up one level (startColumn_, etc).
double * | columnLowerGen_
| Optional lower bounds on columns.
double * | columnUpperGen_
| Optional upper bounds on columns.
Protected Attributes inherited from ClpDynamicMatrix
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 | savedBestGubDual_
| Saved best dual on gub row in pricing.
int | savedBestSet_
| Saved best set in pricing.
int * | backToPivotRow_
| Backward pointer to pivot row !!!
int * | keyVariable_
| Key variable of set (only accurate if none in small problem).
int * | toIndex_
| Backward pointer to extra row.
int * | fromIndex_
int | numberSets_
| Number of sets (dynamic rows).
int | numberActiveSets_
| Number of active sets.
double | objectiveOffset_
| Saved value of objective offset.
double * | lowerSet_
| Lower bounds on sets.
double * | upperSet_
| Upper bounds on sets.
unsigned char * | status_
| Status of slack on set.
ClpSimplex * | model_
| Pointer back to model.
int | firstAvailable_
| first free
int | firstAvailableBefore_
| first free when iteration started
int | firstDynamic_
| first dynamic
int | lastDynamic_
| number of columns in dynamic model
int | numberStaticRows_
| number of rows in original model
CoinBigIndex | numberElements_
| size of working matrix (max)
int | numberDualInfeasibilities_
| Number of dual infeasibilities.
int | numberPrimalInfeasibilities_
| Number of primal infeasibilities.
int | noCheck_
| If pricing will declare victory (i.e.
double | infeasibilityWeight_
| Infeasibility weight when last full pass done.
int | numberGubColumns_
| size
int | maximumGubColumns_
| current maximum number of columns (then compress)
CoinBigIndex | maximumElements_
| current maximum number of elemnts (then compress)
int * | startSet_
| Start of each set.
int * | next_
| next in chain
CoinBigIndex * | startColumn_
| Starts of each column.
int * | row_
| rows
double * | element_
| elements
double * | cost_
| costs
int * | id_
| ids of active columns (just index here)
unsigned char * | dynamicStatus_
| for status and which bound
double * | columnLower_
| Optional lower bounds on columns.
double * | columnUpper_
| Optional upper bounds on columns.
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

## Additional Inherited Members

Public Types inherited from ClpDynamicMatrix
enum | DynamicStatus { soloKey = 0x00 , inSmall = 0x01 , atUpperBound = 0x02 , atLowerBound = 0x03 }
| enums for status of various sorts More...
void | checkFlags (int type) const
| Check validity.
| ClpMatrixBase ()
| Default constructor.
| ClpMatrixBase (const ClpMatrixBase &)
ClpMatrixBase & | operator= (const ClpMatrixBase &)

## Detailed Description

This implements a dynamic matrix when we have a limit on the number of "interesting rows".

This version inherits from ClpDynamicMatrix and knows that the real matrix is gub. This acts just like ClpDynamicMatrix but generates columns. This "generates" columns by choosing from stored set. It is maent as a starting point as to how you could use shortest path to generate columns.

So it has its own copy of all data needed. It populates ClpDynamicWatrix with enough to allow for gub keys and active variables. In turn ClpDynamicMatrix populates a CoinPackedMatrix with active columns and rows.

As there is one copy here and one in ClpDynamicmatrix these names end in Gen_

It is obviously more efficient to just use ClpDynamicMatrix but the ideas is to show how much code a user would have to write.

This does not work very well with bounds

Definition at line 32 of file ClpDynamicExampleMatrix.hpp.

## Constructor & Destructor Documentation

## ClpDynamicExampleMatrix() [1/3]

ClpDynamicExampleMatrix::ClpDynamicExampleMatrix | ( |  | ) |

Default constructor.

## ClpDynamicExampleMatrix() [2/3]

ClpDynamicExampleMatrix::ClpDynamicExampleMatrix | ( | ClpSimplex * | model,
|  | int | numberSets,
|  | int | numberColumns,
|  | const CoinBigIndex * | starts,
|  | const double * | lower,
|  | const double * | upper,
|  | const CoinBigIndex * | startColumn,
|  | const int * | row,
|  | const double * | element,
|  | const double * | cost,
|  | const double * | columnLower = NULL,
|  | const double * | columnUpper = NULL,
|  | const unsigned char * | status = NULL,
|  | const unsigned char * | dynamicStatus = NULL,
|  | int | numberIds = 0,
|  | const int * | ids = NULL )

This is the real constructor.

It assumes factorization frequency will not be changed. This resizes model !!!! The contents of original matrix in model will be taken over and original matrix will be sanitized so can be deleted (to avoid a very small memory leak)

## ~ClpDynamicExampleMatrix()

virtual ClpDynamicExampleMatrix::~ClpDynamicExampleMatrix | ( |  | ) |

virtual

Destructor.

## ClpDynamicExampleMatrix() [3/3]

ClpDynamicExampleMatrix::ClpDynamicExampleMatrix | ( | const ClpDynamicExampleMatrix & |  | ) |

The copy constructor.

## Member Function Documentation

## partialPricing()

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

virtual

Partial pricing.

Reimplemented from ClpDynamicMatrix.

## createVariable()

virtual void ClpDynamicExampleMatrix::createVariable | ( | ClpSimplex * | model,
|  | int & | bestSequence )

virtual

Creates a variable.

This is called after partial pricing and will modify matrix. Will update bestSequence.

Reimplemented from ClpDynamicMatrix.

## packDown()

virtual void ClpDynamicExampleMatrix::packDown | ( | const int * | in,
|  | int | numberToPack )

virtual

If addColumn forces compression then this allows descendant to know what to do.

If >= then entry stayed in, if -1 then entry went out to lower bound.of zero. Entries at upper bound (really nonzero) never go out (at present).

Reimplemented from ClpDynamicMatrix.

## operator=()

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

## clone()

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

virtual

Clone.

Reimplemented from ClpDynamicMatrix.

## startColumnGen()

CoinBigIndex * ClpDynamicExampleMatrix::startColumnGen | ( |  | ) | const

inline

Starts of each column.

Definition at line 98 of file ClpDynamicExampleMatrix.hpp.

## rowGen()

int * ClpDynamicExampleMatrix::rowGen | ( |  | ) | const

inline

rows

Definition at line 103 of file ClpDynamicExampleMatrix.hpp.

## elementGen()

double * ClpDynamicExampleMatrix::elementGen | ( |  | ) | const

inline

elements

Definition at line 108 of file ClpDynamicExampleMatrix.hpp.

## costGen()

double * ClpDynamicExampleMatrix::costGen | ( |  | ) | const

inline

costs

Definition at line 113 of file ClpDynamicExampleMatrix.hpp.

## fullStartGen()

CoinBigIndex * ClpDynamicExampleMatrix::fullStartGen | ( |  | ) | const

inline

full starts

Definition at line 118 of file ClpDynamicExampleMatrix.hpp.

## idGen()

int * ClpDynamicExampleMatrix::idGen | ( |  | ) | const

inline

ids in next level matrix

Definition at line 123 of file ClpDynamicExampleMatrix.hpp.

## columnLowerGen()

double * ClpDynamicExampleMatrix::columnLowerGen | ( |  | ) | const

inline

Optional lower bounds on columns.

Definition at line 128 of file ClpDynamicExampleMatrix.hpp.

## columnUpperGen()

double * ClpDynamicExampleMatrix::columnUpperGen | ( |  | ) | const

inline

Optional upper bounds on columns.

Definition at line 133 of file ClpDynamicExampleMatrix.hpp.

## numberColumns()

int ClpDynamicExampleMatrix::numberColumns | ( |  | ) | const

inline

size

Definition at line 138 of file ClpDynamicExampleMatrix.hpp.

## setDynamicStatusGen()

void ClpDynamicExampleMatrix::setDynamicStatusGen | ( | int | sequence,
|  | DynamicStatus | status )

inline

Definition at line 142 of file ClpDynamicExampleMatrix.hpp.

## getDynamicStatusGen()

DynamicStatus ClpDynamicExampleMatrix::getDynamicStatusGen | ( | int | sequence | ) | const

inline

Definition at line 148 of file ClpDynamicExampleMatrix.hpp.

## flaggedGen()

bool ClpDynamicExampleMatrix::flaggedGen | ( | int | i | ) | const

inline

Whether flagged.

Definition at line 153 of file ClpDynamicExampleMatrix.hpp.

## setFlaggedGen()

void ClpDynamicExampleMatrix::setFlaggedGen | ( | int | i | ) |

inline

Definition at line 157 of file ClpDynamicExampleMatrix.hpp.

## unsetFlagged()

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

inline

Definition at line 161 of file ClpDynamicExampleMatrix.hpp.

## Member Data Documentation

## numberColumns_

int ClpDynamicExampleMatrix::numberColumns_

protected

size

Definition at line 172 of file ClpDynamicExampleMatrix.hpp.

## startColumnGen_

CoinBigIndex* ClpDynamicExampleMatrix::startColumnGen_

protected

Starts of each column.

Definition at line 174 of file ClpDynamicExampleMatrix.hpp.

## rowGen_

int* ClpDynamicExampleMatrix::rowGen_

protected

rows

Definition at line 176 of file ClpDynamicExampleMatrix.hpp.

## elementGen_

double* ClpDynamicExampleMatrix::elementGen_

protected

elements

Definition at line 178 of file ClpDynamicExampleMatrix.hpp.

## costGen_

double* ClpDynamicExampleMatrix::costGen_

protected

costs

Definition at line 180 of file ClpDynamicExampleMatrix.hpp.

## fullStartGen_

CoinBigIndex* ClpDynamicExampleMatrix::fullStartGen_

protected

start of each set

Definition at line 182 of file ClpDynamicExampleMatrix.hpp.

## dynamicStatusGen_

unsigned char* ClpDynamicExampleMatrix::dynamicStatusGen_

protected

for status and which bound

Definition at line 184 of file ClpDynamicExampleMatrix.hpp.

## idGen_

int* ClpDynamicExampleMatrix::idGen_

protected

identifier for each variable up one level (startColumn_, etc).

This is of length maximumGubColumns_. For this version it is just sequence number at this level

Definition at line 188 of file ClpDynamicExampleMatrix.hpp.

## columnLowerGen_

double* ClpDynamicExampleMatrix::columnLowerGen_

protected

Optional lower bounds on columns.

Definition at line 190 of file ClpDynamicExampleMatrix.hpp.

## columnUpperGen_

double* ClpDynamicExampleMatrix::columnUpperGen_

protected

Optional upper bounds on columns.

Definition at line 192 of file ClpDynamicExampleMatrix.hpp.

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

- Clp/src/ClpDynamicExampleMatrix.hpp