AN IMPROVED METHODOLOGY TO DETERMINE THE WIGGLE FACTOR : AN APPLICATION FOR SPANISH ROAD TRANSPORT

The Wiggle Factor (WF) is a correction factor defined as the ratio between the real distance travelled by road and the straight line between the two points. It is commonly used to estimate route distances for land transport. Though WF is an approximation, certain degree of accuracy is required, because it is frequently used to calculate fuel costs (which represent approximately half of the total truck costs). Performing a statistical analysis with more than 10.000 routes, this article shows that the most common Wiggle Factor (1.2) is not a good approximation for Spanish roads, thus two different WF are presented: the first WF (1.36) characterizes mainly road infrastructure in rural areas while the second WF (1.29) characterizes high-capacity roads (typically motorways). In addition, we present a methodology to easily calculate a WF that can be applied to other countries or specific zones.


INTRODUCTION
Today, measuring distances between two points is available to everyone.There are numerous solutions that allow a basic internet user to know the distance between two points when given either the address (including postcode, name of the city, etc) or the coordinates.It is also a simple task to obtain the actual distances and even alternative routes.This context is perfect for the proliferation of solutions to optimize transport distances.There are many solutions to vehicle routing problems (VRP), but all of them require to locate customers and suppliers on a graph, to calculate the distances between them.
With a very high number of clients, the straight line distances can be easily obtained, while finding the actual distances between points can be an arduous task.Some mathematical approaches were developed and improved since the 60s (Christofides et Eilon, 1969;Love et Morris, 1979y 1988;Berens et Körlig, 1985;Stokx et to obtain information about traffic conditions in order to establish optimal routes.The decision to take the optimal route is based in some "congestion indicators" for each road segment in the travel; the length of these straight segments has been corrected using a WF. Another example of application was in a GPS system, to better match the travel distances "off road", i.e. journeys roads not included in digital maps (Eibl, 1993).
The main advantage of a WF against a mathematical approach is its simplicity, as sometimes ease of calculation and intuitive formulation could be as important as accuracy.

OBJECTIVE
The aim of this paper is to establish a methodology for calculating a WF to suit specific needs.
To show the use of this methodology, a series of WF values are calculated for the mainland of Spain.

METHODOLOGY
The process is divided into three stages:

Selection of key points to calculate distances
The selected points depend on the type of path you want to analyze.
If a general WF is required a good option is to choose random points.However, if one wants to analyze a particular type of infrastructure, only points connected by one of those should be chosen.
If the points are too close, non-representative values could be obtained, thus one should choose them separated enough (with a minimum distance) and never in the same town.

Getting straight line and road distances
Straight distances can be easily calculated either by using spherical trigonometry or more accurate methods like Vincenty formulae (Vincenty, 1975).
To find distances by road, a simple and feasible option is to use GPS navigation software or a route calculation system.

Calculation of WF and analysis of results
The WF for each path is obtained by dividing the road distance by the straight-line distance.Thus, by analyzing a significant number of routes, a general WF can be found averaging individual WFs.

WF in Spanish roads
To determine this value we have followed the methodology presented above.The goal is to get two factors, one for any pathway and another exclusively for high-capacity routes (typically motorways).

Selection of key points to calculate distances
To obtain the first WF, 149 random points were selected, which generated over 11,000 routes.
For the second, 47 capitals of province generated 1,081 routes.

Getting straight line and road distances
The straight line distances were obtained using the coordinates and the Haversine formula (Robusto, 1957).This formula (Equation 1.1) uses spherical trigonometry to find the shortest distance, so an error is committed considering that the Earth is a sphere.This error is not significant if the points have similar latitudes.Road distances were obtained using the APIs (Application Programming Interfaces) of Google Maps.Supplying the coordinates of two points, these APIs return the distance in kilometers between them.This requires sending the Google Maps servers a query like this: http://maps.googleapis.com/maps/api/distancematrix/json?origins=|lat1,lon1&destinations=|lat2,lon2 Where Lat1, Lon1, Lat2 and Lon2 are the coordinates to the points for which distance is requested.

Calculation of WF and analysis of results
A WF value was calculated for each route by dividing the actual road distance by the straight line distance.
A regression analysis was performed, in the next charts (figures 2 and 3) and will be detailed the results: The R2 value shows a good level of adjustment, higher than 0,97 in both cases.
The results were processed using SPSS and R, two statistical analysis software.In table 1, mean and Standard deviation have been calculated for each case.The results show that both mean and deviation are higher in the first case.
In addition, it has been found that the distribution of the variable corresponding to the different WFs does not fit any standard probability distribution.
In the figure 4, it has been represented the mean of the wiggle factor for each 5km interval of straight line distance.According to the chart, in straight line distances upper than 50km it is seen a clearly stabilization while in lower distances there are more variation in the WF.

DISCUSSION AND FUTURE RESEARCH
The Cooper's WF value 1.2 is the most widely used to date.In this paper we demonstrate that it is not a good approximation for the Spanish road infrastructure.
Most of the Spanish area (84.2%) is considered rural (INE, 2012).Thus, the first WF (1.36) characterizes mainly road infrastructure in these areas while the second WF (1.29) characterizes high-capacity roads (typically motorways).
Therefore, for rural areas the first one must be used while the second one would be most suitable for long haul using high-capacity roads.Using a WF is not recommended for urban transport no distances lower than 50 km.Furthermore, using the proposed methodology, different WF values can be easily calculated for specific geographical areas or infrastructure, which helps improving accuracy.
Future research could focus on the calculation of various WF with different levels of detail, or even different infrastructures such as railways.

CONCLUSIONS
In this paper we have presented a methodology to calculate a Wiggle Factor for any situation.This methodology is simple enough to be applicable to other geographic areas without any specific software tool, which makes it very useful in cases when one tries to optimize transportation routes quickly and economically.
Moreover, the paper presents an update of the WF value in Spain, distinguishing two variants for different contexts.