Cgl 0.60.9
Loading...
Searching...
No Matches
CglOddHole.hpp
Go to the documentation of this file.
1// $Id$
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
15 friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
16 const std::string mpdDir );
17
18public:
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
97 const CglOddHole& rhs);
98
100 virtual
102
104 virtual void refreshSolver(OsiSolverInterface * solver);
106
107private:
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//#############################################################################
157void 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.
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.
double getMinimumViolationPer() const
Minimum violation per entry.
void setMaximumEntries(int value)
void setMinimumViolationPer(double value)
CglOddHole(const CglOddHole &)
Copy constructor.
double onetol_
1-epsilon
int * member_
clique members
CglOddHole & operator=(const CglOddHole &rhs)
Assignment operator.
CglOddHole()
Default constructor.
int * suitableRows_
list of suitableRows
double epsilon_
epsilon
int * startClique_
start of each clique
double getMinimumViolation() const
Minimum violation.
virtual ~CglOddHole()
Destructor.
int getMaximumEntries() const
Maximum number of entries in a cut.
int numberCliques_
number of cliques
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.
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.
int numberRows_
number of rows when suitability tested
Information about where the cut generator is invoked from.