Main Page
Related Pages
Classes
Files
File List
File Members
var
build
temp
tmp.iNUydw9Gfm
4.0-0-0
coinor-osi
coinor-osi-0.103.0
Osi
src
OsiAuxInfo.hpp
Go to the documentation of this file.
1
// Copyright (C) 2006, International Business Machines
2
// Corporation and others. All Rights Reserved.
3
#ifndef OsiAuxInfo_H
4
#define OsiAuxInfo_H
5
6
class
OsiSolverInterface
;
7
8
//#############################################################################
19
class
OsiAuxInfo
{
20
public
:
21
// Default Constructor
22
OsiAuxInfo
(
void
* appData = NULL);
23
24
// Copy Constructor
25
OsiAuxInfo
(
const
OsiAuxInfo
& rhs);
26
// Destructor
27
virtual
~OsiAuxInfo
();
28
30
virtual
OsiAuxInfo
*
clone
()
const
;
32
OsiAuxInfo
&
operator=
(
const
OsiAuxInfo
& rhs);
33
35
inline
void
*
getApplicationData
()
const
36
{
return
appData_
;}
37
protected
:
39
void
*
appData_
;
40
};
41
//#############################################################################
47
class
OsiBabSolver
:
public
OsiAuxInfo
{
48
public
:
49
// Default Constructor
50
OsiBabSolver
(
int
solverType
=0);
51
52
// Copy Constructor
53
OsiBabSolver
(
const
OsiBabSolver
& rhs);
54
// Destructor
55
virtual
~OsiBabSolver
();
56
58
virtual
OsiAuxInfo
*
clone
()
const
;
60
OsiBabSolver
&
operator=
(
const
OsiBabSolver
& rhs);
61
63
inline
void
setSolver
(
const
OsiSolverInterface
* solver)
64
{
solver_
= solver;}
66
inline
void
setSolver
(
const
OsiSolverInterface
& solver)
67
{
solver_
= &solver;}
68
74
int
solution
(
double
& objectiveValue,
75
double
* newSolution,
int
numberColumns);
79
void
setSolution
(
const
double
*
solution
,
int
numberColumns,
double
objectiveValue);
80
86
bool
hasSolution
(
double
& solutionValue,
double
*
solution
);
87
100
inline
void
setSolverType
(
int
value)
101
{
solverType_
=value;}
114
inline
int
solverType
()
const
115
{
return
solverType_
;}
118
inline
bool
solutionAddsCuts
()
const
119
{
return
solverType_
==3;}
121
inline
bool
alwaysTryCutsAtRootNode
()
const
122
{
return
solverType_
==4;}
125
inline
bool
solverAccurate
()
const
126
{
return
solverType_
==0||
solverType_
==2||
solverType_
==4;}
128
inline
bool
reducedCostsAccurate
()
const
129
{
return
solverType_
==0||
solverType_
==4;}
131
double
mipBound
()
const
;
133
bool
mipFeasible
()
const
;
135
inline
void
setMipBound
(
double
value)
136
{
mipBound_
= value;}
138
inline
double
bestObjectiveValue
()
const
139
{
return
bestObjectiveValue_
;}
141
inline
bool
tryCuts
()
const
142
{
return
solverType_
!=2;}
144
inline
bool
warmStart
()
const
145
{
return
solverType_
!=2;}
150
inline
int
extraCharacteristics
()
const
151
{
return
extraCharacteristics_
;}
156
inline
void
setExtraCharacteristics
(
int
value)
157
{
extraCharacteristics_
=value;}
159
inline
const
double
*
beforeLower
()
const
160
{
return
beforeLower_
;}
162
inline
void
setBeforeLower
(
const
double
* array)
163
{
beforeLower_
= array;}
165
inline
const
double
*
beforeUpper
()
const
166
{
return
beforeUpper_
;}
168
inline
void
setBeforeUpper
(
const
double
* array)
169
{
beforeUpper_
= array;}
170
protected
:
172
double
bestObjectiveValue_
;
174
double
mipBound_
;
176
const
OsiSolverInterface
*
solver_
;
178
double
*
bestSolution_
;
180
const
double
*
beforeLower_
;
182
const
double
*
beforeUpper_
;
194
int
solverType_
;
196
int
sizeSolution_
;
201
int
extraCharacteristics_
;
202
};
203
204
#endif
Generated on Mon Mar 17 2014 19:54:48 by
1.8.1.2