Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglOddHole.hpp
Go to the documentation of this file.
1 // $Id: CglOddHole.hpp 1119 2013-04-06 20:24:18Z stefan $
2 // Copyright (C) 2000, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef CglOddHole_H
7 #define CglOddHole_H
8 
9 #include <string>
10 
11 #include "CglCutGenerator.hpp"
12 
14 class CglOddHole : public CglCutGenerator {
15  friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
16  const std::string mpdDir );
17 
18 public:
19 
20 
41  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
42  const CglTreeInfo info = CglTreeInfo());
44 
47  void createRowList( const OsiSolverInterface & si,
51  const int * possible=NULL);
53  void createRowList(int numberRows, const int * whichRow);
55 
58  void createCliqueList(int numberCliques, const int * cliqueStart,
61  const int * cliqueMember);
63 
66  int numberPossible();
69 
71  double getMinimumViolation() const;
73  void setMinimumViolation(double value);
75  double getMinimumViolationPer() const;
76  void setMinimumViolationPer(double value);
78  int getMaximumEntries() const;
79  void setMaximumEntries(int value);
81 
84  CglOddHole ();
86 
88  CglOddHole (
89  const CglOddHole &);
90 
92  virtual CglCutGenerator * clone() const;
93 
95  CglOddHole &
96  operator=(
97  const CglOddHole& rhs);
98 
100  virtual
101  ~CglOddHole ();
102 
104  virtual void refreshSolver(OsiSolverInterface * solver);
106 
107 private:
108 
109  // Private member methods
110 
111 
114  void generateCuts(const OsiRowCutDebugger * debugger,
117  const CoinPackedMatrix & rowCopy,
118  const double * solution, const double * dj,
119  OsiCuts & cs, const int * suitableRow,
120  const int * fixedColumn,const CglTreeInfo info,
121  bool packed);
123 
124  // Private member data
125 
128  int * suitableRows_;
133  int * member_;
135  double epsilon_;
137  double onetol_;
149 };
150 
151 //#############################################################################
157 void CglOddHoleUnitTest(const OsiSolverInterface * siP,
158  const std::string mpdDir );
159 
160 #endif
void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
int maximumEntries_
Maximum number of entries in a cut.
Definition: CglOddHole.hpp:143
friend void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
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 ...
void setMinimumViolation(double value)
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
int numberRows_
number of rows when suitability tested
Definition: CglOddHole.hpp:145
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate odd hole cuts for the model of the solver interface, si.
int getMaximumEntries() const
Maximum number of entries in a cut.
double minimumViolationPer_
Minimum violation per entry.
Definition: CglOddHole.hpp:141
Abstract Base Class for describing an interface to a solver.
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...
Cut Generator Base Class.
CglOddHole & operator=(const CglOddHole &rhs)
Assignment operator.
double minimumViolation_
Minimum violation.
Definition: CglOddHole.hpp:139
CglOddHole()
Default constructor.
void setMinimumViolationPer(double value)
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
int * startClique_
start of each clique
Definition: CglOddHole.hpp:131
Sparse Matrix Base Class.
double getMinimumViolationPer() const
Minimum violation per entry.
int numberCliques_
number of cliques
Definition: CglOddHole.hpp:147
double getMinimumViolation() const
Minimum violation.
double epsilon_
epsilon
Definition: CglOddHole.hpp:135
int * suitableRows_
list of suitableRows
Definition: CglOddHole.hpp:129
int * member_
clique members
Definition: CglOddHole.hpp:133
double onetol_
1-epsilon
Definition: CglOddHole.hpp:137
Odd Hole Cut Generator Class.
Definition: CglOddHole.hpp:14
virtual ~CglOddHole()
Destructor.
Validate cuts against a known solution.
int numberPossible()
Returns how many rows might give odd hole cuts.
virtual CglCutGenerator * clone() const
Clone.
void setMaximumEntries(int value)