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

[feature] Default forbid pickup/dropoff on last/first stop times of vehicle journeys #703

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

woshilapin
Copy link
Contributor

@woshilapin woshilapin commented Sep 11, 2020

For trip planning to be handled correctly by Navitia, we need to forbid pick-up on the last stop time of each vehicle journey and drop-off on the first stop time of each vehicle journey. However, there is one specific case when we still want to leave the possibility of pick-up on the last and drop-off on the first: prolongation trips when the last stop of the first trip and the first stop of second trip are different.

  • Squash/rebase the PR

ref: ND-991.

@woshilapin woshilapin added the wip label Sep 11, 2020
@woshilapin woshilapin marked this pull request as draft September 11, 2020 07:50
src/model.rs Outdated Show resolved Hide resolved
@woshilapin
Copy link
Contributor Author

woshilapin commented Sep 15, 2020

Some updates about this PR (removing the wip label as well as the Draft status).

  • e18b4a2 is about improving documentation about the different cases, as well as making explicit the scenarios the current implementation does NOT handle.
  • 32bd414 fixes all the fixtures so the tests pass
  • f9bf9c4 is also about fixing the tests but it is a bit specific. It's part of Netex FR parser and is trying to generate Journey Patterns from multiple Vehicle Journeys. Bad luck, we had 2 different Vehicle Journeys in the test but the current PR was making these 2 Vehicle Journeys the same -> the tests were expecting 2 Journey Patterns but was getting one. I changed the second Vehicle Journey so it doesn't have the same Journey Pattern as the first.

@woshilapin woshilapin removed the wip label Sep 15, 2020
@woshilapin woshilapin marked this pull request as ready for review September 15, 2020 11:04
@woshilapin
Copy link
Contributor Author

A small improvement, I moved the .sort_by() later in the implementation, after removing all vehicle journeys that do not contain a block_id (call to .retain()). See 4a1563f.

src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Show resolved Hide resolved
src/model.rs Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
@woshilapin woshilapin merged commit fc42ed4 into hove-io:master Sep 16, 2020
@woshilapin woshilapin deleted the smart-pickup-dropoff branch September 16, 2020 16:04
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