Cgl
0.60.10
Toggle main menu visibility
Loading...
Searching...
No Matches
Cgl
src
CglZeroHalf
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
25
26
class
CglZeroHalf
:
public
CglCutGenerator
{
27
friend
void
CglZeroHalfUnitTest
(
const
OsiSolverInterface * siP,
28
const
std::string mpdDir );
29
30
public
:
31
34
37
virtual
void
generateCuts
(
const
OsiSolverInterface & si, OsiCuts & cs,
38
const
CglTreeInfo
info =
CglTreeInfo
());
40
43
44
inline
int
getFlags
()
const
45
{
return
flags_
;}
46
47
inline
void
setFlags
(
int
value)
48
{
flags_
= value;}
49
50
53
54
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
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_
;
111
Cgl012Cut
cutInfo_
;
115
int
flags_
;
117
};
118
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
Cgl012cut.hpp
CglCutGenerator.hpp
cglShortestPath
void cglShortestPath(auxiliary_graph *graph, int source, int maximumLength)
A simple Dijkstra shortest path - make better later.
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
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition
CglTreeInfo.hpp:15
CglZeroHalf::mtcnt_
int * mtcnt_
number of entries of each row in arrays mtind and mtval
Definition
CglZeroHalf.hpp:97
CglZeroHalf::~CglZeroHalf
virtual ~CglZeroHalf()
Destructor.
CglZeroHalf::getFlags
int getFlags() const
Get flags.
Definition
CglZeroHalf.hpp:44
CglZeroHalf::operator=
CglZeroHalf & operator=(const CglZeroHalf &rhs)
Assignment operator.
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::msense_
char * msense_
senses of the constraints: 'L', 'G' or 'E'
Definition
CglZeroHalf.hpp:109
CglZeroHalf::flags_
int flags_
Flags 1 bit - global cuts.
Definition
CglZeroHalf.hpp:115
CglZeroHalf::vub_
int * vub_
upper bounds on the variables
Definition
CglZeroHalf.hpp:105
CglZeroHalf::cutInfo_
Cgl012Cut cutInfo_
Cgl012Cut object to make thread safe.
Definition
CglZeroHalf.hpp:111
CglZeroHalf::CglZeroHalf
CglZeroHalf(const CglZeroHalf &)
Copy constructor.
CglZeroHalf::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglZeroHalf::mtind_
int * mtind_
column indices of the nonzero entries of the ILP matrix
Definition
CglZeroHalf.hpp:99
CglZeroHalf::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
CglZeroHalf::CglZeroHalfUnitTest
friend void CglZeroHalfUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglZeroHalf class.
CglZeroHalf::clone
virtual CglCutGenerator * clone() const
Clone.
CglZeroHalf::mc_
int mc_
number of columns in the ILP matrix
Definition
CglZeroHalf.hpp:91
CglZeroHalf::setFlags
void setFlags(int value)
Set flags.
Definition
CglZeroHalf.hpp:47
CglZeroHalf::mtval_
int * mtval_
values of the nonzero entries of the ILP matrix
Definition
CglZeroHalf.hpp:101
CglZeroHalf::vlb_
int * vlb_
lower bounds on the variables
Definition
CglZeroHalf.hpp:103
CglZeroHalf::mtbeg_
int * mtbeg_
starting position of each row in arrays mtind and mtval
Definition
CglZeroHalf.hpp:95
CglZeroHalf::mr_
int mr_
number of rows in the ILP matrix
Definition
CglZeroHalf.hpp:89
CglZeroHalf::mnz_
int mnz_
number of nonzero's in the ILP matrix
Definition
CglZeroHalf.hpp:93
CglZeroHalf::mrhs_
int * mrhs_
right hand sides of the constraints
Definition
CglZeroHalf.hpp:107
CglZeroHalf::CglZeroHalf
CglZeroHalf()
Default constructor.
auxiliary_graph
Definition
Cgl012cut.hpp:129
cgl_graph
Definition
Cgl012cut.hpp:50
Generated by
1.17.0