#include <ClpGubMatrix.hpp>
Inheritance diagram for ClpGubMatrix:
Public Member Functions | |
virtual ClpMatrixBase * | reverseOrderedCopy () const |
Returns a new matrix in reverse order without gaps (GUB wants NULL). | |
virtual CoinBigIndex | fillBasis (ClpSimplex *model, const int *whichColumn, int numberRowBasic, int &numberColumnBasic, int *row, int *column, double *element) |
If element NULL returns number of elements in column part of basis, If not NULL fills in as well. | |
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 | partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted) |
Partial pricing. | |
virtual int | hiddenRows () const |
Returns number of hidden rows e.g. gub. | |
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 . | |
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 int | updatePivot (ClpSimplex *model, double oldInValue, double oldOutValue) |
update information for a pivot (and effective rhs) | |
virtual void | useEffectiveRhs (ClpSimplex *model, bool cheapest=true) |
Sets up an effective RHS and does gub crash if needed. | |
virtual double * | rhsOffset (ClpSimplex *model, bool forceRefresh=false, bool check=false) |
Returns effective RHS offset if it is being used. | |
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. | |
virtual void | correctSequence (int &sequenceIn, int &sequenceOut) const |
Correct sequence in and out to give true value. | |
Constructors, destructor | |
ClpGubMatrix () | |
Default constructor. | |
virtual | ~ClpGubMatrix () |
Destructor. | |
Copy method | |
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) | |
The copy constructor. | |
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 &) |
The copy constructor. | |
virtual ClpMatrixBase * | clone () const |
Clone. | |
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. | |
gets and sets | |
ClpSimplex::Status | getStatus (int sequence) const |
Status. | |
void | setStatus (int sequence, ClpSimplex::Status status) |
Status. | |
void | setFlagged (int sequence) |
To flag a variable. | |
void | clearFlagged (int sequence) |
Status. | |
bool | flagged (int sequence) const |
Status. | |
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 |
Status. | |
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). | |
Protected Attributes | |
Data members | |
The data members are protected to allow access for derived classes. | |
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_ |
Sum of dual infeasibilities. | |
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 |
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 19 of file ClpGubMatrix.hpp.
|
Default constructor.
|
|
Destructor.
|
|
The copy constructor.
|
|
The copy constructor from an CoinPackedMatrix.
|
|
Subset constructor (without gaps). Duplicates are allowed and order is as given |
|
The copy constructor.
|
|
This takes over ownership (for space reasons).
|
|
This takes over ownership (for space reasons) and is the real constructor.
|
|
Returns a new matrix in reverse order without gaps (GUB wants NULL).
Reimplemented from ClpPackedMatrix. |
|
If element NULL returns number of elements in column part of basis, If not NULL fills in as well.
Reimplemented from ClpPackedMatrix. |
|
Unpacks a column into an CoinIndexedvector.
Reimplemented from ClpPackedMatrix. |
|
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. |
|
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
Reimplemented from ClpPackedMatrix. |
|
Adds multiple of a column into an array.
Reimplemented from ClpPackedMatrix. |
|
Partial pricing.
Reimplemented from ClpPackedMatrix. Reimplemented in ClpGubDynamicMatrix. |
|
Returns number of hidden rows e.g. gub.
Reimplemented from ClpMatrixBase. |
|
Return 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. |
|
Return 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. |
|
Return Note - z always packed mode Squashes small elements and knows about ClpSimplex Reimplemented from ClpPackedMatrix. |
|
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. |
|
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. |
|
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. |
|
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. |
|
update information for a pivot (and effective rhs)
Reimplemented from ClpMatrixBase. Reimplemented in ClpGubDynamicMatrix. |
|
Sets up an effective RHS and does gub crash if needed.
Reimplemented in ClpGubDynamicMatrix. |
|
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. |
|
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. |
|
Correct sequence in and out to give true value.
Reimplemented from ClpMatrixBase. |
|
The copy constructor.
|
|
Clone.
Reimplemented from ClpPackedMatrix. Reimplemented in ClpGubDynamicMatrix. |
|
Subset clone (without gaps). Duplicates are allowed and order is as given Reimplemented from ClpPackedMatrix. |
|
redoes next_ for a set.
|
|
Status.
Definition at line 202 of file ClpGubMatrix.hpp. References status_. |
|
Status.
Definition at line 204 of file ClpGubMatrix.hpp. References status_. |
|
To flag a variable.
Reimplemented in ClpGubDynamicMatrix. Definition at line 211 of file ClpGubMatrix.hpp. References status_. |
|
Status.
Definition at line 215 of file ClpGubMatrix.hpp. References status_. |
|
Status.
Reimplemented in ClpGubDynamicMatrix. Definition at line 219 of file ClpGubMatrix.hpp. References status_. |
|
To say key is above ub.
Definition at line 222 of file ClpGubMatrix.hpp. References status_. |
|
To say key is feasible.
Definition at line 229 of file ClpGubMatrix.hpp. References status_. |
|
To say key is below lb.
Definition at line 236 of file ClpGubMatrix.hpp. References status_. |
|
Status.
Definition at line 242 of file ClpGubMatrix.hpp. References status_. |
|
Starts.
Definition at line 249 of file ClpGubMatrix.hpp. References start_. |
|
End.
Definition at line 252 of file ClpGubMatrix.hpp. References end_. |
|
Lower bounds on sets.
Definition at line 255 of file ClpGubMatrix.hpp. References lower_. |
|
Upper bounds on sets.
Definition at line 258 of file ClpGubMatrix.hpp. References upper_. |
|
Key variable of set.
Definition at line 261 of file ClpGubMatrix.hpp. References keyVariable_. |
|
Backward pointer to set number.
Definition at line 264 of file ClpGubMatrix.hpp. References backward_. |
|
Number of sets (gub rows).
Definition at line 267 of file ClpGubMatrix.hpp. References numberSets_. |
|
Switches off dj checking each factorization (for BIG models).
|
|
Sum of dual infeasibilities.
Definition at line 279 of file ClpGubMatrix.hpp. |
|
Sum of primal infeasibilities.
Definition at line 281 of file ClpGubMatrix.hpp. |
|
Sum of Dual infeasibilities using tolerance based on error in duals.
Definition at line 283 of file ClpGubMatrix.hpp. |
|
Sum of Primal infeasibilities using tolerance based on error in primals.
Definition at line 285 of file ClpGubMatrix.hpp. |
|
Infeasibility weight when last full pass done.
Definition at line 287 of file ClpGubMatrix.hpp. |
|
Starts.
Definition at line 289 of file ClpGubMatrix.hpp. Referenced by start(). |
|
End.
Definition at line 291 of file ClpGubMatrix.hpp. Referenced by end(). |
|
Lower bounds on sets.
Definition at line 293 of file ClpGubMatrix.hpp. Referenced by lower(). |
|
Upper bounds on sets.
Definition at line 295 of file ClpGubMatrix.hpp. Referenced by upper(). |
|
Status of slacks.
Definition at line 297 of file ClpGubMatrix.hpp. Referenced by clearFlagged(), flagged(), getStatus(), setAbove(), setBelow(), setFeasible(), setFlagged(), setStatus(), and weight(). |
|
Saved status of slacks.
Definition at line 299 of file ClpGubMatrix.hpp. |
|
Saved key variables.
Definition at line 301 of file ClpGubMatrix.hpp. |
|
Backward pointer to set number.
Definition at line 303 of file ClpGubMatrix.hpp. Referenced by backward(). |
|
Backward pointer to pivot row !!!
Definition at line 305 of file ClpGubMatrix.hpp. |
|
Change in costs for keys.
Definition at line 307 of file ClpGubMatrix.hpp. |
|
Key variable of set.
Definition at line 309 of file ClpGubMatrix.hpp. Referenced by keyVariable(). |
|
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 313 of file ClpGubMatrix.hpp. |
|
Backward pointer to index in CoinIndexedVector.
Definition at line 315 of file ClpGubMatrix.hpp. |
|
Sum of dual infeasibilities.
Definition at line 317 of file ClpGubMatrix.hpp. |
|
Pointer back to model.
Definition at line 319 of file ClpGubMatrix.hpp. |
|
Number of dual infeasibilities.
Definition at line 321 of file ClpGubMatrix.hpp. |
|
Number of primal infeasibilities.
Definition at line 323 of file ClpGubMatrix.hpp. |
|
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 329 of file ClpGubMatrix.hpp. |
|
Number of sets (gub rows).
Definition at line 331 of file ClpGubMatrix.hpp. Referenced by numberSets(). |
|
Number in vector without gub extension.
Definition at line 333 of file ClpGubMatrix.hpp. |
|
Pivot row of possible next key.
Definition at line 335 of file ClpGubMatrix.hpp. |
|
Gub slack in (set number or -1).
Definition at line 337 of file ClpGubMatrix.hpp. |
|
First gub variables (same as start_[0] at present).
Definition at line 339 of file ClpGubMatrix.hpp. |
|
last gub variable (same as end_[numberSets_-1] at present)
Definition at line 341 of file ClpGubMatrix.hpp. |
|
type of gub - 0 not contiguous, 1 contiguous add 8 bit to say no ubs on individual variables
Definition at line 344 of file ClpGubMatrix.hpp. |