Cgl 0.59.7

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglAllDifferent.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 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 CglAllDifferent_H
6 #define CglAllDifferent_H
7
8 #include <string>
9
10 #include "CglCutGenerator.hpp"
11
20 class CglAllDifferent : public CglCutGenerator {
21
22 public:
23
24
29 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
30 const CglTreeInfo info = CglTreeInfo());
32
33
36 CglAllDifferent ();
38
40 CglAllDifferent(int numberSets, const int * starts, const int * which);
41
43 CglAllDifferent (
44 const CglAllDifferent &);
45
47 virtual CglCutGenerator * clone() const;
48
50 CglAllDifferent &
51 operator=(
52 const CglAllDifferent& rhs);
53
55 virtual
56 ~CglAllDifferent ();
58 virtual std::string generateCpp( FILE * fp);
59
61 virtual void refreshSolver(OsiSolverInterface * solver);
69 virtual bool mayGenerateRowCutsInTree() const
70 { return false;}
72
74 inline void setLogLevel(int value)
76 { logLevel_=value;}
78 inline int getLogLevel() const
79 { return logLevel_;}
81 inline void setMaxLook(int value)
82 { maxLook_=value;}
84 inline int getMaxLook() const
85 { return maxLook_;}
87
88 private:
89
90 // Private member methods
93
94
95 // Private member data
96
99 int numberSets_;
102 int numberDifferent_;
104 int maxLook_;
106 int logLevel_;
108 int * start_;
110 int * which_;
112 int * originalWhich_;
114 };
115 #endif
CglAllDifferent::~CglAllDifferent
virtual ~CglAllDifferent()
Destructor.
CglAllDifferent::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
This fixes (or reduces bounds) on sets of all different variables.
CglCutGenerator.hpp
CglAllDifferent::which_
int * which_
Members (0,1,....) not as in original model.
Definition: CglAllDifferent.hpp:110
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglAllDifferent::operator=
CglAllDifferent & operator=(const CglAllDifferent &rhs)
Assignment operator.
CglAllDifferent::mayGenerateRowCutsInTree
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
Definition: CglAllDifferent.hpp:69
CglAllDifferent::getLogLevel
int getLogLevel() const
Get log level.
Definition: CglAllDifferent.hpp:78
CglAllDifferent::logLevel_
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
Definition: CglAllDifferent.hpp:106
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
CglAllDifferent::CglAllDifferent
CglAllDifferent()
Default constructor.
CglAllDifferent::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglAllDifferent::setMaxLook
void setMaxLook(int value)
Set Maximum number of sets to look at at once.
Definition: CglAllDifferent.hpp:81
CglAllDifferent::clone
virtual CglCutGenerator * clone() const
Clone.
CglAllDifferent::maxLook_
int maxLook_
Maximum number of sets to look at at once.
Definition: CglAllDifferent.hpp:104
CglAllDifferent::getMaxLook
int getMaxLook() const
Get Maximum number of sets to look at at once.
Definition: CglAllDifferent.hpp:84
CglAllDifferent::start_
int * start_
Start of each set.
Definition: CglAllDifferent.hpp:108
CglAllDifferent::originalWhich_
int * originalWhich_
Original members.
Definition: CglAllDifferent.hpp:112
CglAllDifferent::setLogLevel
void setLogLevel(int value)
Set log level.
Definition: CglAllDifferent.hpp:75
CglAllDifferent
AllDifferent Cut Generator Class This has a number of sets.
Definition: CglAllDifferent.hpp:20
CglAllDifferent::numberDifferent_
int numberDifferent_
Total number of variables in all different sets.
Definition: CglAllDifferent.hpp:102
CglAllDifferent::numberSets_
int numberSets_
Number of sets.
Definition: CglAllDifferent.hpp:100
CglAllDifferent::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.