Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
var
build
temp
tmp.S6JLgK91Yt
4.0-0-0
coinor-cbc
coinor-cbc-2.5.0
debian
tmp
usr
include
coin
CbcBranchLotsize.hpp
Go to the documentation of this file.
1
/* $Id: CbcBranchLotsize.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
2
// Copyright (C) 2004, International Business Machines
3
// Corporation and others. All Rights Reserved.
4
#ifndef CbcBranchLotsize_H
5
#define CbcBranchLotsize_H
6
7
#include "
CbcBranchBase.hpp
"
11
class
CbcLotsize
:
public
CbcObject
{
12
13
public
:
14
15
// Default Constructor
16
CbcLotsize
();
17
18
/* Useful constructor - passed model index.
19
Also passed valid values - if range then pairs
20
*/
21
CbcLotsize
(
CbcModel
*
model
,
int
iColumn,
22
int
numberPoints,
const
double
* points,
bool
range =
false
);
23
24
// Copy constructor
25
CbcLotsize
(
const
CbcLotsize
&);
26
28
virtual
CbcObject
*
clone
()
const
;
29
30
// Assignment operator
31
CbcLotsize
&
operator=
(
const
CbcLotsize
& rhs);
32
33
// Destructor
34
~CbcLotsize
();
35
37
virtual
double
infeasibility
(
const
OsiBranchingInformation * info,
38
int
&
preferredWay
)
const
;
39
40
using
CbcObject::feasibleRegion
;
48
virtual
void
feasibleRegion
();
49
51
virtual
CbcBranchingObject
*
createCbcBranch
(OsiSolverInterface * solver,
const
OsiBranchingInformation * info,
int
way) ;
52
66
virtual
CbcBranchingObject
*
preferredNewFeasible
()
const
;
67
75
virtual
CbcBranchingObject
*
notPreferredNewFeasible
()
const
;
76
82
virtual
void
resetBounds
(
const
OsiSolverInterface * solver);
83
87
bool
findRange
(
double
value)
const
;
88
91
virtual
void
floorCeiling
(
double
& floorLotsize,
double
& ceilingLotsize,
double
value,
92
double
tolerance)
const
;
93
95
inline
int
modelSequence
()
const
{
96
return
columnNumber_
;
97
}
99
inline
void
setModelSequence
(
int
value) {
100
columnNumber_
= value;
101
}
102
107
virtual
int
columnNumber
()
const
;
109
inline
double
originalLowerBound
()
const
{
110
return
bound_
[0];
111
}
112
inline
double
originalUpperBound
()
const
{
113
return
bound_
[
rangeType_
*
numberRanges_
-1];
114
}
116
inline
int
rangeType
()
const
{
117
return
rangeType_
;
118
}
120
inline
int
numberRanges
()
const
{
121
return
numberRanges_
;
122
}
124
inline
double
*
bound
()
const
{
125
return
bound_
;
126
}
129
virtual
bool
canDoHeuristics
()
const
{
130
return
false
;
131
}
132
133
private
:
135
void
printLotsize
(
double
value,
bool
condition,
int
type)
const
;
136
137
private
:
139
141
int
columnNumber_
;
143
int
rangeType_
;
145
int
numberRanges_
;
146
// largest gap
147
double
largestGap_
;
149
double
*
bound_
;
151
mutable
int
range_
;
152
};
153
164
class
CbcLotsizeBranchingObject
:
public
CbcBranchingObject
{
165
166
public
:
167
169
CbcLotsizeBranchingObject
();
170
178
CbcLotsizeBranchingObject
(
CbcModel
*
model
,
int
variable
,
179
int
way
,
double
value,
const
CbcLotsize
* lotsize) ;
180
187
CbcLotsizeBranchingObject
(
CbcModel
*
model
,
int
variable
,
int
way
,
188
double
lowerValue,
double
upperValue) ;
189
191
CbcLotsizeBranchingObject
(
const
CbcLotsizeBranchingObject
&);
192
194
CbcLotsizeBranchingObject
&
operator=
(
const
CbcLotsizeBranchingObject
& rhs);
195
197
virtual
CbcBranchingObject
*
clone
()
const
;
198
200
virtual
~CbcLotsizeBranchingObject
();
201
202
using
CbcBranchingObject::branch
;
206
virtual
double
branch
();
207
208
using
CbcBranchingObject::print
;
211
virtual
void
print
();
212
214
virtual
CbcBranchObjType
type
()
const
{
215
return
LotsizeBranchObj
;
216
}
217
218
// LL: compareOriginalObject can be inherited from the CbcBranchingObject
219
// since variable_ uniquely defines the lot sizing object.
220
229
virtual
CbcRangeCompare
compareBranchingObject
230
(
const
CbcBranchingObject
* brObj,
const
bool
replaceIfOverlap =
false
);
231
232
protected
:
234
double
down_
[2];
236
double
up_
[2];
237
};
238
239
#endif
240
Generated on Mon Mar 17 2014 19:08:45 by
1.8.1.2