Skip to content

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

Open
ue71603 wants to merge 7 commits into
v2.1-wipfrom
different_WaitTimes
Open

Add StopPointInServiceJourneyPatternRef to JourneyWaitTime for stops visited 2 times in the same ServiceJourney with different wait times#1031
ue71603 wants to merge 7 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
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="TimingPointRef" minOccurs="0"/>
<xsd:element ref="StopPointInJourneyPatternRef" minOccurs="0">

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 don't think this should be a sequence. I think it should be a choice. I think I can also make an argument for TimingPointInJourneyPatternRef.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@skinkie TimingPointRef is always present. This is in our examples a ScheduledStopPoint (as that's the level where the TimingLinks are described mostly. Borderpoint is also possible. So this allows us for the WaitTime to anchored to something that remains mostly static.

For JourneyPattern variations we need an additional element. I modeled it now as a choice.

Indirectly one could go to the ScheduledStopPoint also thought those structures. However, if somebody has not implemented this edge case, then they are lost. So I prefer to have to have the TimingPointRef separatly.

Can you live with that? PR updated.

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
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants