Go to the documentation of this file.
6 #ifndef ClpDynamicMatrix_H
7 #define ClpDynamicMatrix_H
9 #include "CoinPragma.hpp"
33 int &bestSequence,
int &numberWanted);
49 virtual void times(
double scalar,
50 const double *x,
double *y)
const;
64 double *other,
int mode);
102 double cost,
double lower,
double upper,
int iSet,
139 int numberColumns,
const int *starts,
140 const double *lower,
const double *upper,
144 const unsigned char *status = NULL,
171 unsigned char &st_byte =
status_[sequence];
172 st_byte =
static_cast< unsigned char >(st_byte & ~7);
173 st_byte =
static_cast< unsigned char >(st_byte | status);
219 st_byte =
static_cast< unsigned char >(st_byte & ~7);
220 st_byte =
static_cast< unsigned char >(st_byte | status);
252 inline int *
id()
const
This solves LPs using the simplex method.
This implements a dynamic matrix when we have a limit on the number of "interesting rows".
int firstAvailableBefore_
first free when iteration started
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.
void setFlaggedSlack(int i)
int numberPrimalInfeasibilities_
Number of primal infeasibilities.
virtual ~ClpDynamicMatrix()
Destructor.
void writeMps(const char *name)
Writes out model (without names)
int * id() const
ids of active columns (just index here)
int numberDualInfeasibilities_
Number of dual infeasibilities.
double columnUpper(int sequence) const
Gets upper bound (to simplify coding)
void modifyOffset(int sequence, double amount)
Modifies rhs offset.
double keyValue(int iSet) const
Gets key value when none in small.
int numberStaticRows() const
number of rows in original model
int firstDynamic_
first dynamic
int numberGubColumns_
size
double objectiveOffset() const
Saved value of objective offset.
int firstAvailable_
first free
double sumOfRelaxedPrimalInfeasibilities_
Sum of Primal infeasibilities using tolerance based on error in primals.
double * upperSet() const
Upper bounds on sets.
int * id_
ids of active columns (just index here)
double * columnUpper_
Optional upper bounds on columns.
int numberGubColumns() const
size
int * startSets() const
Sets.
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
unsigned char * dynamicStatus() const
Status region for gub variables.
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
double * cost() const
costs
int lastDynamic_
number of columns in dynamic model
DynamicStatus getDynamicStatus(int sequence) const
double * columnLower_
Optional lower bounds on columns.
virtual void createVariable(ClpSimplex *model, int &bestSequence)
Creates a variable.
ClpSimplex * model_
Pointer back to model.
CoinBigIndex maximumElements_
current maximum number of elemnts (then compress)
bool flaggedSlack(int i) const
Whether flagged slack.
int noCheck_
If pricing will declare victory (i.e.
double sumOfRelaxedDualInfeasibilities_
Sum of Dual infeasibilities using tolerance based on error in duals.
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
int numberStaticRows_
number of rows in original model
void switchOffCheck()
Switches off dj checking each factorization (for BIG models)
void initialProblem()
Populates initial matrix from dynamic status.
CoinBigIndex * startColumn_
Starts of each column.
double savedBestGubDual_
Saved best dual on gub row in pricing.
Abstract base class for Clp Matrices.
ClpDynamicMatrix & operator=(const ClpDynamicMatrix &)
double infeasibilityWeight_
Infeasibility weight when last full pass done.
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=...
virtual double * rhsOffset(ClpSimplex *model, bool forceRefresh=false, bool check=false)
Returns effective RHS offset if it is being used.
unsigned char * status_
Status of slack on set.
virtual double reducedCost(ClpSimplex *model, int sequence) const
Returns reduced cost of a variable.
void unsetFlaggedSlack(int i)
int firstDynamic() const
first dynamic
int numberSets() const
Number of sets (dynamic rows)
int numberActiveSets_
Number of active sets.
int numberGubEntries() const
Number of possible gub variables.
double sumDualInfeasibilities_
Sum of dual infeasibilities.
ClpSimplex::Status getStatus(int sequence) const
Status of row slacks.
virtual void packDown(const int *, int)
If addColumn forces compression then this allows descendant to know what to do.
double columnLower(int sequence) const
Gets lower bound (to simplify coding)
double sumPrimalInfeasibilities_
Sum of primal infeasibilities.
int * startSet_
Start of each set.
unsigned char * dynamicStatus_
for status and which bound
int firstAvailable() const
first free
DynamicStatus
enums for status of various sorts
int whichSet(int sequence) const
Returns which set a variable is in.
int numberSets_
Number of sets (dynamic rows)
double objectiveOffset_
Saved value of objective offset.
int * keyVariable_
Key variable of set (only accurate if none in small problem)
int * keyVariable() const
CoinBigIndex numberElements_
size of working matrix (max)
double * columnLower() const
Optional lower bounds on columns.
double * upperSet_
Upper bounds on sets.
CoinBigIndex numberElements() const
size of working matrix (max)
double * lowerSet() const
Lower bounds on sets.
void gubCrash()
Does gub crash.
virtual int refresh(ClpSimplex *model)
Purely for column generation and similar ideas.
double * element() const
elements
double * element_
elements
int maximumGubColumns_
current maximum number of columns (then compress)
void setStatus(int sequence, ClpSimplex::Status status)
int * backToPivotRow_
Backward pointer to pivot row !!!
void setDynamicStatus(int sequence, DynamicStatus status)
unsigned char * gubRowStatus() const
Status region for gub slacks.
double * columnUpper() const
Optional upper bounds on columns.
int * toIndex_
Backward pointer to extra row.
double * lowerSet_
Lower bounds on sets.
bool flagged(int i) const
Whether flagged.
virtual int updatePivot(ClpSimplex *model, double oldInValue, double oldOutValue)
update information for a pivot (and effective rhs)
int savedBestSet_
Saved best set in pricing.
int lastDynamic() const
number of columns in dynamic model
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 ...
virtual ClpMatrixBase * clone() const
Clone.
Status
enums for status of various sorts.
CoinBigIndex * startColumn() const
Starts of each column.
ClpDynamicMatrix()
Default constructor.