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

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

# CglTwomir Class Reference

Twostep MIR Cut Generator Class. More...

`#include <CglTwomir.hpp>`

Inheritance diagram for CglTwomir:

[legend]
Collaboration diagram for CglTwomir:

[legend]
List of all members.

## Public Member Functions
Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
| Generate Two step MIR cuts either from the tableau rows or from the formulation rows.
virtual bool | needsOptimalBasis () const
| Return true if needs optimal basis to do cuts (will return true).
Change criterion on which scalings to use (default = 1,1,1,1)
void | setMirScale (int tmin, int tmax)
| Set.
void | setTwomirScale (int qmin, int qmax)
| Set.
void | setAMax (int a)
| Set.
void | setMaxElements (int n)
| Set.
void | setMaxElementsRoot (int n)
| Set.
void | setCutTypes (bool mir, bool twomir, bool tab, bool form)
| Set.
void | setFormulationRows (int n)
| Set.
int | getTmin () const
| Get.
int | getTmax () const
| Set.
int | getQmin () const
| Set.
int | getQmax () const
| Set.
int | getAmax () const
| Set.
int | getMaxElements () const
| Set.
int | getMaxElementsRoot () const
| Set.
int | getIfMir () const
| Set.
int | getIfTwomir () const
| Set.
int | getIfTableau () const
| Set.
int | getIfFormulation () const
| Set.
Change criterion on which variables to look at. All ones
more than "away" away from integrality will be investigated (default 0.05)
void | setAway (double value)
| Set away.
double | getAway () const
| Get away.
void | setAwayAtRoot (double value)
| Set away at root.
double | getAwayAtRoot () const
| Get away at root.
Constructors and destructors
| CglTwomir ()
| Default constructor.
| CglTwomir (const CglTwomir &)
| Copy constructor.
virtual CglCutGenerator * | clone () const
| Clone.
CglTwomir & | operator= (const CglTwomir &rhs)
| Assignment operator.
virtual | ~CglTwomir ()
| Destructor.
virtual std::string | generateCpp (FILE *fp)
| Create C++ lines to get to current state.
## Public Attributes
std::string | probname_
| Problem name.
## Private Attributes
Private member data
double | away_
| Only investigate if more than this away from integrality.
double | awayAtRoot_
| Only investigate if more than this away from integrality (at root).
bool | do_mir_
| Only investigate if more than this away from integrality.
bool | do_2mir_
| Only investigate if more than this away from integrality.
bool | do_tab_
| Only investigate if more than this away from integrality.
bool | do_form_
| Only investigate if more than this away from integrality.
int | t_min_
| Only investigate if more than this away from integrality.
int | t_max_
| t_min - first value of t to use for tMIR inequalities
int | q_min_
| t_max - last value of t to use for tMIR inequalities
int | q_max_
| q_min - first value of t to use for 2-Step tMIR inequalities
int | a_max_
| q_max - last value of t to use for 2-Step tMIR inequalities
int | max_elements_
| a_max - maximum value of bhat/alpha
int | max_elements_root_
| Maximum number of elements in cut.
int | form_nrows_
| Maximum number of elements in cut at root.
## Friends
void | CglTwomirUnitTest (const OsiSolverInterface *siP, const std::string mpdDir)
| A function that tests the methods in the CglTwomir class.

## Detailed Description

Twostep MIR Cut Generator Class.

Definition at line 88 of file CglTwomir.hpp.

## Constructor & Destructor Documentation

CglTwomir::CglTwomir | ( |  | ) |

Default constructor.

CglTwomir::CglTwomir | ( | const CglTwomir & |  | ) |

Copy constructor.

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

Destructor.

## Member Function Documentation

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

Generate Two step MIR cuts either from the tableau rows or from the formulation rows.

Implements CglCutGenerator.

virtual bool CglTwomir::needsOptimalBasis | ( |  | ) | const`[virtual]`

Return true if needs optimal basis to do cuts (will return true).

Reimplemented from CglCutGenerator.

void CglTwomir::setMirScale | ( | int | tmin,
|  | int | tmax |
| ) |  |  | `[inline]`

Set.

Definition at line 112 of file CglTwomir.hpp.

References t_max_, and t_min_.

void CglTwomir::setTwomirScale | ( | int | qmin,
|  | int | qmax |
| ) |  |  | `[inline]`

Set.

Definition at line 113 of file CglTwomir.hpp.

References q_max_, and q_min_.

void CglTwomir::setAMax | ( | int | a | ) | `[inline]`

Set.

Definition at line 114 of file CglTwomir.hpp.

References a_max_.

void CglTwomir::setMaxElements | ( | int | n | ) | `[inline]`

Set.

Definition at line 115 of file CglTwomir.hpp.

References max_elements_.

void CglTwomir::setMaxElementsRoot | ( | int | n | ) | `[inline]`

Set.

Definition at line 116 of file CglTwomir.hpp.

References max_elements_root_.

void CglTwomir::setCutTypes | ( | bool | mir,
|  | bool | twomir,
|  | bool | tab,
|  | bool | form |
| ) |  |  | `[inline]`

Set.

Definition at line 117 of file CglTwomir.hpp.

References do_2mir_, do_form_, do_mir_, and do_tab_.

void CglTwomir::setFormulationRows | ( | int | n | ) | `[inline]`

Set.

Definition at line 119 of file CglTwomir.hpp.

References form_nrows_.

int CglTwomir::getTmin | ( |  | ) | const`[inline]`

Get.

Definition at line 122 of file CglTwomir.hpp.

References t_min_.

int CglTwomir::getTmax | ( |  | ) | const`[inline]`

Set.

Definition at line 123 of file CglTwomir.hpp.

References t_max_.

int CglTwomir::getQmin | ( |  | ) | const`[inline]`

Set.

Definition at line 124 of file CglTwomir.hpp.

References q_min_.

int CglTwomir::getQmax | ( |  | ) | const`[inline]`

Set.

Definition at line 125 of file CglTwomir.hpp.

References q_max_.

int CglTwomir::getAmax | ( |  | ) | const`[inline]`

Set.

Definition at line 126 of file CglTwomir.hpp.

References a_max_.

int CglTwomir::getMaxElements | ( |  | ) | const`[inline]`

Set.

Definition at line 127 of file CglTwomir.hpp.

References max_elements_.

int CglTwomir::getMaxElementsRoot | ( |  | ) | const`[inline]`

Set.

Definition at line 128 of file CglTwomir.hpp.

References max_elements_root_.

int CglTwomir::getIfMir | ( |  | ) | const`[inline]`

Set.

Definition at line 129 of file CglTwomir.hpp.

References do_mir_.

int CglTwomir::getIfTwomir | ( |  | ) | const`[inline]`

Set.

Definition at line 130 of file CglTwomir.hpp.

References do_2mir_.

int CglTwomir::getIfTableau | ( |  | ) | const`[inline]`

Set.

Definition at line 131 of file CglTwomir.hpp.

References do_tab_.

int CglTwomir::getIfFormulation | ( |  | ) | const`[inline]`

Set.

Definition at line 132 of file CglTwomir.hpp.

References do_form_.

void CglTwomir::setAway | ( | double | value | ) |

Set away.

double CglTwomir::getAway | ( |  | ) | const

Get away.

void CglTwomir::setAwayAtRoot | ( | double | value | ) |

Set away at root.

double CglTwomir::getAwayAtRoot | ( |  | ) | const

Get away at root.

virtual CglCutGenerator* CglTwomir::clone | ( |  | ) | const`[virtual]`

Clone.

Implements CglCutGenerator.

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

Assignment operator.

virtual std::string CglTwomir::generateCpp | ( | FILE * | fp | ) | `[virtual]`

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

## Friends And Related Function Documentation

void CglTwomirUnitTest | ( | const OsiSolverInterface * | siP,
|  | const std::string | mpdDir |
| ) |  |  | `[friend]`

A function that tests the methods in the CglTwomir 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

std::string CglTwomir::probname_`[mutable]`

Problem name.

Definition at line 97 of file CglTwomir.hpp.

double CglTwomir::away_`[private]`

Only investigate if more than this away from integrality.

Definition at line 174 of file CglTwomir.hpp.

double CglTwomir::awayAtRoot_`[private]`

Only investigate if more than this away from integrality (at root).

Definition at line 176 of file CglTwomir.hpp.

bool CglTwomir::do_mir_`[private]`

Only investigate if more than this away from integrality.

Definition at line 177 of file CglTwomir.hpp.

Referenced by getIfMir(), and setCutTypes().

bool CglTwomir::do_2mir_`[private]`

Only investigate if more than this away from integrality.

Definition at line 178 of file CglTwomir.hpp.

Referenced by getIfTwomir(), and setCutTypes().

bool CglTwomir::do_tab_`[private]`

Only investigate if more than this away from integrality.

Definition at line 179 of file CglTwomir.hpp.

Referenced by getIfTableau(), and setCutTypes().

bool CglTwomir::do_form_`[private]`

Only investigate if more than this away from integrality.

Definition at line 180 of file CglTwomir.hpp.

Referenced by getIfFormulation(), and setCutTypes().

int CglTwomir::t_min_`[private]`

Only investigate if more than this away from integrality.

Definition at line 182 of file CglTwomir.hpp.

Referenced by getTmin(), and setMirScale().

int CglTwomir::t_max_`[private]`

t_min - first value of t to use for tMIR inequalities

Definition at line 183 of file CglTwomir.hpp.

Referenced by getTmax(), and setMirScale().

int CglTwomir::q_min_`[private]`

t_max - last value of t to use for tMIR inequalities

Definition at line 184 of file CglTwomir.hpp.

Referenced by getQmin(), and setTwomirScale().

int CglTwomir::q_max_`[private]`

q_min - first value of t to use for 2-Step tMIR inequalities

Definition at line 185 of file CglTwomir.hpp.

Referenced by getQmax(), and setTwomirScale().

int CglTwomir::a_max_`[private]`

q_max - last value of t to use for 2-Step tMIR inequalities

Definition at line 186 of file CglTwomir.hpp.

Referenced by getAmax(), and setAMax().

int CglTwomir::max_elements_`[private]`

a_max - maximum value of bhat/alpha

Definition at line 187 of file CglTwomir.hpp.

Referenced by getMaxElements(), and setMaxElements().

int CglTwomir::max_elements_root_`[private]`

Maximum number of elements in cut.

Definition at line 188 of file CglTwomir.hpp.

Referenced by getMaxElementsRoot(), and setMaxElementsRoot().

int CglTwomir::form_nrows_`[private]`

Maximum number of elements in cut at root.

Definition at line 189 of file CglTwomir.hpp.

Referenced by setFormulationRows().

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

- /home/coin/SVN-release/Bcps-0.91.0/Cgl/src/CglTwomir/CglTwomir.hpp