Commit Graph

8677 Commits

Author SHA1 Message Date
Michael Bell
9884684701 Fix generation of inefficient MLD partitions
Duplicate restriction nodes in the edge-based-graph are currently
not in included in a mapping (.osrm.cnbg_to_ebg) from
node-based-graph edges to edge-based-graph nodes.
This mapping is used by the MLD partitioner to assign EBG nodes
to partitions.

The omission from the mapping means all restriction nodes are
included in a special 'invalid' partition. This special partition
will break the geolocation properties of the multi-level hierarchy.
The partition and its super levels will have a large number of
border nodes and very few internal paths between them.

Given the partitioner is the only consumer of the mapping, we fix
the issue by including the duplicate restriction nodes in the mapping,
so that they are correctly assigned to a partition.

This has measurable improvement on MLD routing.
For a country-sized routing network, the fix reduces routing and table
request computation time by ~2% and ~6% respectively.
2021-09-03 22:48:10 +01:00
Michael Bell
0911691008 Fix changelog entry 2021-09-03 18:35:01 +02:00
Michael Bell
971f0d3fe2 Format unit_tests 2021-09-03 18:35:01 +02:00
Michael Bell
eb0c089574 Replace Travis with Github Actions for CI builds
Replace Travis for continuous integration with Github Actions.
The Github Actions pipeline is functionally equivalent, with
all the same build permutations supported.
Whilst the Github Actions offering is broadly equivalent to
Travis, a few changes have been made as part of the migration.

- The 'core' and 'optional' Travis stages have been consolidated
into one build matrix. This is due to the current inability in
Github Actions to share build steps between jobs, so this avoids
having to duplicate the steps.
Optional stage jobs will now run in parallel with core jobs,
but they still remain optional in the sense that they don't fail
the build.

- A number of existing Github Action plugins are used to replace
functionality provided by Travis or other tools:
Node setup, caching, Codecov, publishing release artifacts.

- Linux builds are updated to build on Ubuntu 18.04.
MacOS builds are updated to run on 10.15. Similar to the
Travis Xenial upgrade attempt, some changes are required due
to underlying platform and compiler upgrades. This means some
Node 10 toolchains will no longer be supported.

Whilst there is opportunity to upgrade some dependencies and
make the CI steps more idiomatic, I've left this for future changes
and just focussed on functional replication.
2021-09-03 18:35:01 +02:00
Mateusz Konieczny
8af4f700f7 fix link in the changelog 2021-09-03 11:14:22 +02:00
Patrick Niklaus
155ca8b1f1 Update src/server/api/url_parser.cpp
Co-authored-by: Michael Bell <moke.byll@gmail.com>
2021-09-03 10:55:53 +02:00
Patrick Niklaus
03001ff90a Fix ranges 2021-09-03 10:55:53 +02:00
Patrick Niklaus
ba4e7bfa11 Add changelog entry 2021-09-03 10:55:53 +02:00
Patrick Niklaus
38df7d5e05 Fix the URL parser for special chars in profile 2021-09-03 10:55:53 +02:00
ijleesw
dca35dcc86 Add support for lua5.4 in FindLua.cmake 2021-07-20 23:21:49 +01:00
Matt Riggott
f7478ba80f
Process maxspeed tag before surface, smoothness, and tracktype tags (#6002)
* Handle maxspeed tags before surface and smoothness tags

Let's say we have a tertiary road with the following tags:

   highway=tertiary
   maxspeed=60
   surface=gravel
   smoothness=intermediate

While the maxspeed tag tells us the legal speed limit, the surface and
smoothness tags have much more effect on the real-world speed of a car.
We should process the maxspeed tags first, and then update the road's
forwards/backwards speeds according to any surface and smoothness tags.
For our hypothetical road the process in the car.lua profile now goes
like this:

1. Get default speed from profile (tertiary = 40 on line 150 of car.lua)
2. Change speed to 60 using maxspeed tag (WayHandlers.maxspeed function
   in way_handlers.lua, lines 434-447)
3. Change speed to 40 using surface tag (WayHandlers.surface function
   in way_handlers.lua, lines 360-363)
4. Check speed according to smoothness tag --- but because it's higher
   than the speed according to the surface tag, leave the speed
   unchanged (WayHandlers.surface function again, lines 368-371)

<ec36319232/profiles/car.lua (L150)>
<ec36319232/profiles/lib/way_handlers.lua (L354-L372)>

Note in step 3 above the speed's only changed from 60kph to 40kph
because it's a lower value. If the surface speed was higher than than
the previous value, the speed would remain unchanged. Another example:

   highway=tertiary
   maxspeed=60
   surface=compacted
   smoothness=intermediate

Here, although the profile's speed for compacted is 80, it would stay at
the lower value of 60 (see way_handlers.lua, lines 360-363).

<ec36319232/profiles/lib/way_handlers.lua (L360-L363)>
2021-06-03 17:56:57 +01:00
Daniel Patterson
ec36319232
Reset main branch after release. 2021-05-17 14:59:48 -07:00
Daniel Patterson
051e931091
Final 5.25 release prep. 2021-05-17 14:57:10 -07:00
Daniel Patterson
3a029d476c
Try pushing tag again. 2021-05-17 14:16:35 -07:00
Daniel Patterson
d97fe2322d
Prep 5.25.0-rc.1 2021-05-17 12:15:04 -07:00
Michael Bell
baca7b70f1
Use Github Releases for hosting node binaries (#6030)
* Use Github Releases for hosting node binaries

Replaces S3 hosting of node binaries with Github Releases.
`node-pre-gyp publish` works exclusively with S3, so upload step
is now performed by the Travis deployment provider.

The behaviour for the package user should not change.
When building a new version tag, Travis will create a release for the
tag if it does not already exist.

* Switch to the osrm-release-automation machine account rather than personal credentials.

Co-authored-by: Daniel Patterson <danpat@danpat.net>
2021-05-17 11:54:08 -07:00
Michael Bell
50f5a753ea Increase PackedOSMIDs size to 34 bits
OSM node 2^33 was created in early April 2021. This and all
subsequently created IDs will be overflowing OSRM node storage
which only support 33 bit IDs.
Bump the number of bits to 34 to double node ID capacity. This
is a breaking change to the data format as it alters the layout
of .osrm.nbg_nodes.
2021-04-24 23:41:02 +01:00
Michael Bell
4ac827a849 Remove redundant loading of .osrm.cell_metrics
When using process memory, MLD cell metrics are loaded twice from
.osrm.cell_metrics - once when loading static data, and again when
loading updatable data. The former appears to be the mistake,
as .osrm.cell_metrics is only listed in `GetUpdatableFiles`.
2021-04-24 21:19:27 +01:00
Mandeep Sandhu
def699dafd
Remove hardcoded access keys from travis config (#6012) 2021-04-15 22:29:40 -07:00
Michael Bell
41dda32546
Merge pull request #5999 from mjjbell/mbell/barrier_kerb
Add kerb barrier exception to default car profile
2021-03-31 20:24:42 +01:00
Michael Bell
8d3ebc64dc Add kerb barrier exception to default car profile
OSM data contains many mistakes that tag kerbs as highway barriers
when instead they are only describing highway crossings.

This PR updates the default car profile to handle these mistakes
and unblock routing on the affected highways.
2021-03-31 01:17:19 +01:00
Michael Bell
c15b02ecf6
Merge pull request #5994 from wangyoucao577/bugfix/correct-doc
Fix valid field type in doc
2021-03-26 16:32:03 +00:00
Jay Zhang
480807500b docs: changelog 2021-03-26 00:28:08 +00:00
Jay Zhang
e2de71bdcf docs: fix valid field type 2021-03-26 00:25:26 +00:00
Daniel Patterson
574060418a
Update node-pre-gyp to fix Node 12/14 installation problems in some environments. (#5991) 2021-03-23 10:11:46 -07:00
Daniel Patterson
9d81eb327a
Reset master versioning for next release. 2021-01-28 10:31:49 -08:00
Daniel Patterson
677598a8d8
Blank commit to trigger TravisCI. 2021-01-28 09:03:40 -08:00
Daniel Patterson
781a2ad0f8
Release 5.24.0 2021-01-28 06:11:02 -08:00
Karen Shea
a613375460
Validate source/destination indices correctly in nodejs support (#5595)
* validate source/destination indices correctly

Co-authored-by: Denis Chapligin <denis.chaplygin@wolt.com>
Co-authored-by: Daniel Patterson <danpat@danpat.net>
2021-01-28 06:02:01 -08:00
Richard Fairhurst
960269f95a
Merge pull request #5131 from themylogin/master
Fix turn.roads_on_the_left and turn.roads_on_the right for two-way roads
2021-01-28 14:00:17 +00:00
Dane Springmeyer
ed7b1baacc
Don't bundle node-pre-gyp (#5520)
Bundling node-pre-gyp was only needed for node v4 and earlier.

Remove it to avoid errors like:

> npm ERR! enoent ENOENT: no such file or directory, rename '/home/circleci/project/node_modules/node_or_tools/node_modules/abbrev' -> '/home/circleci/project/node_modules/node_or_tools/node_modules/.abbrev.DELETE'

More context: https://github.com/mapbox/node-pre-gyp/issues/260#issuecomment-407222286
2021-01-27 09:19:32 -08:00
Daniel Patterson
d4e7b3d60b
Cleanup node dependencies. (#5945)
* Cleanup node dependencies.
2021-01-27 09:17:15 -08:00
Michael Bell
bd3eb6591e
Undo libosrm API break by adding old interface as method overload (#5861)
Removes the breaking libosrm API change by adding the old interface to
the new. This does not introduce any new breaks.

The downside of this is that it allows for multiple ways to
return JSON responses.
2021-01-27 09:14:44 -08:00
themylogin
b0b8069ab0 clang-format 2021-01-27 13:12:20 +01:00
themylogin
d9d873903f Account merged edges when processing turn legs 2021-01-27 10:53:48 +01:00
themylogin
e7acc9df76 Fix turn.roads_on_the_left and turn.roads_on_the right for two-way roads #5128 2021-01-27 10:53:00 +01:00
Denis Chapligin
b6557b8cac
Merge pull request #5927 from OgreTransporter/master
Bugfix Lua 5.4 not working
2021-01-21 15:23:39 +02:00
Denis Chapligin
a05d7a8f73
Merge pull request #5926 from mjjbell/mbell/parameter_improvements
Reduce copying in API parameter constructors
2021-01-21 15:22:26 +02:00
Transporter
35ff807e1d Bugfix Lua 5.4 not working 2021-01-07 10:48:59 +01:00
Michael Bell
e554624438 Reduce copying in API parameter constructors
When using non-default constructors for the API parameter classes,
vector arguments like coordinates and hints are copied at least once
(twice when passed as lvalue arguments).

Enable perfect forwarding of BaseParameter arguments and
pass-by-value in the constructor that uses the argument. This
ensures we copy at most once (zero for rvalue arguments).
2021-01-06 23:15:35 +00:00
Michael Bell
58ba3fc84f
Avoid copying ManyToMany table results (#5923)
Regardless of any copy elision on the returned pair value, the
duration and distance results are always copied.

Fix this by passing rvalue references to std::make_pair.
2021-01-04 08:46:51 -08:00
Denis Chapligin
dddf83db7b
Merge pull request #5908 from systemed/debug_way
Profile debug script which fetches a way from OSM
2020-12-21 20:14:37 +02:00
Michael Bell
5266ac1635
Add support for multiple via-way restrictions (#5907)
Currently OSRM only supports turn restrictions with a single via-node or one
via-way. OSM allows for multiple via-ways to represent longer and more
complex restrictions.

This PR extends the use of duplicate nodes for representng via-way turn
restrictions to also support multi via-way restrictions. Effectively, this
increases the edge-based graph size by the number of edges in multi via-way
restrictions. However, given the low number of these restrictions it
has little effect on total graph size.

In addition, we add a new step in the extraction phase that constructs
a restriction graph to support more complex relationships between restrictions,
such as nested restrictions and overlapping restrictions.
2020-12-20 13:59:57 -08:00
Denis Chapligin
eb1d399f3b
Merge pull request #5894 from xlaussel/avoid_samelookup_in_heap_map
Avoid samelookup in heap map
2020-12-20 22:17:49 +02:00
Andrey Gurevich
6bf68fb0c6
Update http.md (#5914)
Looks like a mistake in the description of Table api
2020-12-20 08:39:35 -08:00
Alin Mindroc
33b2a193f9
Fix node14 compilation issues (#5918)
* Use Nan:: getters and setters for node 12/14 compatibility
* Drop support for publishing node 8 bindings, add publishing support for node 12, 14

Co-authored-by: Daniel Patterson <danpat@danpat.net>
2020-12-19 15:37:01 -08:00
systemed
158d260cbb Mention new script in changelog 2020-12-15 12:51:28 +00:00
systemed
83b17e664c Update comments 2020-12-15 12:49:52 +00:00
xlaussel
89a9bc9d70 Undo changes to package-json.com :
Revert to master version
2020-12-14 08:38:31 +01:00
Denis Chapligin
b0a4ad92c4
Merge pull request #5887 from dburnsii/upgrade_libsol2_v2.20.6
Upgrade libsol2 v2.20.6
2020-12-13 22:55:44 +02:00