Cbc  2.10.5
 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 
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_;
104  int maxLook_;
108  int * start_;
110  int * which_;
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.
int * which_
Members (0,1,....) not as in original model.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglAllDifferent & operator=(const CglAllDifferent &rhs)
Assignment operator.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
int getLogLevel() const
Get log level.
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
Abstract Base Class for describing an interface to a solver.
CglAllDifferent()
Default constructor.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
Cut Generator Base Class.
void setMaxLook(int value)
Set Maximum number of sets to look at at once.
virtual CglCutGenerator * clone() const
Clone.
int maxLook_
Maximum number of sets to look at at once.
int getMaxLook() const
Get Maximum number of sets to look at at once.
int * start_
Start of each set.
int * originalWhich_
Original members.
void setLogLevel(int value)
Set log level.
AllDifferent Cut Generator Class This has a number of sets.
int numberDifferent_
Total number of variables in all different sets.
int numberSets_
Number of sets.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.