Cgl 0.59.7

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CglResidualCapacity Class Reference

Residual Capacity Inequalities Cut Generator Class. More...

`#include <CglResidualCapacity.hpp>`

Inheritance diagram for CglResidualCapacity:
[legend]
Collaboration diagram for CglResidualCapacity:
[legend]

## Public Member Functions
Get and Set Parameters
void | setEpsilon (double value)
| Set Epsilon. More...
double | getEpsilon () const
| Get Epsilon. More...
void | setTolerance (double value)
| Set Tolerance. More...
double | getTolerance () const
| Get Tolerance. More...
void | setDoPreproc (int value)
| Set doPreproc. More...
bool | getDoPreproc () const
| Get doPreproc. More...
Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
| Generate Residual Capacity cuts for the model data contained in si. More...
Constructors and destructors
| CglResidualCapacity ()
| Default constructor. More...
| CglResidualCapacity (const double tolerance)
| Alternate Constructor. More...
| CglResidualCapacity (const CglResidualCapacity &)
| Copy constructor. More...
virtual CglCutGenerator * | clone () const
| Clone. More...
CglResidualCapacity & | operator= (const CglResidualCapacity &rhs)
| Assignment operator. More...
virtual | ~CglResidualCapacity ()
| Destructor. More...
virtual void | refreshPrep ()
| This is to refresh preprocessing. More...
Public Member Functions inherited from CglCutGenerator
| CglCutGenerator ()
| Default constructor. More...
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor. More...
CglCutGenerator & | operator= (const CglCutGenerator &rhs)
| Assignment operator. More...
virtual | ~CglCutGenerator ()
| Destructor. More...
virtual std::string | generateCpp (FILE *)
| Create C++ lines to set the generator in the current state. More...
virtual void | refreshSolver (OsiSolverInterface *)
| This can be used to refresh any information. More...
int | getAggressiveness () const
| Get Aggressiveness - 0 = neutral, 100 is normal root node. More...
void | setAggressiveness (int value)
| Set Aggressiveness - 0 = neutral, 100 is normal root node. More...
void | setGlobalCuts (bool trueOrFalse)
| Set whether can do global cuts. More...
bool | canDoGlobalCuts () const
| Say whether can do global cuts. More...
virtual bool | mayGenerateRowCutsInTree () const
| Returns true if may generate Row cuts in tree (rather than root node). More...
virtual bool | needsOptimalBasis () const
| Return true if needs optimal basis to do cuts. More...
virtual int | maximumLengthOfCutInTree () const
| Return maximum length of cut in tree. More...

## Private Types
enum | RowType { ROW_L, ROW_G, ROW_BOTH, ROW_OTHER }

## Private Member Functions
void | gutsOfConstruct (const double tolerance)
void | gutsOfDelete ()
void | gutsOfCopy (const CglResidualCapacity &rhs)
void | resCapPreprocess (const OsiSolverInterface &si)
RowType | determineRowType (const OsiSolverInterface &si, const int rowLen, const int *ind, const double *coef, const char sense, const double rhs, const double *colLowerBound, const double *colUpperBound) const
bool | treatAsLessThan (const OsiSolverInterface &si, const int rowLen, const int *ind, const double *coef, const double rhs, const double *colLowerBound, const double *colUpperBound) const
void | generateResCapCuts (const OsiSolverInterface &si, const double *xlp, const double *colUpperBound, const double *colLowerBound, const CoinPackedMatrix &matrixByRow, const double *LHS, const double *coefByRow, const int *colInds, const int *rowStarts, const int *rowLengths, OsiCuts &cs) const
bool | resCapSeparation (const OsiSolverInterface &si, const int rowLen, const int *ind, const double *coef, const double rhs, const double *xlp, const double *colUpperBound, const double *colLowerBound, OsiRowCut &resCapCut) const

## Private Attributes
double | EPSILON_
| Tolerance used for numerical purposes, default value: 1.e-6. More...
double | TOLERANCE_
| If violation of a cut is greater that this number, the cut is accepted, default value: 1.e-4. More...
int | doPreproc_
| Controls the preprocessing of the matrix to identify rows suitable for cut generation. More...
int | numRows_
int | numCols_
bool | doneInitPre_
RowType * | rowTypes_
int * | indRows_
char * | sense_
double * | RHS_
int | numRowL_
int * | indRowL_
int | numRowG_
int * | indRowG_

## Friends
void | CglResidualCapacityUnitTest (const OsiSolverInterface *siP, const std::string mpdDir)
| A function that tests the methods in the CglResidualCapacity class. More...

## Additional Inherited Members
Public Attributes inherited from CglCutGenerator
int | aggressive_
| Aggressiveness - 0 = neutral, 100 is normal root node. More...
bool | canDoGlobalCuts_
| True if can do global cuts i.e. no general integers. More...

## Detailed Description

Residual Capacity Inequalities Cut Generator Class.

References: T Magnanti, P Mirchandani, R Vachani, "The convex hull of two core capacitated network design problems," Math Programming 60 (1993), 233-250.

A Atamturk, D Rajan, "On splittable and unsplittable flow capacitated network design arc-set polyhedra," Math Programming 92 (2002), 315-333.

Definition at line 47 of file CglResidualCapacity.hpp.

## Member Enumeration Documentation

enum CglResidualCapacity::RowType
| private

Enumerator
ROW_L | row of the type a_1 c_1 + + a_k c_k - d z_1 - - d z_p <= b, where c_i are continuous variables and z_j are integer variables
ROW_G | row of the type -a_1 c_1 - - a_k c_k + d z_1 + + d z_p >= b, where c_i are continuous variables and z_j are integer variables
ROW_BOTH | equation that can be treated as ROW_L and ROW_G
ROW_OTHER | Other types of rows.

Definition at line 56 of file CglResidualCapacity.hpp.

## Constructor & Destructor Documentation

CglResidualCapacity::CglResidualCapacity | ( |  | ) |

Default constructor.

CglResidualCapacity::CglResidualCapacity | ( | const double | tolerance | ) |

Alternate Constructor.

CglResidualCapacity::CglResidualCapacity | ( | const CglResidualCapacity & |  | ) |

Copy constructor.

virtual CglResidualCapacity::~CglResidualCapacity | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

void CglResidualCapacity::setEpsilon | ( | double | value | ) |

Set Epsilon.

double CglResidualCapacity::getEpsilon | ( |  | ) | const

Get Epsilon.

void CglResidualCapacity::setTolerance | ( | double | value | ) |

Set Tolerance.

double CglResidualCapacity::getTolerance | ( |  | ) | const

Get Tolerance.

void CglResidualCapacity::setDoPreproc | ( | int | value | ) |

Set doPreproc.

bool CglResidualCapacity::getDoPreproc | ( |  | ) | const

Get doPreproc.

virtual void CglResidualCapacity::generateCuts | ( | const OsiSolverInterface & | si,
|  | OsiCuts & | cs,
|  | const CglTreeInfo | info = `CglTreeInfo()`
| ) |  |
| virtual

Generate Residual Capacity cuts for the model data contained in si.

The generated cuts are inserted in the collection of cuts cs.

Implements CglCutGenerator.

virtual CglCutGenerator* CglResidualCapacity::clone | ( |  | ) | const
| virtual

Clone.

Implements CglCutGenerator.

CglResidualCapacity& CglResidualCapacity::operator= | ( | const CglResidualCapacity & | rhs | ) |

Assignment operator.

virtual void CglResidualCapacity::refreshPrep | ( |  | ) |
| virtual

This is to refresh preprocessing.

void CglResidualCapacity::gutsOfConstruct | ( | const double | tolerance | ) |
| private

void CglResidualCapacity::gutsOfDelete | ( |  | ) |
| private

void CglResidualCapacity::gutsOfCopy | ( | const CglResidualCapacity & | rhs | ) |
| private

void CglResidualCapacity::resCapPreprocess | ( | const OsiSolverInterface & | si | ) |
| private

RowType CglResidualCapacity::determineRowType | ( | const OsiSolverInterface & | si,
|  | const int | rowLen,
|  | const int * | ind,
|  | const double * | coef,
|  | const char | sense,
|  | const double | rhs,
|  | const double * | colLowerBound,
|  | const double * | colUpperBound
| ) |  | const
| private

bool CglResidualCapacity::treatAsLessThan | ( | const OsiSolverInterface & | si,
|  | const int | rowLen,
|  | const int * | ind,
|  | const double * | coef,
|  | const double | rhs,
|  | const double * | colLowerBound,
|  | const double * | colUpperBound
| ) |  | const
| private

void CglResidualCapacity::generateResCapCuts | ( | const OsiSolverInterface & | si,
|  | const double * | xlp,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound,
|  | const CoinPackedMatrix & | matrixByRow,
|  | const double * | LHS,
|  | const double * | coefByRow,
|  | const int * | colInds,
|  | const int * | rowStarts,
|  | const int * | rowLengths,
|  | OsiCuts & | cs
| ) |  | const
| private

bool CglResidualCapacity::resCapSeparation | ( | const OsiSolverInterface & | si,
|  | const int | rowLen,
|  | const int * | ind,
|  | const double * | coef,
|  | const double | rhs,
|  | const double * | xlp,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound,
|  | OsiRowCut & | resCapCut
| ) |  | const
| private

## Friends And Related Function Documentation

void CglResidualCapacityUnitTest | ( | const OsiSolverInterface * | siP,
|  | const std::string | mpdDir
| ) |  |
| friend

A function that tests the methods in the CglResidualCapacity class.

The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.

## Member Data Documentation

double CglResidualCapacity::EPSILON_
| private

Tolerance used for numerical purposes, default value: 1.e-6.

Definition at line 194 of file CglResidualCapacity.hpp.

double CglResidualCapacity::TOLERANCE_
| private

If violation of a cut is greater that this number, the cut is accepted, default value: 1.e-4.

Definition at line 197 of file CglResidualCapacity.hpp.

int CglResidualCapacity::doPreproc_
| private

Controls the preprocessing of the matrix to identify rows suitable for cut generation.

- -1: preprocess according to solver settings;
- 0: Do preprocessing only if it has not yet been done;
- 1: Do preprocessing.

Default value: -1

Definition at line 205 of file CglResidualCapacity.hpp.

int CglResidualCapacity::numRows_
| private

Definition at line 207 of file CglResidualCapacity.hpp.

int CglResidualCapacity::numCols_
| private

Definition at line 209 of file CglResidualCapacity.hpp.

bool CglResidualCapacity::doneInitPre_
| private

Definition at line 211 of file CglResidualCapacity.hpp.

RowType* CglResidualCapacity::rowTypes_
| private

Definition at line 213 of file CglResidualCapacity.hpp.

int* CglResidualCapacity::indRows_
| private

Definition at line 215 of file CglResidualCapacity.hpp.

char* CglResidualCapacity::sense_
| private

Definition at line 217 of file CglResidualCapacity.hpp.

double* CglResidualCapacity::RHS_
| private

Definition at line 219 of file CglResidualCapacity.hpp.

int CglResidualCapacity::numRowL_
| private

Definition at line 221 of file CglResidualCapacity.hpp.

int* CglResidualCapacity::indRowL_
| private

Definition at line 223 of file CglResidualCapacity.hpp.

int CglResidualCapacity::numRowG_
| private

Definition at line 225 of file CglResidualCapacity.hpp.

int* CglResidualCapacity::indRowG_
| private

Definition at line 227 of file CglResidualCapacity.hpp.

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

- /home/coin/svn-release/Cgl-0.59.7/Cgl/src/CglResidualCapacity/CglResidualCapacity.hpp