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

update prebooking stop activity #3447

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

nkuehnel
Copy link
Member

@nkuehnel nkuehnel commented Sep 3, 2024

includes a performance related update by @sebhoerl proposed here:
https://github.com/matsim-org/matsim-libs/tree/feat/improve-prebooking-stop-activity

in addition, it adds a check to notifyPassengersAreReadyForDeparture in the prebooking stop activity such that only pickups are queued if they are still contained in expectedPickups. Otherwise it can happen that a request is abandoned in the same second as it is picked up, throwing an exception:

  1. a request is part of a prebooking stop activity and registered in the expectedPickups map.
  2. the vehicle arrives before the agent
  3. the vehicle waits until the abandon voter votes for abandonment (e.g., after 10 mins) at time t, the request is removed from the expected pickups map and registers the abandonment at the prebookingmanager (no immediate action)
  4. the DefaultPassenger engine handles a departure event for the expected agent also at time t
  5. the prebooking stop activity gets notified about the departure and picks up the passenger, setting the RequestItem in the prebookingmanager to onBoard=true
  6. at the end of the time step, the prebooking manager goes through all registered abandonments (from step 3 above) and tries to actually abandon the request. At this time the Verify(onBord!=true) fails with an exception as the pickup already happened.

With this fix, step 5 is extended to check whether the request is still contained in expected pickups, from which the agent should be removed in step 1, if abandonment happens in the same second.

@nkuehnel nkuehnel requested a review from sebhoerl September 3, 2024 16:38
@nkuehnel nkuehnel force-pushed the updatePrebookingStopActivity branch from c32ad46 to 358f5bc Compare September 3, 2024 16:51
@sebhoerl
Copy link
Contributor

sebhoerl commented Sep 4, 2024

I just wanted to have a look, but I think something just went wrong with the last push ;)

@nkuehnel nkuehnel force-pushed the updatePrebookingStopActivity branch from edae427 to 358f5bc Compare September 4, 2024 09:13
@nkuehnel
Copy link
Member Author

nkuehnel commented Sep 4, 2024

oopsie, @sebhoerl please check again : )

@nkuehnel nkuehnel force-pushed the updatePrebookingStopActivity branch from eba2fce to 358f5bc Compare September 4, 2024 09:39
@nkuehnel nkuehnel merged commit c18a531 into matsim-org:master Sep 4, 2024
47 checks passed
@nkuehnel nkuehnel deleted the updatePrebookingStopActivity branch September 4, 2024 15:49
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