Alps 1.5.7
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-2019, 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
46};
47
48//#############################################################################
50//#############################################################################
51
55};
56
57//#############################################################################
59//#############################################################################
60
68};
69
70//#############################################################################
72//#############################################################################
73
80};
81
82//#############################################################################
84//#############################################################################
85
86typedef int KnowledgeType;
87
95};
96
97//#############################################################################
98// Search return status
99//#############################################################################
100
113
114//#############################################################################
115// Return code.
116//#############################################################################
117
121 AlpsReturnStatusErrNoInt, /* No integer variable.*/
124
125//#############################################################################
126// Seach phase
127//#############################################################################
128
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
179typedef struct ALPS_PS_STATS
180{
192
193//#############################################################################
194
195
196#endif
AlpsClockType
The possible values for clock type.
Definition: Alps.h:43
@ AlpsClockTypeCpu
Definition: Alps.h:44
@ AlpsClockTypeWallClock
Definition: Alps.h:45
AlpsReturnStatus
Definition: Alps.h:118
@ AlpsReturnStatusErrNoMem
Definition: Alps.h:122
@ AlpsReturnStatusOk
Definition: Alps.h:119
@ AlpsReturnStatusErr
Definition: Alps.h:120
@ AlpsReturnStatusErrNoInt
Definition: Alps.h:121
AlpsKnowledgeType
Definition: Alps.h:88
@ AlpsKnowledgeTypeNode
Definition: Alps.h:91
@ AlpsKnowledgeTypeSolution
Definition: Alps.h:92
@ AlpsKnowledgeTypeModel
Definition: Alps.h:89
@ AlpsKnowledgeTypeUndefined
Definition: Alps.h:94
@ AlpsKnowledgeTypeSubTree
Definition: Alps.h:93
@ AlpsKnowledgeTypeModelGen
Definition: Alps.h:90
AlpsStaticBalanceScheme
The possible values for static load balancing scheme.
Definition: Alps.h:52
@ AlpsRootInit
Definition: Alps.h:53
@ AlpsSpiral
Definition: Alps.h:54
struct ALPS_PS_STATS AlpsPsStats
AlpsSearchType
Search Strategies.
Definition: Alps.h:74
@ AlpsSearchTypeDepthFirst
Definition: Alps.h:77
@ AlpsSearchTypeHybrid
Definition: Alps.h:79
@ AlpsSearchTypeBestEstimate
Definition: Alps.h:78
@ AlpsSearchTypeBestFirst
Definition: Alps.h:75
@ AlpsSearchTypeBreadthFirst
Definition: Alps.h:76
AlpsNodeStatus
The possible stati for the search nodes.
Definition: Alps.h:61
@ AlpsNodeStatusDiscarded
Definition: Alps.h:67
@ AlpsNodeStatusCandidate
Definition: Alps.h:62
@ AlpsNodeStatusFathomed
Definition: Alps.h:66
@ AlpsNodeStatusPregnant
Definition: Alps.h:64
@ AlpsNodeStatusEvaluated
Definition: Alps.h:63
@ AlpsNodeStatusBranched
Definition: Alps.h:65
int KnowledgeType
Type of knowledge like solution, node, cut...
Definition: Alps.h:86
AlpsPhase
Definition: Alps.h:129
@ AlpsPhaseSearch
Definition: Alps.h:131
@ AlpasPhaseRampdown
Definition: Alps.h:132
@ AlpsPhaseRampup
Definition: Alps.h:130
AlpsExitStatus
Definition: Alps.h:101
@ AlpsExitStatusUnknown
Definition: Alps.h:102
@ AlpsExitStatusUnbounded
Definition: Alps.h:111
@ AlpsExitStatusNodeLimit
Definition: Alps.h:105
@ AlpsExitStatusInfeasible
Definition: Alps.h:108
@ AlpsExitStatusSolLimit
Definition: Alps.h:106
@ AlpsExitStatusFeasible
Definition: Alps.h:107
@ AlpsExitStatusFailed
Definition: Alps.h:110
@ AlpsExitStatusTimeLimit
Definition: Alps.h:104
@ AlpsExitStatusOptimal
Definition: Alps.h:103
@ AlpsExitStatusNoMemory
Definition: Alps.h:109
int donateSuccess_
Definition: Alps.h:186
int subtreeWhole_
Definition: Alps.h:189
int subtreeSplit_
Definition: Alps.h:188
int interBalance_
Definition: Alps.h:183
int qualityBalance_
Definition: Alps.h:181
int subtreeChange_
Definition: Alps.h:190
int intraBalance_
Definition: Alps.h:184
int donateFail_
Definition: Alps.h:187
int quantityBalance_
Definition: Alps.h:182
int workerAsk_
Definition: Alps.h:185