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

feat: various changes required for ride-hailing #370

Merged
merged 8 commits into from
Jan 24, 2024
Merged

Conversation

kschrab
Copy link
Contributor

@kschrab kschrab commented Nov 30, 2023

Description

Various minor improvements/fixes required by recent applications related to ride-hailing.

mosaic-application

  • Routes have been stored twice in SimulationKernel and CentralNavigationComponent, but have been updated only in SimulationKernel. This leads to buggy behavior when working with routes in applications. Now, routes are stored and updated only in SimulationKernel.
  • Applications can now request information about connections. This was done by adding getConnection(id) to INavigationModule.

mosaic-sumo

  • When a vehicle type is not used by any spawner in mapping_config.json, it is not propagated to mosaic-sumo, thus it is unknown and results in an NPE when processing a VehicleRegistration interaction with a vehicle type not configured in mapping. Now you may ask: "how can a VehicleRegistration contain a vehicle type which was not used by spawner in mapping configuration?". Well, this can happen when a VehicleRegistration is triggered from any other ambassador (e.g., from inside an application). To allow processing this, we now catch the NPE from happening and write a log.warn that the user has to be sure, that the referred vehicle type must be at least known to SUMO (e.g., by adding them to any rou.xml).

mosaic-routing

  • Added a fallback when a calculated route does not contain any points.

Issue(s) related to this PR

  • Resolves internal issue 724

Affected parts of the online documentation

Changes in the documentation required?

No

Definition of Done

Prerequisites

  • You have read CONTRIBUTING.md carefully.
  • You have signed the Contributor License Agreement.
  • Your GitHub user id is linked with your Eclipse Account.

Required

  • The title of this merge request follows the scheme type(scope): description (in the style of Conventional Commits)
  • You have assigned a suitable label to this pull request (e.g., enhancement, or bugfix)
  • origin/main has been merged into your Fork.
  • Coding guidelines have been followed (see CONTRIBUTING.md).
  • All checks on GitHub pass.
  • All tests on Jenkins pass.

Requested (can be enforced by maintainers)

  • New functionality is covered by unit tests or integration tests. Code coverage must not decrease.
  • If a bug has been fixed, a new unit test has been written (beforehand) to prove misbehavior
  • There are no new SpotBugs warnings.

Special notes to reviewer

@kschrab kschrab added enhancement New feature or request bugfix Pull requests that fixes a bug labels Nov 30, 2023
@kschrab kschrab requested a review from schwepmo November 30, 2023 15:57
Copy link
Contributor

@schwepmo schwepmo left a comment

Choose a reason for hiding this comment

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

LGTM, I left some remarks/questions on some method calls.

@kschrab kschrab requested a review from schwepmo December 15, 2023 09:48
@kschrab kschrab merged commit b17fc24 into main Jan 24, 2024
6 checks passed
@kschrab kschrab deleted the 724-ride-hailing branch January 24, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull requests that fixes a bug enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants