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 #include "VRPH.h" 00014 00015 VRPNode::VRPNode() 00016 { 00022 int i; 00023 00024 x = 0; 00025 y = 0; 00026 00027 for(i = 0;i < MAX_NEIGHBORLIST_SIZE; i++) 00028 { 00029 this->neighbor_list[i].position = 0; 00030 this->neighbor_list[i].val = 0; 00031 } 00032 00033 this->arrival_time=0; 00034 this->service_time=0; 00035 this->daily_demands=NULL; 00036 this->daily_service_times=NULL; 00037 this->num_days=1; // >1 for multi-day VRPs 00038 this->start_tw=-VRP_INFINITY; 00039 this->end_tw=VRP_INFINITY; 00040 00041 } 00042 00043 VRPNode::~VRPNode() 00044 { 00048 00049 if(this->daily_demands) 00050 delete [] this->daily_demands; 00051 if(this->daily_service_times) 00052 delete [] this->daily_service_times; 00053 } 00054 00055