Skip to content

faq 44498955

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Transit router not working as expected

by Andrés Felipe Gómez Moreno on 2016-02-03 00:54:01


Hello everyone.

I have a question about the functioning of the transit router. I created a test scenario with three stops end two lines: Line 1 have a route (1) from the first stop to the second, and another route (2) from the second stop to the third; the Line 2 has only one route (1), which is a direct connection between stops 1 and 3.

There is just one agent, which ends a dummy activity at 5:55am. Line 1 route 1 has one departure at 6am and takes, according to the simulation like 30 seconds to reach the destination stop. Line 1 route 2 has one departure at 6:05am and takes around a minute to reach the destination stop (3). Line 2 route 1 has a departure 6:40am.

Although one would expect the agent to take line 1 route 1, and then line 1 route 2 to reach the destination at stop number 3, this person chooses to walk the entire way to stop 3, which takes 36 minutes, much longer than the pt trip.

If I change the schedule so that line 1 route 2 departs at 6:10, the agent is able to WALK to the second station and take line 1 route 2, arriving at the stop 3 at 6:11am.

However, if I change the plans file so that the destination of the agent is station number 2, the agent decides to take line 1 route 1 to reach the destination.

Why isn't the agent making the connection to reach station number 3?


Comments: 2


Re: Transit router not working as expected

by Andreas Neumann on 2016-02-03 09:29:34

Hello Andres,

I understand that line 2 route 1 can be dropped from the agent's choice set since its departure is at 6:40, i.e. well after the arriving time of the direct walk.

This leaves two routes

line1 route1 from 1 to 2 departing 6:00 arriving 6:30

line1 route2 from 2 to 3 departing 6:05 arriving 6:06

I further understand that the agent will take line1 route2 to reach a destination close to stop 2.

Assuming that the departure and travel times stated from the mobility simulation match those in the transit schedule, I would first double-check the configuration of the TransitRouterConfig. Most likely the transit router tries to avoid transfers because the additionalTransferTime and/or the utilityOfLineSwitch are set too high. That is, even if taking the bus may be faster it is more expensive than the direct walk from the perspective of the transit router.

Best,

Andreas


Re: Transit router not working as expected

by Andrés Felipe Gómez Moreno on 2016-02-04 22:36:10

I already solved the question of why the, for me, the strange behavior of my agent in my simulation.

The thing is that, inspecting the code, I realized that when TransitRouterNetwork is created from schedule, which is done during a normal simulation, transfer links are created between nodes located less than beelineWalkConnectionDistance from each other AND which have DIFFERENT LINES. I'm referring here to nodes of class TransitRouterNetworkNode, from which one for each stop tag in the transit schedule is created, therefore each node is related just to one line.

As the connection in my transitSchedule had to be made between two different routes of the same line, the transfer link was never created and the TransitRouter wasn't able to "see" that transfer as a valid transit route. Therefore the transit passenger was left only with two alternatives, either the direct connection or the pure transit walk.

Now I would like to ask, why is it that transfer links are created just for different lines? as lines and routes are mere human denominators for what are really different options to mobilize inside a transit network, it seems to me logical that an agent could transfer from one route of one line to another route of the same line. I have actually done it in the real transit system of my city to reach some stops not reachable otherwise.

Clone this wiki locally