Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
build
buildd
coinor-cbc-2.5.0
debian
tmp
usr
include
coin
CbcBranchDynamic.hpp
Go to the documentation of this file.
1
/* $Id: CbcBranchDynamic.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
2
// Copyright (C) 2005, International Business Machines
3
// Corporation and others. All Rights Reserved.
4
#ifndef CbcBranchDynamic_H
5
#define CbcBranchDynamic_H
6
7
#include "CoinPackedMatrix.hpp"
8
#include "
CbcSimpleIntegerDynamicPseudoCost.hpp
"
9
#include "
CbcBranchActual.hpp
"
10
17
class
CbcBranchDynamicDecision
:
public
CbcBranchDecision
{
18
public
:
19
// Default Constructor
20
CbcBranchDynamicDecision
();
21
22
// Copy constructor
23
CbcBranchDynamicDecision
(
const
CbcBranchDynamicDecision
&);
24
25
virtual
~CbcBranchDynamicDecision
();
26
28
virtual
CbcBranchDecision
*
clone
()
const
;
29
31
virtual
void
initialize
(
CbcModel
* model);
32
52
virtual
int
betterBranch
(
CbcBranchingObject
* thisOne,
53
CbcBranchingObject
* bestSoFar,
54
double
changeUp,
int
numInfUp,
55
double
changeDn,
int
numInfDn);
57
virtual
void
setBestCriterion
(
double
value);
58
virtual
double
getBestCriterion
()
const
;
61
virtual
int
whichMethod
() {
62
return
3;
63
}
64
67
virtual
void
saveBranchingObject
(OsiBranchingObject *
object
) ;
70
virtual
void
updateInformation
(OsiSolverInterface * solver,
71
const
CbcNode
* node);
72
73
74
private
:
75
77
CbcBranchDynamicDecision
&
operator=
(
const
CbcBranchDynamicDecision
& rhs);
78
80
82
double
bestCriterion_
;
83
85
double
bestChangeUp_
;
86
88
int
bestNumberUp_
;
89
91
double
bestChangeDown_
;
92
94
int
bestNumberDown_
;
95
97
CbcBranchingObject
*
bestObject_
;
98
};
109
class
CbcDynamicPseudoCostBranchingObject
:
public
CbcIntegerBranchingObject
{
110
111
public
:
112
114
CbcDynamicPseudoCostBranchingObject
();
115
123
CbcDynamicPseudoCostBranchingObject
(
CbcModel
*
model
,
int
variable
,
124
int
way
,
double
value,
125
CbcSimpleIntegerDynamicPseudoCost
*
object
) ;
126
134
CbcDynamicPseudoCostBranchingObject
(
CbcModel
*
model
,
int
variable
,
int
way
,
135
double
lowerValue,
double
upperValue) ;
136
138
CbcDynamicPseudoCostBranchingObject
(
const
CbcDynamicPseudoCostBranchingObject
&);
139
141
CbcDynamicPseudoCostBranchingObject
&
operator=
(
const
CbcDynamicPseudoCostBranchingObject
& rhs);
142
144
virtual
CbcBranchingObject
*
clone
()
const
;
145
147
virtual
~CbcDynamicPseudoCostBranchingObject
();
148
150
void
fillPart
(
int
variable
,
151
int
way
,
double
value,
152
CbcSimpleIntegerDynamicPseudoCost
*
object
) ;
153
154
using
CbcBranchingObject::branch
;
159
virtual
double
branch
();
160
165
virtual
int
fillStrongInfo
(
CbcStrongInfo
& info);
166
168
inline
double
changeInGuessed
()
const
{
169
return
changeInGuessed_
;
170
}
172
inline
void
setChangeInGuessed
(
double
value) {
173
changeInGuessed_
= value;
174
}
176
inline
CbcSimpleIntegerDynamicPseudoCost
*
object
()
const
{
177
return
object_
;
178
}
180
inline
void
setObject
(
CbcSimpleIntegerDynamicPseudoCost
*
object
) {
181
object_
=
object
;
182
}
183
185
virtual
CbcBranchObjType
type
()
const
{
186
return
DynamicPseudoCostBranchObj
;
187
}
188
189
// LL: compareOriginalObject and compareBranchingObject are inherited from
190
// CbcIntegerBranchingObject thus need not be declared/defined here. After
191
// all, this kind of branching object is simply using pseudocosts to make
192
// decisions, but once the decisions are made they are the same kind as in
193
// the underlying class.
194
195
protected
:
197
double
changeInGuessed_
;
199
CbcSimpleIntegerDynamicPseudoCost
*
object_
;
200
201
};
202
203
#endif
204
Generated on Fri Jun 29 2012 06:31:52 by
1.8.1.1