coin-Cgl
CglOddHole.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglOddHole_H
4 #define CglOddHole_H
5 
6 #include <string>
7 
8 #include "CglCutGenerator.hpp"
9 
11 class CglOddHole : public CglCutGenerator {
12  friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
13  const std::string mpdDir );
14 
15 public:
16 
17 
38  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
39  const CglTreeInfo info = CglTreeInfo()) const;
41 
44  void createRowList( const OsiSolverInterface & si,
48  const int * possible=NULL);
50  void createRowList(int numberRows, const int * whichRow);
52 
55  void createCliqueList(int numberCliques, const int * cliqueStart,
58  const int * cliqueMember);
60 
63  int numberPossible();
66 
68  double getMinimumViolation() const;
70  void setMinimumViolation(double value);
72  double getMinimumViolationPer() const;
73  void setMinimumViolationPer(double value);
75  int getMaximumEntries() const;
76  void setMaximumEntries(int value);
78 
81  CglOddHole ();
83 
85  CglOddHole (
86  const CglOddHole &);
87 
89  virtual CglCutGenerator * clone() const;
90 
92  CglOddHole &
93  operator=(
94  const CglOddHole& rhs);
95 
97  virtual
98  ~CglOddHole ();
99 
101  virtual void refreshSolver(OsiSolverInterface * solver);
103 
104 private:
105 
106  // Private member methods
107 
108 
111  void generateCuts(const OsiRowCutDebugger * debugger,
114  const CoinPackedMatrix & rowCopy,
115  const double * solution, const double * dj,
116  OsiCuts & cs, const int * suitableRow,
117  const int * fixedColumn,const CglTreeInfo info,
118  bool packed);
120 
121  // Private member data
122 
125  int * suitableRows_;
130  int * member_;
132  double epsilon_;
134  double onetol_;
146 };
147 
148 //#############################################################################
154 void CglOddHoleUnitTest(const OsiSolverInterface * siP,
155  const std::string mpdDir );
156 
157 #endif
double getMinimumViolation() const
Minimum violation.
CglOddHole & operator=(const CglOddHole &rhs)
Assignment operator.
int maximumEntries_
Maximum number of entries in a cut.
Definition: CglOddHole.hpp:140
int numberRows_
number of rows when suitability tested
Definition: CglOddHole.hpp:142
Odd Hole Cut Generator Class.
Definition: CglOddHole.hpp:11
double epsilon_
epsilon
Definition: CglOddHole.hpp:132
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
Generate odd hole cuts for the model of the solver interface, si.
CglOddHole()
Default constructor.
void createCliqueList(int numberCliques, const int *cliqueStart, const int *cliqueMember)
Create a list of extra row cliques which may not be in matrix At present these are classical cliques...
virtual ~CglOddHole()
Destructor.
int numberCliques_
number of cliques
Definition: CglOddHole.hpp:144
int * member_
clique members
Definition: CglOddHole.hpp:130
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
Cut Generator Base Class.
void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
void setMinimumViolation(double value)
Minimum violation.
int * suitableRows_
list of suitableRows
Definition: CglOddHole.hpp:126
double getMinimumViolationPer() const
Minimum violation per entry.
void setMinimumViolationPer(double value)
Minimum violation.
double minimumViolationPer_
Minimum violation per entry.
Definition: CglOddHole.hpp:138
double onetol_
1-epsilon
Definition: CglOddHole.hpp:134
virtual CglCutGenerator * clone() const
Clone.
double minimumViolation_
Minimum violation.
Definition: CglOddHole.hpp:136
void createRowList(const OsiSolverInterface &si, const int *possible=NULL)
Create a list of rows which might yield cuts this is to speed up process The possible parameter is a ...
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:13
friend void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
int getMaximumEntries() const
Maximum number of entries in a cut.
void setMaximumEntries(int value)
Minimum violation.
int * startClique_
start of each clique
Definition: CglOddHole.hpp:128
int numberPossible()
Returns how many rows might give odd hole cuts.