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

WIP support split service #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gcamp
Copy link
Member

@gcamp gcamp commented Dec 2, 2024

Support split service by adding

  • a boolean to define if the service is split
  • a secondary shape to define the second part of the shape

I think this might be ok for our usecase, but that does mean that there can be only a single split service modification. I don't think that will be ok for the general spec.

@gcamp gcamp requested a review from cmonagle December 2, 2024 18:29

// Is that modification splitting the service in two, instead of just having a detour
// If true, a `secondary_shape_id` should be provided in TransitSelectedTripsExtension
optional bool is_splitting_service = 4;
Copy link

@cmonagle cmonagle Dec 19, 2024

Choose a reason for hiding this comment

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

Nit: would no_through_travel through_travel_prohibited work? it feels a bit clearer to me.

@juanborre
Copy link

juanborre commented Jan 20, 2025

If the flag is true, how do we know the two trips that result?

Is the detour defined in the trip_modifications->modification the second trip? Or the stops in the modificationdefine a part that is not served and then that is the part that does not have service?

I think we could clarify the behaviour.

@cmonagle
Copy link

cmonagle commented Jan 28, 2025

If the flag is true, how do we know the two trips that result?

There are two undocumented requirements with this:

  1. There must not be any replacement stops.
  2. There must be stops remaining before the startStopSelector, and stops after the endStopSelector.

The resulting trips are (first stop) to startStop, and then endStop to (last stop).

[Edit]:

I think I understand your question now: how do we know which trip is associated with which shape. I don't think that's defined in the current implementation.

@juanborre
Copy link

It feels to me we are stuffing this here with a shoehorn. When we define a detour in TM, we actually define a segment that is not served and there is a lot of implicits or extra behaviour. There are also fields that don't mean anything in the current spec when the flag is set.

I'm not sure what's best though.

  • Making another element similar to a Modification that can represent this better could be too much but could be cleaner.
  • Also adding in an enum at the Modification level instead of a boolean to define what the modification is doing: detour, split, etc...

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 this pull request may close these issues.

3 participants