Alps  2.0.2
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  * Aykut Bulut, Lehigh University *
11  * Ted Ralphs, Lehigh University *
12  * *
13  * Conceptual Design: *
14  * *
15  * Yan Xu, Lehigh University *
16  * Ted Ralphs, Lehigh University *
17  * Laszlo Ladanyi, IBM T.J. Watson Research Center *
18  * Matthew Saltzman, Clemson University *
19  * *
20  * *
21  * Copyright (C) 2001-2023, Lehigh University, Yan Xu, Aykut Bulut, and *
22  * Ted Ralphs. *
23  * All Rights Reserved. *
24  *===========================================================================*/
25 
26 
27 #ifndef Alps_h_
28 #define Alps_h_
29 
30 #include <cfloat>
31 #include <cstdio>
32 
33 #include "AlpsConfig.h"
34 #include "CoinFinite.hpp"
35 
36 
38 
168 //#############################################################################
169 
170 #if defined(__linux__)
171 #define ALPS_MEMORY_USAGE 1
172 #endif
173 
174 typedef int AlpsNodeIndex_t;
175 
176 //#############################################################################
178 //#############################################################################
179 
183 };
184 
185 //#############################################################################
187 //#############################################################################
188 
192 };
193 
194 //#############################################################################
196 //#############################################################################
197 
205 };
206 
207 //#############################################################################
209 //#############################################################################
210 
217 };
218 
219 //#############################################################################
221 //#############################################################################
222 
231 };
232 
238 };
239 
240 //#############################################################################
241 // Search return status
242 //#############################################################################
243 
255 };
256 
257 //#############################################################################
258 // Return code.
259 //#############################################################################
260 
264  AlpsReturnStatusErrNoInt, /* No integer variable.*/
266 };
267 
268 //#############################################################################
269 // Seach phase
270 //#############################################################################
271 
272 enum AlpsPhase {
276 };
277 
278 #define ALPS_NODE_PROCESS_TIME 0.0123
279 #define ALPS_NONE 0
280 #define ALPS_NOT_SET -1
281 
282 //#############################################################################
283 // Big number
284 //#############################################################################
285 
286 #define ALPS_DBL_MAX COIN_DBL_MAX
287 #define ALPS_INC_MAX 1.0e80
288 #define ALPS_OBJ_MAX 1.0e75
289 #define ALPS_OBJ_MAX_LESS 1.0e70
290 #define ALPS_BND_MAX 1.0e20
291 #define ALPS_INFINITY 1.0e20
292 
293 #define ALPS_INT_MAX COIN_INT_MAX
294 
295 //#############################################################################
296 // Small number
297 //#############################################################################
298 
299 #define ALPS_ZERO 1.0e-14
300 #define ALPS_GEN_TOL 1.0e-6
301 #define ALPS_QUALITY_TOL 1.0e-5
302 #define ALPS_SMALL_3 1.0e-3
303 #define ALPS_SMALL_4 1.0e-4
304 #define ALPS_SMALL_5 1.0e-5
305 
306 //#############################################################################
307 
308 #define ALPS_PRINTF printf
309 
310 #define ALPS_DMSG printf
311 
312 
313 //#############################################################################
314 
315 #define ALPS_MAX( x, y ) ( ( (x) > (y) ) ? (x) : (y) )
316 #define ALPS_MIN( x, y ) ( ( (x) < (y) ) ? (x) : (y) )
317 #define ALPS_FABS(x) ( (x < 0.0) ? -(x) : (x) )
318 #define ALPS_ABS(x) ( (x < 0) ? -(x) : (x) )
319 
320 //#############################################################################
321 
322 typedef struct ALPS_PS_STATS
323 {
334 } AlpsPsStats;
335 
336 //#############################################################################
337 
338 
339 #endif
AlpsExitStatusNodeLimit
@ AlpsExitStatusNodeLimit
Definition: Alps.h:248
AlpsPhaseSearch
@ AlpsPhaseSearch
Definition: Alps.h:274
AlpsSearchTypeBreadthFirst
@ AlpsSearchTypeBreadthFirst
Definition: Alps.h:213
AlpsKnowledgeTypeNodeDesc
@ AlpsKnowledgeTypeNodeDesc
Definition: Alps.h:227
AlpsClockTypeWallClock
@ AlpsClockTypeWallClock
Definition: Alps.h:182
AlpsSearchTypeBestFirst
@ AlpsSearchTypeBestFirst
Definition: Alps.h:212
AlpsRootInit
@ AlpsRootInit
Definition: Alps.h:190
AlpsStaticBalanceScheme
AlpsStaticBalanceScheme
The possible values for static load balancing scheme.
Definition: Alps.h:189
ALPS_PS_STATS::subtreeChange_
int subtreeChange_
Definition: Alps.h:333
AlpsExitStatusOptimal
@ AlpsExitStatusOptimal
Definition: Alps.h:246
AlpsNodeStatusPregnant
@ AlpsNodeStatusPregnant
Definition: Alps.h:201
AlpsReturnStatus
AlpsReturnStatus
Definition: Alps.h:261
ALPS_PS_STATS::intraBalance_
int intraBalance_
Definition: Alps.h:327
AlpsExitStatusSolLimit
@ AlpsExitStatusSolLimit
Definition: Alps.h:249
AlpsNodeStatusBranched
@ AlpsNodeStatusBranched
Definition: Alps.h:202
AlpsNodeStatus
AlpsNodeStatus
The possible stati for the search nodes.
Definition: Alps.h:198
AlpsClockType
AlpsClockType
The possible values for clock type.
Definition: Alps.h:180
ALPS_PS_STATS::donateFail_
int donateFail_
Definition: Alps.h:330
AlpsSearchType
AlpsSearchType
Search Strategies.
Definition: Alps.h:211
AlpsNodeStatusCandidate
@ AlpsNodeStatusCandidate
Definition: Alps.h:199
AlpsClockTypeCpu
@ AlpsClockTypeCpu
Definition: Alps.h:181
AlpsNodeStatusEvaluated
@ AlpsNodeStatusEvaluated
Definition: Alps.h:200
AlpsNodeStatusFathomed
@ AlpsNodeStatusFathomed
Definition: Alps.h:203
AlpsReturnStatusErrNoInt
@ AlpsReturnStatusErrNoInt
Definition: Alps.h:264
AlpsExitStatusUnbounded
@ AlpsExitStatusUnbounded
Definition: Alps.h:254
AlpsPhase
AlpsPhase
Definition: Alps.h:272
AlpsKnowledgePoolTypeSolution
@ AlpsKnowledgePoolTypeSolution
Definition: Alps.h:235
AlpsSearchTypeBestEstimate
@ AlpsSearchTypeBestEstimate
Definition: Alps.h:215
AlpsReturnStatusErrNoMem
@ AlpsReturnStatusErrNoMem
Definition: Alps.h:265
AlpsReturnStatusOk
@ AlpsReturnStatusOk
Definition: Alps.h:262
AlpsNodeStatusDiscarded
@ AlpsNodeStatusDiscarded
Definition: Alps.h:204
AlpsKnowledgePoolType
AlpsKnowledgePoolType
Definition: Alps.h:233
ALPS_PS_STATS::donateSuccess_
int donateSuccess_
Definition: Alps.h:329
AlpsPsStats
struct ALPS_PS_STATS AlpsPsStats
AlpsPhaseRampdown
@ AlpsPhaseRampdown
Definition: Alps.h:275
AlpsKnowledgeTypeUndefined
@ AlpsKnowledgeTypeUndefined
Definition: Alps.h:230
AlpsKnowledgeType
AlpsKnowledgeType
Type of knowledge like solution, node, cut...
Definition: Alps.h:223
AlpsPhaseRampup
@ AlpsPhaseRampup
Definition: Alps.h:273
AlpsExitStatus
AlpsExitStatus
Definition: Alps.h:244
ALPS_PS_STATS::subtreeSplit_
int subtreeSplit_
Definition: Alps.h:331
AlpsConfig.h
AlpsKnowledgeTypeModelGen
@ AlpsKnowledgeTypeModelGen
Definition: Alps.h:225
AlpsKnowledgeTypeNode
@ AlpsKnowledgeTypeNode
Definition: Alps.h:226
AlpsKnowledgePoolTypeNode
@ AlpsKnowledgePoolTypeNode
Definition: Alps.h:234
ALPS_PS_STATS::subtreeWhole_
int subtreeWhole_
Definition: Alps.h:332
ALPS_PS_STATS::qualityBalance_
int qualityBalance_
Definition: Alps.h:324
ALPS_PS_STATS::quantityBalance_
int quantityBalance_
Definition: Alps.h:325
AlpsExitStatusNoMemory
@ AlpsExitStatusNoMemory
Definition: Alps.h:252
ALPS_PS_STATS::workerAsk_
int workerAsk_
Definition: Alps.h:328
AlpsKnowledgePoolTypeUndefined
@ AlpsKnowledgePoolTypeUndefined
Definition: Alps.h:237
AlpsExitStatusInfeasible
@ AlpsExitStatusInfeasible
Definition: Alps.h:251
ALPS_PS_STATS
Definition: Alps.h:322
AlpsKnowledgeTypeSubTree
@ AlpsKnowledgeTypeSubTree
Definition: Alps.h:229
AlpsKnowledgeTypeModel
@ AlpsKnowledgeTypeModel
Definition: Alps.h:224
AlpsReturnStatusErr
@ AlpsReturnStatusErr
Definition: Alps.h:263
ALPS_PS_STATS::interBalance_
int interBalance_
Definition: Alps.h:326
AlpsSpiral
@ AlpsSpiral
Definition: Alps.h:191
AlpsExitStatusFailed
@ AlpsExitStatusFailed
Definition: Alps.h:253
AlpsKnowledgePoolTypeSubTree
@ AlpsKnowledgePoolTypeSubTree
Definition: Alps.h:236
AlpsSearchTypeDepthFirst
@ AlpsSearchTypeDepthFirst
Definition: Alps.h:214
AlpsExitStatusUnknown
@ AlpsExitStatusUnknown
Definition: Alps.h:245
AlpsSearchTypeHybrid
@ AlpsSearchTypeHybrid
Definition: Alps.h:216
AlpsKnowledgeTypeSolution
@ AlpsKnowledgeTypeSolution
Definition: Alps.h:228
AlpsExitStatusFeasible
@ AlpsExitStatusFeasible
Definition: Alps.h:250
AlpsNodeIndex_t
int AlpsNodeIndex_t
Definition: Alps.h:174
AlpsExitStatusTimeLimit
@ AlpsExitStatusTimeLimit
Definition: Alps.h:247