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.
* Remove include that breaks compilation for Boost v1.85.0
* Update CHANGELOG.md
* Fix typo
* Fix issues found by newer clang-tidy version
* Add include to boost filesystem to satisfy Windows compiler
Each leg of a via-route supporting u-turns does not need to consider
force-loops. Negative weight checks are sufficient to prevent
incorrect results when waypoints are on the same edge.
* 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>
* sort manuever overrides vector after partition
---------
Co-authored-by: rshokri <reza.shokri@tapsi.cab>
Co-authored-by: Michael Bell <michael@mjjbell.com>
* Extract prerelease/build information from package semver
Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.
This leads to version information in executables incorrectly
reporting a release version is running on prereleases and special builds.
This commit is a quickfix to extract this information and report it
in version strings.
CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
Unidirectional traffic signal segments are currently not compressed.
This means traffic signals which are not on turns can be missed and
not applied the correct penalty.
This commit changes this behaviour to correctly handle the graph
compression. Additional tests are added to ensure there is no
regression for other cases (turns, restrictions).
Co-authored-by: Michael Bell <michael@mjjbell.com>
This change adds support for disabling datasets, such that specific
files are not loaded into memory when running OSRM. This enables users
to not pay the memory cost for features they do not intend to use.
Initially, there are two options:
- ROUTE_GEOMETRY, for disabling overview, steps, annotations and waypoints.
- ROUTE_STEPS, for disabling steps only.
Attempts to query features for which the datasets are disabled will
lead to a DisabledDatasetException being returned.
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.
* Ensure required file check in osrm-routed is correctly enforced.
The storage module had a stricter check. This keeps the IOConfig
check in sync.
* Correct HTTP docs to reflect summary output dependency on steps parameter.
There is no summary parameter.
* npm audit fix
* print tracebacks and line numbers for Lua runtime errors
* revert format changes
* update changelog with lua traceback, #6564
* revert using protected_function for old GetStringListFromFunction and source_function #6564
* add unit test for line numbers in tracebacks, #6564
* apply clang-format (#6564)
* remove unused test helper function, #6564
* suppress leaksanitizer warnings in extract-tests, #6564
When the extractor encounters a lua runtime error, some osmium objects are not freed. In production this doesn't matter because these errors bring down OSRM. In the tests we catch them to ensure they occur, and the leaksanitizer flags them.
This change takes the existing typedefs for weight, duration and
distance, and makes them proper types, using the existing Alias
functionality.
Primarily this is to prevent bugs where the metrics are switched,
but it also adds additional documentation. For example, it now
makes it clear (despite the naming of variables) that most of the
trip algorithm is running on the duration metric.
I've not made any changes to the casts performed between metrics
and numeric types, they now just more explicit.
Weight and duration penalties are flipped in the lambda function
that applies penalties from traffic signals.
Duration is in deciseconds, whilst weight is multipled by
10^weight_precision, with weight_precision being 1 by default.
Therefore, for default routability profile, the penalties end up
being the same, hence why no tests picked this up.
If distance weight is used however, it will incorrectly apply an
additional penalty to the weight, and not add the traffic signal
delay to the duration in the routing graph.
To confuse things further, in some API responses the values are
correct because they use geometry data instead, but it's still
possible that a sub-optimal route was selected.
However, given the distance weight is in meters, and the additional
penalty per traffic light would be 20, it's unlikely this would
have changed the routing results.
In any case, we correct the function to apply the arguments correctly.
In case we're not able to get access to the unscoped credentials.
Scoped packages are also the recommended approach for projects
managed by a team of developers.