VrpConstants.h
Go to the documentation of this file.
1 /*===========================================================================*
2  * This file is part of a solver for the Vehicle Routing Problem *
3  * developed using the BiCePS Linear Integer Solver (BLIS). *
4  * *
5  * This solver is distributed under the Eclipse Public License as part of *
6  * the COIN-OR repository (http://www.coin-or.org). *
7  * *
8  * Authors: Yan Xu, Lehigh University *
9  * Ted Ralphs, Lehigh University *
10  * *
11  * Copyright (C) 2007 Yan Xu and Ted Ralphs. *
12  * All Rights Reserved. *
13  *===========================================================================*/
14 
15 #ifndef VrpConstants_h_
16 #define VrpConstants_h_
17 
18 #define LENGTH 255
19 #define KEY_NUM 43
20 #define DEAD 2
21 #define NEAR_INS -1
22 #define FAR_INS -2
23 #define DEPOT_PENALTY 20
24 #define RRR 6378.388
25 #define MY_PI 3.141592
26 #define LINE_LEN 80
27 
28 /*---------------- distance types -------------------------------------------*/
29 #define _EXPLICIT 0
30 #define _EUC_2D 1
31 #define _EUC_3D 2
32 #define _MAX_2D 3
33 #define _MAX_3D 4
34 #define _MAN_2D 5
35 #define _MAN_3D 6
36 #define _CEIL_2D 7
37 #define _GEO 8
38 #define _ATT 9
39 
40 /*---------------- message types --------------------------------------------*/
41 #define VRP_LB_DATA 1
42 #define VRP_LB_DATA2 2
43 #define VRP_BROADCAST_DATA 3
44 #define EXCHANGE_HEUR_TOUR 4
45 #define ROUTE_FINS_START_RULE 5
46 #define ROUTE_NINS_START_RULE 6
47 #define ROUTE_FNINS_START_RULE 7
48 #define FINI_RATIO 8
49 #define TSP_FINI_RATIO 9
50 #define ROUTE_FINS_VRP_DATA 10
51 #define ROUTE_NINS_VRP_DATA 11
52 #define ROUTE_FNINS_VRP_DATA 12
53 #define SWEEP_TRIALS 13
54 #define TSP_NI_TRIALS 14
55 #define TSP_FI_TRIALS 15
56 #define TSP_FINI_TRIALS 16
57 #define S3_NUMROUTES 17
58 #define NC_NUMROUTES 18
59 #define TSP_START_POINT 19
60 #define SAVINGS_DATA 20
61 #define SAVINGS2_DATA 21
62 #define SAVINGS3_DATA 22
63 #define DISPLAY_DATA 23
64 #define STOP 24
65 
66 /*__BEGIN_EXPERIMENTAL_SECTION__*/
67 
68 #define HEUR_TOUR 25
69 #define HEUR_TOUR_WITH_ROUTES 26
70 #define LOWER_BOUND 27
71 
72 /*--------------- algorithms ------------------------------------------------*/
73 #define EXCHANGE 28
74 #define EXCHANGE2 29
75 #define FARNEAR_INS 30
76 #define FARTHEST_INS 31
77 #define MST 32
78 #define NEAREST_INS 33
79 #define NEAR_CLUSTER 34
80 #define SAVINGS 35
81 #define SAVINGS2 36
82 #define SAVINGS3 37
83 #define SWEEP 38
84 #define TSP_FI 39
85 #define TSP_FINI 40
86 #define TSP_NI 41
87 /*--------------- algorithms ------------------------------------------------*/
88 #define S_EXCHANGE 42
89 #define S_EXCHANGE2 43
90 #define S_FARNEAR_INS 44
91 #define S_FARTHEST_INS 45
92 #define S_MST 46
93 #define S_NEAREST_INS 47
94 #define S_NEAR_CLUSTER 48
95 #define S_SAVINGS 49
96 #define S_SAVINGS2 50
97 #define S_SAVINGS3 51
98 #define S_SWEEP 52
99 #define S_TSP_FI 53
100 #define S_TSP_FINI 54
101 #define S_TSP_NI 55
102 
103 #define IN_TOUR -1
104 #define IN_TREE -1
105 #define NOT_NEIGHBOR 0
106 /*___END_EXPERIMENTAL_SECTION___*/
107 
108 /*---------------- cut types ------------------------------------------------*/
109 #define SUBTOUR_ELIM_SIDE 0
110 #define SUBTOUR_ELIM_ACROSS 1
111 #define SUBTOUR_ELIM 2
112 #define CLIQUE 3
113 /*__BEGIN_EXPERIMENTAL_SECTION__*/
114 #define FARKAS 4
115 #define NO_COLUMNS 5
116 #define GENERAL_NONZEROS 6
117 /*___END_EXPERIMENTAL_SECTION___*/
118 
119 /*---------------- tsp cut routines -----------------------------------------*/
120 
121 #define NO_TSP_CUTS 0
122 #define SUBTOUR 1
123 #define BLOSSOM 2
124 #define COMB 4
125 #define ALL_TSP_CUTS 7
126 
127 #define NUM_RANDS 6
128 
129 #define ACTIVE_NODE_LIST_BLOCK_SIZE 100
130 #define DELETE_POWER 3
131 #define DELETE_AND 0x07
132 
133 /*-------------- base variable selection rules ------------------------------*/
134 #define EVERYTHING_IS_EXTRA 0
135 #define SOME_ARE_BASE 1
136 #define EVERYTHING_IS_BASE 2
137 
138 /*--------- constants used in creating the edges lists for the root ---------*/
139 #define CHEAP_EDGES 0
140 #define REMAINING_EDGES 1
141 
142 /*--------- constants for saving the small graph ----------------------------*/
143 #define SAVE_SMALL_GRAPH 1
144 #define LOAD_SMALL_GRAPH 2
145 
146 /*--------- constants for defining which set of exchange heuristics to do --*/
147 #define FIRST_SET 1
148 #define SECOND_SET 2
149 
150 /*--------- which_connected_routine choices --------------------------------*/
151 #define CONNECTED 0
152 #define BICONNECTED 1
153 #define BOTH 2
154 
155 #define VRP_NOT_SET -1
156 
157 #endif