<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Intermodal public transit routing using Linked Connections</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pieter Colpaert</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alejandro Llaves</string-name>
          <email>allaves@fi.upm.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ruben Verborgh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oscar Corcho</string-name>
          <email>ocorcho@fi.upm.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Erik Mannens</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rik Van de Walle</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ghent University - iMinds - Multimedia Lab</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ontology Engineering Group - Universidad Politécnica de Madrid</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Ever since public transit agencies have found their way to the Web, they inform travelers using route planning software made available on their website. These travelers also need to be informed about other modes of transport, for which they have to consult other websites, or for which they have to ask the transit agency's server maintainer to implement new functionalities. In this demo, we introduce an affordable publishing method for transit data, called Linked Connections, that can be used for intermodal route planning, by allowing user agents to execute the route planning algorithm. We publish paged documents containing a stream of hops between transit stops sorted by departure time. Using these documents, clients are able to perform intermodal route planning in a reasonable time. Furthermore, such clients are fully in charge of the algorithm, and can now also route in different ways by integrating datasets of a user's choice. When visiting our demo, conference attendees will be able to calculate intermodal routes by querying the Web of data using their phone's browser, without expensive server infrastructure.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web</kwd>
        <kwd>Linked Open Data</kwd>
        <kwd>Linked Data Fragments</kwd>
        <kwd>public transit</kwd>
        <kwd>smart cities</kwd>
        <kwd>route planning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Public transit agencies inform travelers using route planning software made available on
their website. However, for every public transit agency they intend to use for their travel,
they would have to consult a different website, in which they need to look up connecting
trips. Furthermore, the way travelers want their route planning advice to be calculated
is diverse, going from calculating routes with the nicest pictures on social networking
sites [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], to finding routes which are feasible with a certain disability.
      </p>
      <p>
        Linked Data Fragments [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is a conceptual framework that captures all Web APIs
to RDF on an axis (Figure 1) to discuss the trade-offs between efforts done by the data
publishers versus efforts by the data consumer. On the far-most right point of the axis,
public transit agencies have chosen to allow HTTP clients to access a route planning
service. In this case, the server is doing all the effort, and it will always, in some way,
restrict the way user agents are able to plan routes. On the far-most left point of the
data
dump
generic requests
high client effort
high server availability
      </p>
      <p>Linked
Connections
route planning</p>
      <p>result
specific requests
high server effort
low server availability
Linked Data Fragments axis, data dumps of the transit schedules enable full flexibility.
In this case, user agents execute the route planning algorithm on client-side, with the
drawback that the effort that is required from user agents is high.</p>
      <p>In this demo, we show that we can find a solution in the middle, which combines
best of both worlds. We first discuss the related work, we then describe the point on the
axis we have chosen and introduce the tools developed as part of the Linked Connections
framework, and finally, we describe the set-up of the demo.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        In related work, a demo was given by choosing a different point on the Linked Data
Fragments axis for the problem of solving SPARQL Queries. The solution introduced
Triple Pattern Fragments (TPFs) to enable the client to perform reasonably fast joins [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
This way, a low-end computer (Raspberry Pi) was able to host DBpedia, while offering
the client the possibility to reliably solve Basic Graph Patterns (BGPs). In a similar way,
this demo addresses route planning systems. Instead of focusing on high availability, our
main goal is to let user agents stay in control of the route planning algorithm and to offer
a way of combining different sources into intermodal route planning advice. In order
to plan routes through a public transit system, recent research is slowly moving away
from traditional shortest path algorithms such as Dijkstra or A* in favor of algorithms
that work on top of the specific structure of transit schedules [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], or on top of a sorted
list of connections [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. These works, however, focus on creating algorithms optimized
for one machine. This demo instead implements the basic Connection Scan Algorithm
(CSA) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] using distributed data through HTTP.
      </p>
      <p>The General Transit Feed Specification (GTFS)3 specifies the headers of 13 types of
CSV files, describing the schedules using a set of rules. In recent years, GTFS gained
a lot of popularity, thanks to its simplicity and its adoption in popular route planning
systems such as Open Trip Planner, Navita.io, Google Maps or RRRR Rapid Real-time
Routing. It is typically used as an exchange format: after downloading, existing tools
convert the data to an in-memory, algorithm specific, structure. To update GTFS-files
with real-time updates, GTFS-RT was created: a specification for a file that can be
downloaded regularly, which includes a set of updates. In order to link the terms and
identifiers of GTFS and its files with the Linked Open Data cloud, we have created
3 https:// developers.google.com/ transit/ gtfs/
Linked GTFS4. It helps transit agencies to provide context to the HTTP clients when
executing the route planning by e.g., linking to the gtfs:Route5 a vehicle follows, adding
a gtfs:headsign, or indicating the type of the vehicle with a gtfs:RouteType.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Linked Connections</title>
      <p>Linked Connections define a way to publish raw transit data, so that it can be used
for intermodal route planning. Instead of solving each route planning query on the
server-side Linked Connections enables route planning with a linear growing number of
fragments with the number of connections.</p>
      <p>
        A connection, in the context of this paper, is a hop from one transit stop to another.
A connection is defined by an indication of the location and time of departure, and an
indication of the location and time of arrival. Connections can be extracted from a set of
rules, called a transit schedule, such as a GTFS dump. When all the connections of a
certain transit system are available in one sorted (e.g., descending by departure-time)
array, the basic CSA algorithm [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] can scan the list once and come up with the earliest
arrival times for all stops. The results of the evaluation of extensions of this algorithm
presented in their paper, seem promising.
      </p>
      <p>A Linked Connection is a representation of a connection on the Web. It contains
the data needed to define a connection, as well as useful links to other resources: e.g.,
links to GTFS terms, links to Linked Connections from different transit agencies, links
to accessibility information, or links to nearby points of interests on geonames. In our
implementation, we have published a sorted (by departure time) array of Linked
Connections, as illustrated in Figure 2, using paged documents with hydra:nextPage6 links.
The array of sorted connections needed for CSA, now became a stream of connections
which can be downloaded from the Web as the algorithm advances. For multimodal
route planning, Linked Connections from different transit modes can be downloaded in
parallel and merge-sorted just in time.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Demonstrator</title>
      <p>The demonstrator can be viewed at http:// demo.linkedconnections.org/ 7. When visiting
the page, a map is served on which transit stops can be selected for various intermodal
systems across the world. When both the start location and arrival destination are chosen,
the algorithm will be executed. It will start downloading connections, until the earliest
arrival time is found. In the process, the progress of visited transit stops will be visualised
on the map.
4 Linked GTFS is available at http:// vocab.gtfs.org/ terms. Mapping scripts to transform a
GTFS file to Linked GTFS is available as open source at https:// github.com/ OpenTransport/
gtfs-csv2rdf
5 gtfs: is a prefix that can be expanded to http:// vocab.gtfs.org/ terms#
6 hydra: is a prefix that can be expanded to http:// www.w3.org/ ns/ hydra/ core#
7 The source code can be found at https:// github.com/ linkedconnections</p>
      <p>nextPage</p>
      <sec id="sec-4-1">
        <title>Page 1</title>
      </sec>
      <sec id="sec-4-2">
        <title>Page 2</title>
      </sec>
      <sec id="sec-4-3">
        <title>Page 3 ...</title>
        <p>time
nextPage</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this demo, we applied the Linked Data Fragments axis to the problem of intermodal
route planning by introducing Linked Connections. We implemented a paged document
containing a sorted list of connections between two transit stops, published on the Web.
This way, we enable user agents to execute the route planning algorithm, and download
connections from different agencies in parallel. Furthermore, this paged document has
a finite amount of URLs per day. This results in better caching possibilities and thus
lower server costs, compared to route planning APIs which execute the algorithm on the
server-side.</p>
      <p>The drawbacks are higher bandwidth consumption and slower results, as more data
needs to be downloaded. Nevertheless, the HTTP clients can precache data, can show
the results as the algorithm advances (streaming results) and/or calculate the routes on
the application’s server-side.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D.</given-names>
            <surname>Delling</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Pajor</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R. F. F.</given-names>
            <surname>Werneck</surname>
          </string-name>
          .
          <article-title>Round-based public transit routing</article-title>
          .
          <source>In Proceedings of the 14th Meeting on Algorithm Engineering and Experiments (ALENEX'12)</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>J.</given-names>
            <surname>Dibbelt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Pajor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Strasser</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Wagner</surname>
          </string-name>
          .
          <article-title>Intriguingly Simple and Fast Transit Routing</article-title>
          .
          <source>In Experimental Algorithms</source>
          , pages
          <fpage>43</fpage>
          -
          <lpage>54</lpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>D.</given-names>
            <surname>Quercia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schifanella</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Aiello</surname>
          </string-name>
          .
          <article-title>The shortest path to happiness: Recommending beautiful, quiet, and happy routes in the city</article-title>
          .
          <source>In Proceedings of the 25th ACM conference on Hypertext and social media</source>
          , pages
          <fpage>116</fpage>
          -
          <lpage>125</lpage>
          . ACM,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Hartig</surname>
          </string-name>
          , B. De Meester,
          <string-name>
            <given-names>G.</given-names>
            <surname>Haesendonck</surname>
          </string-name>
          , L. De Vocht,
          <string-name>
            <given-names>M. Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          , E. Mannens, and R. Van de Walle.
          <article-title>Low-cost queryable linked data through triple pattern fragments</article-title>
          .
          <source>In Proceedings of the 13th International Semantic Web Conference: Posters and Demos</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Hartig</surname>
          </string-name>
          , B. De Meester,
          <string-name>
            <given-names>G.</given-names>
            <surname>Haesendonck</surname>
          </string-name>
          , L. De Vocht,
          <string-name>
            <given-names>M. Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          , E. Mannens, and R. Van de Walle.
          <article-title>Querying Datasets on the Web with High Availability</article-title>
          .
          <source>Proceedings of the 13th International Semantic Web Conference</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>