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 AlpsNodeStatusDiscarded
00067 };
00068
00069
00071
00072
00073 enum AlpsSearchType {
00074 AlpsSearchTypeBestFirst = 0,
00075 AlpsSearchTypeBreadthFirst,
00076 AlpsSearchTypeDepthFirst,
00077 AlpsSearchTypeBestEstimate,
00078 AlpsSearchTypeHybrid
00079 };
00080
00081
00083
00084
00085 typedef int KnowledgeType;
00086
00087 enum AlpsKnowledgeType{
00088 AlpsKnowledgeTypeModel = 0,
00089 AlpsKnowledgeTypeModelGen,
00090 AlpsKnowledgeTypeNode,
00091 AlpsKnowledgeTypeSolution,
00092 AlpsKnowledgeTypeSubTree,
00093 AlpsKnowledgeTypeUndefined
00094 };
00095
00096
00097
00098
00099
00100 enum AlpsExitStatus {
00101 AlpsExitStatusUnknown = -1,
00102 AlpsExitStatusOptimal,
00103 AlpsExitStatusTimeLimit,
00104 AlpsExitStatusNodeLimit,
00105 AlpsExitStatusSolLimit,
00106 AlpsExitStatusFeasible,
00107 AlpsExitStatusInfeasible,
00108 AlpsExitStatusNoMemory,
00109 AlpsExitStatusFailed,
00110 AlpsExitStatusUnbounded
00111 };
00112
00113
00114
00115
00116
00117 enum AlpsReturnStatus {
00118 AlpsReturnStatusOk = 0,
00119 AlpsReturnStatusErr,
00120 AlpsReturnStatusErrNoInt,
00121 AlpsReturnStatusErrNoMem
00122 };
00123
00124
00125
00126
00127
00128 enum AlpsPhase {
00129 AlpsPhaseRampup = 0,
00130 AlpsPhaseSearch,
00131 AlpasPhaseRampdown
00132 };
00133
00134 #define ALPS_NODE_PROCESS_TIME 0.0123
00135 #define ALPS_NONE 0
00136 #define ALPS_NOT_SET -1
00137
00138
00139
00140
00141
00142 #define ALPS_DBL_MAX COIN_DBL_MAX
00143 #define ALPS_INC_MAX 1.0e80
00144 #define ALPS_OBJ_MAX 1.0e75
00145 #define ALPS_OBJ_MAX_LESS 1.0e70
00146 #define ALPS_BND_MAX 1.0e20
00147 #define ALPS_INFINITY 1.0e20
00148
00149 #define ALPS_INT_MAX COIN_INT_MAX
00150
00151
00152
00153
00154
00155 #define ALPS_ZERO 1.0e-14
00156 #define ALPS_GEN_TOL 1.0e-6
00157 #define ALPS_QUALITY_TOL 1.0e-5
00158 #define ALPS_SMALL_3 1.0e-3
00159 #define ALPS_SMALL_4 1.0e-4
00160 #define ALPS_SMALL_5 1.0e-5
00161
00162
00163
00164 #define ALPS_PRINTF printf
00165
00166 #define ALPS_DMSG printf
00167
00168
00169
00170
00171 #define ALPS_MAX( x, y ) ( ( (x) > (y) ) ? (x) : (y) )
00172 #define ALPS_MIN( x, y ) ( ( (x) < (y) ) ? (x) : (y) )
00173 #define ALPS_FABS(x) ( (x < 0.0) ? -(x) : (x) )
00174 #define ALPS_ABS(x) ( (x < 0) ? -(x) : (x) )
00175
00176
00177
00178 typedef struct ALPS_PS_STATS
00179 {
00180 int qualityBalance_;
00181 int quantityBalance_;
00182 int interBalance_;
00183 int intraBalance_;
00184 int workerAsk_;
00185 int donateSuccess_;
00186 int donateFail_;
00187 int subtreeSplit_;
00188 int subtreeWhole_;
00189 int subtreeChange_;
00190 } AlpsPsStats;
00191
00192
00193
00194
00195 #endif