Go to the documentation of this file.
9 #include "CoinPragma.hpp"
30 int &numberColumnBasic);
33 const int *whichColumn,
34 int &numberColumnBasic,
36 int *rowCount,
int *columnCount,
37 CoinFactorizationDouble *element);
47 CoinIndexedVector *rowArray,
51 virtual void add(
const ClpSimplex *model, CoinIndexedVector *rowArray,
52 int column,
double multiplier)
const;
55 int column,
double multiplier)
const;
58 int &bestSequence,
int &numberWanted);
72 const CoinIndexedVector *x,
74 CoinIndexedVector *z)
const;
81 const CoinIndexedVector *x,
83 CoinIndexedVector *z)
const;
88 const CoinIndexedVector *x,
89 const CoinIndexedVector *y,
90 CoinIndexedVector *z)
const;
113 double *other,
int mode);
177 int numberRows,
const int *whichRows,
178 int numberColumns,
const int *whichColumns);
180 int numberRows,
const int *whichRows,
181 int numberColumns,
const int *whichColumns);
191 const unsigned char *status = NULL);
199 int numberRows,
const int *whichRows,
200 int numberColumns,
const int *whichColumns)
const;
213 unsigned char &st_byte =
status_[sequence];
214 st_byte =
static_cast< unsigned char >(st_byte & ~7);
215 st_byte =
static_cast< unsigned char >(st_byte | status);
220 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 64);
224 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~64);
228 return ((
status_[sequence] & 64) != 0);
233 unsigned char iStat =
status_[sequence];
234 iStat =
static_cast< unsigned char >(iStat & ~24);
235 status_[sequence] =
static_cast< unsigned char >(iStat | 16);
240 unsigned char iStat =
status_[sequence];
241 iStat =
static_cast< unsigned char >(iStat & ~24);
242 status_[sequence] =
static_cast< unsigned char >(iStat | 8);
247 unsigned char iStat =
status_[sequence];
248 iStat =
static_cast< unsigned char >(iStat & ~24);
253 int iStat =
status_[sequence] & 31;
255 return static_cast< double >(iStat - 1);
This solves LPs using the simplex method.
unsigned char * status_
Status of slacks.
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
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 ClpMatrixBase * subsetClone(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
Subset clone (without gaps).
int saveNumber_
Number in vector without gub extension.
int * keyVariable_
Key variable of set.
void setFeasible(int sequence)
To say key is feasible.
ClpSimplex::Status getStatus(int sequence) const
Status.
virtual ClpMatrixBase * clone() const
Clone.
int * backward_
Backward pointer to set number.
double sumPrimalInfeasibilities_
Sum of primal infeasibilities.
ClpGubMatrix()
Default constructor.
This implements Gub rows plus a ClpPackedMatrix.
virtual int hiddenRows() const
Returns number of hidden rows e.g. gub.
double sumDualInfeasibilities_
Sum of dual infeasibilities.
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.
double weight(int sequence) const
ClpSimplex * model_
Pointer back to model.
int * next_
Next basic variable in set - starts at key and end with -(set+1).
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 ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps (GUB wants NULL)
int * backward() const
Backward pointer to set number.
ClpGubMatrix & operator=(const ClpGubMatrix &)
void clearFlagged(int sequence)
int * start() const
Starts.
double * lower() const
Lower bounds on sets.
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
int numberPrimalInfeasibilities_
Number of primal infeasibilities.
int gubSlackIn_
Gub slack in (set number or -1)
virtual void primalExpanded(ClpSimplex *model, int mode)
mode=0 - Set up before "update" and "times" for primal solution using extended rows mode=1 - Cleanup ...
int firstGub_
First gub variables (same as start_[0] at present)
void setAbove(int sequence)
To say key is above ub.
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.
int * toIndex_
Backward pointer to index in CoinIndexedVector.
CoinPackedMatrix * matrix() const
Returns CoinPackedMatrix (non const)
Abstract base class for Clp Matrices.
void setBelow(int sequence)
To say key is below lb.
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector.
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 variab...
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
virtual void correctSequence(const ClpSimplex *model, int &sequenceIn, int &sequenceOut)
Correct sequence in and out to give true value.
int numberDualInfeasibilities_
Number of dual infeasibilities.
virtual void transposeTimes(const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
Return x * scalar * A + y in z.
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 retur...
virtual void useEffectiveRhs(ClpSimplex *model, bool cheapest=true)
Sets up an effective RHS and does gub crash if needed.
void switchOffCheck()
Switches off dj checking each factorization (for BIG models)
double * lower_
Lower bounds on sets.
virtual double * rhsOffset(ClpSimplex *model, bool forceRefresh=false, bool check=false)
Returns effective RHS offset if it is being used.
double infeasibilityWeight_
Infeasibility weight when last full pass done.
double * upper() const
Upper bounds on sets.
int numberSets_
Number of sets (gub rows)
int gubType_
type of gub - 0 not contiguous, 1 contiguous add 8 bit to say no ubs on individual variables
virtual ~ClpGubMatrix()
Destructor.
double sumOfRelaxedDualInfeasibilities_
Sum of Dual infeasibilities using tolerance based on error in duals.
int * keyVariable() const
Key variable of set.
void redoSet(ClpSimplex *model, int newKey, int oldKey, int iSet)
redoes next_ for a set.
int numberSets() const
Number of sets (gub rows)
int * backToPivotRow_
Backward pointer to pivot row !!!
int noCheck_
If pricing will declare victory (i.e.
void setFlagged(int sequence)
To flag a variable.
bool flagged(int sequence) const
int * savedKeyVariable_
Saved key variables.
unsigned char * saveStatus_
Saved status of slacks.
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=...
int lastGub_
last gub variable (same as end_[numberSets_-1] at present)
virtual int updatePivot(ClpSimplex *model, double oldInValue, double oldOutValue)
update information for a pivot (and effective rhs)
double sumOfRelaxedPrimalInfeasibilities_
Sum of Primal infeasibilities using tolerance based on error in primals.
double * upper_
Upper bounds on sets.
int possiblePivotKey_
Pivot row of possible next key.
double * changeCost_
Change in costs for keys.
void setStatus(int sequence, ClpSimplex::Status status)
Status
enums for status of various sorts.
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 dualExpanded(ClpSimplex *model, CoinIndexedVector *array, double *other, int mode)
mode=0 - Set up before "updateTranspose" and "transposeTimes" for duals using extended updates array ...