Stored Cut Generator Class. More...
#include <CglStored.hpp>
Public Member Functions | |
Generate Cuts | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const |
Generate Mixed Integer Stored cuts for the model of the solver interface, si. | |
Change criterion on whether to include cut. | |
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 |
Add cuts. | |
const OsiRowCut * | rowCutPointer (int index) const |
Add cuts. | |
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. | |
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. |
Stored Cut Generator Class.
Definition at line 13 of file CglStored.hpp.
CglStored::CglStored | ( | int | numberColumns = 0 |
) |
Default constructor.
CglStored::CglStored | ( | const CglStored & | rhs | ) |
Copy constructor.
CglStored::CglStored | ( | const char * | fileName | ) |
Constructor from file.
virtual CglStored::~CglStored | ( | ) | [virtual] |
Destructor.
virtual void CglStored::generateCuts | ( | const OsiSolverInterface & | si, | |
OsiCuts & | cs, | |||
const CglTreeInfo | info = CglTreeInfo() | |||
) | const [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.
void CglStored::setRequiredViolation | ( | double | value | ) | [inline] |
double CglStored::getRequiredViolation | ( | ) | const [inline] |
void CglStored::setProbingInfo | ( | CglTreeProbingInfo * | info | ) | [inline] |
Takes over ownership of probing info.
Definition at line 43 of file CglStored.hpp.
References probingInfo_.
void CglStored::addCut | ( | const OsiCuts & | cs | ) |
Add cuts.
void CglStored::addCut | ( | const OsiRowCut & | cut | ) |
Add a row cut.
void CglStored::addCut | ( | double | lb, | |
double | ub, | |||
const CoinPackedVector & | vector | |||
) |
Add a row cut from a packed vector.
void CglStored::addCut | ( | double | lb, | |
double | ub, | |||
int | size, | |||
const int * | colIndices, | |||
const double * | elements | |||
) |
Add a row cut from elements.
int CglStored::sizeRowCuts | ( | ) | const [inline] |
const OsiRowCut* CglStored::rowCutPointer | ( | int | index | ) | const [inline] |
void CglStored::saveStuff | ( | double | bestObjective, | |
const double * | bestSolution, | |||
const double * | lower, | |||
const double * | upper | |||
) |
Save stuff.
const double* CglStored::bestSolution | ( | ) | const [inline] |
double CglStored::bestObjective | ( | ) | const |
Best objective.
const double* CglStored::tightLower | ( | ) | const [inline] |
const double* CglStored::tightUpper | ( | ) | const [inline] |
Tight upper bounds.
Definition at line 73 of file CglStored.hpp.
References bounds_, and numberColumns_.
virtual CglCutGenerator* CglStored::clone | ( | ) | const [virtual] |
Clone.
Implements CglCutGenerator.
double CglStored::requiredViolation_ [protected] |
Only add if more than this requiredViolation.
Definition at line 109 of file CglStored.hpp.
Referenced by getRequiredViolation(), and setRequiredViolation().
CglTreeProbingInfo* CglStored::probingInfo_ [protected] |
Pointer to probing information.
Definition at line 111 of file CglStored.hpp.
Referenced by setProbingInfo().
OsiCuts CglStored::cuts_ [mutable, protected] |
Cuts.
Definition at line 113 of file CglStored.hpp.
Referenced by rowCutPointer(), and sizeRowCuts().
int CglStored::numberColumns_ [protected] |
Number of columns in model.
Definition at line 115 of file CglStored.hpp.
Referenced by tightUpper().
double* CglStored::bestSolution_ [protected] |
Best solution (objective at end).
Definition at line 117 of file CglStored.hpp.
Referenced by bestSolution().
double* CglStored::bounds_ [protected] |
Tight bounds.
Definition at line 119 of file CglStored.hpp.
Referenced by tightLower(), and tightUpper().