Loading...
Searching...
No Matches
CglCutGenerator Class Referenceabstract

Cut Generator Base Class. More...

`#include <CglCutGenerator.hpp>`

Inheritance diagram for CglCutGenerator:
[legend]

## Public Member Functions

Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0
| Generate cuts for the model data contained in si.
Constructors and destructors
| CglCutGenerator ()
| Default constructor.
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor.
virtual CglCutGenerator * | clone () const =0
| Clone.
CglCutGenerator & | operator= (const CglCutGenerator &rhs)
| Assignment operator.
virtual | ~CglCutGenerator ()
| Destructor.
virtual std::string | generateCpp (FILE *)
| Create C++ lines to set the generator in the current state.
virtual void | refreshSolver (OsiSolverInterface *)
| This can be used to refresh any information.

## Gets and Sets

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

## Detailed Description

Cut Generator Base Class.

This is an abstract base class for generating cuts. A specific cut generator will inherit from this class.

Definition at line 23 of file CglCutGenerator.hpp.

## Constructor & Destructor Documentation

## CglCutGenerator() [1/2]

CglCutGenerator::CglCutGenerator | ( |  | ) |

Default constructor.

## CglCutGenerator() [2/2]

CglCutGenerator::CglCutGenerator | ( | const CglCutGenerator & |  | ) |

Copy constructor.

## ~CglCutGenerator()

virtual CglCutGenerator::~CglCutGenerator | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## generateCuts()

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

pure virtual

Generate cuts for the model data contained in si.

The generated cuts are inserted into and returned in the collection of cuts cs.

Implemented in CglAllDifferent, CglClique, CglDuplicateRow, CglFakeClique, CglFlowCover, CglGMI, CglGomory, CglImplication, CglKnapsackCover, CglLandP, CglLiftAndProject, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglOddHole, CglProbing, CglRedSplit2, CglRedSplit, CglResidualCapacity, CglSimpleRounding, CglStored, CglTwomir, and CglZeroHalf.

## clone()

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

pure virtual

Clone.

Implemented in CglAllDifferent, CglClique, CglDuplicateRow, CglFakeClique, CglFlowCover, CglGMI, CglGomory, CglImplication, CglKnapsackCover, CglLandP, CglLiftAndProject, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglOddHole, CglProbing, CglRedSplit2, CglRedSplit, CglResidualCapacity, CglSimpleRounding, CglStored, CglTwomir, and CglZeroHalf.

## operator=()

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

Assignment operator.

## generateCpp()

virtual std::string CglCutGenerator::generateCpp | ( | FILE * |  | ) |

inline virtual

Create C++ lines to set the generator in the current state.

The output must be parsed by the calling code, as each line starts with a key indicating the following:
0: must be kept (for #includes etc)
3: Set to changed (not default) values
4: Set to default values (redundant)

Keys 1, 2, 5, 6, 7, 8 are defined, but not applicable to cut generators.

Reimplemented in CglAllDifferent, CglClique, CglDuplicateRow, CglFlowCover, CglGMI, CglGomory, CglImplication, CglKnapsackCover, CglLiftAndProject, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglProbing, CglRedSplit, CglSimpleRounding, CglTwomir, and CglZeroHalf.

Definition at line 64 of file CglCutGenerator.hpp.

## refreshSolver()

virtual void CglCutGenerator::refreshSolver | ( | OsiSolverInterface * |  | ) |

inline virtual

This can be used to refresh any information.

Reimplemented in CglAllDifferent, CglDuplicateRow, CglGomory, CglKnapsackCover, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglOddHole, CglProbing, CglTwomir, and CglZeroHalf.

Definition at line 67 of file CglCutGenerator.hpp.

## getAggressiveness()

int CglCutGenerator::getAggressiveness | ( |  | ) | const

inline

Get Aggressiveness - 0 = neutral, 100 is normal root node.

Really just a hint to cut generator

Definition at line 76 of file CglCutGenerator.hpp.

## setAggressiveness()

void CglCutGenerator::setAggressiveness | ( | int | value | ) |

inline

Set Aggressiveness - 0 = neutral, 100 is normal root node.

Really just a hint to cut generator

Definition at line 85 of file CglCutGenerator.hpp.

## setGlobalCuts()

void CglCutGenerator::setGlobalCuts | ( | bool | trueOrFalse | ) |

inline

Set whether can do global cuts.

Definition at line 90 of file CglCutGenerator.hpp.

## canDoGlobalCuts()

bool CglCutGenerator::canDoGlobalCuts | ( |  | ) | const

inline

Say whether can do global cuts.

Definition at line 95 of file CglCutGenerator.hpp.

## mayGenerateRowCutsInTree()

virtual bool CglCutGenerator::mayGenerateRowCutsInTree | ( |  | ) | const

virtual

Returns true if may generate Row cuts in tree (rather than root node).

Used so know if matrix will change in tree. Really meant so column cut generators can still be active without worrying code. Default is true

Reimplemented in CglAllDifferent, and CglProbing.

## needsOptimalBasis()

virtual bool CglCutGenerator::needsOptimalBasis | ( |  | ) | const

virtual

Return true if needs optimal basis to do cuts.

Reimplemented in CglGMI, CglGomory, CglLandP, CglRedSplit2, CglRedSplit, and CglTwomir.

## maximumLengthOfCutInTree()

virtual int CglCutGenerator::maximumLengthOfCutInTree | ( |  | ) | const

inline virtual

Return maximum length of cut in tree.

Reimplemented in CglGomory, and CglTwomir.

Definition at line 110 of file CglCutGenerator.hpp.

## Member Data Documentation

## aggressive_

int CglCutGenerator::aggressive_

Aggressiveness - 0 = neutral, 100 is normal root node.

Really just a hint to cut generator

Definition at line 125 of file CglCutGenerator.hpp.

## canDoGlobalCuts_

bool CglCutGenerator::canDoGlobalCuts_

True if can do global cuts i.e. no general integers.

Definition at line 127 of file CglCutGenerator.hpp.

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

- Cgl/src/CglCutGenerator.hpp