Cgl 0.60.9
Loading...
Searching...
No Matches
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
27 friend void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
28 const std::string mpdDir );
29
30public:
31
37 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
38 const CglTreeInfo info = CglTreeInfo());
40
44 inline int getFlags() const
45 { return flags_;}
47 inline void setFlags(int value)
48 { flags_ = value;}
50
55
58 const CglZeroHalf &);
59
61 virtual CglCutGenerator * clone() const;
62
66 const CglZeroHalf& rhs);
67
69 virtual
72 virtual std::string generateCpp( FILE * fp);
74 virtual void refreshSolver(OsiSolverInterface * solver);
76
77private:
78
79 // Private member methods
80
84
85
89 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_;
117};
119#ifndef CGL_NEW_SHORT
120void cglShortestPath(cgl_graph * graph, int source, int maximumLength);
121#else
122void cglShortestPath(auxiliary_graph * graph, int source, int maximumLength);
123#endif
124//#############################################################################
130void CglZeroHalfUnitTest(const OsiSolverInterface * siP,
131 const std::string mpdDir );
132
133#endif
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
012Cut Generator Class
Cut Generator Base Class.
Information about where the cut generator is invoked from.
Zero Half Cut Generator Class.
int * mtcnt_
number of entries of each row in arrays mtind and mtval
virtual ~CglZeroHalf()
Destructor.
int getFlags() const
Get flags.
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate zero half cuts for the model accessed through the solver interface.
char * msense_
senses of the constraints: 'L', 'G' or 'E'
int flags_
Flags 1 bit - global cuts.
int * vub_
upper bounds on the variables
Cgl012Cut cutInfo_
Cgl012Cut object to make thread safe.
CglZeroHalf(const CglZeroHalf &)
Copy constructor.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
int * mtind_
column indices of the nonzero entries of the ILP matrix
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
friend void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
virtual CglCutGenerator * clone() const
Clone.
int mc_
number of columns in the ILP matrix
void setFlags(int value)
Set flags.
int * mtval_
values of the nonzero entries of the ILP matrix
int * vlb_
lower bounds on the variables
int * mtbeg_
starting position of each row in arrays mtind and mtval
int mr_
number of rows in the ILP matrix
int mnz_
number of nonzero's in the ILP matrix
int * mrhs_
right hand sides of the constraints
CglZeroHalf()
Default constructor.