Cgl  0.59.9
Friends | List of all members
CglSimpleRounding Class Reference

Simple Rounding Cut Generator Class. More...

#include <CglSimpleRounding.hpp>

+ Inheritance diagram for CglSimpleRounding:
+ Collaboration diagram for CglSimpleRounding:

Public Member Functions

Generate Cuts
virtual void generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
 Generate simple rounding cuts for the model accessed through the solver interface. More...
 
Constructors and destructors
 CglSimpleRounding ()
 Default constructor. More...
 
 CglSimpleRounding (const CglSimpleRounding &)
 Copy constructor. More...
 
virtual CglCutGeneratorclone () const
 Clone. More...
 
CglSimpleRoundingoperator= (const CglSimpleRounding &rhs)
 Assignment operator. More...
 
virtual ~CglSimpleRounding ()
 Destructor. More...
 
virtual std::string generateCpp (FILE *fp)
 Create C++ lines to get to current state. More...
 
- Public Member Functions inherited from CglCutGenerator
 CglCutGenerator ()
 Default constructor. More...
 
 CglCutGenerator (const CglCutGenerator &)
 Copy constructor. More...
 
CglCutGeneratoroperator= (const CglCutGenerator &rhs)
 Assignment operator. More...
 
virtual ~CglCutGenerator ()
 Destructor. More...
 
virtual void refreshSolver (OsiSolverInterface *)
 This can be used to refresh any information. 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...
 

Friends

void CglSimpleRoundingUnitTest (const OsiSolverInterface *siP, const std::string mpdDir)
 A function that tests the methods in the CglSimpleRounding class. More...
 

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

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.

Constructor & Destructor Documentation

CglSimpleRounding::CglSimpleRounding ( )

Default constructor.

CglSimpleRounding::CglSimpleRounding ( const CglSimpleRounding )

Copy constructor.

virtual CglSimpleRounding::~CglSimpleRounding ( )
virtual

Destructor.

Member Function Documentation

virtual void CglSimpleRounding::generateCuts ( const OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo  info = CglTreeInfo() 
)
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.

Friends And Related Function Documentation

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.


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