00001 #ifndef _EGddomino
00002 #define _EGddomino
00003
00004 #include<stdio.h>
00005 #include<math.h>
00006 #include<limits.h>
00007
00008 #ifndef CCtsp_DOMINO_PORT
00009 #define CCtsp_DOMINO_PORT ((unsigned short) 24869)
00010 #endif
00011
00012 #ifndef CCtsp_DOMINO_WORK
00013 #define CCtsp_DOMINO_WORK 'A'
00014 #endif
00015 #ifndef CCtsp_DOMINO_GRAPH
00016 #define CCtsp_DOMINO_GRAPH 'G'
00017 #endif
00018 #ifndef CCtsp_DOMINO_NO
00019 #define CCtsp_DOMINO_NO 'N'
00020 #endif
00021 #ifndef CCtsp_DOMINO_RECEIVE
00022 #define CCtsp_DOMINO_RECEIVE 'R'
00023 #endif
00024 #ifndef CCtsp_DOMINO_SEND
00025 #define CCtsp_DOMINO_SEND 'S'
00026 #endif
00027 #ifndef CCtsp_DOMINO_WAIT
00028 #define CCtsp_DOMINO_WAIT 'W'
00029 #endif
00030 #ifndef CCtsp_DOMINO_YES
00031 #define CCtsp_DOMINO_YES 'Y'
00032 #endif
00033 #ifndef CCtsp_DOMINO_EXIT
00034 #define CCtsp_DOMINO_EXIT 'X'
00035 #endif
00036
00037 #include "eg_dgraph.h"
00038 #include "eg_dijkstra.h"
00039 #define DOM_DUAL_NORM 0
00040 #define DOM_CC_ONE 1
00041
00042 typedef struct
00043 {
00044
00045 EGdijkstraCost_t value, primalValue;
00046 EGdGraphNode_t *s, *t;
00047 void ***path;
00048
00049
00050 unsigned int *npath;
00051 unsigned char DDtype;
00052 unsigned int id;
00053 } EGddomino_t;
00054
00055 #include "eg_util.h"
00056 #include "bc_util.h"
00057 #include "dp_config.h"
00058 #include "eg_heap.h"
00059 #include "eg_menger.h"
00060 #include "eg_menger_app.h"
00061
00062 EGddomino_t *EGnewDdomino (EGmemPool_t * mem,
00063 EGdGraphEdge_t ** path,
00064 unsigned int *path_beg,
00065 EGdijkstraCost_t val);
00066
00067 void EGfreeDdomino (void *v,
00068 EGmemPool_t * mem);
00069 int EGfreeAllDDominoes (EGlist_t * dlist,
00070 EGmemPool_t * mem);
00071
00072 int EGddominoComputeAll (EGmemPool_t * mem,
00073 EGdGraph_t * G,
00074 EGlist_t * dlist,
00075 int k,
00076 double percentage);
00077
00078 int EGddominoComputeAllRemote (EGmemPool_t * mem,
00079 EGdGraph_t * G,
00080 EGlist_t * dlist,
00081 int k,
00082 const char *boss_name,
00083 double ddp_heuristic_maxtime);
00084
00085 int EGddominoComputeS (EGmemPool_t * mem,
00086 EGdGraphNode_t * s,
00087 EGdGraph_t * G,
00088 EGlist_t * dlist,
00089 int k,
00090 double percentage);
00091
00092 void EGddominoDisplay (EGddomino_t * ddom,
00093 FILE * file);
00094
00095 int EGddominoPerturb (EGdGraph_t * G,
00096 EGdijkstraCost_t epsilon);
00097 EGdijkstraCost_t EGddWeight (EGddomino_t * dd);
00098 int EGddFixValues (EGlist_t * dd_list);
00099
00100 #endif