The change clarifies the conditions for forcing routing steps and
simplifies the codebase to support it.
- Makes explicity the search runtime condition for forcing a routing
step. Namely, the node is a source of the forward and reverse searches,
and it's one of the pre-identified nodes that requires a step to
be forced.
- Consolidate the two lists of force nodes into one. Not only is there
no algorithmic value in separating the nodes by geometric direction,
the improvements to via-routes with u-turns mean atleast one of these
lists will be empty for any search.
- Rename 'force loop' to 'force step'. This moves the code away
from the original CH-specific language for checking for self-loops
in the case where this condition is met. MLD does not have loops.
Additional cucumber tests are added to cover the logic related to
negative search weights and forcing routing steps on via-route
paths.
* Added approach on the opposite side of the road.
* Additional test and docs coverage for opposite approach
---------
Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
Currently `npm test` runs the Cucumber suite with a matrix
configuration for selecting the algorithm (CH, MLD) and data loading
(shared-memory, mmap) options.
However, there is a third data loading option, 'load directly',
which is to directly load the datasets into the osrm-routed process memory.
The code paths for each data loading option are distinct:
Storage::Run + SharedMemoryAllocator
MMapMemoryAllocator
ProcessMemoryAllocator
This commit adds direct data loading as part of the Cucumber
configuration matrix.
This will ensure optional dataset support can be added without any
regressions.
This PR improves routing results by adding support for snapping to
multiple ways at input locations.
This means all edges at the snapped location can act as source/target
candidates for routing search, ensuring we always find the best route,
and not the one dependent on the edge selected.
Currently /trip supports finding round-trip routes where only the
start or end location is fixed. This PR extends this feature to
non-round-trip requests.
We do this by a new table manipulation that simulates non-round-trip
fixed endpoint requests as a round-trip request.
In situations where there is not a valid source or target phantom
node (e.g. when snapping to an edge with a zero weight), a
heap assertion will fail in the MLD alternative search code.
We fix this by checking for empty heaps before proceeding with
the search.
Fixes#5788
Table queries where source and destination are phantom nodes
on the same one-way segment can fail to find valid routes.
This is due to a bug in the MLD table generation for the
special case where the query can be simplified to a
one-to-many search.
If the destination is before the source on the one-way segment,
it will fail to find a route.
We fix this case by not marking the node as visited at the start,
so that valid paths to this node can be found later in the search.
We also remove redundant initialization for the source
node as the same actions are performed by a search step.
* Revert "Remove estimated_cells value in the response."
This reverts commit 364e35af06.
* Update changelog.
* fix linting
* adjust fallback_speed check
* change [].includes to [].indexOf !== -1 for compatibility with node 4
* change param name
* more cuke tests
* fix formatting
* add a multiplier to the matrix
* add rounding
* remove scale_factor restrictions
* clamp for overflow error
* update check to match error message
* enforce clamping on < 0 and increase test coverage
* add an invalid scale_factor value to node tests
* increase test coverage
* changelog
* Revert "Update changelog"
This reverts commit 9b779c704f.
* Revert "Fix formating"
This reverts commit 5bd7d04fe3.
* Revert "Fix bug in computation of distance offset for phantom node"
This reverts commit 0f78f7b2cc.
* Revert "Adjust text cases for flightly different matching due to rounding"
This reverts commit 8473be69d2.
* Revert "Round network distance to deci-meter to retain previous behavior"
This reverts commit c0124f7d77.
* Revert "Preserve heap state in map matching"
This reverts commit b630b4e32a.
* Revert "Use distance functions from many to many"
This reverts commit 89fabc1b9c.
* Revert "Use FCC algorithm for map matching distance calculation"
This reverts commit a649a8a5cf.
As a form of smoothing we use the previous speed value instead.
This makes sense because the zero duration segments have to be very
short, potentially also zero length.