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
CbcHeuristicFPump.hpp
Go to the documentation of this file.
1
/* $Id: CbcHeuristicFPump.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 CbcHeuristicFeasibilityPump_H
5
#define CbcHeuristicFeasibilityPump_H
6
7
#include "
CbcHeuristic.hpp
"
8
#include "OsiClpSolverInterface.hpp"
9
13
class
CbcHeuristicFPump
:
public
CbcHeuristic
{
14
public
:
15
16
// Default Constructor
17
CbcHeuristicFPump
();
18
19
// Constructor with model - assumed before cuts
20
CbcHeuristicFPump
(
CbcModel
& model,
21
double
downValue = 0.5,
bool
roundExpensive =
false
);
22
23
// Copy constructor
24
CbcHeuristicFPump
(
const
CbcHeuristicFPump
&);
25
26
// Destructor
27
~CbcHeuristicFPump
();
28
30
CbcHeuristicFPump
&
operator=
(
const
CbcHeuristicFPump
& rhs);
32
virtual
CbcHeuristic
*
clone
()
const
;
34
virtual
void
generateCpp
( FILE * fp) ;
35
37
virtual
void
resetModel
(
CbcModel
* model);
38
40
virtual
void
setModel
(
CbcModel
* model);
41
42
using
CbcHeuristic::solution
;
63
virtual
int
solution
(
double
& objectiveValue,
64
double
* newSolution);
65
67
void
setMaximumTime
(
double
value);
69
inline
double
maximumTime
()
const
{
70
return
maximumTime_
;
71
}
73
inline
void
setFakeCutoff
(
double
value) {
74
fakeCutoff_
= value;
75
}
77
inline
double
fakeCutoff
()
const
{
78
return
fakeCutoff_
;
79
}
81
inline
void
setAbsoluteIncrement
(
double
value) {
82
absoluteIncrement_
= value;
83
}
85
inline
double
absoluteIncrement
()
const
{
86
return
absoluteIncrement_
;
87
}
89
inline
void
setRelativeIncrement
(
double
value) {
90
relativeIncrement_
= value;
91
}
93
inline
double
relativeIncrement
()
const
{
94
return
relativeIncrement_
;
95
}
97
inline
void
setDefaultRounding
(
double
value) {
98
defaultRounding_
= value;
99
}
101
inline
double
defaultRounding
()
const
{
102
return
defaultRounding_
;
103
}
105
inline
void
setInitialWeight
(
double
value) {
106
initialWeight_
= value;
107
}
109
inline
double
initialWeight
()
const
{
110
return
initialWeight_
;
111
}
113
inline
void
setWeightFactor
(
double
value) {
114
weightFactor_
= value;
115
}
117
inline
double
weightFactor
()
const
{
118
return
weightFactor_
;
119
}
121
inline
void
setArtificialCost
(
double
value) {
122
artificialCost_
= value;
123
}
125
inline
double
artificialCost
()
const
{
126
return
artificialCost_
;
127
}
129
inline
double
iterationRatio
()
const
{
130
return
iterationRatio_
;
131
}
133
inline
void
setIterationRatio
(
double
value) {
134
iterationRatio_
= value;
135
}
137
inline
void
setMaximumPasses
(
int
value) {
138
maximumPasses_
= value;
139
}
141
inline
int
maximumPasses
()
const
{
142
return
maximumPasses_
;
143
}
145
inline
void
setMaximumRetries
(
int
value) {
146
maximumRetries_
= value;
147
}
149
inline
int
maximumRetries
()
const
{
150
return
maximumRetries_
;
151
}
173
inline
void
setAccumulate
(
int
value) {
174
accumulate_
= value;
175
}
177
inline
int
accumulate
()
const
{
178
return
accumulate_
;
179
}
185
inline
void
setFixOnReducedCosts
(
int
value) {
186
fixOnReducedCosts_
= value;
187
}
189
inline
int
fixOnReducedCosts
()
const
{
190
return
fixOnReducedCosts_
;
191
}
196
inline
void
setReducedCostMultiplier
(
double
value) {
197
reducedCostMultiplier_
= value;
198
}
200
inline
double
reducedCostMultiplier
()
const
{
201
return
reducedCostMultiplier_
;
202
}
203
204
protected
:
205
// Data
207
double
startTime_
;
209
double
maximumTime_
;
213
double
fakeCutoff_
;
215
double
absoluteIncrement_
;
217
double
relativeIncrement_
;
219
double
defaultRounding_
;
221
double
initialWeight_
;
223
double
weightFactor_
;
225
double
artificialCost_
;
228
double
iterationRatio_
;
233
double
reducedCostMultiplier_
;
235
int
maximumPasses_
;
239
int
maximumRetries_
;
250
int
accumulate_
;
256
int
fixOnReducedCosts_
;
258
bool
roundExpensive_
;
259
260
private
:
265
int
rounds
(OsiSolverInterface * solver,
double
*
solution
,
266
/*const double * objective, */
267
int
numberIntegers,
const
int
* integerVariable,
268
/*char * pumpPrint,*/
int
passNumber,
269
/*bool roundExpensive=false,*/
270
double
downValue = 0.5,
int
*flip = 0);
271
/* note for eagle eyed readers.
272
when_ can now be exotic -
273
<=10 normal
274
*/
275
};
276
277
# ifdef COIN_HAS_CLP
278
279
class
CbcDisasterHandler :
public
OsiClpDisasterHandler {
280
public
:
284
#ifdef JJF_ZERO
285
286
virtual
void
intoSimplex();
288
virtual
bool
check()
const
;
290
virtual
void
saveInfo();
291
#endif
292
293
virtual
int
typeOfDisaster();
295
296
301
CbcDisasterHandler(
CbcModel
* model = NULL);
303
virtual
~CbcDisasterHandler();
304
// Copy
305
CbcDisasterHandler(
const
CbcDisasterHandler&);
306
// Assignment
307
CbcDisasterHandler& operator=(
const
CbcDisasterHandler&);
309
virtual
ClpDisasterHandler * clone()
const
;
310
312
317
void
setCbcModel(
CbcModel
* model);
319
inline
CbcModel
* cbcModel()
const
{
320
return
cbcModel_;
321
}
322
324
325
326
protected
:
330
331
CbcModel
* cbcModel_;
332
334
};
335
#endif
336
337
#endif
338
Generated on Mon Mar 17 2014 19:08:45 by
1.8.1.2