Cgl  0.59.10
Public Attributes | Friends | List of all members
CglTwomir Class Reference

Twostep MIR Cut Generator Class. More...

#include <CglTwomir.hpp>

+ Inheritance diagram for CglTwomir:
+ Collaboration diagram for CglTwomir:

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)
 
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. More...
 
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. 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 CglCutGeneratorclone () const
 Clone. More...
 
CglTwomiroperator= (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...
 
CglCutGeneratoroperator= (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...
 

Friends

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

Detailed Description

Twostep MIR Cut Generator Class.

Definition at line 91 of file CglTwomir.hpp.

Constructor & Destructor Documentation

◆ CglTwomir() [1/2]

CglTwomir::CglTwomir ( )

Default constructor.

◆ CglTwomir() [2/2]

CglTwomir::CglTwomir ( const CglTwomir )

Copy constructor.

◆ ~CglTwomir()

virtual CglTwomir::~CglTwomir ( )
virtual

Destructor.

Member Function Documentation

◆ generateCuts()

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

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

Implements CglCutGenerator.

◆ needsOptimalBasis()

virtual bool CglTwomir::needsOptimalBasis ( ) const
virtual

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

Reimplemented from CglCutGenerator.

◆ setMirScale()

void CglTwomir::setMirScale ( int  tmin,
int  tmax 
)
inline

Set.

Definition at line 115 of file CglTwomir.hpp.

◆ setTwomirScale()

void CglTwomir::setTwomirScale ( int  qmin,
int  qmax 
)
inline

Definition at line 116 of file CglTwomir.hpp.

◆ setAMax()

void CglTwomir::setAMax ( int  a)
inline

Definition at line 117 of file CglTwomir.hpp.

◆ setMaxElements()

void CglTwomir::setMaxElements ( int  n)
inline

Definition at line 118 of file CglTwomir.hpp.

◆ setMaxElementsRoot()

void CglTwomir::setMaxElementsRoot ( int  n)
inline

Definition at line 119 of file CglTwomir.hpp.

◆ setCutTypes()

void CglTwomir::setCutTypes ( bool  mir,
bool  twomir,
bool  tab,
bool  form 
)
inline

Definition at line 120 of file CglTwomir.hpp.

◆ setFormulationRows()

void CglTwomir::setFormulationRows ( int  n)
inline

Definition at line 122 of file CglTwomir.hpp.

◆ getTmin()

int CglTwomir::getTmin ( ) const
inline

Get.

Definition at line 125 of file CglTwomir.hpp.

◆ getTmax()

int CglTwomir::getTmax ( ) const
inline

Definition at line 126 of file CglTwomir.hpp.

◆ getQmin()

int CglTwomir::getQmin ( ) const
inline

Definition at line 127 of file CglTwomir.hpp.

◆ getQmax()

int CglTwomir::getQmax ( ) const
inline

Definition at line 128 of file CglTwomir.hpp.

◆ getAmax()

int CglTwomir::getAmax ( ) const
inline

Definition at line 129 of file CglTwomir.hpp.

◆ getMaxElements()

int CglTwomir::getMaxElements ( ) const
inline

Definition at line 130 of file CglTwomir.hpp.

◆ getMaxElementsRoot()

int CglTwomir::getMaxElementsRoot ( ) const
inline

Definition at line 131 of file CglTwomir.hpp.

◆ getIfMir()

int CglTwomir::getIfMir ( ) const
inline

Definition at line 132 of file CglTwomir.hpp.

◆ getIfTwomir()

int CglTwomir::getIfTwomir ( ) const
inline

Definition at line 133 of file CglTwomir.hpp.

◆ getIfTableau()

int CglTwomir::getIfTableau ( ) const
inline

Definition at line 134 of file CglTwomir.hpp.

◆ getIfFormulation()

int CglTwomir::getIfFormulation ( ) const
inline

Definition at line 135 of file CglTwomir.hpp.

◆ setAway()

void CglTwomir::setAway ( double  value)

Set away.

◆ getAway()

double CglTwomir::getAway ( ) const

Get away.

◆ setAwayAtRoot()

void CglTwomir::setAwayAtRoot ( double  value)

Set away at root.

◆ getAwayAtRoot()

double CglTwomir::getAwayAtRoot ( ) const

Get away at root.

◆ maximumLengthOfCutInTree()

virtual int CglTwomir::maximumLengthOfCutInTree ( ) const
inlinevirtual

Return maximum length of cut in tree.

Reimplemented from CglCutGenerator.

Definition at line 151 of file CglTwomir.hpp.

◆ passInOriginalSolver()

void CglTwomir::passInOriginalSolver ( OsiSolverInterface *  solver)

Pass in a copy of original solver (clone it)

◆ originalSolver()

OsiSolverInterface* CglTwomir::originalSolver ( ) const
inline

Returns original solver.

Definition at line 160 of file CglTwomir.hpp.

◆ setTwomirType()

void CglTwomir::setTwomirType ( int  type)
inline

Set type - 0 normal, 1 add original matrix one, 2 replace.

Definition at line 163 of file CglTwomir.hpp.

◆ twomirType()

int CglTwomir::twomirType ( ) const
inline

Return type.

Definition at line 166 of file CglTwomir.hpp.

◆ clone()

virtual CglCutGenerator* CglTwomir::clone ( ) const
virtual

Clone.

Implements CglCutGenerator.

◆ operator=()

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

Assignment operator.

◆ generateCpp()

virtual std::string CglTwomir::generateCpp ( FILE *  fp)
virtual

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

◆ refreshSolver()

virtual void CglTwomir::refreshSolver ( OsiSolverInterface *  solver)
virtual

This can be used to refresh any inforamtion.

Reimplemented from CglCutGenerator.

Friends And Related Function Documentation

◆ CglTwomirUnitTest

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

◆ probname_

std::string CglTwomir::probname_

Problem name.

Definition at line 100 of file CglTwomir.hpp.


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