Cgl  0.59.10
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 
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 
44  const CglAllDifferent &);
45 
47  virtual CglCutGenerator * clone() const;
48 
51  operator=(
52  const CglAllDifferent& rhs);
53 
55  virtual
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
virtual ~CglAllDifferent()
Destructor.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
This fixes (or reduces bounds) on sets of all different variables.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
virtual CglCutGenerator * clone() const
Clone.
CglAllDifferent & operator=(const CglAllDifferent &rhs)
Assignment operator.
CglAllDifferent()
Default constructor.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
int getLogLevel() const
Get log level.
Cut Generator Base Class.
void setMaxLook(int value)
Set Maximum number of sets to look at at once.
int getMaxLook() const
Get Maximum number of sets to look at at once.
void setLogLevel(int value)
Set log level.
AllDifferent Cut Generator Class This has a number of sets.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.