5. The Focus…
Travel & Transport (Manchester)
Open Data
Open Source
Metrolink System (25 Million Journeys p/a)
Tech: Not Only SQL
• Neo4J
Experiment with Graph database as way of
modeling a travel network
Everything in the Cloud (AWS)
8. Tram Data…
Tabular Data in text file (General Transit Feed Specification)
250 Cities publish GTFS data
http://www.gtfs-data-exchange.com/agency/mta-new-york-citytransit/
Stops
Stop_id
Stop
Times
Trip_id
Trips
Service_id
Route_id
Routes
Calendar
9. Earliest Arrival Time Problem
Earliest Arrival Time (EAT) attempts to find the path through a
network from source to destination, such that given a start time T
we arrive at the destination at the earliest possible time after T.
15. Different Graph at each point in time…
Example: A -> E
A
B
D
C
E
9:30 AM / Friday
F
16. Different Graph at each point in time…
Example: A -> E
A
B
D
C
E
9:30 AM / Saturday
F
17. Different Graph at each point in time…
Example: A -> E
A
B
D
C
E
10:00 AM / Saturday
F
18. Modeling Time
Time Expanded Model
• Model temporal events as Nodes –
– Arrivals
– Department
– Transfers
• Duration as edge weight, use Dijkstra to find EAT
Time Dependent Model
• Model temporal data as properties
• Model all distinct routes with 2 Node types –
Station
Station Route
• Use modified Dijsktra to perform Travel Time Function
during traversal
24. Path Expander
The traversal framework use PathExpanders to discover
the relationships that should be followed from a
particular path to further branches in the traversal.
public class TripPathExpander implements PathExpander<GraphState>
{
public Iterable<Relationship> expand(…) {
}
}
27. Traversal Framework
Declarative Java API
It enables the user to specify a set of constraints that limit the parts
of the graph the traversal is allowed to visit
Can specify which relationship types to follow, and in which
direction (effectively specifying relationship filters)
Can specify a user-defined path evaluator that is triggered with each
node encountered