|
Dip
0.92.4
|
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()) |
| Generate Two step MIR cuts either from the tableau rows or from the formulation rows. More... | |
| virtual bool | needsOptimalBasis () const |
| Return true if needs optimal basis to do cuts (will return true) More... | |
Change criterion on which scalings to use (default = 1,1,1,1) | |
| void | setMirScale (int tmin, int tmax) |
| Set. More... | |
| void | setTwomirScale (int qmin, int qmax) |
| Set. More... | |
| void | setAMax (int a) |
| Set. More... | |
| void | setMaxElements (int n) |
| Set. More... | |
| void | setMaxElementsRoot (int n) |
| Set. More... | |
| void | setCutTypes (bool mir, bool twomir, bool tab, bool form) |
| Set. More... | |
| void | setFormulationRows (int n) |
| Set. More... | |
| int | getTmin () const |
| Get. More... | |
| int | getTmax () const |
| Set. More... | |
| int | getQmin () const |
| Set. More... | |
| int | getQmax () const |
| Set. More... | |
| int | getAmax () const |
| Set. More... | |
| int | getMaxElements () const |
| Set. More... | |
| int | getMaxElementsRoot () const |
| Set. More... | |
| int | getIfMir () const |
| Set. More... | |
| int | getIfTwomir () const |
| Set. More... | |
| int | getIfTableau () const |
| Set. More... | |
| int | getIfFormulation () const |
| Set. More... | |
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. More... | |
| double | getAway () const |
| Get away. More... | |
| void | setAwayAtRoot (double value) |
| Set away at root. More... | |
| double | getAwayAtRoot () const |
| Get away at root. More... | |
| virtual int | maximumLengthOfCutInTree () const |
| Return maximum length of cut in tree. More... | |
Change way TwoMir works | |
| void | passInOriginalSolver (OsiSolverInterface *solver) |
| Pass in a copy of original solver (clone it) More... | |
| OsiSolverInterface * | originalSolver () const |
| Returns original solver. More... | |
| void | setTwomirType (int type) |
| Set type - 0 normal, 1 add original matrix one, 2 replace. More... | |
| int | twomirType () const |
| Return type. More... | |
Constructors and destructors | |
| CglTwomir () | |
| Default constructor. More... | |
| CglTwomir (const CglTwomir &) | |
| Copy constructor. More... | |
| virtual CglCutGenerator * | clone () const |
| Clone. More... | |
| CglTwomir & | operator= (const CglTwomir &rhs) |
| Assignment operator. More... | |
| virtual | ~CglTwomir () |
| Destructor. More... | |
| virtual std::string | generateCpp (FILE *fp) |
| Create C++ lines to get to current state. More... | |
| virtual void | refreshSolver (OsiSolverInterface *solver) |
| This can be used to refresh any inforamtion. 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... | |
Public Attributes | |
| std::string | probname_ |
| Problem name. More... | |
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... | |
Private Attributes | |
Private member data | |
| CoinThreadRandom | randomNumberGenerator_ |
| Threadsafe random number generator. More... | |
| OsiSolverInterface * | originalSolver_ |
| Original solver. More... | |
| double | away_ |
| Only investigate if more than this away from integrality. More... | |
| double | awayAtRoot_ |
| Only investigate if more than this away from integrality (at root) More... | |
| int | twomirType_ |
| Type - 0 normal, 1 add original matrix one, 2 replace. More... | |
| bool | do_mir_ |
| Threadsafe random number generator. More... | |
| bool | do_2mir_ |
| Threadsafe random number generator. More... | |
| bool | do_tab_ |
| Threadsafe random number generator. More... | |
| bool | do_form_ |
| Threadsafe random number generator. More... | |
| int | t_min_ |
| Threadsafe random number generator. More... | |
| int | t_max_ |
| t_min - first value of t to use for tMIR inequalities More... | |
| int | q_min_ |
| t_max - last value of t to use for tMIR inequalities More... | |
| int | q_max_ |
| q_min - first value of t to use for 2-Step tMIR inequalities More... | |
| int | a_max_ |
| q_max - last value of t to use for 2-Step tMIR inequalities More... | |
| int | max_elements_ |
| a_max - maximum value of bhat/alpha More... | |
| int | max_elements_root_ |
| Maximum number of elements in cut. More... | |
| int | form_nrows_ |
| Maximum number of elements in cut at root. More... | |
Friends | |
| void | CglTwomirUnitTest (const OsiSolverInterface *siP, const std::string mpdDir) |
| A function that tests the methods in the CglTwomir class. More... | |
Twostep MIR Cut Generator Class.
Definition at line 91 of file CglTwomir.hpp.
| CglTwomir::CglTwomir | ( | ) |
Default constructor.
| CglTwomir::CglTwomir | ( | const CglTwomir & | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Generate Two step MIR cuts either from the tableau rows or from the formulation rows.
Implements CglCutGenerator.
|
virtual |
Return true if needs optimal basis to do cuts (will return true)
Reimplemented from CglCutGenerator.
|
inline |
Set.
Definition at line 115 of file CglTwomir.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| 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.
|
inlinevirtual |
Return maximum length of cut in tree.
Reimplemented from CglCutGenerator.
Definition at line 151 of file CglTwomir.hpp.
References max_elements_.
| void CglTwomir::passInOriginalSolver | ( | OsiSolverInterface * | solver | ) |
Pass in a copy of original solver (clone it)
|
inline |
|
inline |
Set type - 0 normal, 1 add original matrix one, 2 replace.
Definition at line 163 of file CglTwomir.hpp.
References twomirType_.
|
inline |
|
virtual |
Clone.
Implements CglCutGenerator.
|
virtual |
Create C++ lines to get to current state.
Reimplemented from CglCutGenerator.
|
virtual |
This can be used to refresh any inforamtion.
Reimplemented from CglCutGenerator.
|
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_ |
Problem name.
Definition at line 100 of file CglTwomir.hpp.
|
private |
Threadsafe random number generator.
Definition at line 197 of file CglTwomir.hpp.
|
private |
|
private |
Only investigate if more than this away from integrality.
Definition at line 201 of file CglTwomir.hpp.
|
private |
Only investigate if more than this away from integrality (at root)
Definition at line 203 of file CglTwomir.hpp.
|
private |
Type - 0 normal, 1 add original matrix one, 2 replace.
Definition at line 205 of file CglTwomir.hpp.
Referenced by setTwomirType(), and twomirType().
|
private |
Threadsafe random number generator.
Definition at line 206 of file CglTwomir.hpp.
Referenced by getIfMir(), and setCutTypes().
|
private |
Threadsafe random number generator.
Definition at line 207 of file CglTwomir.hpp.
Referenced by getIfTwomir(), and setCutTypes().
|
private |
Threadsafe random number generator.
Definition at line 208 of file CglTwomir.hpp.
Referenced by getIfTableau(), and setCutTypes().
|
private |
Threadsafe random number generator.
Definition at line 209 of file CglTwomir.hpp.
Referenced by getIfFormulation(), and setCutTypes().
|
private |
Threadsafe random number generator.
Definition at line 211 of file CglTwomir.hpp.
Referenced by getTmin().
|
private |
t_min - first value of t to use for tMIR inequalities
Definition at line 212 of file CglTwomir.hpp.
Referenced by getTmax().
|
private |
t_max - last value of t to use for tMIR inequalities
Definition at line 213 of file CglTwomir.hpp.
Referenced by getQmin(), and setTwomirScale().
|
private |
q_min - first value of t to use for 2-Step tMIR inequalities
Definition at line 214 of file CglTwomir.hpp.
Referenced by getQmax(), and setTwomirScale().
|
private |
q_max - last value of t to use for 2-Step tMIR inequalities
Definition at line 215 of file CglTwomir.hpp.
|
private |
a_max - maximum value of bhat/alpha
Definition at line 216 of file CglTwomir.hpp.
Referenced by getMaxElements(), maximumLengthOfCutInTree(), and setMaxElements().
|
private |
Maximum number of elements in cut.
Definition at line 217 of file CglTwomir.hpp.
Referenced by getMaxElementsRoot(), and setMaxElementsRoot().
|
private |
Maximum number of elements in cut at root.
Definition at line 218 of file CglTwomir.hpp.
Referenced by setFormulationRows().
1.8.5