VRPH
1.0
|
00001 00002 // // 00003 // This file is part of the VRPH software package for // 00004 // generating solutions to vehicle routing problems. // 00005 // VRPH was developed by Chris Groer (cgroer@gmail.com). // 00006 // // 00007 // (c) Copyright 2010 Chris Groer. // 00008 // All Rights Reserved. VRPH is licensed under the // 00009 // Common Public License. See LICENSE file for details. // 00010 // // 00012 00013 #ifndef _VRP_HEUR_H 00014 #define _VRP_HEUR_H 00015 00016 // Various rules that can be or'ed together 00017 #define VRPH_DOWNHILL 1 00018 #define VRPH_RECORD_TO_RECORD (1<<1) 00019 #define VRPH_SIMULATED_ANNEALING (1<<2) 00020 #define VRPH_FIRST_ACCEPT (1<<3) 00021 #define VRPH_BEST_ACCEPT (1<<4) 00022 #define VRPH_LI_ACCEPT (1<<5) 00023 #define VRPH_INTER_ROUTE_ONLY (1<<6) 00024 #define VRPH_INTRA_ROUTE_ONLY (1<<7) 00025 #define VRPH_USE_NEIGHBOR_LIST (1<<8) 00026 #define VRPH_FREE (1<<9) 00027 #define VRPH_BALANCED (1<<10) 00028 #define VRPH_FORWARD (1<<11) 00029 #define VRPH_BACKWARD (1<<12) 00030 #define VRPH_RANDOMIZED (1<<13) 00031 #define VRPH_SAVINGS_ONLY (1<<14) 00032 #define VRPH_MINIMIZE_NUM_ROUTES (1<<15) 00033 #define VRPH_FIXED_EDGES (1<<17) 00034 #define VRPH_ALLOW_INFEASIBLE (1<<18) 00035 #define VRPH_NO_NEW_ROUTE (1<<19) 00036 #define VRPH_TABU (1<<20) 00037 00038 // Heuristic operations 00039 #define ONE_POINT_MOVE (1<<21) 00040 #define TWO_POINT_MOVE (1<<22) 00041 #define TWO_OPT (1<<23) 00042 #define OR_OPT (1<<24) 00043 #define THREE_OPT (1<<25) 00044 #define CROSS_EXCHANGE (1<<26) 00045 #define THREE_POINT_MOVE (1<<27) 00046 #define KITCHEN_SINK (1<<28) 00047 00048 #define ALL_HEURISTICS (1<<20)|(1<<21)|(1<<22)|(1<<23)|(1<<24)|(1<<25)|(1<<26)|(1<<27) 00049 00050 // Values of heuristics that can be used in functions such as 00051 // clean_routes 00052 00053 #define NUM_HEURISTICS 7 00054 00055 #define ONE_POINT_MOVE_INDEX 0 00056 #define TWO_POINT_MOVE_INDEX 1 00057 #define TWO_OPT_INDEX 2 00058 #define OR_OPT_INDEX 3 00059 #define THREE_OPT_INDEX 4 00060 #define CROSS_EXCHANGE_INDEX 5 00061 #define THREE_POINT_MOVE_INDEX 6 00062 00063 00064 00065 // Move types 00066 #define PRESERT 1 00067 #define POSTSERT 2 00068 #define CONCATENATE 3 00069 #define SWAP_ENDS 4 00070 #define FLIP 5 00071 #define MOVE_STRING 6 00072 #define SWAP 7 00073 00074 #endif 00075 00076 00077 00078 00079