Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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_;
111 Cgl012Cut cutInfo_;
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::flags_
int flags_
Flags 1 bit - global cuts.
Definition: CglZeroHalf.hpp:115
cgl_graph
Definition: Cgl012cut.hpp:49
CglZeroHalf::mtbeg_
int * mtbeg_
starting position of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:95
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::msense_
char * msense_
senses of the constraints: &#39;L&#39;, &#39;G&#39; or &#39;E&#39;
Definition: CglZeroHalf.hpp:109
CglCutGenerator.hpp
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglZeroHalf::vub_
int * vub_
upper bounds on the variables
Definition: CglZeroHalf.hpp:105
CglZeroHalf::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglZeroHalf::mrhs_
int * mrhs_
right hand sides of the constraints
Definition: CglZeroHalf.hpp:107
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:61
CglZeroHalfUnitTest
void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
Cgl012Cut
012Cut Generator Class
Definition: Cgl012cut.hpp:207
CglZeroHalf::mtval_
int * mtval_
values of the nonzero entries of the ILP matrix
Definition: CglZeroHalf.hpp:101
cglShortestPath
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
CglZeroHalf::mtcnt_
int * mtcnt_
number of entries of each row in arrays mtind and mtval
Definition: CglZeroHalf.hpp:97
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglZeroHalf::clone
virtual CglCutGenerator * clone() const
Clone.
CglZeroHalf::mc_
int mc_
number of columns in the ILP matrix
Definition: CglZeroHalf.hpp:91
CglZeroHalf::CglZeroHalf
CglZeroHalf()
Default constructor.
CglZeroHalf::vlb_
int * vlb_
lower bounds on the variables
Definition: CglZeroHalf.hpp:103
CglZeroHalf::mtind_
int * mtind_
column indices of the nonzero entries of the ILP matrix
Definition: CglZeroHalf.hpp:99
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.
CglZeroHalf::getFlags
int getFlags() const
Get flags.
Definition: CglZeroHalf.hpp:44
CglZeroHalf::~CglZeroHalf
virtual ~CglZeroHalf()
Destructor.
CglZeroHalf::mr_
int mr_
number of rows in the ILP matrix
Definition: CglZeroHalf.hpp:89
CglZeroHalf::operator=
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
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
CoinPackedMatrix.hpp
Cgl012cut.hpp
CglZeroHalf::mnz_
int mnz_
number of nonzero&#39;s in the ILP matrix
Definition: CglZeroHalf.hpp:93
auxiliary_graph
Definition: Cgl012cut.hpp:129
CglZeroHalf
Zero Half Cut Generator Class.
Definition: CglZeroHalf.hpp:26