coin-Cgl
List of all members
CglStored Class Reference

Stored Cut Generator Class. More...

#include <CglStored.hpp>

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

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. More...
 
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. More...
 
double getRequiredViolation () const
 Get. More...
 
void setProbingInfo (CglTreeProbingInfo *info)
 Takes over ownership of probing info. More...
 
Cut stuff
void addCut (const OsiCuts &cs)
 Add cuts. More...
 
void addCut (const OsiRowCut &cut)
 Add a row cut. More...
 
void addCut (double lb, double ub, const CoinPackedVector &vector)
 Add a row cut from a packed vector. More...
 
void addCut (double lb, double ub, int size, const int *colIndices, const double *elements)
 Add a row cut from elements. More...
 
int sizeRowCuts () const
 Add cuts. More...
 
const OsiRowCut * rowCutPointer (int index) const
 Add cuts. More...
 
void saveStuff (double bestObjective, const double *bestSolution, const double *lower, const double *upper)
 Save stuff. More...
 
const double * bestSolution () const
 Best solution (or NULL) More...
 
double bestObjective () const
 Best objective. More...
 
const double * tightLower () const
 Tight lower bounds. More...
 
const double * tightUpper () const
 Tight upper bounds. More...
 
Constructors and destructors
 CglStored (int numberColumns=0)
 Default constructor. More...
 
 CglStored (const CglStored &rhs)
 Copy constructor. More...
 
 CglStored (const char *fileName)
 Constructor from file. More...
 
virtual CglCutGeneratorclone () const
 Clone. More...
 
CglStoredoperator= (const CglStored &rhs)
 Assignment operator. More...
 
virtual ~CglStored ()
 Destructor. 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...
 
virtual std::string generateCpp (FILE *)
 Create C++ lines to set the generator in the current state. More...
 
virtual void refreshSolver (OsiSolverInterface *)
 This can be used to refresh any information. 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...
 
virtual bool mayGenerateRowCutsInTree () const
 Returns true if may generate Row cuts in tree (rather than root node). More...
 
virtual bool needsOptimalBasis () const
 Return true if needs optimal basis to do cuts. More...
 
virtual int maximumLengthOfCutInTree () const
 Return maximum length of cut in tree. More...
 

Protected Attributes

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

Additional Inherited Members

- Public Attributes inherited from CglCutGenerator
int aggressive_
 Aggressiveness - 0 = neutral, 100 is normal root node. More...
 

Detailed Description

Stored Cut Generator Class.

Definition at line 13 of file CglStored.hpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Set.

Definition at line 37 of file CglStored.hpp.

double CglStored::getRequiredViolation ( ) const
inline

Get.

Definition at line 40 of file CglStored.hpp.

References requiredViolation_.

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

Add cuts.

Definition at line 57 of file CglStored.hpp.

References cuts_.

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

Add cuts.

Definition at line 59 of file CglStored.hpp.

References cuts_.

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

Save stuff.

const double* CglStored::bestSolution ( ) const
inline

Best solution (or NULL)

Definition at line 65 of file CglStored.hpp.

References bestSolution_.

double CglStored::bestObjective ( ) const

Best objective.

const double* CglStored::tightLower ( ) const
inline

Tight lower bounds.

Definition at line 70 of file CglStored.hpp.

References bounds_.

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.

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

Assignment operator.

Member Data Documentation

double CglStored::requiredViolation_
protected

Only add if more than this requiredViolation.

Definition at line 109 of file CglStored.hpp.

Referenced by getRequiredViolation().

CglTreeProbingInfo* CglStored::probingInfo_
protected

Pointer to probing information.

Definition at line 111 of file CglStored.hpp.

Referenced by setProbingInfo().

OsiCuts CglStored::cuts_
mutableprotected

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().


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