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

CR record in MCA file isn't handled #85

Closed
miklcct opened this issue May 1, 2024 · 4 comments · Fixed by #90
Closed

CR record in MCA file isn't handled #85

miklcct opened this issue May 1, 2024 · 4 comments · Fixed by #90

Comments

@miklcct
Copy link
Contributor

miklcct commented May 1, 2024

A CR record in an MCA file indicates a change in the service property en-route, for example, from an EMU to a DMU. It isn't currently handled in the importer.

For example, the service L65563 changes its property two times en-route, including the addition of catering at Swansea, and the power switch at Cardiff. I am looking to rewrite this timetable website using MySQL as the backend to improve performance however it isn't currently possible.

@linusnorton
Copy link
Collaborator

I think we'd need to add an extra table for the change records. At the moment the information just goes into the schedule table.

@miklcct
Copy link
Contributor Author

miklcct commented May 1, 2024

I am seeing how I can do that, but the problem is that the CR record needs to reference the stop_time ID of the next line in the CIF file, which isn't possible in the current parser, and for a more canonical model, the "changeable" property in the BS and BX records should also be extracted to the new table as well.

@linusnorton
Copy link
Collaborator

it could reference the previous one to indicate that "this change is applied after x stop", not as intuitive as it applying "on x stop" but might be viable

@miklcct
Copy link
Contributor Author

miklcct commented May 1, 2024

The service property is a property for a section of route, so if applied "after x stop", it can be confusing.

The actual change happens when the train calls at the transition stop.

I think I may make another record type which is used to reference the "next line" of a foreign ID, instead of the previous line.

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

Successfully merging a pull request may close this issue.

2 participants