Skip to content

Adding replacement-submodes - #1104

Open
TuThoThai wants to merge 8 commits into
v2.1-wipfrom
cr_entur_add_submode
Open

TuThoThai wants to merge 8 commits into
v2.1-wipfrom
cr_entur_add_submode

Conversation

@TuThoThai

Copy link
Copy Markdown
Contributor

Replaces #974 with the addition of documentation in the XSD to identify added values to enumeration

@TuThoThai TuThoThai added this to the netex_2.1 milestone Nov 9, 2026
@TuThoThai TuThoThai added change-request Request for an additional feature -- Must be discussed with the group needs documentation update The NeTEx document needs to be updated labels Nov 9, 2026
@TuThoThai

Copy link
Copy Markdown
Contributor Author

Before merging, this PR will need examples provided by Entur team. The addition of examples can be done directly in the feature branch cr_entur_add_submodeof this repo, so it is easier for maintainers to edit / review before merge

@ue71603

ue71603 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

I will add an example this week, I think

hfjelstad and others added 2 commits November 10, 2026 10:23
Move the +v2.1 annotations inside their xsd:enumeration elements;
as siblings inside xsd:restriction they made the schema fail to compile.

Add example showing the new replacement submodes on Line level
(metroReplacementBus) and ServiceJourney level (tramReplacementBus,
railReplacementTaxi).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hfjelstad

Copy link
Copy Markdown
Contributor

Wrapped the +v2.1 annotations inside their xsd:enumeration elements so the schema compiles correctly. Also added an example line_and_servicejourney_pr1104.xml showing the new submodes on both Line and ServiceJourney level.

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

we have to do the documentation right

TuThoThai and others added 3 commits November 10, 2026 20:29
Co-authored-by: Matthias Günter <matthias.guenter@sbb.ch>
Co-authored-by: Matthias Günter <matthias.guenter@sbb.ch>

@TuThoThai TuThoThai left a comment

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.

@hfjelstad, please see some comments in the XML example

@ue71603, how about making documentation really right? 😉

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>

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.

I would say that the example is not comprehensive enough.
For the Line, especially with a replacement, you would have more details (e.g., BrandingRef, Routes, NoticeAssignment)
For the ServiceJourney that is a taxi replacement, you would expect at least the PassengerCapacity

Also, I would have imagined that the example carries the nominal example (without replacement) and the replacement details to be self-explanatory

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.

So basically you would like to have a whole replacement situation modeled? if the service journey / line that was replaced?
I would accep the change without it and do the whole replacement example as an issue for 30

@BredeD BredeD Nov 11, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That would be a huge overkill in complexity just to provide an example of how to send a railReplacementTaxi, which is the simple change to the request. For other use cases you refer to, @TuThoThai, should have their own guidelines and examples.

@TuThoThai TuThoThai Nov 11, 2026 •

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.

@ue71603 and @BredeD, we add a good chat with the SIRI group yesterday saying that replacements / deviations are one of the best use-case for working on the articulation between NeTEx and SIRI.

The current change request on submodes is not crucial for v2.1, or at least I did not find any practical use-case supporting the request. So, we have 2 options here:

  • either an example of a pre-production / production file supporting the need for immediate change (in that case, I expect better than an almost empty file)
  • either we park this change for v3.0 with an entire rework of modes / submodes as it was advocated originally by @JohanEntur

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>

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.

So basically you would like to have a whole replacement situation modeled? if the service journey / line that was replaced?
I would accep the change without it and do the whole replacement example as an issue for 30

@TuThoThai TuThoThai added the triage-needed These issues are to be read again & move toward the correct milestone label Nov 19, 2026
@TuThoThai

Copy link
Copy Markdown
Contributor Author

As of the plenary of 19 November 2026, the agreement is:

@einarbjorkevoll

Copy link
Copy Markdown

ReplacedLineRef was approved at the plenary on 21 November 2025 and merged into v2.1-wip in #981. Its documentation says it should only be used “when the Transport SubMode clearly indicates that it is a replacement (for example, railReplacementBus)“. Today, railReplacementBus is the only submode that meets this condition. Replacement lines for metro and tram, and replacement taxis for rail, have no submode that marks them as replacements, so they cannot use ReplacedLineRef as documented.
#1104 fills this gap with metroReplacementBus, tramReplacementBus and railReplacementTaxi. The values follow the existing naming pattern (railReplacementBus in BusSubmode, replacementRailService in RailSubmode). The PR adds no new structure. We know that a broader rework of TransportMode and TransportSubmode is planned for 3.0. Until then, extending the existing convention is the least disruptive option, and it keeps 2.x consistent with what was already agreed.
A follow-up issue on how to model replacement services more completely for 2.1 or 3.0 is welcome, but it should not block this PR.

Business description: why Entur requests these submodes
The need. When a rail, metro or tram service is replaced by road transport, the passenger still travels on the original service’s terms: the same ticket, the same fare, the same line identity. The vehicle is different, and so are the boarding point, the accessibility and the capacity. Downstream systems need to know both facts at once: what is running (a bus or a taxi) and what it replaces (rail, metro or tram).
NeTEx already supports this for one case, railReplacementBus. In Norway that value is used in production across the whole chain:
Journey planning and passenger information: replacement buses are shown with a bus icon in the rail line’s colour and a dedicated “bus for train” tag, so the passenger understands that this is their train service, run by bus.
Sales and ticketing: rail tickets remain valid, and the fare is calculated from the original stations, not the bus stops.
Revenue settlement: replacement journeys are matched to the rail journey they replace, so revenue is allocated to the right operator and contract.
Customer service and compensation: deviations with and without replacement transport are handled differently.
The gap. The same situations occur for metro and tram (planned infrastructure work, where buses replace the service for days or weeks) and for rail replaced by taxi (low-demand departures, remote stations, accessibility needs, short-notice disruptions). There is no value for these today. Data providers must either mislabel the service as railReplacementBus, or fall back to a generic bus or taxi submode and lose the replacement semantics. In both cases the passenger gets wrong or missing information, and ticket validity and settlement need manual workarounds.
User stories.
As a passenger, I want to see that this bus replaces my metro or tram line, so that I know my ticket is valid and where to board.
As a passenger, I want to know that my replacement transport is a taxi and not a bus, because capacity, accessibility, luggage and boarding point differ.
As a data provider, I want to publish planned replacement services with the correct mode and submode, without misusing railReplacementBus.
As a journey planner or retailer, I want to tell replacement services apart from ordinary bus and taxi services, so that I can apply the correct presentation, ticket validity and fare rules.
As a transport authority, I want replacement journeys identifiable in the data, so that revenue and performance are attributed to the replaced service.

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

Labels

change-request Request for an additional feature -- Must be discussed with the group needs documentation update The NeTEx document needs to be updated triage-needed These issues are to be read again & move toward the correct milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants