Loading...
Searching...
No Matches
CglStored Class Reference

Stored Cut Generator Class. More...

`#include <CglStored.hpp>`

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

## Public Member Functions

Generate Cuts
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
| Generate Mixed Integer Stored cuts for the model of the solver interface, si.
Change criterion on whether to include cut.
Violations of more than this will be added to current cut list (default 1.0e-5)
void | setRequiredViolation (double value)
| Set.
double | getRequiredViolation () const
| Get.
void | setProbingInfo (CglTreeProbingInfo *info)
| Takes over ownership of probing info.
Cut stuff
void | addCut (const OsiCuts &cs)
| Add cuts.
void | addCut (const OsiRowCut &cut)
| Add a row cut.
void | addCut (double lb, double ub, const CoinPackedVector &vector)
| Add a row cut from a packed vector.
void | addCut (double lb, double ub, int size, const int *colIndices, const double *elements)
| Add a row cut from elements.
int | sizeRowCuts () const
const OsiRowCut * | rowCutPointer (int index) const
void | saveStuff (double bestObjective, const double *bestSolution, const double *lower, const double *upper)
| Save stuff.
const double * | bestSolution () const
| Best solution (or NULL).
double | bestObjective () const
| Best objective.
const double * | tightLower () const
| Tight lower bounds.
const double * | tightUpper () const
| Tight upper bounds.
Constructors and destructors
| CglStored (int numberColumns=0)
| Default constructor.
| CglStored (const CglStored &rhs)
| Copy constructor.
| CglStored (const char *fileName)
| Constructor from file.
virtual CglCutGenerator * | clone () const
| Clone.
CglStored & | operator= (const CglStored &rhs)
| Assignment operator.
virtual | ~CglStored ()
| Destructor.
Public Member Functions inherited from CglCutGenerator
| CglCutGenerator ()
| Default constructor.
| CglCutGenerator (const CglCutGenerator &)
| Copy constructor.
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.
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.

## Protected Attributes

Protected member data
double | requiredViolation_
| Only add if more than this requiredViolation.
CglTreeProbingInfo * | probingInfo_
| Pointer to probing information.
OsiCuts | cuts_
| Cuts.
int | numberColumns_
| Number of columns in model.
double * | bestSolution_
| Best solution (objective at end).
double * | bounds_
| Tight bounds.

## 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

Stored Cut Generator Class.

Definition at line 16 of file CglStored.hpp.

## Constructor & Destructor Documentation

## CglStored() [1/3]

CglStored::CglStored | ( | int | numberColumns = 0 | ) |

Default constructor.

## CglStored() [2/3]

CglStored::CglStored | ( | const CglStored & | rhs | ) |

Copy constructor.

## CglStored() [3/3]

CglStored::CglStored | ( | const char * | fileName | ) |

Constructor from file.

## ~CglStored()

virtual CglStored::~CglStored | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## generateCuts()

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

virtual

Generate Mixed Integer Stored cuts for the model of the solver interface, si.

Insert the generated cuts into OsiCut, cs.

This generator just looks at previously stored cuts and inserts any that are violated by enough

Implements CglCutGenerator.

## setRequiredViolation()

void CglStored::setRequiredViolation | ( | double | value | ) |

inline

Set.

Definition at line 38 of file CglStored.hpp.

## getRequiredViolation()

double CglStored::getRequiredViolation | ( |  | ) | const

inline

Get.

Definition at line 43 of file CglStored.hpp.

## setProbingInfo()

void CglStored::setProbingInfo | ( | CglTreeProbingInfo * | info | ) |

inline

Takes over ownership of probing info.

Definition at line 48 of file CglStored.hpp.

## addCut() [1/4]

void CglStored::addCut | ( | const OsiCuts & | cs | ) |

Add cuts.

## addCut() [2/4]

void CglStored::addCut | ( | const OsiRowCut & | cut | ) |

Add a row cut.

## addCut() [3/4]

void CglStored::addCut | ( | double | lb,
|  | double | ub,
|  | const CoinPackedVector & | vector )

Add a row cut from a packed vector.

## addCut() [4/4]

void CglStored::addCut | ( | double | lb,
|  | double | ub,
|  | int | size,
|  | const int * | colIndices,
|  | const double * | elements )

Add a row cut from elements.

## sizeRowCuts()

int CglStored::sizeRowCuts | ( |  | ) | const

inline

Definition at line 64 of file CglStored.hpp.

## rowCutPointer()

const OsiRowCut * CglStored::rowCutPointer | ( | int | index | ) | const

inline

Definition at line 68 of file CglStored.hpp.

## saveStuff()

void CglStored::saveStuff | ( | double | bestObjective,
|  | const double * | bestSolution,
|  | const double * | lower,
|  | const double * | upper )

Save stuff.

## bestSolution()

const double * CglStored::bestSolution | ( |  | ) | const

inline

Best solution (or NULL).

Definition at line 76 of file CglStored.hpp.

## bestObjective()

double CglStored::bestObjective | ( |  | ) | const

Best objective.

## tightLower()

const double * CglStored::tightLower | ( |  | ) | const

inline

Tight lower bounds.

Definition at line 83 of file CglStored.hpp.

## tightUpper()

const double * CglStored::tightUpper | ( |  | ) | const

inline

Tight upper bounds.

Definition at line 88 of file CglStored.hpp.

## clone()

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

virtual

Clone.

Implements CglCutGenerator.

## operator=()

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

Assignment operator.

## Member Data Documentation

## requiredViolation_

double CglStored::requiredViolation_

protected

Only add if more than this requiredViolation.

Definition at line 124 of file CglStored.hpp.

## probingInfo_

CglTreeProbingInfo* CglStored::probingInfo_

protected

Pointer to probing information.

Definition at line 126 of file CglStored.hpp.

## cuts_

OsiCuts CglStored::cuts_

protected

Cuts.

Definition at line 128 of file CglStored.hpp.

## numberColumns_

int CglStored::numberColumns_

protected

Number of columns in model.

Definition at line 130 of file CglStored.hpp.

## bestSolution_

double* CglStored::bestSolution_

protected

Best solution (objective at end).

Definition at line 132 of file CglStored.hpp.

## bounds_

double* CglStored::bounds_

protected

Tight bounds.

Definition at line 134 of file CglStored.hpp.

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

- Cgl/src/CglStored.hpp