VRPH  1.0
inc/VRPH.h
Go to the documentation of this file.
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 // This is the primary include file for VRPH.  Applications should
00014 // just need to include this file and everything else will
00015 // be taken care of
00016 
00017 #ifndef _VRPH_H
00018 #define _VRPH_H
00019 
00020 // Supported TSPLIB Problem types
00021 #define VRPH_TSP                1
00022 #define VRPH_CVRP               2
00023 
00024 // Supported TSPLIB Edge Weight Formats
00025 #define VRPH_FUNCTION           1
00026 #define VRPH_UPPER_ROW          2
00027 #define VRPH_FULL_MATRIX        3
00028 #define VRPH_LOWER_ROW          4
00029 #define VRPH_UPPER_DIAG_ROW     5
00030 #define VRPH_LOWER_DIAG_ROW     6
00031 
00032 // Supported TSPLIB Coord types
00033 #define VRPH_TWOD_COORDS        2
00034 #define VRPH_THREED_COORDS      3
00035 
00036 // Supported TSPLIB Edge Weight Types
00037 #define VRPH_EXPLICIT           0
00038 #define VRPH_EUC_2D             1
00039 #define VRPH_EUC_3D             2
00040 #define VRPH_MAX_2D             3
00041 #define VRPH_MAX_3D             4
00042 #define VRPH_MAN_2D             5
00043 #define VRPH_MAN_3D             6
00044 #define VRPH_CEIL_2D            7
00045 #define VRPH_GEO                8
00046 #define VRPH_EXACT_2D           9
00047 
00048 // Useful macros
00049 #define VRPH_MIN(X,Y)   ((X) < (Y) ?  (X) : (Y))
00050 #define VRPH_MAX(X,Y)   ((X) < (Y) ?  (Y) : (X))
00051 #define VRPH_ABS(a)     (((a) < 0) ? -(a) : (a))
00052 
00053 // Different types of searches for inject_set
00054 #define VRPH_RANDOM_SEARCH      1
00055 #define VRPH_REGRET_SEARCH      2
00056 
00057 // PLPlot/image-related defines
00058 #define VRPH_EPS_EXE    "epstopdf"
00059 // To convert .ps to .pdf files - only tested on WINDOWS and Cygwin
00060 
00061 #ifdef HAS_PLPLOT
00062 #include "plplot.h"
00063 #endif
00064 
00065 // Colors for PLPlot
00066 #define VRPH_BLACK          0
00067 #define VRPH_RED            1
00068 #define VRPH_YELLOW         2
00069 #define VRPH_GREEN          3
00070 #define VRPH_AQUA           4
00071 #define VRPH_PINK           5
00072 #define VRPH_WHEAT          6
00073 #define VRPH_GRAY           7
00074 #define VRPH_BROWN          8
00075 #define VRPH_BLUE           9
00076 #define VRPH_VIOLET         10
00077 #define VRPH_CYAN           11
00078 #define VRPH_TURQUOISE      12
00079 #define VRPH_MAGENTA        13
00080 #define VRPH_SALMON         14
00081 #define VRPH_WHITE          15
00082 
00083 // Options for plotting
00084 #define VRPH_DEFAULT_PLOT           0
00085 #define VRPH_BLACK_AND_WHITE        1
00086 #define VRPH_COLOR                  2
00087 #define VRPH_BOXED                  4
00088 #define VRPH_NO_TITLE               8
00089 #define VRPH_BARE_BONES             16
00090 #define VRPH_NO_POINTS              32
00091 #define VRPH_NO_DEPOT_EDGES         64
00092 #define VRPH_WEIGHTED               128
00093 
00094 // Miscellaneous defines
00095 // Set this to 1 if you want to have different random
00096 // seeds that incorporate time - 
00097 // otherwise the solution should be repeatable
00098 #define VRPH_ADD_ENTROPY            0
00099 // Set this to 1 if you want to prevent "trivial"
00100 // moves that have no effect on the total route length
00101 #define VRPH_FORBID_TINY_MOVES      1
00102 #define VRPH_MAX_NUM_LAMBDAS        100
00103 #define VRPH_STRING_SIZE            200
00104 #define VRPH_DEPOT                  0
00105 #define VRPH_PI                     3.14159265358979323846264
00106 #define VRPH_RRR                    6378.3888
00107 #define VRP_INFINITY                (1<<30)
00108 #define VRP_INFEASIBLE              VRP_INFINITY
00109 #define VRPH_EPSILON                .00001
00110 #define VRPH_DEFAULT_DEVIATION      .01
00111 #define VRPH_MAX_NUM_ROUTES         10000
00112 // Perturb types
00113 #define VRPH_LI_PERTURB             0
00114 
00115 #define VRPH_OSMAN_PERTURB          1
00116 // Multi-day VRP's
00117 #define VRPH_MAX_SERVICE_DAYS       10
00118 
00119 #include "RNG.h"
00120 #include <stdlib.h>
00121 #include <stdio.h>
00122 #include <math.h>
00123 #include <time.h>
00124 #include <string.h>
00125 #include <memory.h>
00126 #include <assert.h>
00127 #include "VRPDebug.h"
00128 #include "VRPHeuristic.h"
00129 #include "VRPUtils.h"
00130 #include "VRPNode.h"
00131 #include "VRPRoute.h"
00132 #include "VRPMove.h"
00133 #include "VRPSolution.h"
00134 #include "VRPTabuList.h"
00135 #include "VRP.h"
00136 #include "Postsert.h"
00137 #include "Presert.h"
00138 #include "Concatenate.h"
00139 #include "SwapEnds.h"
00140 #include "Flip.h"
00141 #include "Swap.h"
00142 #include "MoveString.h"
00143 #include "OnePointMove.h"
00144 #include "TwoPointMove.h"
00145 #include "TwoOpt.h"
00146 #include "ClarkeWright.h"
00147 #include "Sweep.h"
00148 #include "OrOpt.h"
00149 #include "ThreeOpt.h"
00150 #include "CrossExchange.h"
00151 #include "VRPGenerator.h"
00152 #include "ThreePointMove.h"
00153 
00154 void VRPH_version();
00155 
00156 #endif
00157 
00158