- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ClpGubDynamicMatrix Class Reference

This implements Gub rows plus a ClpPackedMatrix. More...

`#include <ClpGubDynamicMatrix.hpp>`

Inheritance diagram for ClpGubDynamicMatrix:

[legend]
Collaboration diagram for ClpGubDynamicMatrix:

[legend]
List of all members.

## gets and sets
enum | DynamicStatus { inSmall = 0x01, atUpperBound = 0x02, atLowerBound = 0x03 }
| enums for status of various sorts More...
bool | flagged (int i) const
| Whether flagged.
void | setFlagged (int i)
| enums for status of various sorts
void | unsetFlagged (int i)
| enums for status of various sorts
void | setDynamicStatus (int sequence, DynamicStatus status)
| enums for status of various sorts
DynamicStatus | getDynamicStatus (int sequence) const
| enums for status of various sorts
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 * | fullStart () const
| full starts
int * | id () const
| ids of active columns (just index here)
double * | lowerColumn () const
| Optional lower bounds on columns.
double * | upperColumn () const
| Optional upper bounds on columns.
double * | lowerSet () const
| Optional true lower bounds on sets.
double * | upperSet () const
| Optional true upper bounds on sets.
int | numberGubColumns () const
| size
int | firstAvailable () const
| first free
void | setFirstAvailable (int value)
| set first free
int | firstDynamic () const
| first dynamic
int | lastDynamic () const
| number of columns in dynamic model
int | numberElements () const
| size of working matrix (max)
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
Main functions provided
virtual void | partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
| Partial pricing.
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=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming.
virtual void | useEffectiveRhs (ClpSimplex *model, bool cheapest=true)
| Sets up an effective RHS and does gub crash if needed.
virtual int | updatePivot (ClpSimplex *model, double oldInValue, double oldOutValue)
| update information for a pivot (and effective rhs)
void | insertNonBasic (int sequence, int iSet)
| Add a new variable to a set.
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`.
virtual int | checkFeasible (ClpSimplex *model, double &sum) const
| Just for debug Returns sum and number of primal infeasibilities.
void | cleanData (ClpSimplex *model)
| Cleans data after setWarmStart.
Constructors, destructor
| ClpGubDynamicMatrix ()
| Default constructor.
virtual | ~ClpGubDynamicMatrix ()
| Destructor.
Copy method
| ClpGubDynamicMatrix (const ClpGubDynamicMatrix &)
| The copy constructor.
| ClpGubDynamicMatrix (ClpSimplex *model, int numberSets, int numberColumns, const int *starts, const double *lower, const double *upper, const int *startColumn, const int *row, const double *element, const double *cost, const double *lowerColumn=NULL, const double *upperColumn=NULL, const unsigned char *status=NULL)
| This is the real constructor.
ClpGubDynamicMatrix & | operator= (const ClpGubDynamicMatrix &)
| The copy constructor.
virtual ClpMatrixBase * | clone () const
| Clone.
## Protected Attributes
Data members
The data members are protected to allow access for derived classes.
double | objectiveOffset_
| Saved value of objective offset.
CoinBigIndex * | startColumn_
| Starts of each column.
int * | row_
| rows
double * | element_
| elements
double * | cost_
| costs
int * | fullStart_
| full starts
int * | id_
| ids of active columns (just index here)
unsigned char * | dynamicStatus_
| for status and which bound
double * | lowerColumn_
| Optional lower bounds on columns.
double * | upperColumn_
| Optional upper bounds on columns.
double * | lowerSet_
| Optional true lower bounds on sets.
double * | upperSet_
| Optional true upper bounds on sets.
int | numberGubColumns_
| size
int | firstAvailable_
| first free
int | savedFirstAvailable_
| saved first free
int | firstDynamic_
| first dynamic
int | lastDynamic_
| number of columns in dynamic model
int | numberElements_
| size of working matrix (max)

## Detailed Description

This implements Gub rows plus a ClpPackedMatrix.

This a dynamic version which stores the gub part and dynamically creates matrix. All bounds are assumed to be zero and infinity

This is just a simple example for real column generation

Definition at line 17 of file ClpGubDynamicMatrix.hpp.

## Member Enumeration Documentation

enum ClpGubDynamicMatrix::DynamicStatus

enums for status of various sorts

Enumerator:

  inSmall |
  atUpperBound |
  atLowerBound |

Definition at line 97 of file ClpGubDynamicMatrix.hpp.

## Constructor & Destructor Documentation

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( |  | ) |

Default constructor.

virtual ClpGubDynamicMatrix::~ClpGubDynamicMatrix | ( |  | ) | `[virtual]`

Destructor.

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( | const ClpGubDynamicMatrix & |  | ) |

The copy constructor.

ClpGubDynamicMatrix::ClpGubDynamicMatrix | ( | ClpSimplex * | model,
|  | int | numberSets,
|  | int | numberColumns,
|  | const int * | starts,
|  | const double * | lower,
|  | const double * | upper,
|  | const int * | startColumn,
|  | const int * | row,
|  | const double * | element,
|  | const double * | cost,
|  | const double * | lowerColumn = `NULL`,
|  | const double * | upperColumn = `NULL`,
|  | const unsigned char * | status = `NULL` |
| ) |  |  |

This is the real constructor.

It assumes factorization frequency will not be changed. This resizes model !!!!

## Member Function Documentation

virtual void ClpGubDynamicMatrix::partialPricing | ( | ClpSimplex * | model,
|  | double | start,
|  | double | end,
|  | int & | bestSequence,
|  | int & | numberWanted |
| ) |  |  | `[virtual]`

Partial pricing.

Reimplemented from ClpGubMatrix.

virtual int ClpGubDynamicMatrix::synchronize | ( | ClpSimplex * | model,
|  | int | mode |
| ) |  |  | `[virtual]`

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=8 - make sure set is clean mode=9 - adjust lower, upper on set by incoming.

Reimplemented from ClpGubMatrix.

virtual void ClpGubDynamicMatrix::useEffectiveRhs | ( | ClpSimplex * | model,
|  | bool | cheapest = `true` |
| ) |  |  | `[virtual]`

Sets up an effective RHS and does gub crash if needed.

Reimplemented from ClpGubMatrix.

virtual int ClpGubDynamicMatrix::updatePivot | ( | ClpSimplex * | model,
|  | double | oldInValue,
|  | double | oldOutValue |
| ) |  |  | `[virtual]`

update information for a pivot (and effective rhs)

Reimplemented from ClpGubMatrix.

void ClpGubDynamicMatrix::insertNonBasic | ( | int | sequence,
|  | int | iSet |
| ) |  |  |

Add a new variable to a set.

virtual double* ClpGubDynamicMatrix::rhsOffset | ( | ClpSimplex * | model,
|  | bool | forceRefresh = `false`,
|  | bool | check = `false` |
| ) |  |  | `[virtual]`

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 ClpGubMatrix.

virtual void ClpGubDynamicMatrix::times | ( | double | scalar,
|  | const double * | x,
|  | double * | y |
| ) |  |  | const`[virtual]`

Return `y + A * scalar *x` in `y`.

Precondition:
  `x` must be of size `numColumns()`

  `y` must be of size `numRows()`

Reimplemented from ClpPackedMatrix.

virtual int ClpGubDynamicMatrix::checkFeasible | ( | ClpSimplex * | model,
|  | double & | sum |
| ) |  |  | const`[virtual]`

Just for debug Returns sum and number of primal infeasibilities.

Recomputes keys

Reimplemented from ClpMatrixBase.

void ClpGubDynamicMatrix::cleanData | ( | ClpSimplex * | model | ) |

Cleans data after setWarmStart.

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

The copy constructor.

virtual ClpMatrixBase* ClpGubDynamicMatrix::clone | ( |  | ) | const`[virtual]`

Clone.

Reimplemented from ClpGubMatrix.

bool ClpGubDynamicMatrix::flagged | ( | int | i | ) | const`[inline]`

Whether flagged.

Reimplemented from ClpGubMatrix.

Definition at line 103 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

void ClpGubDynamicMatrix::setFlagged | ( | int | i | ) | `[inline]`

enums for status of various sorts

Reimplemented from ClpGubMatrix.

Definition at line 106 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

void ClpGubDynamicMatrix::unsetFlagged | ( | int | i | ) | `[inline]`

enums for status of various sorts

Definition at line 109 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

void ClpGubDynamicMatrix::setDynamicStatus | ( | int | sequence,
|  | DynamicStatus | status |
| ) |  |  | `[inline]`

enums for status of various sorts

Definition at line 112 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

DynamicStatus ClpGubDynamicMatrix::getDynamicStatus | ( | int | sequence | ) | const`[inline]`

enums for status of various sorts

Definition at line 118 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

double ClpGubDynamicMatrix::objectiveOffset | ( |  | ) | const`[inline]`

Saved value of objective offset.

Definition at line 121 of file ClpGubDynamicMatrix.hpp.

References objectiveOffset_.

CoinBigIndex* ClpGubDynamicMatrix::startColumn | ( |  | ) | const`[inline]`

Starts of each column.

Definition at line 124 of file ClpGubDynamicMatrix.hpp.

References startColumn_.

int* ClpGubDynamicMatrix::row | ( |  | ) | const`[inline]`

rows

Definition at line 127 of file ClpGubDynamicMatrix.hpp.

References row_.

double* ClpGubDynamicMatrix::element | ( |  | ) | const`[inline]`

elements

Definition at line 130 of file ClpGubDynamicMatrix.hpp.

References element_.

double* ClpGubDynamicMatrix::cost | ( |  | ) | const`[inline]`

costs

Definition at line 133 of file ClpGubDynamicMatrix.hpp.

References cost_.

int* ClpGubDynamicMatrix::fullStart | ( |  | ) | const`[inline]`

full starts

Definition at line 136 of file ClpGubDynamicMatrix.hpp.

References fullStart_.

int* ClpGubDynamicMatrix::id | ( |  | ) | const`[inline]`

ids of active columns (just index here)

Definition at line 139 of file ClpGubDynamicMatrix.hpp.

References id_.

double* ClpGubDynamicMatrix::lowerColumn | ( |  | ) | const`[inline]`

Optional lower bounds on columns.

Definition at line 142 of file ClpGubDynamicMatrix.hpp.

References lowerColumn_.

double* ClpGubDynamicMatrix::upperColumn | ( |  | ) | const`[inline]`

Optional upper bounds on columns.

Definition at line 145 of file ClpGubDynamicMatrix.hpp.

References upperColumn_.

double* ClpGubDynamicMatrix::lowerSet | ( |  | ) | const`[inline]`

Optional true lower bounds on sets.

Definition at line 148 of file ClpGubDynamicMatrix.hpp.

References lowerSet_.

double* ClpGubDynamicMatrix::upperSet | ( |  | ) | const`[inline]`

Optional true upper bounds on sets.

Definition at line 151 of file ClpGubDynamicMatrix.hpp.

References upperSet_.

int ClpGubDynamicMatrix::numberGubColumns | ( |  | ) | const`[inline]`

size

Definition at line 154 of file ClpGubDynamicMatrix.hpp.

References numberGubColumns_.

int ClpGubDynamicMatrix::firstAvailable | ( |  | ) | const`[inline]`

first free

Definition at line 157 of file ClpGubDynamicMatrix.hpp.

References firstAvailable_.

void ClpGubDynamicMatrix::setFirstAvailable | ( | int | value | ) | `[inline]`

set first free

Definition at line 160 of file ClpGubDynamicMatrix.hpp.

References firstAvailable_.

int ClpGubDynamicMatrix::firstDynamic | ( |  | ) | const`[inline]`

first dynamic

Definition at line 163 of file ClpGubDynamicMatrix.hpp.

References firstDynamic_.

int ClpGubDynamicMatrix::lastDynamic | ( |  | ) | const`[inline]`

number of columns in dynamic model

Definition at line 166 of file ClpGubDynamicMatrix.hpp.

References lastDynamic_.

int ClpGubDynamicMatrix::numberElements | ( |  | ) | const`[inline]`

size of working matrix (max)

Definition at line 169 of file ClpGubDynamicMatrix.hpp.

References numberElements_.

unsigned char* ClpGubDynamicMatrix::gubRowStatus | ( |  | ) | const`[inline]`

Status region for gub slacks.

Definition at line 172 of file ClpGubDynamicMatrix.hpp.

References ClpGubMatrix::status_.

unsigned char* ClpGubDynamicMatrix::dynamicStatus | ( |  | ) | const`[inline]`

Status region for gub variables.

Definition at line 175 of file ClpGubDynamicMatrix.hpp.

References dynamicStatus_.

int ClpGubDynamicMatrix::whichSet | ( | int | sequence | ) | const

Returns which set a variable is in.

## Member Data Documentation

double ClpGubDynamicMatrix::objectiveOffset_`[protected]`

Saved value of objective offset.

Definition at line 187 of file ClpGubDynamicMatrix.hpp.

Referenced by objectiveOffset().

CoinBigIndex* ClpGubDynamicMatrix::startColumn_`[protected]`

Starts of each column.

Definition at line 189 of file ClpGubDynamicMatrix.hpp.

Referenced by startColumn().

int* ClpGubDynamicMatrix::row_`[protected]`

rows

Definition at line 191 of file ClpGubDynamicMatrix.hpp.

Referenced by row().

double* ClpGubDynamicMatrix::element_`[protected]`

elements

Definition at line 193 of file ClpGubDynamicMatrix.hpp.

Referenced by element().

double* ClpGubDynamicMatrix::cost_`[protected]`

costs

Definition at line 195 of file ClpGubDynamicMatrix.hpp.

Referenced by cost().

int* ClpGubDynamicMatrix::fullStart_`[protected]`

full starts

Definition at line 197 of file ClpGubDynamicMatrix.hpp.

Referenced by fullStart().

int* ClpGubDynamicMatrix::id_`[protected]`

ids of active columns (just index here)

Definition at line 199 of file ClpGubDynamicMatrix.hpp.

Referenced by id().

unsigned char* ClpGubDynamicMatrix::dynamicStatus_`[protected]`

for status and which bound

Definition at line 201 of file ClpGubDynamicMatrix.hpp.

Referenced by dynamicStatus(), flagged(), getDynamicStatus(), setDynamicStatus(), setFlagged(), and unsetFlagged().

double* ClpGubDynamicMatrix::lowerColumn_`[protected]`

Optional lower bounds on columns.

Definition at line 203 of file ClpGubDynamicMatrix.hpp.

Referenced by lowerColumn().

double* ClpGubDynamicMatrix::upperColumn_`[protected]`

Optional upper bounds on columns.

Definition at line 205 of file ClpGubDynamicMatrix.hpp.

Referenced by upperColumn().

double* ClpGubDynamicMatrix::lowerSet_`[protected]`

Optional true lower bounds on sets.

Definition at line 207 of file ClpGubDynamicMatrix.hpp.

Referenced by lowerSet().

double* ClpGubDynamicMatrix::upperSet_`[protected]`

Optional true upper bounds on sets.

Definition at line 209 of file ClpGubDynamicMatrix.hpp.

Referenced by upperSet().

int ClpGubDynamicMatrix::numberGubColumns_`[protected]`

size

Definition at line 211 of file ClpGubDynamicMatrix.hpp.

Referenced by numberGubColumns().

int ClpGubDynamicMatrix::firstAvailable_`[protected]`

first free

Definition at line 213 of file ClpGubDynamicMatrix.hpp.

Referenced by firstAvailable(), and setFirstAvailable().

int ClpGubDynamicMatrix::savedFirstAvailable_`[protected]`

saved first free

Definition at line 215 of file ClpGubDynamicMatrix.hpp.

int ClpGubDynamicMatrix::firstDynamic_`[protected]`

first dynamic

Definition at line 217 of file ClpGubDynamicMatrix.hpp.

Referenced by firstDynamic().

int ClpGubDynamicMatrix::lastDynamic_`[protected]`

number of columns in dynamic model

Definition at line 219 of file ClpGubDynamicMatrix.hpp.

Referenced by lastDynamic().

int ClpGubDynamicMatrix::numberElements_`[protected]`

size of working matrix (max)

Definition at line 221 of file ClpGubDynamicMatrix.hpp.

Referenced by numberElements().

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

- /home/coin/SVN-release/Blis-0.91.0/Clp/src/ClpGubDynamicMatrix.hpp