# Raptor Algorithm: Differences between trip and route

I'm reading Microsoft's white paper "Round-Based Public Transit Routing" (the RAPTOR algorithm). In this algorithm, there are some definitions that I don't understand:

trip represents a sequence of stops a specific vehicle (train, bus, subway, . . . ) visits along a line

Each route consists of the trips that share the same sequence of stops.

So, if I understand, trip means a "bus route" and a route is collection of trips to make a path? If my guess is true, why does it state:

Typically there are more routes than trips

And if a route is just a collection of trips, how can I build all routes?

Trip represents a sequence of stops plus associated arrival and departure times on each stop.

Group all trips by their sequence of stops, ignoring the time information, then each group of trips sharing the same sequence of stops forms a route.

eg. for air traveling, each flight is a trip, while each airline is a route, grouping all flights flying on the same airline.

What I saw in the paper is

Typically, there are many more trips than routes.

Which is obvious since there is an one-to-many mapping between route and trips.

• Woa. thanks so much. I'm reading this paper for many days. and It seems that rarely document I can search for this paper. I try so hard to understand trip and route but cannot. As you said, more trips than routes, and that's my typos :) I search many places for sample implementation or more detail document about this algorithm but cannot. Can you propose for me a sample implementation or some document more detail in this algorithm than original paper. thanks :) Sep 2, 2015 at 17:57
• If you are interested in delving in a little more, I would defiantly familiarise yourself with GTFS. Once you understand how transit schedules are structured, a lot of the concepts described in the paper will make more sense to you. Oct 7, 2015 at 21:53

Be careful, as the definition of route given in this paper does not seems to match the definition given in other standards (namely, GTFS). In GTFS a route is a somehow arbitrary collection of trips, but they do not have to share the exact same pattern of stop sequence (and they usually don't).

What the paper describes for a route is sometimes called a route pattern — a set of trips sharing an exact identical stop sequence.