Cgl  trunk
Classes | Public Member Functions | Friends
CglKnapsackCover Class Reference

Knapsack Cover Cut Generator Class. More...

#include <CglKnapsackCover.hpp>

+ Inheritance diagram for CglKnapsackCover:
+ Collaboration diagram for CglKnapsackCover:

List of all members.

Classes

struct  cliqueType
 Clique type.

Public Member Functions

void setTestedRowIndices (int num, const int *ind)
 A method to set which rows should be tested for knapsack covers.
Generate Cuts
virtual void generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
 Generate knapsack cover cuts for the model of the solver interface, si.
Constructors and destructors
 CglKnapsackCover ()
 Default constructor.
 CglKnapsackCover (const CglKnapsackCover &)
 Copy constructor.
virtual CglCutGeneratorclone () const
 Clone.
CglKnapsackCoveroperator= (const CglKnapsackCover &rhs)
 Assignment operator.
virtual ~CglKnapsackCover ()
 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.
Sets and gets
void setMaxInKnapsack (int value)
 Set limit on number in knapsack.
int getMaxInKnapsack () const
 get limit on number in knapsack
void switchOffExpensive ()
 Switch off expensive cuts.
void switchOnExpensive ()
 Switch on expensive cuts.

Friends

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

Detailed Description

Knapsack Cover Cut Generator Class.

Definition at line 15 of file CglKnapsackCover.hpp.


Constructor & Destructor Documentation

Default constructor.

Copy constructor.

virtual CglKnapsackCover::~CglKnapsackCover ( ) [virtual]

Destructor.


Member Function Documentation

void CglKnapsackCover::setTestedRowIndices ( int  num,
const int *  ind 
)

A method to set which rows should be tested for knapsack covers.

virtual void CglKnapsackCover::generateCuts ( const OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo  info = CglTreeInfo() 
) const [virtual]

Generate knapsack cover cuts for the model of the solver interface, si.

Insert the generated cuts into OsiCut, cs.

Implements CglCutGenerator.

virtual CglCutGenerator* CglKnapsackCover::clone ( ) const [virtual]

Clone.

Implements CglCutGenerator.

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

Assignment operator.

virtual std::string CglKnapsackCover::generateCpp ( FILE *  fp) [virtual]

Create C++ lines to get to current state.

Reimplemented from CglCutGenerator.

virtual void CglKnapsackCover::refreshSolver ( OsiSolverInterface *  solver) [virtual]

This can be used to refresh any information.

Reimplemented from CglCutGenerator.

void CglKnapsackCover::setMaxInKnapsack ( int  value) [inline]

Set limit on number in knapsack.

Definition at line 62 of file CglKnapsackCover.hpp.

int CglKnapsackCover::getMaxInKnapsack ( ) const [inline]

get limit on number in knapsack

Definition at line 65 of file CglKnapsackCover.hpp.

Switch off expensive cuts.

Definition at line 68 of file CglKnapsackCover.hpp.

Switch on expensive cuts.

Definition at line 71 of file CglKnapsackCover.hpp.


Friends And Related Function Documentation

void CglKnapsackCoverUnitTest ( const OsiSolverInterface *  siP,
const std::string  mpdDir 
) [friend]

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines