Cgl
trunk
|
Simple Rounding Cut Generator Class
More...
#include <CglSimpleRounding.hpp>
Public Member Functions | |
Generate Cuts | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const |
Generate simple rounding cuts for the model accessed through the solver interface. | |
Constructors and destructors | |
CglSimpleRounding () | |
Default constructor. | |
CglSimpleRounding (const CglSimpleRounding &) | |
Copy constructor. | |
virtual CglCutGenerator * | clone () const |
Clone. | |
CglSimpleRounding & | operator= (const CglSimpleRounding &rhs) |
Assignment operator. | |
virtual | ~CglSimpleRounding () |
Destructor. | |
virtual std::string | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
Friends | |
void | CglSimpleRoundingUnitTest (const OsiSolverInterface *siP, const std::string mpdDir) |
A function that tests the methods in the CglSimpleRounding class. |
Simple Rounding Cut Generator Class
This class generates simple rounding cuts via the following method: For each contraint, attempt to derive a <= inequality in all integer variables by netting out any continuous variables. Divide the resulting integer inequality through by the greatest common denomimator (gcd) of the lhs coefficients. Round down the rhs.
Warning: Use with careful attention to data precision.
(Reference: Nemhauser and Wolsey, Integer and Combinatorial Optimization, 1988, pg 211.)
Definition at line 29 of file CglSimpleRounding.hpp.
Default constructor.
Copy constructor.
virtual CglSimpleRounding::~CglSimpleRounding | ( | ) | [virtual] |
Destructor.
virtual void CglSimpleRounding::generateCuts | ( | const OsiSolverInterface & | si, |
OsiCuts & | cs, | ||
const CglTreeInfo | info = CglTreeInfo() |
||
) | const [virtual] |
Generate simple rounding cuts for the model accessed through the solver interface.
Insert generated cuts into the cut set cs.
Implements CglCutGenerator.
virtual CglCutGenerator* CglSimpleRounding::clone | ( | ) | const [virtual] |
Clone.
Implements CglCutGenerator.
CglSimpleRounding& CglSimpleRounding::operator= | ( | const CglSimpleRounding & | rhs | ) |
Assignment operator.
virtual std::string CglSimpleRounding::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CglCutGenerator.
void CglSimpleRoundingUnitTest | ( | const OsiSolverInterface * | siP, |
const std::string | mpdDir | ||
) | [friend] |
A function that tests the methods in the CglSimpleRounding 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.