00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef Alps_h_
00025 #define Alps_h_
00026
00027 #include <cfloat>
00028 #include <cstdio>
00029
00030 #include "CoinFinite.hpp"
00031
00032
00033
00034 #if defined(__linux__)
00035 #define ALPS_MEMORY_USAGE 1
00036 #endif
00037
00038
00040
00041
00042 enum AlpsClockType {
00043 AlpsClockTypeCpu,
00044 AlpsClockTypeWallClock
00045 };
00046
00047
00049
00050
00051 enum AlpsStaticBalanceScheme {
00052 AlpsRootInit = 0,
00053 AlpsSpiral
00054 };
00055
00056
00058
00059
00060 enum AlpsNodeStatus {
00061 AlpsNodeStatusCandidate,
00062 AlpsNodeStatusEvaluated,
00063 AlpsNodeStatusPregnant,
00064 AlpsNodeStatusBranched,
00065 AlpsNodeStatusFathomed
00066 };
00067
00068
00070
00071
00072 enum AlpsSearchType {
00073 AlpsSearchTypeBestFirst = 0,
00074 AlpsSearchTypeBreadthFirst,
00075 AlpsSearchTypeDepthFirst,
00076 AlpsSearchTypeBestEstimate,
00077 AlpsSearchTypeHybrid
00078 };
00079
00080
00082
00083
00084 typedef int KnowledgeType;
00085
00086 enum AlpsKnowledgeType{
00087 AlpsKnowledgeTypeModel = 0,
00088 AlpsKnowledgeTypeModelGen,
00089 AlpsKnowledgeTypeNode,
00090 AlpsKnowledgeTypeSolution,
00091 AlpsKnowledgeTypeSubTree,
00092 AlpsKnowledgeTypeUndefined
00093 };
00094
00095
00096
00097
00098
00099 enum AlpsExitStatus {
00100 AlpsExitStatusUnknown = -1,
00101 AlpsExitStatusOptimal,
00102 AlpsExitStatusTimeLimit,
00103 AlpsExitStatusNodeLimit,
00104 AlpsExitStatusFeasible,
00105 AlpsExitStatusInfeasible,
00106 AlpsExitStatusNoMemory,
00107 AlpsExitStatusFailed,
00108 AlpsExitStatusUnbounded
00109 };
00110
00111
00112
00113
00114
00115 enum AlpsReturnStatus {
00116 AlpsReturnStatusOk = 0,
00117 AlpsReturnStatusErr,
00118 AlpsReturnStatusErrNoInt,
00119 AlpsReturnStatusErrNoMem
00120 };
00121
00122
00123
00124
00125
00126 enum AlpsPhase {
00127 AlpsPhaseRampup = 0,
00128 AlpsPhaseSearch,
00129 AlpasPhaseRampdown
00130 };
00131
00132 #define ALPS_NODE_PROCESS_TIME 0.0123
00133 #define ALPS_NONE 0
00134 #define ALPS_NOT_SET -1
00135
00136
00137
00138
00139
00140 #define ALPS_DBL_MAX COIN_DBL_MAX
00141 #define ALPS_INC_MAX 1.0e80
00142 #define ALPS_OBJ_MAX 1.0e75
00143 #define ALPS_OBJ_MAX_LESS 1.0e70
00144 #define ALPS_BND_MAX 1.0e20
00145 #define ALPS_INFINITY 1.0e20
00146
00147 #define ALPS_INT_MAX COIN_INT_MAX
00148
00149
00150
00151
00152
00153 #define ALPS_ZERO 1.0e-14
00154 #define ALPS_GEN_TOL 1.0e-6
00155 #define ALPS_QUALITY_TOL 1.0e-5
00156 #define ALPS_SMALL_3 1.0e-3
00157 #define ALPS_SMALL_4 1.0e-4
00158 #define ALPS_SMALL_5 1.0e-5
00159
00160
00161
00162 #define ALPS_PRINTF printf
00163
00164 #define ALPS_DMSG printf
00165
00166
00167
00168
00169 #define ALPS_MAX( x, y ) ( ( (x) > (y) ) ? (x) : (y) )
00170 #define ALPS_MIN( x, y ) ( ( (x) < (y) ) ? (x) : (y) )
00171 #define ALPS_FABS(x) ( (x < 0.0) ? -(x) : (x) )
00172 #define ALPS_ABS(x) ( (x < 0) ? -(x) : (x) )
00173
00174
00175
00176 typedef struct ALPS_PS_STATS
00177 {
00178 int qualityBalance_;
00179 int quantityBalance_;
00180 int interBalance_;
00181 int intraBalance_;
00182 int workerAsk_;
00183 int donateSuccess_;
00184 int donateFail_;
00185 int subtreeSplit_;
00186 int subtreeWhole_;
00187 int subtreeChange_;
00188 } AlpsPsStats;
00189
00190
00191
00192
00193 #endif