Cgl  0.60.3
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 
50  void createRowList( const OsiSolverInterface & si,
51  const int * possible=NULL);
53  void createRowList(int numberRows, const int * whichRow);
55 
60  void createCliqueList(int numberCliques, const int * cliqueStart,
61  const int * cliqueMember);
63 
69 
72  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 
86 
89  const CglOddHole &);
90 
92  virtual CglCutGenerator * clone() const;
93 
95  CglOddHole &
97  const CglOddHole& rhs);
98 
100  virtual
102 
104  virtual void refreshSolver(OsiSolverInterface * solver);
106 
107 private:
108 
109  // Private member methods
110 
111 
116  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 
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.
Cut Generator Base Class.
Odd Hole Cut Generator Class.
Definition: CglOddHole.hpp:14
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.
void setMinimumViolation(double value)
virtual CglCutGenerator * clone() const
Clone.
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 createRowList(int numberRows, const int *whichRow)
This version passes in a list - 1 marks possible.
double minimumViolation_
Minimum violation.
Definition: CglOddHole.hpp:139
double getMinimumViolationPer() const
Minimum violation per entry.
void setMaximumEntries(int value)
void setMinimumViolationPer(double value)
CglOddHole(const CglOddHole &)
Copy constructor.
CglOddHole & operator=(const CglOddHole &rhs)
Assignment operator.
double onetol_
1-epsilon
Definition: CglOddHole.hpp:137
int * member_
clique members
Definition: CglOddHole.hpp:133
CglOddHole()
Default constructor.
int * suitableRows_
list of suitableRows
Definition: CglOddHole.hpp:129
double epsilon_
epsilon
Definition: CglOddHole.hpp:135
int * startClique_
start of each clique
Definition: CglOddHole.hpp:131
double getMinimumViolation() const
Minimum violation.
virtual ~CglOddHole()
Destructor.
int getMaximumEntries() const
Maximum number of entries in a cut.
int numberCliques_
number of cliques
Definition: CglOddHole.hpp:147
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate odd hole cuts for the model of the solver interface, si.
double minimumViolationPer_
Minimum violation per entry.
Definition: CglOddHole.hpp:141
int numberPossible()
Returns how many rows might give odd hole cuts.
friend void CglOddHoleUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglOddHole class.
void generateCuts(const OsiRowCutDebugger *debugger, const CoinPackedMatrix &rowCopy, const double *solution, const double *dj, OsiCuts &cs, const int *suitableRow, const int *fixedColumn, const CglTreeInfo info, bool packed)
Generate cuts from matrix copy and solution If packed true then <=1 rows, otherwise >=1 rows.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
int maximumEntries_
Maximum number of entries in a cut.
Definition: CglOddHole.hpp:143
int numberRows_
number of rows when suitability tested
Definition: CglOddHole.hpp:145
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15