Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
coin
svn-release
Blis-0.94.3
Alps
src
Alps.h
Go to the documentation of this file.
1
/*===========================================================================*
2
* This file is part of the Abstract Library for Parallel Search (ALPS). *
3
* *
4
* ALPS is distributed under the Eclipse Public License as part of the *
5
* COIN-OR repository (http://www.coin-or.org). *
6
* *
7
* Authors: *
8
* *
9
* Yan Xu, Lehigh University *
10
* Ted Ralphs, Lehigh University *
11
* *
12
* Conceptual Design: *
13
* *
14
* Yan Xu, Lehigh University *
15
* Ted Ralphs, Lehigh University *
16
* Laszlo Ladanyi, IBM T.J. Watson Research Center *
17
* Matthew Saltzman, Clemson University *
18
* *
19
* *
20
* Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21
* All Rights Reserved. *
22
*===========================================================================*/
23
24
#ifndef Alps_h_
25
#define Alps_h_
26
27
#include <cfloat>
28
#include <cstdio>
29
30
#include "
AlpsConfig.h
"
31
#include "
CoinFinite.hpp
"
32
33
//#############################################################################
34
35
#if defined(__linux__)
36
#define ALPS_MEMORY_USAGE 1
37
#endif
38
39
//#############################################################################
41
//#############################################################################
42
43
enum
AlpsClockType
{
44
AlpsClockTypeCpu
,
45
AlpsClockTypeWallClock
46
};
47
48
//#############################################################################
50
//#############################################################################
51
52
enum
AlpsStaticBalanceScheme
{
53
AlpsRootInit
= 0,
54
AlpsSpiral
55
};
56
57
//#############################################################################
59
//#############################################################################
60
61
enum
AlpsNodeStatus
{
62
AlpsNodeStatusCandidate
,
63
AlpsNodeStatusEvaluated
,
64
AlpsNodeStatusPregnant
,
65
AlpsNodeStatusBranched
,
66
AlpsNodeStatusFathomed
,
67
AlpsNodeStatusDiscarded
68
};
69
70
//#############################################################################
72
//#############################################################################
73
74
enum
AlpsSearchType
{
75
AlpsSearchTypeBestFirst
= 0,
76
AlpsSearchTypeBreadthFirst
,
77
AlpsSearchTypeDepthFirst
,
78
AlpsSearchTypeBestEstimate
,
79
AlpsSearchTypeHybrid
80
};
81
82
//#############################################################################
84
//#############################################################################
85
86
typedef
int
KnowledgeType
;
87
88
enum
AlpsKnowledgeType
{
89
AlpsKnowledgeTypeModel
= 0,
90
AlpsKnowledgeTypeModelGen
,
91
AlpsKnowledgeTypeNode
,
92
AlpsKnowledgeTypeSolution
,
93
AlpsKnowledgeTypeSubTree
,
94
AlpsKnowledgeTypeUndefined
95
};
96
97
//#############################################################################
98
// Search return status
99
//#############################################################################
100
101
enum
AlpsExitStatus
{
102
AlpsExitStatusUnknown
= -1,
103
AlpsExitStatusOptimal
,
104
AlpsExitStatusTimeLimit
,
105
AlpsExitStatusNodeLimit
,
106
AlpsExitStatusSolLimit
,
107
AlpsExitStatusFeasible
,
108
AlpsExitStatusInfeasible
,
109
AlpsExitStatusNoMemory
,
110
AlpsExitStatusFailed
,
111
AlpsExitStatusUnbounded
112
};
113
114
//#############################################################################
115
// Return code.
116
//#############################################################################
117
118
enum
AlpsReturnStatus
{
119
AlpsReturnStatusOk
= 0,
120
AlpsReturnStatusErr
,
121
AlpsReturnStatusErrNoInt
,
/* No integer variable.*/
122
AlpsReturnStatusErrNoMem
123
};
124
125
//#############################################################################
126
// Seach phase
127
//#############################################################################
128
129
enum
AlpsPhase
{
130
AlpsPhaseRampup
= 0,
131
AlpsPhaseSearch
,
132
AlpasPhaseRampdown
133
};
134
135
#define ALPS_NODE_PROCESS_TIME 0.0123
136
#define ALPS_NONE 0
137
#define ALPS_NOT_SET -1
138
139
//#############################################################################
140
// Big number
141
//#############################################################################
142
143
#define ALPS_DBL_MAX COIN_DBL_MAX
144
#define ALPS_INC_MAX 1.0e80
145
#define ALPS_OBJ_MAX 1.0e75
146
#define ALPS_OBJ_MAX_LESS 1.0e70
147
#define ALPS_BND_MAX 1.0e20
148
#define ALPS_INFINITY 1.0e20
149
150
#define ALPS_INT_MAX COIN_INT_MAX
151
152
//#############################################################################
153
// Small number
154
//#############################################################################
155
156
#define ALPS_ZERO 1.0e-14
157
#define ALPS_GEN_TOL 1.0e-6
158
#define ALPS_QUALITY_TOL 1.0e-5
159
#define ALPS_SMALL_3 1.0e-3
160
#define ALPS_SMALL_4 1.0e-4
161
#define ALPS_SMALL_5 1.0e-5
162
163
//#############################################################################
164
165
#define ALPS_PRINTF printf
166
167
#define ALPS_DMSG printf
168
169
170
//#############################################################################
171
172
#define ALPS_MAX( x, y ) ( ( (x) > (y) ) ? (x) : (y) )
173
#define ALPS_MIN( x, y ) ( ( (x) < (y) ) ? (x) : (y) )
174
#define ALPS_FABS(x) ( (x < 0.0) ? -(x) : (x) )
175
#define ALPS_ABS(x) ( (x < 0) ? -(x) : (x) )
176
177
//#############################################################################
178
179
typedef
struct
ALPS_PS_STATS
180
{
181
int
qualityBalance_
;
182
int
quantityBalance_
;
183
int
interBalance_
;
184
int
intraBalance_
;
185
int
workerAsk_
;
186
int
donateSuccess_
;
187
int
donateFail_
;
188
int
subtreeSplit_
;
189
int
subtreeWhole_
;
190
int
subtreeChange_
;
191
}
AlpsPsStats
;
192
193
//#############################################################################
194
195
196
#endif
KnowledgeType
int KnowledgeType
Type of knowledge like solution, node, cut...
Definition:
Alps.h:86
AlpsExitStatusNodeLimit
Definition:
Alps.h:105
AlpsPhaseSearch
Definition:
Alps.h:131
AlpsSearchTypeBreadthFirst
Definition:
Alps.h:76
AlpsClockTypeWallClock
Definition:
Alps.h:45
AlpsSearchTypeBestFirst
Definition:
Alps.h:75
ALPS_PS_STATS::workerAsk_
int workerAsk_
Definition:
Alps.h:185
AlpsRootInit
Definition:
Alps.h:53
AlpsStaticBalanceScheme
AlpsStaticBalanceScheme
The possible values for static load balancing scheme.
Definition:
Alps.h:52
ALPS_PS_STATS
Definition:
Alps.h:179
AlpsExitStatusOptimal
Definition:
Alps.h:103
AlpsNodeStatusPregnant
Definition:
Alps.h:64
AlpsReturnStatus
AlpsReturnStatus
Definition:
Alps.h:118
AlpsExitStatusSolLimit
Definition:
Alps.h:106
ALPS_PS_STATS::qualityBalance_
int qualityBalance_
Definition:
Alps.h:181
AlpsNodeStatusBranched
Definition:
Alps.h:65
AlpsNodeStatus
AlpsNodeStatus
The possible stati for the search nodes.
Definition:
Alps.h:61
ALPS_PS_STATS::donateSuccess_
int donateSuccess_
Definition:
Alps.h:186
CoinFinite.hpp
AlpsClockType
AlpsClockType
The possible values for clock type.
Definition:
Alps.h:43
AlpsSearchType
AlpsSearchType
Search Strategies.
Definition:
Alps.h:74
AlpsNodeStatusCandidate
Definition:
Alps.h:62
AlpsClockTypeCpu
Definition:
Alps.h:44
AlpsNodeStatusEvaluated
Definition:
Alps.h:63
AlpsNodeStatusFathomed
Definition:
Alps.h:66
AlpsReturnStatusErrNoInt
Definition:
Alps.h:121
AlpsExitStatusUnbounded
Definition:
Alps.h:111
AlpsPhase
AlpsPhase
Definition:
Alps.h:129
ALPS_PS_STATS::intraBalance_
int intraBalance_
Definition:
Alps.h:184
AlpsSearchTypeBestEstimate
Definition:
Alps.h:78
AlpsReturnStatusErrNoMem
Definition:
Alps.h:122
ALPS_PS_STATS::interBalance_
int interBalance_
Definition:
Alps.h:183
AlpsReturnStatusOk
Definition:
Alps.h:119
AlpsNodeStatusDiscarded
Definition:
Alps.h:67
ALPS_PS_STATS::subtreeWhole_
int subtreeWhole_
Definition:
Alps.h:189
AlpsKnowledgeTypeUndefined
Definition:
Alps.h:94
AlpsKnowledgeType
AlpsKnowledgeType
Definition:
Alps.h:88
AlpsPhaseRampup
Definition:
Alps.h:130
ALPS_PS_STATS::quantityBalance_
int quantityBalance_
Definition:
Alps.h:182
AlpsExitStatus
AlpsExitStatus
Definition:
Alps.h:101
ALPS_PS_STATS::donateFail_
int donateFail_
Definition:
Alps.h:187
AlpsKnowledgeTypeModelGen
Definition:
Alps.h:90
AlpsKnowledgeTypeNode
Definition:
Alps.h:91
AlpsExitStatusNoMemory
Definition:
Alps.h:109
AlpsExitStatusInfeasible
Definition:
Alps.h:108
AlpsKnowledgeTypeSubTree
Definition:
Alps.h:93
AlpasPhaseRampdown
Definition:
Alps.h:132
AlpsKnowledgeTypeModel
Definition:
Alps.h:89
AlpsReturnStatusErr
Definition:
Alps.h:120
AlpsSpiral
Definition:
Alps.h:54
AlpsExitStatusFailed
Definition:
Alps.h:110
ALPS_PS_STATS::subtreeSplit_
int subtreeSplit_
Definition:
Alps.h:188
AlpsSearchTypeDepthFirst
Definition:
Alps.h:77
AlpsConfig.h
ALPS_PS_STATS::subtreeChange_
int subtreeChange_
Definition:
Alps.h:190
AlpsExitStatusUnknown
Definition:
Alps.h:102
AlpsSearchTypeHybrid
Definition:
Alps.h:79
AlpsKnowledgeTypeSolution
Definition:
Alps.h:92
AlpsExitStatusFeasible
Definition:
Alps.h:107
AlpsPsStats
struct ALPS_PS_STATS AlpsPsStats
AlpsExitStatusTimeLimit
Definition:
Alps.h:104
Generated by
1.8.5