Loading...
Searching...
No Matches
CglZeroHalf Class Reference

Zero Half Cut Generator Class. More...

`#include <CglZeroHalf.hpp>`

Inheritance diagram for CglZeroHalf:
[legend]
Collaboration diagram for CglZeroHalf:
[legend]

## Public Member Functions

Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
| Generate zero half cuts for the model accessed through the solver interface.
Sets and Gets
int | getFlags () const
| Get flags.
void | setFlags (int value)
| Set flags.
Constructors and destructors
| CglZeroHalf ()
| Default constructor.
| CglZeroHalf (const CglZeroHalf &)
| Copy constructor.
virtual CglCutGenerator * | clone () const
| Clone.
CglZeroHalf & | operator= (const CglZeroHalf &rhs)
| Assignment operator.
virtual | ~CglZeroHalf ()
| Destructor.
virtual std::string | generateCpp (FILE *fp)
| Create C++ lines to get to current state.
virtual void | refreshSolver (OsiSolverInterface *solver)
| This can be used to refresh any information.
Public Member Functions inherited from CglCutGenerator
| CglCutGenerator ()
| Default constructor.
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor.
CglCutGenerator & | operator= (const CglCutGenerator &rhs)
| Assignment operator.
virtual | ~CglCutGenerator ()
| Destructor.
int | getAggressiveness () const
| Get Aggressiveness - 0 = neutral, 100 is normal root node.
void | setAggressiveness (int value)
| Set Aggressiveness - 0 = neutral, 100 is normal root node.
void | setGlobalCuts (bool trueOrFalse)
| Set whether can do global cuts.
bool | canDoGlobalCuts () const
| Say whether can do global cuts.
virtual bool | mayGenerateRowCutsInTree () const
| Returns true if may generate Row cuts in tree (rather than root node).
virtual bool | needsOptimalBasis () const
| Return true if needs optimal basis to do cuts.
virtual int | maximumLengthOfCutInTree () const
| Return maximum length of cut in tree.

## Private Attributes

Private member data
int | mr_
| number of rows in the ILP matrix
int | mc_
| number of columns in the ILP matrix
int | mnz_
| number of nonzero's in the ILP matrix
int * | mtbeg_
| starting position of each row in arrays mtind and mtval
int * | mtcnt_
| number of entries of each row in arrays mtind and mtval
int * | mtind_
| column indices of the nonzero entries of the ILP matrix
int * | mtval_
| values of the nonzero entries of the ILP matrix
int * | vlb_
| lower bounds on the variables
int * | vub_
| upper bounds on the variables
int * | mrhs_
| right hand sides of the constraints
char * | msense_
| senses of the constraints: 'L', 'G' or 'E'
Cgl012Cut | cutInfo_
| Cgl012Cut object to make thread safe.
int | flags_
| Flags 1 bit - global cuts.

## Friends

void | CglZeroHalfUnitTest (const OsiSolverInterface *siP, const std::string mpdDir)
| A function that tests the methods in the CglZeroHalf class.

## Additional Inherited Members

int | aggressive_
| Aggressiveness - 0 = neutral, 100 is normal root node.
bool | canDoGlobalCuts_
| True if can do global cuts i.e. no general integers.

## Detailed Description

Zero Half Cut Generator Class.

This class generates zero half cuts via the following method:

See -

G. Andreello, A. Caprara, M. Fischetti, “Embedding Cuts in a Branch and Cut Framework: a Computational Study with {0,1/2}-Cuts”, INFORMS Journal on Computing 19(2), 229-238, 2007.

Definition at line 26 of file CglZeroHalf.hpp.

## Constructor & Destructor Documentation

## CglZeroHalf() [1/2]

CglZeroHalf::CglZeroHalf | ( |  | ) |

Default constructor.

## CglZeroHalf() [2/2]

CglZeroHalf::CglZeroHalf | ( | const CglZeroHalf & |  | ) |

Copy constructor.

## ~CglZeroHalf()

virtual CglZeroHalf::~CglZeroHalf | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## generateCuts()

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

virtual

Generate zero half cuts for the model accessed through the solver interface.

Insert generated cuts into the cut set cs.

Implements CglCutGenerator.

## getFlags()

int CglZeroHalf::getFlags | ( |  | ) | const

inline

Get flags.

Definition at line 44 of file CglZeroHalf.hpp.

## setFlags()

void CglZeroHalf::setFlags | ( | int | value | ) |

inline

Set flags.

Definition at line 47 of file CglZeroHalf.hpp.

## clone()

virtual CglCutGenerator * CglZeroHalf::clone | ( |  | ) | const

virtual

Clone.

Implements CglCutGenerator.

## operator=()

CglZeroHalf & CglZeroHalf::operator= | ( | const CglZeroHalf & | rhs | ) |

Assignment operator.

## generateCpp()

virtual std::string CglZeroHalf::generateCpp | ( | FILE * | fp | ) |

virtual

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

## refreshSolver()

virtual void CglZeroHalf::refreshSolver | ( | OsiSolverInterface * | solver | ) |

virtual

This can be used to refresh any information.

Reimplemented from CglCutGenerator.

## Friends And Related Symbol Documentation

## CglZeroHalfUnitTest

void CglZeroHalfUnitTest | ( | const OsiSolverInterface * | siP,
|  | const std::string | mpdDir )

friend

A function that tests the methods in the CglZeroHalf 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

## mr_

int CglZeroHalf::mr_

private

number of rows in the ILP matrix

Definition at line 89 of file CglZeroHalf.hpp.

## mc_

int CglZeroHalf::mc_

private

number of columns in the ILP matrix

Definition at line 91 of file CglZeroHalf.hpp.

## mnz_

int CglZeroHalf::mnz_

private

number of nonzero's in the ILP matrix

Definition at line 93 of file CglZeroHalf.hpp.

## mtbeg_

int* CglZeroHalf::mtbeg_

private

starting position of each row in arrays mtind and mtval

Definition at line 95 of file CglZeroHalf.hpp.

## mtcnt_

int* CglZeroHalf::mtcnt_

private

number of entries of each row in arrays mtind and mtval

Definition at line 97 of file CglZeroHalf.hpp.

## mtind_

int* CglZeroHalf::mtind_

private

column indices of the nonzero entries of the ILP matrix

Definition at line 99 of file CglZeroHalf.hpp.

## mtval_

int* CglZeroHalf::mtval_

private

values of the nonzero entries of the ILP matrix

Definition at line 101 of file CglZeroHalf.hpp.

## vlb_

int* CglZeroHalf::vlb_

private

lower bounds on the variables

Definition at line 103 of file CglZeroHalf.hpp.

## vub_

int* CglZeroHalf::vub_

private

upper bounds on the variables

Definition at line 105 of file CglZeroHalf.hpp.

## mrhs_

int* CglZeroHalf::mrhs_

private

right hand sides of the constraints

Definition at line 107 of file CglZeroHalf.hpp.

## msense_

char* CglZeroHalf::msense_

private

senses of the constraints: 'L', 'G' or 'E'

Definition at line 109 of file CglZeroHalf.hpp.

## cutInfo_

Cgl012Cut CglZeroHalf::cutInfo_

private

Cgl012Cut object to make thread safe.

Definition at line 111 of file CglZeroHalf.hpp.

## flags_

int CglZeroHalf::flags_

private

Flags 1 bit - global cuts.

Definition at line 115 of file CglZeroHalf.hpp.

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

- Cgl/src/CglZeroHalf/CglZeroHalf.hpp