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

RSPS-1243: Implement fail fast option for matrix calculation #28

Merged
merged 11 commits into from
Apr 19, 2023

Conversation

HDBandit
Copy link

Jira Ticket

Example-ticket-to-be-replaced

Implementation details

We added some logic, to take into account possible errors trying to snap (origin/destination points) to the closest edge. Instead of forcing the failure for the whole request, we contemplate the option to fail the computations affected by the erroneous points. So it will be up to the client to ignore the failed computations.

The failed computations are marked in the matrix results with -1.0 (time) and with -1 (distance).

In case you want to specify the failFast option to true, the system will fail with the exception MultiplePointsNotFoundException informing all the points not found in the request.

By default, the system GHMatrixRequest is configured with failFast=false as is the compatible behavior expected by Solver.

Examples

GHMatrixRequest request = new GHMatrixRequest();
request.setFailFast(true);
request.setProfile("car");
request.setOrigins(origins);
request.setDestinations(destinations);

Testing

Added unit tests (CI)

@HDBandit HDBandit changed the title Manage snap errors RSPS-1243: Implement fail fast option for matrix calculation Apr 19, 2023
@HDBandit HDBandit requested a review from jp-lopez April 19, 2023 12:00
Copy link

@jp-lopez jp-lopez left a comment

Choose a reason for hiding this comment

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

Good Job. 💯

@sonarcloud
Copy link

sonarcloud bot commented Apr 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@HDBandit HDBandit merged commit 630bd38 into develop Apr 19, 2023
@HDBandit HDBandit deleted the manage_snap_errors branch April 19, 2023 12:46
HDBandit added a commit that referenced this pull request Apr 19, 2023
HDBandit added a commit that referenced this pull request Apr 20, 2023
HDBandit added a commit that referenced this pull request Apr 20, 2023
* Enable again: "Implement fail fast option for matrix calculation (#28)"

This reverts commit f91ff36.

* Enable fail fast and gitflow plugin

* Add RELEASE documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants