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 #ifndef _VRP_MOVE_H 00013 #define _VRP_MOVE_H 00014 00015 #define MAX_AFFECTED_ROUTES 3 00016 #define MAX_ARGUMENTS 15 00017 00018 class VRPMove 00019 { 00024 00025 public: 00026 00027 VRPMove(); 00028 VRPMove(int n); 00029 ~VRPMove(); 00030 00031 bool is_better(class VRP *V, VRPMove *M2, int criteria); 00032 00033 int criteria; 00034 int num_affected_routes; 00035 int route_nums [MAX_AFFECTED_ROUTES]; 00036 double route_lens [MAX_AFFECTED_ROUTES]; 00037 int route_loads[MAX_AFFECTED_ROUTES]; 00038 int route_custs[MAX_AFFECTED_ROUTES]; 00039 00040 double *arrival_times; // for time window addition 00041 00042 double savings; 00043 int total_number_of_routes; 00044 double new_total_route_length; 00045 int move_type; 00046 int num_arguments; 00047 int move_arguments[MAX_ARGUMENTS]; 00048 int eval_arguments[MAX_ARGUMENTS]; 00049 00050 bool evaluated_savings; 00051 00052 }; 00053 00054 #endif 00055