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