Skip to content

Add StopPointInServiceJourneyPatternRef to JourneyWaitTime for stops visited 2 times in the same ServiceJourney with different wait times#1031

Merged
TuThoThai merged 11 commits into
v2.1-wipfrom
different_WaitTimes
Jul 16, 2026
Merged

Add StopPointInServiceJourneyPatternRef to JourneyWaitTime for stops visited 2 times in the same ServiceJourney with different wait times#1031
TuThoThai merged 11 commits into
v2.1-wipfrom
different_WaitTimes

Conversation

@ue71603

@ue71603 ue71603 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

In some cases the WaitTime is different if a stop is visited multiple times within a ServiceJourney. When modeled with TimeDemandType then two WaitTimes are needed e.g. first visit 1 minute and second visit 4 minutes, because change of driver.

In those cases (and only those) a StopPointInServiceJourneyPatternRef should be filled in.

Is this ok? Other ideas?

@ue71603 ue71603 added this to the netex_2.1 milestone Jun 17, 2026
@ue71603 ue71603 added the enhancement non semantic enhacement: technical enhancement, etc. label Jun 17, 2026
@ue71603 ue71603 changed the title Addint StopPointInServiceJourneyPatternRef to JourneyWaitTime Add StopPointInServiceJourneyPatternRef to JourneyWaitTime for stops visited 2 times in the same ServiceJourney with different wait times Jun 17, 2026
@Joostb61

Copy link
Copy Markdown

Do you really have 2 WaitingTimes at the same stop in one journey? Can you give an example from Switzerland? In NL we have 2 or more TimeDemandTypes, but this is not on the same journey.

@ue71603

ue71603 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Wilfried's example:
example_2_wait_times

The journeys visit "Avenches, Gare" twice, obviously the vehicle does a loop. For whatever reason they do not have a waiting time at the first visit, but at the second visit they wait for 4 minutes. This situation occurs quite often in regional bus services. How do you express this using time demand type? In VDV 462 it works, because we put the waitTimes Element below StopPointInJourneyPattern.

@hilcokats

Copy link
Copy Markdown

In the Netherlands we solved this exact case by requiring two disctinct ScheduledStopPoints A and B linked to the same Quay in their respective PassengerStopAssignments. In that case, you can link a WaitTime X to SSP A and a WaitTime Y to SSP B.

@ue71603

ue71603 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@duexw Whatdoyou think? I don't think it should be done that way. All other attributes are not in ScheduledStopPoint that are relevant for single journeys.

@ue71603

ue71603 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

I had a discussion with @skinkie and he thinks we should it do as proposed here and not with two different ScheduledStopPoints.

@duexw

duexw commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

We have the same issue in VDV 452, and up to now it is often solved by creating a "virtual" stop point for the second visit. However, this introduces follow up problems, as in reality there is only one stop point. For instance, in AVM systems you have to assign a different stop id to the virtual stop point, this again does not match anything found in the central stop register and so on. I therefore approve of the solution proposed here.

duexw
duexw previously approved these changes Jun 26, 2026
Comment thread xsd/netex_part_1/part1_tacticalPlanning/netex_journeyTiming_version.xsd Outdated
Comment thread xsd/netex_part_1/part1_tacticalPlanning/netex_journeyTiming_version.xsd Outdated

@skinkie skinkie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would want a small example here too.

@duexw

duexw commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Hi Stefan,
I agree choice would be better than sequence. I made a small example when I did the change to StopPointInJourneyPatternRef (see also attachment):
image
NeTEx_CH_Bern_Spiez_Zweisimmen_ValidRef.xml

However, I would not allow for wait times at any type of point, as it would open quite a few issues.

@ue71603
ue71603 requested review from duexw and skinkie July 7, 2026 22:16
Comment thread xsd/netex_part_1/part1_tacticalPlanning/netex_journeyTiming_version.xsd Outdated
Comment thread xsd/netex_part_1/part1_tacticalPlanning/netex_journeyTiming_version.xsd Outdated
skinkie
skinkie previously approved these changes Jul 15, 2026
duexw
duexw previously approved these changes Jul 16, 2026
Correct a typo and make documentation clearer
@TuThoThai
TuThoThai dismissed stale reviews from duexw and skinkie via 3051ad1 July 16, 2026 18:30

@TuThoThai TuThoThai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a tiny documentation correction

@TuThoThai

Copy link
Copy Markdown
Contributor

This PR was previously approved by @duexw and @skinkie
I merge it after I have added my own review that includes a documentation change + addressing the previously failed GitHub Action

@TuThoThai
TuThoThai merged commit 2cead31 into v2.1-wip Jul 16, 2026
2 checks passed
@TuThoThai
TuThoThai deleted the different_WaitTimes branch July 16, 2026 18:33
@skinkie skinkie added the needs documentation update The NeTEx document needs to be updated label Jul 16, 2026
@skinkie

skinkie commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@ue71603 @TuThoThai @duexw for documentation perspective there is an implication with addition. This means that a TimeDemandType gets closely coupled with one (or more) ServiceJourneyPatterns, while there hasn't been an explicit relation before. The only relation existed because a ServiceJourney would specify a ServiceJourneyPattern and a TimeDemandType. Technically the relationship between ServiceJourneyPattern and TimeDemandType does not have to exist. Nothing would stop you to model the entire timing model for all links in the network in one TimeDemandType. That this in practise never happens has to do with the fact that transit modellers don't publish true timing but a percentille with respect to the start of the trip.

@ue71603

ue71603 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@skinkie I agree that these only should be used when it is absolutely necessary (e.g. when there are two visits). Do I need to make the documentation comment clearer in that respect?

@skinkie

skinkie commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

I don't really care that there is an alternative way to model it. What we need to clear about is how the relation between ServiceJourneyPattern and TimeDemandType should work. That is a bigger topic than this pull request.

@skinkie

skinkie commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@ue71603 the point being ;-) you are at an earlier commit than I am now. I updated to v2.0.

@ue71603

ue71603 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I understand. I will use the latest as well and commit the new one to the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement non semantic enhacement: technical enhancement, etc. needs documentation update The NeTEx document needs to be updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants