Cgl trunk
|
Twostep MIR Cut Generator Class. More...
#include <CglTwomir.hpp>
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) |
void | setAMax (int a) |
void | setMaxElements (int n) |
void | setMaxElementsRoot (int n) |
void | setCutTypes (bool mir, bool twomir, bool tab, bool form) |
void | setFormulationRows (int n) |
int | getTmin () const |
Get. | |
int | getTmax () const |
int | getQmin () const |
int | getQmax () const |
int | getAmax () const |
int | getMaxElements () const |
int | getMaxElementsRoot () const |
int | getIfMir () const |
int | getIfTwomir () const |
int | getIfTableau () const |
int | getIfFormulation () const |
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. | |
virtual int | maximumLengthOfCutInTree () const |
Return maximum length of cut in tree. | |
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. | |
Friends | |
void | CglTwomirUnitTest (const OsiSolverInterface *siP, const std::string mpdDir) |
A function that tests the methods in the CglTwomir class. |
Twostep MIR Cut Generator Class.
Definition at line 91 of file CglTwomir.hpp.
CglTwomir::CglTwomir | ( | ) |
Default constructor.
CglTwomir::CglTwomir | ( | const CglTwomir & | ) |
Copy constructor.
virtual CglTwomir::~CglTwomir | ( | ) | [virtual] |
Destructor.
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 115 of file CglTwomir.hpp.
void CglTwomir::setTwomirScale | ( | int | qmin, |
int | qmax | ||
) | [inline] |
Definition at line 116 of file CglTwomir.hpp.
void CglTwomir::setAMax | ( | int | a | ) | [inline] |
Definition at line 117 of file CglTwomir.hpp.
void CglTwomir::setMaxElements | ( | int | n | ) | [inline] |
Definition at line 118 of file CglTwomir.hpp.
void CglTwomir::setMaxElementsRoot | ( | int | n | ) | [inline] |
Definition at line 119 of file CglTwomir.hpp.
void CglTwomir::setCutTypes | ( | bool | mir, |
bool | twomir, | ||
bool | tab, | ||
bool | form | ||
) | [inline] |
Definition at line 120 of file CglTwomir.hpp.
void CglTwomir::setFormulationRows | ( | int | n | ) | [inline] |
Definition at line 122 of file CglTwomir.hpp.
int CglTwomir::getTmin | ( | ) | const [inline] |
Get.
Definition at line 125 of file CglTwomir.hpp.
int CglTwomir::getTmax | ( | ) | const [inline] |
Definition at line 126 of file CglTwomir.hpp.
int CglTwomir::getQmin | ( | ) | const [inline] |
Definition at line 127 of file CglTwomir.hpp.
int CglTwomir::getQmax | ( | ) | const [inline] |
Definition at line 128 of file CglTwomir.hpp.
int CglTwomir::getAmax | ( | ) | const [inline] |
Definition at line 129 of file CglTwomir.hpp.
int CglTwomir::getMaxElements | ( | ) | const [inline] |
Definition at line 130 of file CglTwomir.hpp.
int CglTwomir::getMaxElementsRoot | ( | ) | const [inline] |
Definition at line 131 of file CglTwomir.hpp.
int CglTwomir::getIfMir | ( | ) | const [inline] |
Definition at line 132 of file CglTwomir.hpp.
int CglTwomir::getIfTwomir | ( | ) | const [inline] |
Definition at line 133 of file CglTwomir.hpp.
int CglTwomir::getIfTableau | ( | ) | const [inline] |
Definition at line 134 of file CglTwomir.hpp.
int CglTwomir::getIfFormulation | ( | ) | const [inline] |
Definition at line 135 of file CglTwomir.hpp.
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 int CglTwomir::maximumLengthOfCutInTree | ( | ) | const [inline, virtual] |
Return maximum length of cut in tree.
Reimplemented from CglCutGenerator.
Definition at line 151 of file CglTwomir.hpp.
virtual CglCutGenerator* CglTwomir::clone | ( | ) | const [virtual] |
Clone.
Implements CglCutGenerator.
virtual std::string CglTwomir::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CglCutGenerator.
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.
std::string CglTwomir::probname_ [mutable] |
Problem name.
Definition at line 100 of file CglTwomir.hpp.