Skip to content

faq 251101185

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

setFreeSpeedBasedOnSchedule error

by Pradeep Burla on 2018-03-26 11:55:41


Hello everyone,

I am using pt2matsim module to
- convert GTFS data to transitSchedule and transitVehicles
- Map generated transitSchedule to network

ScheduleTools.setFreeSpeedBasedOnSchedule() method is called to generate free speeds based on the transitSchedule. The method loops over the links contained in a specific route and checks if the the freespeed needs to be changed in order to arrive at the next stop in time. But the loop exits before the penultimate link is reached. So if the penultimate link is 1000m long, the bus/train takes 1000 seconds longer to reach the destination (default freespeed: 1 m/s).

for(int i = 0; i < links.size() - 2; i++) {
 	Link linkFrom = links.get(i);
 	Link linkTo = links.get(i + 1);

 Is there any specific reason for it? any implementation detail which I am missing?

 Thanks in advance.

 Regards,
 Pradeep

Comments: 1


Re: setFreeSpeedBasedOnSchedule error

by Flavio Poletti on 2018-03-28 06:44:56

Hi Pradeep,

No, there is no specific reason for this. I added an issue for this bug.

Regards,
Flavio

Clone this wiki locally