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