Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglZeroHalf.hpp
Go to the documentation of this file.
1 // $Id: CglZeroHalf.hpp 1122 2013-04-06 20:39:53Z stefan $
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
int flags_
Flags 1 bit - global cuts.
int * mtbeg_
starting position of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:95
Cgl012Cut cutInfo_
Cgl012Cut object to make thread safe.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
char * msense_
senses of the constraints: &#39;L&#39;, &#39;G&#39; or &#39;E&#39;
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 * vub_
upper bounds on the variables
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
int * mrhs_
right hand sides of the constraints
Abstract Base Class for describing an interface to a solver.
void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
012Cut Generator Class
Definition: Cgl012cut.hpp:207
int * mtval_
values of the nonzero entries of the ILP matrix
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
int * mtcnt_
number of entries of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:97
Cut Generator Base Class.
virtual CglCutGenerator * clone() const
Clone.
int mc_
number of columns in the ILP matrix
Definition: CglZeroHalf.hpp:91
CglZeroHalf()
Default constructor.
int * vlb_
lower bounds on the variables
int * mtind_
column indices of the nonzero entries of the ILP matrix
Definition: CglZeroHalf.hpp:99
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate zero half cuts for the model accessed through the solver interface.
int getFlags() const
Get flags.
Definition: CglZeroHalf.hpp:44
virtual ~CglZeroHalf()
Destructor.
int mr_
number of rows in the ILP matrix
Definition: CglZeroHalf.hpp:89
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
friend void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
void setFlags(int value)
Set flags.
Definition: CglZeroHalf.hpp:47
int mnz_
number of nonzero&#39;s in the ILP matrix
Definition: CglZeroHalf.hpp:93
Zero Half Cut Generator Class.
Definition: CglZeroHalf.hpp:26