- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

CglCutGenerator.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4
5 #ifndef CglCutGenerator_H
6 #define CglCutGenerator_H
7
8 #include "OsiCuts.hpp"
9 #include "OsiSolverInterface.hpp"
10 #include "CglTreeInfo.hpp"
11
12 //-------------------------------------------------------------------
13 //
14 // Abstract base class for generating cuts.
15 //
16 //-------------------------------------------------------------------
18
23 class CglCutGenerator {
24
25 public:
26
33 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
34 const CglTreeInfo info = CglTreeInfo())=0;
36
37
40 CglCutGenerator ();
42
44 CglCutGenerator ( const CglCutGenerator &);
45
47 virtual CglCutGenerator * clone() const = 0;
48
50 CglCutGenerator & operator=(const CglCutGenerator& rhs);
51
53 virtual ~CglCutGenerator ();
54
65 virtual std::string generateCpp( FILE * ) {return "";}
66
68 virtual void refreshSolver(OsiSolverInterface * ) {}
70
77 inline int getAggressiveness() const
78 { return aggressive_;}
79
84 inline void setAggressiveness(int value)
85 { aggressive_=value;}
87 inline void setGlobalCuts(bool trueOrFalse)
88 { canDoGlobalCuts_ = trueOrFalse;}
90 inline bool canDoGlobalCuts() const
91 {return canDoGlobalCuts_;}
99 virtual bool mayGenerateRowCutsInTree() const;
101 virtual bool needsOptimalBasis() const;
103 virtual int maximumLengthOfCutInTree() const
104 { return COIN_INT_MAX;}
106
107 // test this class
108 //static void unitTest();
109
110 // private:
111
116 int aggressive_;
118 bool canDoGlobalCuts_;
119 };
120
121 #endif
CglCutGenerator::canDoGlobalCuts_
bool canDoGlobalCuts_
True if can do global cuts i.e. no general integers.
Definition: CglCutGenerator.hpp:118
CglCutGenerator::~CglCutGenerator
virtual ~CglCutGenerator()
Destructor.
CglCutGenerator::setAggressiveness
void setAggressiveness(int value)
Set Aggressiveness - 0 = neutral, 100 is normal root node.
Definition: CglCutGenerator.hpp:84
CglCutGenerator::canDoGlobalCuts
bool canDoGlobalCuts() const
Say whether can do global cuts.
Definition: CglCutGenerator.hpp:90
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
COIN_INT_MAX
const int COIN_INT_MAX
Definition: CoinFinite.hpp:19
CglTreeInfo.hpp
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglCutGenerator::operator=
CglCutGenerator & operator=(const CglCutGenerator &rhs)
Assignment operator.
CglCutGenerator::setGlobalCuts
void setGlobalCuts(bool trueOrFalse)
Set whether can do global cuts.
Definition: CglCutGenerator.hpp:87
CglCutGenerator::mayGenerateRowCutsInTree
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
CglCutGenerator::maximumLengthOfCutInTree
virtual int maximumLengthOfCutInTree() const
Return maximum length of cut in tree.
Definition: CglCutGenerator.hpp:103
CglCutGenerator::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0
Generate cuts for the model data contained in si.
CglCutGenerator::refreshSolver
virtual void refreshSolver(OsiSolverInterface *)
This can be used to refresh any information.
Definition: CglCutGenerator.hpp:68
CglCutGenerator::needsOptimalBasis
virtual bool needsOptimalBasis() const
Return true if needs optimal basis to do cuts.
OsiSolverInterface.hpp
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglCutGenerator::getAggressiveness
int getAggressiveness() const
Get Aggressiveness - 0 = neutral, 100 is normal root node.
Definition: CglCutGenerator.hpp:77
CglCutGenerator::clone
virtual CglCutGenerator * clone() const =0
Clone.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
OsiCuts.hpp
CglCutGenerator::aggressive_
int aggressive_
Aggressiveness - 0 = neutral, 100 is normal root node.
Definition: CglCutGenerator.hpp:116
CglCutGenerator::generateCpp
virtual std::string generateCpp(FILE *)
Create C++ lines to set the generator in the current state.
Definition: CglCutGenerator.hpp:65