Cgl  0.60.7
CglZeroHalf.hpp
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2010, 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 #ifndef CglZeroHalf_H
6 #define CglZeroHalf_H
7 
8 #include <string>
9 
10 #include "CglCutGenerator.hpp"
11 #include "CoinPackedMatrix.hpp"
12 #include "Cgl012cut.hpp"
13 
26 class CglZeroHalf : public CglCutGenerator {
27  friend void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
28  const std::string mpdDir );
29 
30 public:
31 
37  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
38  const CglTreeInfo info = CglTreeInfo());
40 
43  inline int getFlags() const
45  { return flags_;}
47  inline void setFlags(int value)
48  { flags_ = value;}
50 
53  CglZeroHalf ();
55 
57  CglZeroHalf (
58  const CglZeroHalf &);
59 
61  virtual CglCutGenerator * clone() const;
62 
64  CglZeroHalf &
65  operator=(
66  const CglZeroHalf& rhs);
67 
69  virtual
70  ~CglZeroHalf ();
72  virtual std::string generateCpp( FILE * fp);
74  virtual void refreshSolver(OsiSolverInterface * solver);
76 
77 private:
78 
79  // Private member methods
80 
83 
84 
85 
88  int mr_;
91  int mc_;
93  int mnz_;
95  int *mtbeg_;
97  int *mtcnt_;
99  int *mtind_;
101  int *mtval_;
103  int *vlb_;
105  int *vub_;
107  int *mrhs_;
109  char *msense_;
115  int flags_;
117 };
119 #ifndef CGL_NEW_SHORT
120 void cglShortestPath(cgl_graph * graph, int source, int maximumLength);
121 #else
122 void cglShortestPath(auxiliary_graph * graph, int source, int maximumLength);
123 #endif
124 //#############################################################################
130 void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
131  const std::string mpdDir );
132 
133 #endif
CglZeroHalf::mc_
int mc_
number of columns in the ILP matrix
Definition: CglZeroHalf.hpp:91
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
Cgl012cut.hpp
CglZeroHalfUnitTest
void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
CglZeroHalf::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate zero half cuts for the model accessed through the solver interface.
CglCutGenerator.hpp
CglZeroHalf::mrhs_
int * mrhs_
right hand sides of the constraints
Definition: CglZeroHalf.hpp:107
CglZeroHalf::mnz_
int mnz_
number of nonzero's in the ILP matrix
Definition: CglZeroHalf.hpp:93
Cgl012Cut
012Cut Generator Class
Definition: Cgl012cut.hpp:207
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
cgl_graph
Definition: Cgl012cut.hpp:49
CglZeroHalf::cutInfo_
Cgl012Cut cutInfo_
Cgl012Cut object to make thread safe.
Definition: CglZeroHalf.hpp:111
CglZeroHalf::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
CglZeroHalf::mtbeg_
int * mtbeg_
starting position of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:95
CglZeroHalf::clone
virtual CglCutGenerator * clone() const
Clone.
CglZeroHalf::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
cglShortestPath
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
CglZeroHalf::mtval_
int * mtval_
values of the nonzero entries of the ILP matrix
Definition: CglZeroHalf.hpp:101
CglZeroHalf::mr_
int mr_
number of rows in the ILP matrix
Definition: CglZeroHalf.hpp:89
CglZeroHalf::CglZeroHalf
CglZeroHalf()
Default constructor.
CglZeroHalf::mtind_
int * mtind_
column indices of the nonzero entries of the ILP matrix
Definition: CglZeroHalf.hpp:99
CglZeroHalf::vlb_
int * vlb_
lower bounds on the variables
Definition: CglZeroHalf.hpp:103
CglZeroHalf::~CglZeroHalf
virtual ~CglZeroHalf()
Destructor.
CglZeroHalf::vub_
int * vub_
upper bounds on the variables
Definition: CglZeroHalf.hpp:105
CglZeroHalf::operator=
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
CglZeroHalf::getFlags
int getFlags() const
Get flags.
Definition: CglZeroHalf.hpp:44
CglZeroHalf
Zero Half Cut Generator Class.
Definition: CglZeroHalf.hpp:26
CglZeroHalf::CglZeroHalfUnitTest
friend void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
CglZeroHalf::setFlags
void setFlags(int value)
Set flags.
Definition: CglZeroHalf.hpp:47
auxiliary_graph
Definition: Cgl012cut.hpp:129
CglZeroHalf::mtcnt_
int * mtcnt_
number of entries of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:97
CglZeroHalf::flags_
int flags_
Flags 1 bit - global cuts.
Definition: CglZeroHalf.hpp:115
CglZeroHalf::msense_
char * msense_
senses of the constraints: 'L', 'G' or 'E'
Definition: CglZeroHalf.hpp:109