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