VDVde / OJP

Open API for distributed journey planning. CEN/TS 17118:2017.
https://www.vdv.de/open-journey-planner.aspx
22 stars 12 forks source link

Rename the LegIntermediates element to LegIntermediate (and add an example for ParallelService from ÖBB) #399

Closed ue71603 closed 1 year ago

ue71603 commented 1 year ago

working on https://github.com/VDVde/OJP/issues/398 Create TR_ParallelService_OeBB.xml

Als fix LegIntermediates -> LegIntermediate

ue71603 commented 1 year ago

An open question during review: Should the "main" service be copied to parallel service as well (to tell that NJ 490 is only NJ 490 between stations 1 to 5). Otherwise we can't say that.

` Wien - NJ 490/NJ40490 -> some station - NJ 590 -> (Hamburg)

trurlurl commented 1 year ago

Which case should be expressed?

Case (1) 1 490 | 40490 5 590 | 50490 7 590 12

Case (2) 1 490 | 40490 5 490 | 590 | 50490 7 490 | 590 12

My interpretation might be too intuitive or simplistic, but I would expect that the Service element always applies to the complete parent which should be a dated journey. That would mean case (2), and a ParallelService 1-490-5 would not make any sense.

To represent case (1) we'd need two dated journeys, one for Austria (Service 490, ParallelService 40490) and one for Germany (Service 590, ParallelService 50490 until Nürnberg).

Perhaps I miss some complexities?

ue71603 commented 1 year ago

What really

Which case should be expressed?

Case (1) 1 490 | 40490 5 590 | 50490 7 590 12

Case (2) 1 490 | 40490 5 490 | 590 | 50490 7 490 | 590 12

My interpretation might be too intuitive or simplistic, but I would expect that the Service element always applies to the complete parent which should be a dated journey. That would mean case (2), and a ParallelService 1-490-5 would not make any sense.

To represent case (1) we'd need two dated journeys, one for Austria (Service 490, ParallelService 40490) and one for Germany (Service 590, ParallelService 50490 until Nürnberg).

Perhaps I miss some complexities?

@trurlurl : What really happens on the rail is use case (1). However we need to provide some basic information for the Service (even when it is only going from stop 1-7. And I think departure is the important place. And really in (1) we shorten things and are not quite "true". However it is simpler. It would be always possible to model as two TimedLeg with a TransferLeg with 0 minutes and remainInVehicle. In many cases this would not be helpful. That's why I propose a duplication of the 490 1- 5 Service

herlitze commented 1 year ago

I would suggest splitting the line at "some station" and have a TransferLeg with TransferMode remainInVehicle between the two Legs. The result would be:

TimedLeg Wien -> some station - NJ 590 -> (Hamburg) - NJ50490 -> (Amsterdam) NJ 490/NJ40490

TransferLeg some station -> some station with TransferMode remainInVehicle

TimedLeg some station -> Hamburg NJ 590

...

I know this is not the prettiest of all solutions, but I dislike the idea of having the "main" service copied to parallel service as well.

ue71603 commented 1 year ago

@skinkie @Aurige : Having a split is ok for me as the train number really changes. What do you think? If ok for you, then I will do as @herlitze suggests.

ue71603 commented 1 year ago

@trurlurl @skinkie discussed with OeBB. If ok, then we can merge it.

ue71603 commented 1 year ago

@trurlurl @skinkie : Can we do this one next?

sgrossberndt commented 1 year ago

In my opinion "Rename the LegIntermediates element to LegIntermediate" should be separated from "Add an example for ParallelService from ÖBB". Do one thing at a time.

ue71603 commented 1 year ago

In my opinion "Rename the LegIntermediates element to LegIntermediate" should be separated from "Add an example for ParallelService from ÖBB". Do one thing at a time.

Will do from now on.