Using an evolutionary algorithm to discover low CO2 tours within a Travelling Salesman Problem

This paper examines the issues surrounding the effects of using vehicle emissions as the fitness criteria when solving routing problems using evolutionary techniques. The case-study examined is that of the Travelling Salesman Problem (TSP) based upon the road network within the City of Edinburgh, Scotland. A low cost path finding algorithm (A*) is used to build paths through the street network between delivery points. The EA is used to discover tours that utilise paths with low emissions characteristics. Two methods of estimating CO2 emissions are examined; one that utilises a fuel consumption model and applies it to an estimated drive cycle and one that applies a simplistic CO2 calculation model that focuses on average speeds over street sections. The results of these two metrics are compared with each other and with results obtained using a traditional distance metric.


Introduction and motivation
Vehicle routing may be measured in terms of emissions produced as well as the more traditional raw distance metric. Vehicle emissions are dependant on the physical characteristics of the vehicle such as engine type and overall mass as well as factors related to the current driving activities such as acceleration and speed. Previous research in the area of optimisation has examined routing problems such as Travelling Salesman on the basis of a simplistic underlying geographical model, with a fitness function being based on the distance taken by a vehicle within a given solution. This paper will examine the effects of using emissions rather than distance covered as evaluation criterion. A more realistic underlying geographical model is required, rather than one that assumes a constant Euclidean distance between points.
In this paper we examine the Travelling Salesman Problem (TSP) based on real-world street data using CO 2 emissions as our evaluation criterion. The EA employed produces permutations of delivery points, the path taken through the street network between each point determined by the A* algorithm. It is feasible to use a CO 2 costing metric as the cost function of a search technique such as Dijkstra's algorithm, but the time taken to construct paths can be prohibitive. In this work we are using the EA to find paths created on the basis of distance that will contribute to a low CO 2 TSP tour.
The TSP is a well known mathematical problem that involves construction a Hamiltonian Path within a graph. It is traditionally presented as finding the shortest route that allows a travelling salesman to visit each location. The TSP has been extensively investigated since the 1930s (for a brief history of TSP investigation see [1]). Because of its simple construction the TSP has been used for testing newly developed heuristics and algorithms.
The use of heuristic approaches to solve the TSP, such as Lin-Kernighan [2] are discussed in [3]

The Geographical Data Source
In recent years sources of accurate geographical data have been made available online by vendors such as Google Maps, ViaMichelin and TeleAtlas. Such encapsulates the topology of streets and to a certain extent the layout and characteristics of road junctions. Within this paper the authors have used data from the Open Street Map (OSM) project (available from www.osm.org under the terms of the Creative Commons Attribution-Share Alike 2.0 licence). Data representing the street graph for the City of Edinburgh, Scotland has been downloaded and stored within a local MySQL database. For each road section the length and road class are stored. The authors have applied empirical knowledge and data presented in [14] to allocate a realistic average speed to each class of road (see table 1). At junctions the appropriate intersecting street details are stored along with attributes such as the existence of traffic signals or a roundabout. The model in use within this paper does not take into account waiting time at junctions or gradients.
The A* algorithm may be used to construct a path between any two locations within the OSM dataset, on the basis of shortest distance. A metric may subsequently be applied to calculate the cost associated with the route. In previous research this metric has often been based upon distance travelled. By examining the attributes of streets and junctions traversed within the route it is feasible to apply a CO 2 emissions metric to the route.

Estimating Vehicle Emissions
The emissions characteristics of a specific vehicle will depend on a range of factors, such as engine size, fuel type and vehicle mass. The actual driving activity and style also influences emissions through variables such as speed, acceleration and gradient. The calculation of estimated vehicle emissions is non-trivial exercise for which a number of approaches have been proposed. In this paper we examine two estimating techniques one based on [15] which attempts to calculate fuel consumption over each second of the journey and relate emissions produced to fuel used. The other (see section 3.4) is based on the work of [15] and assumes and average emissions rate over a road based on the probable speed of vehicles on that category of road.

Emissions Calculations using a fuel consumption model
A power based instantaneous fuel consumption model for road vehicles was proposed in [15]. The model may be described as follows: where dF = fuel (mL) consumed over distance dx (metres) during time dt(s) α = idle fuel rate (mL/s) β 1 = fuel consumption per unit of energy β 2 = fuel consumption during positive acceleration a = acceleration (m/s), negative when slowing down R t = total force required to drive the vehicle (kN) expressed as follows: Appropriate values are provided in [15] to allow the model to be calibrated with respect to a Ford saloon car, these values were derived from observations made using an instrumented vehicle. This model is used by the authors of this paper to estimate fuel consumed within a given solution to the TSP. The litres fuel consumed are converted to Kg of co2 by multiplying by a conversion factor of 2.317 as specified in [16]. To estimate emissions from a route the model has to be utilised in conjunction with a drive cycle. A drive cycle being a series of data points representing the vehicles speed at given intervals (typically one second in many applications). The authors convert the OSM route into a series of interconnected drive cycles. Data for likely acceleration/deceleration curves is taken from [14]. The drive cycle is built as follows: for each street section establish a likely average speed based upon the OSM category using the values in table 1. -create data points for that street within the drive cycle, speeds are not constant but deviate slightly in cycles derived from TRL data [14] evaluate the action required for each junction (change in speed, stop/restart etc) and plot appropriate data points (using acceleration/declaration curves from the TRL data [14]) The estimated changes in speed required at a junction are based upon the features present at the junction (traffic signals, roundabout etc) and the classification of the incoming and outgoing roads. It is assumed that at any junction having the attributes of a roundabout or traffic signals the vehicle will stop and restart.

Emissions Calculations using a simpler model
The model described in 3.3 requires the construction of a drive cycle, which facilitates an attempt to model junctions, but is computationally expensive. As a contrast a simpler model based on the work of [17] is also tested. This is available as spreadsheet based model from the UK National Atmospheric Emissions Inventory [18].
The model proposed by [17] is an average speed model that is applied to each street section, with junctions being explicitly modelled. This negates the requirement to construct a drive cycle. The model may be described as follows: Where em = the emissions produced as grams of CO2 per km v = speed (kph) a,b,c,d,e,f,g,h,i,h =coefficients that define the specific characteristics of the vehicle under consideration.
Values for a-j are provided within [17] for a range of vehicles. For the purposes of linking this model to the EA under consideration the spreadsheet model has been re-implemented as a set of Java classes. The model is applied to each street within the route, the length of street and class of street being available from the underlying OSM database. The average speed for that class of road is derived from observations within [14]. This is a computationally simpler model, but lacks the detail of that in section 3.3.

Problem Instances
Six problem instances were utilised, each requiring a visit to between 10 and 30 delivery points (addresses within the City of Edinburgh data set, see section 3.1) starting and ending at specific start point. Table 2 shows the respective distances between delivery points. The two data sets known as DS1 and DS2 were utilised their delivery points were chosen at random, two data sets referred to as Ring Road and City Centre were also utilised and two data sets big-20 and big-30 are used to explore longer runs. Ring Road uses delivery points located adjacent to the city's outer ring-road and City Centre used 15 delivery points located within the city centre area. 18.52 1.45 11.65 9.181 Table 2. A summary of the data sets used

The evolutionary algorithm employed
The evolutionary algorithm uses a steady state population of 10 individuals. Each individual is a permutation of the points to be visited within the TSP instance. Within each generational cycle a parent is selected using tournament selection of size 2. A child is cloned from the parent and a mutation applied. The child is copied back into the population, by conducting another tournament and having the child replace the looser.
The fitness function builds a route through the street data visiting the points in the order they appear in the chromosome. To determine the path to be taken between each set of points the A* algorithm is utilised as described in section 3.1. The metric used to cost the route will be as set in section 4.3.

Experimental Method
The EA was executed on each of the four data sets with each of the three routing metrics were used to cost the TSP tours. The metrics used were raw distance and those outlined in sections 3.3 and 3.4. Within the results tables these metrics are referred to as dist, em and sEm respectively. Because of the non-deterministic nature of EAs all experiments were repeated 10 times and the results averaged.
Where results produced using dist and sEm as the evaluation criterion are being evaluated the em metric is applied to the final solution to produce a comparable emissions value.

Results
The results obtained by the methods outlined in section 4.3 are illustrated in table 5. The distances of tours do not increase significantly when the emissions metrics are utilised. Note that in two cases (City Centre and DS2) a slight decrease in the average distance is noted when optimising for emissions. The biggest increase in distance being the 10% increase noted on the Ring Road dataset. Table 3 shows the average emissions (kg/CO2) produced by solutions when optimising for distance and for emissions. When comparing the emissions produced by tours evaluated using the dist and em metrics all of the data sets show an improvement. Less of an improvement is noted when sEm is utilised, in the example of DS1, no improvement is noted. The improvements produced when using the larger datasets (Big-20 and Big-30) are less than the improvement with the smaller data sets. Table 4 compares the emissions values produced by the individual results for each dataset and metric using t-tests. The T-test is used to establish where the difference in results is significant underlying changes. It suggests that the improvements noted in emissions between TSP tours evolved with the dist and em metrics are most significant in the smaller data sets. When optimising for low emissions some increase in distance may be expected as evidenced in table 5. The reduction in emissions is shown in table 3. Table 6 shows how the road categories used in solutions based on raw distance differs from those based on the emissions model. There do not appear to be any general trends, which suggest that a specific class of road is generally utilised more or less when costing the tours using a specific metric. But it should be noted that the Ring Road data set shows a significant switch to roads of the trunk class when optimising for emissions and that all data sets show a slight reduction in their use of unclassified roads when optimising for emissions

Conclusions and future work
The results presented suggest that within the context of the TSP there exist new challenges based upon the use of real-world data and emissions metrics. Of the  Table 6. The effect of routing using the emissions metric by road class (expressed as a %). metrics used sEm (see section3.4) results are broadly similar to those obtained using raw distance, this might be expected given that both methods rely heavily on road weights. The em metric (see section 3.3) appears to reduce emissions further with relatively little increase in distance, the principle difference between the metrics being that em takes account of junctions. It should also be noticed that within the City-Centre data set, very little improvement in emissions is achieved. This data set has delivery points that are on average 1.45km apart, which provides few opportunities for alternative routes that provide a lower emissions factor. Overall it should be noted that the emissions reductions achieved by the EA have been based on the ordering of the points to be visited. The path taken through the streets is determined by the A* algorithm. The improvement is due to the EA evolving tours that incorporate paths with a low emissions cost. There exists further potential for emissions reduction by applying the emissions metric at the path finding stage.
Both of the emissions metrics discussed in this paper have weaknesses, neither of them take into account all of the possible variables which may effect emissions. Further research to determine those variables that most affect emissions is required. Also required is to enhance the underlying map data to include factors such as congestion patterns and gradients. The inclusion of such additional factors (especially those with a dynamic aspect such as congestion) will further increase the complexity of the fitness function. A major challenge is to integrate such techniques into existing EA and heuristics. It is desirable to apply the techniques suggested in this paper to larger and more complex routing problems such as the Vehicle Routing Problem with Time Windows.
The successful use of A*, rather than a heuristic specially designed to build paths that meet low emission criterion suggests the potential to integrate with existing routing services and products. It is anticipated that demand for such services will increase as legislation forces communities and organisations to account for, and reduce emissions.