Loading...
Searching...
No Matches
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.
double | getEpsilon () const
| Get Epsilon.
void | setTolerance (double value)
| Set Tolerance.
double | getTolerance () const
| Get Tolerance.
void | setDoPreproc (int value)
| Set doPreproc.
bool | getDoPreproc () const
| Get doPreproc.
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.
Public Member Functions inherited from CglCutGenerator
| CglCutGenerator ()
| Default constructor.
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor.
CglCutGenerator & | operator= (const CglCutGenerator &rhs)
| Assignment operator.
virtual | ~CglCutGenerator ()
| Destructor.
virtual std::string | generateCpp (FILE *)
| Create C++ lines to set the generator in the current state.
virtual void | refreshSolver (OsiSolverInterface *)
| This can be used to refresh any information.
int | getAggressiveness () const
| Get Aggressiveness - 0 = neutral, 100 is normal root node.
void | setAggressiveness (int value)
| Set Aggressiveness - 0 = neutral, 100 is normal root node.
void | setGlobalCuts (bool trueOrFalse)
| Set whether can do global cuts.
bool | canDoGlobalCuts () const
| Say whether can do global cuts.
virtual bool | mayGenerateRowCutsInTree () const
| Returns true if may generate Row cuts in tree (rather than root node).
virtual bool | needsOptimalBasis () const
| Return true if needs optimal basis to do cuts.
virtual int | maximumLengthOfCutInTree () const
| Return maximum length of cut in tree.

## Private Types

enum | RowType { ROW_L , ROW_G , ROW_BOTH , ROW_OTHER }

## Friends

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

## Constructors and destructors

double | EPSILON_
| Tolerance used for numerical purposes, default value: 1.e-6.
double | TOLERANCE_
| If violation of a cut is greater that this number, the cut is accepted, default value: 1.e-4.
int | doPreproc_
| Controls the preprocessing of the matrix to identify rows suitable for cut generation.
int | numRows_
int | numCols_
bool | doneInitPre_
RowType * | rowTypes_
int * | indRows_
char * | sense_
double * | RHS_
int | numRowL_
int * | indRowL_
int | numRowG_
int * | indRowG_
| CglResidualCapacity ()
| Default constructor.
| CglResidualCapacity (const double tolerance)
| Alternate Constructor.
| CglResidualCapacity (const CglResidualCapacity &)
| Copy constructor.
virtual CglCutGenerator * | clone () const
| Clone.
CglResidualCapacity & | operator= (const CglResidualCapacity &rhs)
| Assignment operator.
virtual | ~CglResidualCapacity ()
| Destructor.
virtual void | refreshPrep ()
| This is to refresh preprocessing.
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 CoinBigIndex *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

## Additional Inherited Members

int | aggressive_
| Aggressiveness - 0 = neutral, 100 is normal root node.
bool | canDoGlobalCuts_
| True if can do global cuts i.e. no general integers.

## 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

## RowType

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() [1/3]

CglResidualCapacity::CglResidualCapacity | ( |  | ) |

Default constructor.

## CglResidualCapacity() [2/3]

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

Alternate Constructor.

## CglResidualCapacity() [3/3]

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

Copy constructor.

## ~CglResidualCapacity()

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

virtual

Destructor.

## Member Function Documentation

## setEpsilon()

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

Set Epsilon.

## getEpsilon()

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

Get Epsilon.

## setTolerance()

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

Set Tolerance.

## getTolerance()

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

Get Tolerance.

## setDoPreproc()

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

Set doPreproc.

## getDoPreproc()

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

Get doPreproc.

## generateCuts()

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.

## clone()

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

virtual

Clone.

Implements CglCutGenerator.

## operator=()

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

Assignment operator.

## refreshPrep()

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

virtual

This is to refresh preprocessing.

## gutsOfConstruct()

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

private

## gutsOfDelete()

void CglResidualCapacity::gutsOfDelete | ( |  | ) |

private

## gutsOfCopy()

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

private

## resCapPreprocess()

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

private

## determineRowType()

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

## treatAsLessThan()

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

## generateResCapCuts()

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 CoinBigIndex * | rowStarts,
|  | const int * | rowLengths,
|  | OsiCuts & | cs ) const

private

## resCapSeparation()

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 Symbol Documentation

## CglResidualCapacityUnitTest

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

## EPSILON_

double CglResidualCapacity::EPSILON_

private

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

Definition at line 194 of file CglResidualCapacity.hpp.

## TOLERANCE_

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.

## doPreproc_

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.

## numRows_

int CglResidualCapacity::numRows_

private

Definition at line 207 of file CglResidualCapacity.hpp.

## numCols_

int CglResidualCapacity::numCols_

private

Definition at line 209 of file CglResidualCapacity.hpp.

## doneInitPre_

bool CglResidualCapacity::doneInitPre_

private

Definition at line 211 of file CglResidualCapacity.hpp.

## rowTypes_

RowType* CglResidualCapacity::rowTypes_

private

Definition at line 213 of file CglResidualCapacity.hpp.

## indRows_

int* CglResidualCapacity::indRows_

private

Definition at line 215 of file CglResidualCapacity.hpp.

## sense_

char* CglResidualCapacity::sense_

private

Definition at line 217 of file CglResidualCapacity.hpp.

## RHS_

double* CglResidualCapacity::RHS_

private

Definition at line 219 of file CglResidualCapacity.hpp.

## numRowL_

int CglResidualCapacity::numRowL_

private

Definition at line 221 of file CglResidualCapacity.hpp.

## indRowL_

int* CglResidualCapacity::indRowL_

private

Definition at line 223 of file CglResidualCapacity.hpp.

## numRowG_

int CglResidualCapacity::numRowG_

private

Definition at line 225 of file CglResidualCapacity.hpp.

## indRowG_

int* CglResidualCapacity::indRowG_

private

Definition at line 227 of file CglResidualCapacity.hpp.

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

- Cgl/src/CglResidualCapacity/CglResidualCapacity.hpp