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
CglMixedIntegerRounding Class Reference

Mixed Integer Rounding Cut Generator Class. More...

`#include <CglMixedIntegerRounding.hpp>`

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

## Public Member Functions
Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
| Generate Mixed Integer Rounding cuts for the model data contained in si. More...
Constructors and destructors
| CglMixedIntegerRounding ()
| Default constructor. More...
| CglMixedIntegerRounding (const int maxaggr, const bool multiply, const int criterion, const int preproc=-1)
| Alternate Constructor. More...
| CglMixedIntegerRounding (const CglMixedIntegerRounding &)
| Copy constructor. More...
virtual CglCutGenerator * | clone () const
| Clone. More...
CglMixedIntegerRounding & | operator= (const CglMixedIntegerRounding &rhs)
| Assignment operator. More...
virtual | ~CglMixedIntegerRounding ()
| Destructor. More...
virtual void | refreshSolver (OsiSolverInterface *solver)
| This can be used to refresh any inforamtion. More...
virtual std::string | generateCpp (FILE *fp)
| Create C++ lines to get to current state. More...
Set and get methods
void | setMAXAGGR_ (int maxaggr)
| Set MAXAGGR_. More...
int | getMAXAGGR_ () const
| Get MAXAGGR_. More...
void | setMULTIPLY_ (bool multiply)
| Set MULTIPLY_. More...
bool | getMULTIPLY_ () const
| Get MULTIPLY_. More...
void | setCRITERION_ (int criterion)
| Set CRITERION_. More...
int | getCRITERION_ () const
| Get CRITERION_. More...
void | setDoPreproc (int value)
| Set doPreproc. More...
bool | getDoPreproc () const
| Get doPreproc. 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...
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_UNDEFINED, ROW_VARUB, ROW_VARLB, ROW_VAREQ, ROW_MIX, ROW_CONT, ROW_INT, ROW_OTHER }

## Private Member Functions
void | gutsOfConstruct (const int maxaggr, const bool multiply, const int criterion, const int preproc)
void | gutsOfDelete ()
void | gutsOfCopy (const CglMixedIntegerRounding &rhs)
void | mixIntRoundPreprocess (const OsiSolverInterface &si)
RowType | determineRowType (const OsiSolverInterface &si, const int rowLen, const int *ind, const double *coef, const char sense, const double rhs) const
void | generateMirCuts (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, const double *coefByCol, const int *rowInds, const int *colStarts, const int *colLengths, OsiCuts &cs) const
void | copyRowSelected (const int iAggregate, const int rowSelected, std::set< int > &setRowsAggregated, int *listRowsAggregated, double *xlpExtra, const char sen, const double rhs, const double lhs, const CoinPackedMatrix &matrixByRow, CoinPackedVector &rowToAggregate, double &rhsToAggregate) const
bool | selectRowToAggregate (const OsiSolverInterface &si, const CoinPackedVector &rowAggregated, const double *colUpperBound, const double *colLowerBound, const std::set< int > &setRowsAggregated, const double *xlp, const double *coefByCol, const int *rowInds, const int *colStarts, const int *colLengths, int &rowSelected, int &colSelected) const
void | aggregateRow (const int colSelected, CoinPackedVector &rowToAggregate, double rhs, CoinPackedVector &rowAggregated, double &rhsAggregated) const
bool | isLowerSubst (const double inf, const double aj, const double xlp, const double LB, const double UB) const
bool | boundSubstitution (const OsiSolverInterface &si, const CoinPackedVector &rowAggregated, const double *xlp, const double *xlpExtra, const double *colUpperBound, const double *colLowerBound, CoinPackedVector &mixedKnapsack, double &rhsMixedKnapsack, double &sStar, CoinPackedVector &contVariablesInS) const
bool | cMirSeparation (const OsiSolverInterface &si, const CoinPackedMatrix &matrixByRow, const CoinPackedVector &rowAggregated, const int *listRowsAggregated, const char *sense, const double *RHS, const double *xlp, const double sStar, const double *colUpperBound, const double *colLowerBound, const CoinPackedVector &mixedKnapsack, const double &rhsMixedKnapsack, const CoinPackedVector &contVariablesInS, OsiRowCut &flowCut) const
void | cMirInequality (const int numInt, const double delta, const double numeratorBeta, const int *knapsackIndices, const double *knapsackElements, const double *xlp, const double sStar, const double *colUpperBound, const std::set< int > &setC, CoinPackedVector &cMIR, double &rhscMIR, double &sCoef, double &violation) const
double | functionG (const double d, const double f) const
void | printStats (std::ofstream &fout, const bool hasCut, const OsiSolverInterface &si, const CoinPackedVector &rowAggregated, const double &rhsAggregated, const double *xlp, const double *xlpExtra, const int *listRowsAggregated, const int *listColsSelected, const int level, const double *colUpperBound, const double *colLowerBound) const

## Private Attributes
int | MAXAGGR_
bool | MULTIPLY_
int | CRITERION_
double | EPSILON_
int | UNDEFINED_
| There is no variable upper bound or variable lower bound defined. More...
double | TOLERANCE_
int | doPreproc_
| Controls the preprocessing of the matrix to identify rows suitable for cut generation. More...
int | numRows_
int | numCols_
bool | doneInitPre_
CglMixIntRoundVUB * | vubs_
CglMixIntRoundVLB * | vlbs_
RowType * | rowTypes_
int * | indRows_
int | numRowMix_
int * | indRowMix_
int | numRowCont_
int * | indRowCont_
int | numRowInt_
int * | indRowInt_
int | numRowContVB_
int * | indRowContVB_
char * | sense_
double * | RHS_

## Friends
void | CglMixedIntegerRoundingUnitTest (const OsiSolverInterface *siP, const std::string mpdDir)

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

Mixed Integer Rounding Cut Generator Class.

Definition at line 86 of file CglMixedIntegerRounding.hpp.

## Member Enumeration Documentation

enum CglMixedIntegerRounding::RowType
| private

Enumerator
ROW_UNDEFINED |
ROW_VARUB | After the row is flipped to 'L', the row has exactly two variables: one is negative binary and the other is a continous, and the RHS is zero.
ROW_VARLB | After the row is flipped to 'L', the row has exactly two variables: one is positive binary and the other is a continous, and the RHS is zero.
ROW_VAREQ | The row sense is 'E', the row has exactly two variables: one is binary and the other is a continous, and the RHS is zero.
ROW_MIX |
ROW_CONT |
ROW_INT |
ROW_OTHER |

Definition at line 95 of file CglMixedIntegerRounding.hpp.

## Constructor & Destructor Documentation

CglMixedIntegerRounding::CglMixedIntegerRounding | ( |  | ) |

Default constructor.

CglMixedIntegerRounding::CglMixedIntegerRounding | ( | const int | maxaggr,
|  | const bool | multiply,
|  | const int | criterion,
|  | const int | preproc = `-1`
| ) |  |

Alternate Constructor.

CglMixedIntegerRounding::CglMixedIntegerRounding | ( | const CglMixedIntegerRounding & |  | ) |

Copy constructor.

virtual CglMixedIntegerRounding::~CglMixedIntegerRounding | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

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

Generate Mixed Integer Rounding cuts for the model data contained in si.

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

Implements CglCutGenerator.

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

Clone.

Implements CglCutGenerator.

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

Assignment operator.

virtual void CglMixedIntegerRounding::refreshSolver | ( | OsiSolverInterface * | solver | ) |
| virtual

This can be used to refresh any inforamtion.

Reimplemented from CglCutGenerator.

virtual std::string CglMixedIntegerRounding::generateCpp | ( | FILE * | fp | ) |
| virtual

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

void CglMixedIntegerRounding::setMAXAGGR_ | ( | int | maxaggr | ) |
| inline

Set MAXAGGR_.

Definition at line 170 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::getMAXAGGR_ | ( |  | ) | const
| inline

Get MAXAGGR_.

Definition at line 181 of file CglMixedIntegerRounding.hpp.

void CglMixedIntegerRounding::setMULTIPLY_ | ( | bool | multiply | ) |
| inline

Set MULTIPLY_.

Definition at line 184 of file CglMixedIntegerRounding.hpp.

bool CglMixedIntegerRounding::getMULTIPLY_ | ( |  | ) | const
| inline

Get MULTIPLY_.

Definition at line 187 of file CglMixedIntegerRounding.hpp.

void CglMixedIntegerRounding::setCRITERION_ | ( | int | criterion | ) |
| inline

Set CRITERION_.

Definition at line 190 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::getCRITERION_ | ( |  | ) | const
| inline

Get CRITERION_.

Definition at line 201 of file CglMixedIntegerRounding.hpp.

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

Set doPreproc.

bool CglMixedIntegerRounding::getDoPreproc | ( |  | ) | const

Get doPreproc.

void CglMixedIntegerRounding::gutsOfConstruct | ( | const int | maxaggr,
|  | const bool | multiply,
|  | const int | criterion,
|  | const int | preproc
| ) |  |
| private

void CglMixedIntegerRounding::gutsOfDelete | ( |  | ) |
| private

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

void CglMixedIntegerRounding::mixIntRoundPreprocess | ( | const OsiSolverInterface & | si | ) |
| private

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

void CglMixedIntegerRounding::generateMirCuts | ( | 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,
|  | const double * | coefByCol,
|  | const int * | rowInds,
|  | const int * | colStarts,
|  | const int * | colLengths,
|  | OsiCuts & | cs
| ) |  | const
| private

void CglMixedIntegerRounding::copyRowSelected | ( | const int | iAggregate,
|  | const int | rowSelected,
|  | std::set< int > & | setRowsAggregated,
|  | int * | listRowsAggregated,
|  | double * | xlpExtra,
|  | const char | sen,
|  | const double | rhs,
|  | const double | lhs,
|  | const CoinPackedMatrix & | matrixByRow,
|  | CoinPackedVector & | rowToAggregate,
|  | double & | rhsToAggregate
| ) |  | const
| private

bool CglMixedIntegerRounding::selectRowToAggregate | ( | const OsiSolverInterface & | si,
|  | const CoinPackedVector & | rowAggregated,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound,
|  | const std::set< int > & | setRowsAggregated,
|  | const double * | xlp,
|  | const double * | coefByCol,
|  | const int * | rowInds,
|  | const int * | colStarts,
|  | const int * | colLengths,
|  | int & | rowSelected,
|  | int & | colSelected
| ) |  | const
| private

void CglMixedIntegerRounding::aggregateRow | ( | const int | colSelected,
|  | CoinPackedVector & | rowToAggregate,
|  | double | rhs,
|  | CoinPackedVector & | rowAggregated,
|  | double & | rhsAggregated
| ) |  | const
| private

bool CglMixedIntegerRounding::isLowerSubst | ( | const double | inf,
|  | const double | aj,
|  | const double | xlp,
|  | const double | LB,
|  | const double | UB
| ) |  | const
| inline private

bool CglMixedIntegerRounding::boundSubstitution | ( | const OsiSolverInterface & | si,
|  | const CoinPackedVector & | rowAggregated,
|  | const double * | xlp,
|  | const double * | xlpExtra,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound,
|  | CoinPackedVector & | mixedKnapsack,
|  | double & | rhsMixedKnapsack,
|  | double & | sStar,
|  | CoinPackedVector & | contVariablesInS
| ) |  | const
| private

bool CglMixedIntegerRounding::cMirSeparation | ( | const OsiSolverInterface & | si,
|  | const CoinPackedMatrix & | matrixByRow,
|  | const CoinPackedVector & | rowAggregated,
|  | const int * | listRowsAggregated,
|  | const char * | sense,
|  | const double * | RHS,
|  | const double * | xlp,
|  | const double | sStar,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound,
|  | const CoinPackedVector & | mixedKnapsack,
|  | const double & | rhsMixedKnapsack,
|  | const CoinPackedVector & | contVariablesInS,
|  | OsiRowCut & | flowCut
| ) |  | const
| private

void CglMixedIntegerRounding::cMirInequality | ( | const int | numInt,
|  | const double | delta,
|  | const double | numeratorBeta,
|  | const int * | knapsackIndices,
|  | const double * | knapsackElements,
|  | const double * | xlp,
|  | const double | sStar,
|  | const double * | colUpperBound,
|  | const std::set< int > & | setC,
|  | CoinPackedVector & | cMIR,
|  | double & | rhscMIR,
|  | double & | sCoef,
|  | double & | violation
| ) |  | const
| private

double CglMixedIntegerRounding::functionG | ( | const double | d,
|  | const double | f
| ) |  | const
| inline private

void CglMixedIntegerRounding::printStats | ( | std::ofstream & | fout,
|  | const bool | hasCut,
|  | const OsiSolverInterface & | si,
|  | const CoinPackedVector & | rowAggregated,
|  | const double & | rhsAggregated,
|  | const double * | xlp,
|  | const double * | xlpExtra,
|  | const int * | listRowsAggregated,
|  | const int * | listColsSelected,
|  | const int | level,
|  | const double * | colUpperBound,
|  | const double * | colLowerBound
| ) |  | const
| private

## Friends And Related Function Documentation

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

## Member Data Documentation

int CglMixedIntegerRounding::MAXAGGR_
| private

Definition at line 362 of file CglMixedIntegerRounding.hpp.

bool CglMixedIntegerRounding::MULTIPLY_
| private

Definition at line 364 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::CRITERION_
| private

Definition at line 366 of file CglMixedIntegerRounding.hpp.

double CglMixedIntegerRounding::EPSILON_
| private

Definition at line 368 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::UNDEFINED_
| private

There is no variable upper bound or variable lower bound defined.

Definition at line 370 of file CglMixedIntegerRounding.hpp.

double CglMixedIntegerRounding::TOLERANCE_
| private

Definition at line 372 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::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 380 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numRows_
| private

Definition at line 382 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numCols_
| private

Definition at line 384 of file CglMixedIntegerRounding.hpp.

bool CglMixedIntegerRounding::doneInitPre_
| private

Definition at line 386 of file CglMixedIntegerRounding.hpp.

CglMixIntRoundVUB* CglMixedIntegerRounding::vubs_
| private

Definition at line 388 of file CglMixedIntegerRounding.hpp.

CglMixIntRoundVLB* CglMixedIntegerRounding::vlbs_
| private

Definition at line 390 of file CglMixedIntegerRounding.hpp.

RowType* CglMixedIntegerRounding::rowTypes_
| private

Definition at line 392 of file CglMixedIntegerRounding.hpp.

int* CglMixedIntegerRounding::indRows_
| private

Definition at line 394 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numRowMix_
| private

Definition at line 396 of file CglMixedIntegerRounding.hpp.

int* CglMixedIntegerRounding::indRowMix_
| private

Definition at line 398 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numRowCont_
| private

Definition at line 400 of file CglMixedIntegerRounding.hpp.

int* CglMixedIntegerRounding::indRowCont_
| private

Definition at line 402 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numRowInt_
| private

Definition at line 404 of file CglMixedIntegerRounding.hpp.

int* CglMixedIntegerRounding::indRowInt_
| private

Definition at line 406 of file CglMixedIntegerRounding.hpp.

int CglMixedIntegerRounding::numRowContVB_
| private

Definition at line 409 of file CglMixedIntegerRounding.hpp.

int* CglMixedIntegerRounding::indRowContVB_
| private

Definition at line 412 of file CglMixedIntegerRounding.hpp.

char* CglMixedIntegerRounding::sense_
| private

Definition at line 414 of file CglMixedIntegerRounding.hpp.

double* CglMixedIntegerRounding::RHS_
| private

Definition at line 416 of file CglMixedIntegerRounding.hpp.

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

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