Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban...

16
Urban Freight Delivery Stop Identification Using GPS Data Xia Yang Department of Civil and Environmental Engineering Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 5107, Troy, NY 12180-3590 Email: [email protected] Zhanbo Sun Department of Civil and Environmental Engineering Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 5107, Troy, NY 12180-3590 Email: [email protected] Xuegang (Jeff) Ban, Ph.D. * Department of Civil and Environmental Engineering Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 4034, Troy, NY 12180-3590 Phone: (518) 276-8043 Fax: (518) 276-4833 Email: [email protected] *Corresponding Author José Holguín-Veras, Ph.D., P.E. Department of Civil and Environmental Engineering Rensselaer Polytechnic Institute, Room JEC 4030, Troy, New York, 12180 Email: [email protected] Number of Words: 4,600 words + 8 Figures + 3 Tables = 7,350 words+18 references Submitted for presentation and publication to the Transportation Research Board (TRB) 93rd Annual Meeting, Washington, D.C. TRB 2014 Annual Meeting Original paper submittal - not revised by author

Transcript of Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban...

Page 1: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

1

Urban Freight Delivery Stop Identification Using GPS Data

Xia Yang Department of Civil and Environmental Engineering

Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 5107, Troy, NY 12180-3590 Email: [email protected]

Zhanbo Sun Department of Civil and Environmental Engineering

Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 5107, Troy, NY 12180-3590 Email: [email protected]

Xuegang (Jeff) Ban, Ph.D. * Department of Civil and Environmental Engineering

Rensselaer Polytechnic Institute, 110 Eighth Street, Room JEC 4034, Troy, NY 12180-3590 Phone: (518) 276-8043 Fax: (518) 276-4833 Email: [email protected]

*Corresponding Author

José Holguín-Veras, Ph.D., P.E. Department of Civil and Environmental Engineering

Rensselaer Polytechnic Institute, Room JEC 4030, Troy, New York, 12180 Email: [email protected]

Number of Words: 4,600 words + 8 Figures + 3 Tables = 7,350 words+18 references Submitted for presentation and publication to the Transportation Research Board (TRB) 93rd

Annual Meeting, Washington, D.C.

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 2: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

2

Abstract

Delivery stop identification is a crucial but challenging step in urban freight performance measurement using second-by-second GPS data. This paper presents the application of a robust learning method, i.e. Support Vector Machine (SVM), in identifying delivery stops using GPS data. Stop duration, the distance to the center of the city, and the binary distance to a stop’s closest bottleneck are extracted as the three major features used in the SVM model. A linear SVM with nested K-fold cross-validation proves to be highly reliable and robust in delivery stop identification, in spite of the imbalance in the number of delivery stops and non-delivery stops. A case study is conducted using second-by-second GPS data in New York City. The identification accuracy for the case study is very high and the average error rates are only around 0.2% for both the training and testing data sets, resulting in only 3 stops misidentified among the 2249 stops in total.

Keywords: Freight Performance Measurement; GPS; Delivery Stop Identification; Support Vector Machine (SVM); Nested K-Fold Cross-Validation

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 3: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

3

Introduction

Freight performance measurement is intended to assist public agencies and private freight shipping companies to monitor and improve freight performances pertaining to mobility, energy and environment impacts. In this paper, the focus is on urban freight that mainly delivers commodities to various locations in urban centers from warehouses. The unique feature of urban freight is therefore “tour-centric.” Here a tour refers to an entire urban freight trip, starting at a warehouse, making multiple deliveries/pickups in the middle, and ending usually at the same warehouse. The deliveries or pickups usually take significant amount of time (from several minutes to a few hours), which are called “delivery stops” in this paper. Correctly identifying delivery stops is essential to characterize urban freight, such as tours, tour durations, delivery times, number of stops, among others. Traditionally, delivery stop identification was done via surveys or driver logs, which is time/resource consuming and can only cover limited urban areas.

Global Positioning System (GPS) data has recently gained popularity in measuring freight performances because of the advantages of GPS units over traditional tools such as loop detectors and traffic cameras. Instead of gathering data from only a finite number of network locations, GPS units can capture continuous vehicle traces. Besides, GPS units are much smaller and less expensive than traditional data gathering tools. However, GPS data also has its own limitations, e.g., uncertainty about vehicle types (although vehicle class may be inferred using traces, see Sun and Ban (2013)), signal loss and spatial inaccuracy caused by urban canyoning (i.e. tunnels, tall buildings, etc.), difficulties for data cleaning (McCormack, et al., 2010; Greaves and Figliozzi 2008; Du and Aultman-Hall, 2007), and so on.

Identifying urban freight delivery stops using GPS data proves to be challenging. Until recently the only data provided by GPS units indicating that a vehicle may have stopped is the absence of any communications between the satellite and the receiver (pings). For example, if the vehicle speed drops below certain value, there will be no pings, indicating a possible vehicle stop. As a result, it may be difficult to make a distinction between vehicle stops (i.e. traffic stops, deliveries, etc.) and signal loss. Furthermore, even after a vehicle stop can be properly determined, one still needs to distinguish between the delivery stops and non-delivery stops. To this end, proper algorithmic techniques need to be applied.

One of the first attempts to discuss the stop identification issue was Du and Altman-Hall (2007), who analyzed GPS data collected from a subset of travelers in Lexington, KY between March 2002 and July 2003 and calibrated it with manual travel logs provided by the participants. Using the two data sets, they identified the heading change (compass direction), dwell time (time elapsed while vehicle speed drops below a certain level), the distance between the GPS points and the network geometry as the main parameters for trip end prediction. It was found that the proper benchmarks for detecting trip ends were a heading change of 180 degrees, and/or a dwell time between 20 and 140 seconds. The study however focused on passenger cars. Since passenger cars typically take less time to park, it is very likely that a lower threshold for vehicle

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 4: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

4

dwell times is acceptable for identifying a trip end of passenger cars. This may not be the case for commercial vehicles.

Recently, Greaves and Figliozzi (2008) developed an algorithm to identify the stops for commercial vehicles. The algorithm analyzed the time difference between GPS-to-satellite communications to determine if the vehicle was stopped. By investigating different thresholds between 120 seconds and 300 seconds, it was found that 240 seconds was an adequate threshold to indicate a stop. In addition to the time threshold, the geographic distance between the locations of a vehicle at consecutive communications was also considered. If the vehicle had moved more than the accuracy rating of the device (e.g., 6 meters), it was determined that the signal had been lost. They also tagged any points where the vehicle position changed less than 6 meters regardless of the time elapsed to identify short stops by manual inspection. The limitation of their algorithm is that many of the results rely on manual inspections, which may be biased and also time-consuming for a large dataset. Their algorithm becomes further distressed in urban areas such as the New York City where a commercial vehicle may have to move several times for the same delivery due to the extremely demanding spatial constraints of the Manhattan traffic network (e.g., numerous one-way streets, tall buildings and pedestrian traffic). Since the algorithm needs to flag such short trips for manual inspection, it may end up manually checking every delivery site.

More recently McCormack et al. (2010) analyzed data from the Seattle, Washington metropolitan area using an algorithm that recorded delivery stops when the vehicle’s dwell time (i.e. time that the vehicle engine is off or idle) exceeded 3 minutes (180 seconds). It was pointed out that in addition to insignificant truck movement, the GPS points tend to fluctuate when a truck idles. To deal with this issue, if the distance between two consecutive data points was less than 65 feet, this instance will be removed. While this algorithm is effective at filtering spurious trips, it also removes data that could be significant for other freight performance measures such as service times (i.e., how long it takes for the truck to unload and start the next trip).

The purpose of this paper is to develop a robust method to identify urban freight delivery stops using fine-grained (second-by-second) GPS data. The data were collected from a trucking company (the name of the company cannot be released due to the non-disclosure agreement signed by the research team with the company), delivering groceries to multiple stores in New York City especially Manhattan. The key technique applied in the algorithm is Support Vector Machine (SVM). SVM is a recently developed classifier, which can be used for two-group or multiple-group classification (Vapnik1995; Bishop 2006). In transportation, SVM has been used for incident detection, signal timing estimation, vehicle classification, regression analysis, and so on (Corinna and Vladdimir, 1995; Fang and Ruey, 2003; Hao et al., 2012; Sun and Ban, 2013). A three-stage algorithm is developed based on linear SVM with nested K-fold cross-validation, which is effective in dealing with the significant imbalance in the distribution of classes (Alexander S., et al, 2005.). The first stage is to identify all the stops based on speeds as recorded in the second-by-second GPS data. In the second stage, three features about stops are extracted,

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 5: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

5

including stop duration, distance to the center of the city, a binary distance to the closest bottleneck such as tunnel, toll booth, and so on. The third stage is the implementation of the linear SVM with nested K-fold cross-validation to classify all stop into delivery stops and non-delivery stops. The classification results based on this three-stage algorithm are satisfactory with only three stops misidentified among a total of 2,249 stops and the average misclassification rates are around 0.2% for both the training and testing datasets.

Introduction of SVM

SVM is a pattern classifier (Vapnik 1995; Corinna and Vladdimir V., 1995). It first represents training data in space so that the points are divided by a hyperplane with the largest separation or margin between the two classes. Such a hyperplane is known as the maximum-margin hyperplane. Then the testing data is mapped into the same space and predicted to belong to which side of the separating hyperplane. For non-linearly separable data, the SVMs uses the kernel method to transform the original input space into a higher dimensional feature space where an optimal linear separating hyperplane is constructed (Fang and Ruey, 2003). Since the linear SVM for two-group classification is sufficiently accurate in identifying urban freight delivery stops, only linear SVMs will be briefly presented in this section. Readers can refer to Vapnik (1998), Burges (1998) and Gunn (1998) for more details of SVM. For linear SVMs, suppose the training data with n data points is denoted by as follows.

Where is a p-dimensional real vector ( ) and is a binary value indicating the class that the point belongs to. is also called the “features” of the SVM. The main task of SVM is to find the maximum-margin hyperplane that clearly divides the two classes as much as possible. A hyperplane can be defined by the following equation:

(1)

Where ‘ ’ denotes the dot product; X is the input vector (X={ }); W is the vector perpendicular to the hyperplane, and b is a constant. Figure 1 is a graphical representation for a simple case with two-dimensional input ( =2) where the hyperplane is reduced to a linear equation in the two-dimensional space.

According to this hyperplane, all the training data must satisfy the following constraints:

(2)

(3)

Which is equivalent to:

(4)

As shown in the above figure, the best hyperplane is the one that, not only separate the data without error, but also maximizes the margin or the distance between the closest vectors in both

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 6: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

6

classes to the hyperplane (Vapnik, 1995). In this paper, the delivery stops (y=1) and non-delivery stops (y=-1) are separated with a p=3 (three features) linear SVM, as presented in Section 3.

Figure 1: Optimal separating hyperplane for a two-dimensional two-class problem

SVM for urban freight delivery stop identification

This section presents the SVM model for urban freight delivery stop identification. A case study is then conducted for GPS data obtained from delivery tours to some grocery stores in the New York metropolitan area. The stores are for a New York City-based chain of small supermarkets, serving a mostly urban customers base. Most stores are within Manhattan including Roosevelt Island except two stores in Brooklyn and Scarsdale. Daily log data, recorded by the delivery vehicle drivers, for these tours are also available, which provide the “ground truth” delivery stops. Table 1(a) and Table 1(b) provide respectively some sample GPS data and log data. The columns of each table are self-explanatory. The latitudes and longitudes information from the GPS data and the store number and name from the log data are purposely removed to protect the privacy of the stores.

Table 1(a): Second-by-second GPS dataset Index Tag Date Time Latitude N/S Longitude E/W Height Speed Heading

54 T 130227 205402 40.557885N 075.634331W 136 6 0

55 T 130227 205403 40.557866N 075.634321W 136 7 0

56 T 130227 205404 40.557844N 075.634306W 136 10 147

57 T 130227 205405 40.557819N 075.634290W 135 10 149

58 T 130227 205406 40.557793N 075.634273W 134 10 149

59 T 130227 205407 40.557765N 075.634259W 134 12 154

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 7: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

7

Table 1(b): Driver’s delivery log

Date

2/27/2013

Store # PC Store

name Commit

time Time in Time out Pieces Weight Time at store

OK/Early /Late

1417 PC Gristedes 5p-11p 6:15 PM 7:00 PM 250 5017 0:45 ok

1422 0 Gristedes 5p-11p 7:30 PM 8:00 PM 307 5349 0:30 ok

1403 0 Gristedes 5p-11p 8:30 PM 9:00 PM 463 8513 0:30 ok

1445 0 Gristedes 5p-11p 9:30 PM 10:00 PM 278 5202 0:30 ok

(Note: some columns in table 2(a) and 2(b) are purposely removed due to the privacy agreements)

A three-stage approach is developed in this section using SVM to identify delivery stops from GPS data. The first stage is to preprocess the daily log data to obtain all the ground truth delivery stops and the second-by-second GPS data to find all the stops, including both delivery stops and non-delivery stops. The second stage is to extract features from GPS data to determine which combination of the features is the most effective to use in the SVM model. The last stage is to implement the SVMs for urban freight delivery identification.

Preprocessing: ground truth from daily log and all stops from GPS data

The daily log is first processed to obtain the actual delivery stops. As shown in Table 1(b), detailed information about delivery stops can be easily obtained from the daily log including the store number, arrival time at each store, and departure time from each store, delivery time, and so on. The results show that there are 42 delivery stops in total and that the minimum delivery time is around 15 minutes. Notice that since the drivers always round the arrival or departure times to the nearest 5 minute, the actual minimum delivery time could vary from 10 minutes to 20 minutes.

As with the second-by-second GPS data, as shown in Table 1(a), it records date and time, latitude and longitude, and speed and heading direction. Date and time should be accurately adjusted to the local time with consideration about daylight saving before further processing the GPS data. Due to the urban canyon effect produced by tall building, long tunnels, etc. A speed threshold of 14 kilometers/hour is used to detect vehicle stops in order to capture all potential stops. Since this threshold speed is relatively high, if a delivery vehicle makes minor movements around the stop location (e.g., move from one parking spot to another, circling to find a parking spot, and so on), multiple vehicle stops may be identified. To resolve this issue, consecutive stops less than 10 seconds apart are combined together as a single stop. This way, issues of idling and minor movements around the stop can be instantly avoided. It was found that the difference in terms of stop durations using speed threshold of 14 kilometers/hour and 0 kilometers/hour is within 30 seconds, which is negligible to the minimum delivery time according to the daily log (10 – 20 minutes). With the above method of data processing, there are 2249 stops in total detected from the GPS data. Obviously most of the identified stops are non-delivery stops while

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 8: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

8

only 42 of them are delivery stops according to the daily logs. This shows a considerable imbalance in class distribution (i.e., 42 delivery stops vs. 2207 non-delivery stops).

Feature extraction for SVMs

The second stage is to extract features from GPS data for implementation of SVM to identify delivery stops from non-delivery stops. A feature is a prominent characteristic of the data that can be used to classify samples into multiple groups. From the daily log, it can be seen that a delivery stop is relatively long and thus stop durations are first extracted as a feature in the SVM model for delivery stop identification. The distributions of stop durations are shown in Figure 2.

Figure 2 shows that stop duration is an important feature for delivery stop identification. However third person still cannot simply distinguish delivery stops from non-delivery stops based on only stop durations, since the two types of stops (the squares and starts) clearly overlap each other. Since a delivery stop is relatively long, it should result in relatively smaller average speed for the entire stop duration. The average speed for the stop duration is thus examined as another feature. The results are shown in Figure 3.

Figure 2: Stop duration of all stops

As shown in Figure 3, it seems that the average speed does contribute to delivery stop identification but still there are some non-delivery stops mixed with delivery stops, even though the percentage is not high. Based on the above figures, it is clear that the biggest challenge lies in identifying long non-delivery stops from delivery stops. By showing all the long stops and all delivery stops in Google Earth, all the delivery stops are concentrated in the New York City while other long non-delivery stops are further away as shown in Figure 4 and Figure 5.

0 500 1000 1500 2000 25000

20

40

60

80

100

120

Stop ID number after data sorting based on stop type

Sto

p d

ura

tion (

min

ute

s)

Non-delivery stop

Delivery stop

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 9: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

9

Figure 3: Stop duration and average speed of all stops

Figure 4: Distribution of stops with duration over 500 seconds

Figure 5: Distribution of all the 42 delivery stops

0 20 40 60 80 100 1200

2

4

6

8

10

12

14

Stop duration (minutes)

Avera

ge s

peed o

f sto

p (

mile

s/h

our)

Non-delivery stop

Delivery stop

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 10: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

10

Therefore, the great-circle distance to the center of Manhattan is chosen as another feature. The formulas for calculating the great-circle distance between two locations are given as follows:

(9) Here r is the earth radius (6,371,009 meters) and is the central angle between the two points which can be calculated as below:

(10)

Here are the geographical latitudes and longitudes of the two points (s and f stans for the two locations, such as the vehicle’s stop location and a toll booth), respectively;

are their absolute differences. The data plotting are shown in the following figure.

Figure 6: Stop duration and distance to the city center

Figure 6 shows that the stop duration and the distance to the center of Manhattan are two features that are very effective to make reliable identification of delivery stops but there are still some overlaps of the two types of stops (the squares and stars). It is highly possible that the number of overlaps would be larger if the data sample is bigger so it is important to figure out how to deal with this problem.

Since a vehicle may dwell at a major bottleneck (such as a toll booth, the entrance to a tunnel or a bridge, etc.) in New York City during its journey for a long time, the distance to its closest bottleneck is extracted as another feature. A binary value is set to imply a stop’s distance to the closest bottleneck: the distance will be recorded as 1 if the great-circle distance is less than or equal to 1000 meters or recorded as 0 otherwise. Here 1,000 meters are obtained by plotting some of the tours again the major bottlenecks. This value is very rough and the SVM results are not very sensitive to this actual threshold. Bottlenecks of all trips close to New York City can be easily found with the help of Google Earth. The bottlenecks are detected, including the two ends of Lincoln Tunnel and the toll booth in Weehawken (Latitude/Longitude: 40.76486/-74.023606).

0 20 40 60 80 100 1200

20

40

60

80

100

120

140

160

180

Stop duration (minutes)

Dis

tance t

o t

he c

ente

r of

Manhatt

an (

km

)

Non-delivery stop

Delivery stop

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 11: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

11

The data plotting of stop duration, the distance to the center of Manhattan, and the binary distance to the closest bottlenecks is shown in Figure 7.

Figure 7 Stop duration, distance to the center of city, and distance to closest bottleneck

From Figure 7, it can be seen that the stop duration, the distance to the center of Manhattan, and the stop’s binary distance to the closest bottleneck are three features that are the most effective to identify delivery stops. In this paper, therefore, they are selected as the major features for the proposed SVM model.

Implementation and results

As mentioned in section 3.1, there is a significant imbalance in the number of delivery stops and non-delivery stops from GPS data. There are much more non-delivery stops than delivery stops: 2249 stops were identified from the GPS data while only 42 delivery stops were listed from the daily log data. Such an imbalance in data will cause issues in SVM classification in general. Many previous effects were made on classification data with imbalanced class distribution and different approaches have been proposed, including the data-level approaches such as the random sampling method (Chawla et al, 2004; Chawla, et al, 2002; Zhou and Liu, 2006), the algorithm approaches such as applying different penalty terms for different classes in SVM (Lin et al., 2002), the nested K-fold cross validation method (Alexander et al, 2005), and so on. In this paper, a linear SVM with nested K-fold cross-validation will be implemented for delivery stop identification. As concluded in Alexander et al (2005), the Nested K-fold cross-validation could produce satisfactory estimation in the outer loop and model selection in the inner loop for classification with imbalanced classes (see the pseudo code below).

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 12: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

12

Figure 8: SVM with nested K-fold cross-validation (dashed box indicates the inner loop)

In this paper, third person implemented the linear SVM with nested 10-fold cross-validation, ( . Besides, m is also set as 10. The results are shown in Table 2. Notice that the misclassification rate is defined as the ratio of the number of misclassified stops and the total number of stops; false positive is defined as the number of non-delivery stops misclassified as delivery stops; false negative is defined as the number of delivery stops misclassified as non-delivery stops.

Table 2: Results for delivery stops identification using GPS data

i Training dataset Testing dataset Error rate False positive False negative Error rate False positive False negative

1 0.0025 2 1 0.0024 0 0 2 0.0022 2 1 0.0022 0 0 3 0.0021 2 1 0.0021 0 0 4 0.0021 2 1 0.0021 0 0 5 0.002 1 1 0.002 1 0 6 0.002 2 1 0.002 0 0 7 0.002 2 1 0.002 0 0 8 0.002 2 1 0.002 0 0 9 0.002 2 1 0.002 0 0 10 0.002 2 1 0.002 0 0

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 13: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

13

The above table shows that the linear SVM with nested K-fold cross-validation are highly reliable and robust in delivery stop identification using second-by-second GPS data. The final average performance is very satisfactory with an error of around 0.2% for both the training and testing datasets. The number of false positive is 2 (most cases) and the number of false negative is 1 for all training data; both false positive and false negative are 0 or 1 (only 1 case) for the testing datasets.

The identified delivery stops can be used for stop analysis based on GPS data. For the case study, the deliveries were both for regular hours (6am ~10pm) and off hours (10pm~6am) for four grocery stores. After the delivery stops are identified, the average duration of delivery stops can be computed as shown in table 3.

Table 3: Delivery stops analysis for four stores

Time period NO. of stops

Average duration (minutes)

Standard Deviation of stop duration

(minutes)

Maximum stop duration(minutes)

Minimum stop duration (minutes)

All time periods 27 45.78 16.68 92.92 22.52 Regular-hour 7 51.39 13.66 68.35 32.52

Off-hour 20 43.82 17.5 92.92 22.52

The above table shows that off-hour deliveries could help to reduce average delivery times at the four stores although the standard deviation of off-hour delivery times is a little bit higher. Based on the identified delivery stops, other freight performances such as fuel consumption and emission can also be analyzed. The authors are working on this and results will be shown in subsequent papers.

Discussions

In this section, third person briefly discuss some key issues related to the development of the SVM method for freight delivery stop identification.

Preprocessing to avoid the problem of double parking or idling

A big problem of delivery stop identification is idling. To deal with this problem, a high speed threshold (14 kilometers/hour) is first used to identify a stop. Two successive stops less than 10 seconds apart are then combined, which is easy to implement. It turns out that even with speed threshold set as high as 14 kilometers/hour, the stop duration deviation is within 30 seconds compared with 0 kilometer/hour, which is negligible to the actual delivery stop duration. Furthermore, the delivery stop duration can be corrected or adjusted after the delivery stop identification in the last step. It is obvious that the issue of minor movements at stores is also solved by the preprocessing of GPS data. On the other hand, this method might not be suitable for deliveries in extremely congested areas, resulting in double parking after circling around in a large scale. This extreme case, however, barely exists in reality because delivery companies always prefer to pay fines instead of circling for a long time to find a normal parking.

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 14: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

14

Manual detection of major bottlenecks

The binary distance to a stop’s closest bottleneck is chosen as the third feature of the SVM model to classify stops, which requires manual detection of major bottlenecks. To reduce the manual efforts, only major bottlenecks that are on the delivery tours and close to the delivery region, New York for the case study, should be inspected. Google Earth can be used to shown the traces of second-by-second GPS data. Those bottlenecks could then be easily detected. Still, this process requires some manual work which is the drawback of this algorithm, which, however, can also guarantee the quality of the results.

Class imbalance problem

As aforementioned, the number of non-delivery stops is always much larger than the number of delivery stops. A non-delivery stop could be caused by various reasons such as traffic lights, congestion, tolling, waiting for ferry and so on, resulting in high frequency of non-delivery stops. Most standard classification methods tend to produce better results for the majority class. In this paper, the application of the nested K-fold cross-validation solved this problem. The results show that the linear SVM with nested K-fold cross-validation is reliable in delivery stop identification. Therefore the method is effective in addressing the issue of class imbalance problem.

Benefits of applying robust learning methods

The process of constructing SVM and the results in Section 3 highlight the importance of applying robust learning methods, in this case the SVM method, for delivery stop identification and for freight performance measurement using GPS data in general. Such learning methods are highly adaptive and can learn key model parameters from the data. In essence, they learn from the data the best combinations of the thresholds of the three features used in the SVM model. Such thresholds might be manually or automatically determined via experimental studies, e.g., in Greaves and Figliozzi (2008) and McCormack et al (2010). However those simple methods suffer from at least two drawbacks. First, this requires significant efforts, sometimes manual for trials and errors to determine the thresholds. Second and more critical, the methods can only produce simple combinations of the thresholds: for example (for a two-feature SVM), “if feature A is less than 100, and (or) feature B is more than 200, the stop is a delivery stop.” In reality, the best combinations of the features could be more complicated, e.g., “If (i) feature A is between 0 and 100, and feature B is between 100 and 200; or (ii) feature A is between 100 and 200, and feature B is more than 200, the stop is a delivery stop.” In this case, simple, intuitive methods will have difficulty to determine those thresholds. Robust learning methods such as SVM however can easily deal with those cases by learning both the structure and the actual thresholds. They will be more beneficial to use in case the separating hyperplane is nonlinear, for which case the simple intuitive method will obviously fail to work.

Notice that similar to the previous simple methods, some threshold values are also needed to construct the SVM model. For example, during the preprocessing phase, 14 KPH is used determine a stop and 10 seconds is used to combine consecutive stops. These threshold values

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 15: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

15

however are straightforward and can be readily set by looking at the data. Moreover, they are also needed by the previous simple, intuitive methods.

Conclusions and future research directions

In this paper, third person studied the feasibility of using SVM with nested K-fold cross-validation to identify urban freight delivery stops using second-by-second GPS data. A three-stage algorithm was developed including preprocessing of the GPS data, feature extraction, and implementation of the SVM. The features that are extracted consist of stop duration, the stop’s distance to the center of the city, and the stop’s binary distance to its closest bottleneck. To resolve the class imbalance problem, nested K-fold cross-validation was used in the SVM training process. A case study was conducted and the classification results based this three-stage algorithm was highly reliable with an average error rate of around 0.2% for both the training and testing datasets.

The three-stage SVM model proposed in this paper can be applied to urban freight delivery stop identification, especially to deliveries that are made for small supermarkets or other deliveries with relatively large stop duration and relatively concentrated delivery destination areas. Future work should be conducted to test the SVM-based method on more urban freight GPS datasets to further improve and validate the model.

The results from the SVM-based freight delivery stop identification can be used to analyze the urban freight delivery performances such as mobility (speeds, travel times, delivery times, etc.) and fuel consumption and emissions. The authors are working on this, particularly for the purpose of evaluating the freight performances for off-hour deliveries (Holguín-Veras et al., 2010). Results will be presented in subsequent papers.

The SVM model developed in this paper represents the first step of using robust learning methods to explore large urban datasets (GPS data in this case) for urban freight performance assessment. With the advent of urban BIGDATA, the authors believe that such a robust learning based, data driven method may have great potential for urban freight performance measurement and urban transportation modeling and management in general.

Reference

1. Alexander, S., Ioannis, T., Yerbolat, D., Constantin, F. A., 2005. GEMS: A system for automated cancer diagnosis and biomarker discovery from microarray gene expression data. International Journal of Medical Informatics 74, 491-503

2. Burges, C.J.C., 1998. A tutorial on support vector machines for pattern recognition. Data Mining and Knowledge Discovery 2 (2), 121-167. Available from http://svm.first.gmd.de

3. Bishop, C.M., 2006. Pattern Recognition and Machine Learning, Springer. 4. Corinna, C., Vladdimir, V., 1995. Support-Vector Networks. Machine Learning 20, 273-297 5. Du J., Aultman-Hal,l L., 2007. Increasing the accuracy of trip rate information from passive

multi-day GPS travel datasets: Automatic trip end identification issues. Transportation Research Part A, 41, 220-232.

TRB 2014 Annual Meeting Original paper submittal - not revised by author

Page 16: Urban Freight Delivery Stop Identification Using GPS Datadocs.trb.org/prp/14-3553.pdf · Urban Freight Delivery Stop Identification Using GPS Data ... (i.e. time that the vehicle

16

6. Richardson, E., Ban, X., Holguin-Veras, J., 2013. Identifying and Classifying Freight Trip Stops from GPS Data. 92th Annual Meeting of Transportation Research Board, Washington, D.C.

7. Gunn, S., 1998. Support vector machines for classification and regression. Technical Report, Image Speech and Intelligent Systems Research Group, University of Southampton, UK. http://www.isis.ecs.soton.ac.uk/resources/svminfo

8. Greaves, S. P., Figliozzi, M., 2008. Collecting Commercial Vehicle Tour Data with Passive Global Positioning System and Technology. Transportation Research Record: Journal of the Transportation Research Board, No. 2049, TRB, National Research Council, Washington, D.C., pp. 158-166.

9. Hao, P., Ban, X., Bennett K., Ji, Q., Sun, Z., 2012. Signal timing estimation using sample intersection travel times. IEEE Transactions on Intelligent Transportation Systems, 13(2), 792-804.

10. Holguin-Veras, J., Ozbay, K., Kornhauser, A., Shorris, A., Ukkusuri, S., 2010. Integrative freight demand management in the New York city metropolitan area, Report submitted to the United States Department of Transportation. Internet Link (Accessed on July 28, 2013): http://transp.rpi.edu/~usdotp/OHD_FINAL_REPORT.pdf.

11. McCormack, E. D. et al., 2010. Developing a GPS-Based Truck Freight Performance Measure Platform, WSDOT research report, pp.9-20

12. Chawla, N.V., Japkowicz, N., Kolcz, A., 2004. Editorial: special issue on learning from imbalanced data sets. SIGKDD Explorations Special Issue on Learning from Imbalanced Datasets 6 (1), pp.1-6.

13. Chawla, N., Bowyer, K., Hall L., Kegelmeyer, W.P., 2002. SMOTE: synthetic minority over-sampling technique. Journal of Artificial Intelligence Research 16, 321-357.

14. Vapnik, V.N., 1995. The nature of statistical learning theory. Springer-Verlag, New York. 15. Sun, Y., Mohamed, K.S., Andrew, K.C. Wang, W., 2007. Cost-sensitive boosting for

classification of imbalanced data, Pattern Recognition 40, 3358-3378 16. Lin Y., Lee Y., Wahba, G., 2002. Support vector machines for classification in nonstandard

situations, Mach. Learn 46, 191-202. 17. Zhou, Z., Liu, X., 2006. Training cost-sensitive neural networks with methods addressing

the class imbalance problem. IEEE Trans. Knowledge and Data Engineering18 (1), 63-77. 18. Sun, Z., Ban, X., 2013. Vehicle Classification Using Mobile Traffic Sensors, Resubmittal to

Transportation Research Part C.

TRB 2014 Annual Meeting Original paper submittal - not revised by author