Cgl 0.60.9
Loading...
Searching...
No Matches
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
22public:
23
24
27
29 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
30 const CglTreeInfo info = CglTreeInfo());
32
33
36
38
40 CglAllDifferent(int numberSets, const int * starts, const int * which);
41
44 const CglAllDifferent &);
45
47 virtual CglCutGenerator * clone() const;
48
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;}
71
72
74
75 inline void setLogLevel(int value)
76 { logLevel_=value;}
77
78 inline int getLogLevel() const
79 { return logLevel_;}
80
81 inline void setMaxLook(int value)
82 { maxLook_=value;}
83
84 inline int getMaxLook() const
85 { return maxLook_;}
86
87
88private:
89
90 // Private member methods
93
94
95 // Private member data
96
99
108 int * start_;
110 int * which_;
114};
115#endif
virtual ~CglAllDifferent()
Destructor.
int * start_
Start of each set.
int * originalWhich_
Original members.
int numberSets_
Number of sets.
CglAllDifferent & operator=(const CglAllDifferent &rhs)
Assignment operator.
int maxLook_
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.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
int numberDifferent_
Total number of variables in all different sets.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
This fixes (or reduces bounds) on sets of all different variables.
int getLogLevel() const
Get log level.
CglAllDifferent(int numberSets, const int *starts, const int *which)
Useful constructot.
int * which_
Members (0,1,....) not as in original model.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
CglAllDifferent()
Default constructor.
void setMaxLook(int value)
Set Maximum number of sets to look at at once.
CglAllDifferent(const CglAllDifferent &)
Copy constructor.
virtual CglCutGenerator * clone() const
Clone.
CglCutGenerator()
Default constructor.
Information about where the cut generator is invoked from.