Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunTime in VehicleJourneyTimingLink #47

Open
tafflin opened this issue Oct 29, 2021 · 7 comments
Open

RunTime in VehicleJourneyTimingLink #47

tafflin opened this issue Oct 29, 2021 · 7 comments

Comments

@tafflin
Copy link

tafflin commented Oct 29, 2021

Hi @linusnorton ,
In the latest BODS data I found that there are a lot of converted trips with the same times on each stop in the stop times. E.g. the trip departs at 07:05:00 and all consecuitive stops have the same arrival/departure times.
I looked throught the file with such an issue and noticed that the RunTime between stops in the JourneyPatternTimingLinks are all set to 0 seconds. However there is a reference to each JourneyPatternTimingLink in the VehicleJourney section.
In the VehicleJourney there are "VehicleJourneyTimingLinks" where each one is referenced to the correct "JourneyPatternTimingLink" by "JourneyPatternTimingLinkRef" AND each link has a correct RunTime.

Here is a screenshot of such place in xml
изображение

My suggestion is maybe it is correct to overwrite the runtime in JourneyPatternTimingLinks with VehicleJourneyTimingLinks when the runtimes are the same or equal to 0 seconds?

The file in the attachment
116_916-FECS_116_916--FECS-IPSWICH-2021-10-24-IP1C FINAL-BODS_V1_1.zip

@linusnorton
Copy link
Contributor

I'd be happy to accept a PR with that change but I can't make it myself at the moment

@tafflin
Copy link
Author

tafflin commented Oct 29, 2021

Thanks for a quick reply
I don't know txc format 100%, looks like vehiclejourneytiminglink modifies the regular link between the stops or adds more information, is that correct?
As for PR it is not possible from our side as well right now. Do you plan to introduce this feature in the coming months?
At least 30% of the data has these vehicle jouryey timing links but I can't say how many files have modified runtimes in those links.

@linusnorton
Copy link
Contributor

I can't see it being added at the moment. I don't really have a use case and I don't really understand whether this is expected behaviour for TransXchange or bad data. I'm happy to keep the ticket open though in case anyone else wants to create a PR

@tafflin
Copy link
Author

tafflin commented Oct 29, 2021

I am researching the issue and in contact with bods team. Will post if any updates appear

@tafflin
Copy link
Author

tafflin commented Oct 29, 2021

@linusnorton the usecase is using DFT bulk data archive with UK txc files: https://data.bus-data.dft.gov.uk/timetable/download/ . This source is used for real-time vehicle positions data - 18000 vehicles around the UK.
Looks like 40% of the data is converted incorrectly since it is impossible to extract the runtime between stops from vehicle journey timing links. The usual place for the runtime between stops is reset to 0 seconds.
I have inquired from the DFT whether it is their new format or bad data

@linusnorton
Copy link
Contributor

thanks, let me know what they say

@tafflin
Copy link
Author

tafflin commented Nov 8, 2021

@linusnorton in short, DFT does not plan to change the data like Traveline does (however their sources should be the same). Currently this change in run time usage affects 40-50% of the data.
Here is the reply from them:

Your GTFS creator may benefit from handling this. But no plans to stop this type of data being published. More info from our SME on this:

JourneyPattern is the most efficient approach to handling RunTimes in JourneyPatternTimingLink, as with many other data elements. There are cases where a journey may have different requirements, and this can be overridden by the use of VehicleJourney but must provide all the data not just some as per 9.4 in the profile document:

“In TXC-PTI, where a default pattern is provided for timing links then this can be overridden by use of VehicleJourneyTimingLink. Where this is used then there shall be a one-to-one mapping to a JourneyPattern with the same set of links, and times shall be provided for all links and (where necessary) wait times. No links shall be omitted.”

In this case all journeys are overridden rather than using a JourneyPattern, its allowed and should pass PTI validation but not really in the spirit of the profile and is far from efficient. I can see how a GTFS converter that was not aware of the VehicleJourney options may have a problem as GTFS has only one way of doing things but as in any Transmodel implementation TxC has a few ways of doing some things to cope with a myriad of use cases most of which we have stopped but overriding a JourneyPattern down to VehicleJourney is quite an important thing to be able to allow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants