2. What is APAS?
2
Software service which
generates end-user package
arrival times based on
numerous events (actual and
predicted) that occur during a
delivery
3. Introduction
• Provides predictive arrival times for package
deliveries.
• Accuracy based on telemetry data from numerous
resources (carriers, live traffic streams, GPS
devices).
• Supports a number of heuristic rules to ensure
quality and end-user acceptable predictions.
• Provides an external interface to drop in third-
party predictive services.
• Allows carriers to contribute at run-time to APAS in
heuristics and actual ETA times. For example,
providing length of time to unload a package.
3
4. Contributions
• Research papers – examples:
• “Hybrid Predictive Control Strategy for a public Transport
System with Uncertain Demand”.
• “Integration of Predictive Routing Information with dynamic
Traffic Signal Control”.
• “Agent-Based Approaches to Transportation Logistics”.
• “The Use of Integrated Historical and Predictive Data to
Support Flight Planning by Airline Dispatchers”.
• Studies/Research Organizations
• Committee on New Transportation Systems and Technology.
• Transportation Research Board
• Transit Cooperative Research Program
• Texas Transportation Institute
• Open Source and APIs
• OpenGTS – open GPS management system
• GeoBase – Application Programming Interface
• Existing vendors
• FltAdvisor – predictive arrival for airline flights
• INRIX – traffic information
• GeoBase
4
6. Telemetry Use
• Telemetry helps:
– Determine the current state and
progress of the delivery vehicle.
– Determine the impact of an
event on a predicted value. For
example, how does an event
such as a traffic accident effect
the travel time between two
stops.
6
7. Predicted Arrival Times
• Each generated predicted arrival time
is accompanied by a confidence level:
• Level 1: Highest confidence. Value based
on GPS, accurate distance/travel data,
access to GPS-decoding facility, and traffic
information. We don’t currently generate
level 1 prediction values.
• Level 2: Value based on GPS and access
to GPS-decoding facility.
• Level 3: Value based solely on estimates.
• Level 4: Value based on heuristics
(market site, travel, distance, etc.).
7
8. What is a Prediction?
8
Arrival Time =
∑ dwell + (distance / speed ) + delay
i = m
n-1
i i i i
n
Arrival Time at stop n is the sum of
the dwell time, travel time, and delay
for each stop between the current
stop m and stop n.
Stop m + 1 Stop n - 1Stop m + 2Stop m Stop n…
9. Better Predictions
• A good prediction depends on getting
the best prediction values for:
– Dwell Time: how long a driver remains at
a stop for delivering a package
(unloading).
– Delay Time: amount of time the driver may
be delayed (for example, lunch).
– Distance: distance between two stops.
– Speed: speed of the vehicle.
9
10. Better Predictions
• Additional telemetry data points including
cross-boundaries (route overlaps).
• Better application of heuristics. For
example, multiple sets of heuristics based
on region, population density (city),
carrier, vehicle type, product type,
weather.
• Better application of algorithms derived
from research into predictive arrival.
10
11. Analysis Filter Service
• Transportation studies on predictive
arrival times indicate specific end-
user reactions to arrival values.
• Studies indicate you cannot merely
display every generated arrival time.
• The Analysis Filter Service employs
heuristics described in the
transportation studies.
• The Analysis Filter Service uses the
prediction confidence levels
generated by the Prediction Engine.
11
12. Analysis Filter Service - Example
12
Tracking Screen
Request ETA
Predictive
Engine
Analysis
Filter
Predict Arrival
Prediction:
12/4 at 10:00
Level 4
But it’s scheduled
for 12/1 at 2:00
ETA
12/1 at 2:00
13. GPS
• GPS is used for :
– Current location of a delivery vehicle.
Distance from stop indicated on tracking
web page.
– If the vehicle is in the geozone (vicinity) of
a route stop. Useful for route stops that
do not represent a vendor delivery (3rd
party).
• GPS cannot tell us:
– If we have visited a route stop.
– If we are between two adjacent route
stops since we don’t know the route.
– Speed of the vehicle.
– Traffic congestion.
13
15. 15
GPS: 3rd Party Deliveries
Stop 1 Stop 3Stop 2
GeoZone (virtual boundary)
GPS Activities
Current Stop (location within GeoZone)
Stop 0
16. • Designed to support the processing of
large volumes of telemetry data.
• For fast response, predictions are
calculated at telemetry time, not at
request time.
• Designed to incorporate any number of
additional telemetry streams such as
traffic information sources, traffic alerts,
and third-party data streams.
16
Architecture
17. Architecture: The Carrier Route
17
• Central internal data structure for ETA.
• Sent by the carrier to AgentNet.
• Stored at AgentNet.
• Supports multiple delivery requests.
• Contains deliveries for one carrier.
• Contains deliveries for one driver.
• Stores the predictive (ETA) values.
• Stores all heuristics (e.g. market site
estimates, speed, distance).
Delivery request A Destination
Delivery request B Destination
Dwell Time
Speed to Next Stop
Delay to Next Stop
Travel Time to Next Stop
Predicted Arrival
Predicted Departure
Stop 0
Stop 1
Stop 2
Stop 3
CarrierRoute
Last Stop
Speed Heuristic
Distance Heuristic
Travel Time Heuristic
Last GPS Latitude
Last GPS Longitude
Origin (Cross Dock)
Distance from vehicle
Scheduled delivery
time
18. 18
Architecture: Process
1. Collect And Apply Telemetry
(including prediction generation)
Stop 0
Stop 1
Stop 2
CarrierRoute
2. Provide Predictions
Route construction
and maintenance
Route reference
19. 19
Architecture
Predictive
Analysis Filter
Telemetry
(Data Flow)
Manager
Predictive
Engine
Tracking Screen / End Recipient
1. Receives request for ETA.
2. Requests Prediction from Prediction Engine
3. Analyze results to determine appropriate response.
4. Sends response to end recipient.
Carrier Telemetry
Generate Predictions
Request Prediction
Agentnet
ETA Service
(interface to
external callers)
predict ( tracking number)
20. • The Telemetry Data Flow Manager is
responsible for:
• Collecting Telemetry
• Constructing the appropriate data flows for
supported telemetry types (routes, activities,
GPS, heuristics)
• Executing constructed data flows
• Requesting prediction generation for any
affected routes
• Posting notifications for end-recipient
subscribers
20
ARCHITECTURE: Telemetry Data Flow Manager
21. 21
ARCHITECTURE: Telemetry Processing via Data Flows
Telemetry
DataFlow
Manager
Telemetry Data
GPS
Market-
Site
Estimate
Heuristics
Construct data flow
24. Predictive Heuristics
24
Receive Request (best/worst)
Shipped From DC(best/worst)
Arrived at LDP (best/worst)
Picked Up (best/worst)
Carrier Route
Market Estimate (best/worst)
ReceiveRequest + ShippedFromDC + ArrivedLDP + PickedUpLDP = Market Estimate
Heuristic (in hours)
in transit
25. • Estimations from historical data for:
– Typical vehicle speed
– Typical distance between stops
– Typical travel time between stops
– Typical stop dwell time (e.g. time to unload
packages)
25
Predictive Heuristics
27. • Individual JAR. No longer part of the
“com.agentnet.service” name family.
• Considered at the same level as the “Services” layer in
the AgentNet Architecture.
• Does not access any class in the Service layer (duplicates
a few service classes to accomplish this).
• Name family for the Predictive Service is
“com.agentnet.predictive”.
• For every interface class, there is a corresponding
implementation class with the name “Standard<interface
class name>”. Allows to easily “load” a layer of
associated classes.
• External interface which is available to outside vendors
is “org. smarttransportnetwork.epas”.
• All Agent-based services will use the family name
“org.smarttransportnetwork”.
27
Internals: AgentNet Predictive Service
28. • Predictive codeline is divided into five paths:
– Statistics (package com.agentnet.epas.statistics).
Provides management and processing of statistical
information relating to routes, route-based deliveries,
and predictive events.
– Data (package com.agentnet.epas.data). Provides
management and processing of data associated with
predictive arrival (e.g. telemetry, geozones,
geopoints).
– GIS (package com.agentnet.epas.gis). Provides
abstraction layer for existing geospatial information
systems such as Google and PCMiler.
– Runtime (package com.agentnet.epas.runtime).
Provides runtime processing of the predictive service
including filtering and the prediction engine.
– External interfaces (package
org.natltransportgrid.epas). Interfaces available to
the outside world.
28
Internals: General Code Structure
33. 33
Internals: External Interfaces Code Structure
org.natltransportgrid.epas
service
ETAService
predict(trackingNumber)
Data
(not used)
ETADataManager
www.natltransportgrid.org
34. 34
Internals: Telemetry Handling Process Flow
ETA Data
Manager
Integration
Operation
Handlers
Telemetry
Data Flow
Manager
TelematicsListener
TelematicsQueue
Telemetry Data
(XML conversations)
IntegQueue
collectTelemetry(<telemetry>)
NotificationListener
NotificationQueue
Future Direct Flows
36. • Stores heuristics. Accessed by heuristics telemetry handler. For
example:
[when] city=‘SAN FRANCISCO’ and carrier=‘CMS’ and packageType=‘CABINET’
[then] dwell = 100
• Stores Filter Rules. Accessed by ETA Analysis Filter to apply filter
rules to predictions. For example:
[when] etaFrom > etaPreviousFrom
[then] etaFrom = etaPreviousFrom
• Stores notification rules. Used by notification listener to invoke
end-user subscription rules.
[when] distanceFromStop < 30
[then] sendEmail()
• Agentnet uses Drools 5.0. All rules are managed via the Drools
Guvnor product.
36
Drools: JBoss Rules Engine
37. 37
Internals: Route Database Tables
RouteSearchIndex
Used for searching. Locates a route for a particular delivery leg.
TrackingID Agentnet Tracking Number
DeliveryID ObjectID of corresponding
delivery object containing leg.
RouteID ObjectID of route containing
the delivery leg.
LastPredictedArrivalFrom
LastPredictedArrivalTo
LastPredictedDepartureFrom
LastPredictedDepartureTo
PredictionConfidenceLevel
Route
Stores the route XML string which holds all
predictive information
RouteXML CarrierRoute XML
String
38. 38
Internals: Route Event Database Tables
RouteEvent
Used for searching. Locates a route for a particular delivery leg.
ObjectID Agentnet Tracking Number
AgentnetTrackingNumber ObjectID of corresponding
delivery object containing leg.
RouteID ObjectID of route containing the
delivery leg.
CreationDate
StopAgentnetIdentifier
StopSequence
Reason
EventType
PredictedArrivalFrom
PredictedArrivalTo
PredictedDepartureFrom
PredictedDepartureTo
Dwell
Speed
Distance
Delay
DistanceFromStop
ActualArrival
Actual Departure
Stores prediction history. Used
to determine the accuracy of
EPAS and as the contributor to
the eventual feedback loop. One
row for each prediction change.
Essentially, one row for each
telemetry event.