Re: [OSRM-talk] Some question/issue using the trips service

2020-10-11 Diskussionsfäden Stephen Woodbridge

Never mind! I figured it out after reading the docs yet a few more times.

For anyone else looking, the waypoints are returned in the order you 
send them, if you want them in route order sort the list on 
waypoint_index field.


Sorry for the noise,
  -Steve

On 10/11/2020 3:50 PM, Stephen Woodbridge wrote:

Hi,

I'm trying to use the trips service and I'm confused by the 
waypoint_index. If I pass 50 coordinates on input, is this index back 
to the original list of coordinates?


Because, the lon,lat of the waypoint in the result does not appear to 
map back to the index of the coordinate in the request. I can see 
these don't match exactly, but close enough to know something is 
amiss, probably my understanding.


For example, Here is a list of covered bridges in Vermont with an 
arbitrary START location in the first location:


[['', 'START', '', 43.16477, -72.8958, '', ''],
['Belvidere', 'Mill', 'W off Rte. 109', '44.74373', '-72.74143', 
'1895', 'Null'],
['Belvidere', 'Morgan', 'W off Rte. I 09', '44.74357', '-72.72809', 
'1887', 'Null'],
['Cambridge', 'Grist Mill', 'E off Rte. 108', '44.63668', '-72.82537', 
'1872', 'Null'],
['Cambridge', 'Poland', 'N off Rte. 15', '44.65134', '-72.81465', 
'1887', '2001'],
['Charlotte', 'Holmes Creek', 'W off Rte. 7', '44.33312', '-73.28230', 
'1870', 'Null'],
['Charlotte', 'Sequin', 'E off Quinlan Bridge', '44.28906', 
'-73.15032', '1850', '1994'],
['Charlotte', 'Quinlan\\u0027s', 'Off Rte. 7 to N Ferrisburgh', 
'44.27641', '-73.18388', '1849', '1950'],
['Danville', 'Greenbanks Hollow', 'S off Rte. 2', '44.37762', 
'-72.12200', '1886', '2002'],
['Enosburg', 'Hopkins', 'W next to Rte. 118', '44.92062', '-72.67309', 
'1875', 'Null'],
['Fairfax', 'Maple Street', 'S off Rte. 104', '44.66369', '-73.01043', 
'1865', '2002'],
['Fairfield', 'East Fairfield', 'Adjacent to Rte. 36', '44.78616', 
'-72.86229', '1865', 'Null'],
['Island Pond', 'Island Pond Footbridge', 'At railroad depot off Main 
St.', '44.81629', '-71.88105', '2003', 'Null'],
['Johnson', 'Power House', 'W next to Rte. lOOC', '44.63611', 
'-72.67041', '1872', '2002'],
['Johnson', 'Scribner', 'E off Rte. lOOC', '44.63822', '-72.64855', 
'Null', 'Null'],
['Lemington', 'Columbia', 'Off Rte. 102 to NH', '44.85324', 
'-71.55169', '1912', 'Null'],
['Lunenburg', 'Mount Orne', 'South Lancaster Rd. to NH', '44.46024', 
'-71.65270', '1911', '1999'],
['Lyndon', 'Schoolhouse', 'Rte. 5 E, Lyndon Corner', '44.51617', 
'-72.01014', '1879', 'Null'],
['Lyndon', 'Chamberlin', 'W off Rte. 5', '44.51659', '-72.01647', 
'1881', 'Null'],
['Lyndon', 'Millers Run', 'On Rte. 122', '44.54220', '-72.00989', 
'1878', '1995'],
['Montgomery', 'Comstock', 'S next to Rte. 118', '44.89963', 
'-72.64484', '1883', 'Null'],
['Montgomery', 'West Hill', 'S off Rte. 118', '44.86762', '-72.64831', 
'1883', 'Null'],
['Montgomery', 'Fuller', 'N next to Rte. 118', '44.90334', 
'-72.64011', '1890', '2000'],
['Montgomery', 'Hectorville', 'W off Rte. 118', '44.85378', 
'-72.61359', '1883', '2003'],
['Montgomery', 'Hutchins', 'W off Rte. 118', '44.85862', '-72.61255', 
'1883', 'Null'],
['Montgomery', 'Longley', 'W next to Rte. 118', '44.90723', 
'-72.65594', '1863', 'Null'],
['Morristown', 'Red', 'W off Rte. l00', '44.51869', '-72.67772', 
'1896', 'Null'],
['Shelburne', 'Shelburne Museum', 'Facing Rte. 7', '44.37700', 
'-73.22952', '1845', '1950'],
['Stowe', 'Emily\\u0027s', 'E off Rte. 100', '44.44048', '-72.67983', 
'1844', '1969'],
['Waterville', 'Village', 'W off Rte. 109', '44.69015', '-72.77098', 
'1877', 'Null'],
['Waterville', 'Montgomery', 'E next to Rte. 109', '44.70573', 
'-72.76023', '1877', '1998'],
['Waterville', 'Codding Hollow', 'E next to Rte. l09', '44.71216', 
'-72.75624', '1877', 'Null'],
['Westford', 'Browns River', 'Off Rte. 128', '44.61259', '-73.00808', 
'1873', '2001'],
['Wolcott', 'Fisher Railroad', 'S off Rte. 15', '44.53248', 
'-72.42783', '1908', 'Null'],
['Brandon', 'Sanderson', 'S off Rte. 7', '43.78966', '-73.11176', 
'1840', 'Null'],
['Chelsea', 'Moxley .', 'E next to Rte. 110', '43.95703', '-72.46340', 
'1883', 'Null'],
['Clarendon', 'Kingsley', 'SW off Rte. 103', '43.52386', '-72.94106', 
'1870', '2003'],
['Coventry', 'Black River', 'Town highway 36', '44.86098', 
'-72.27332', '1881', 'Null'],
['East Montpelier', 'Coburn', 'NW off Rte. 2', '44.28084', 
'-72.45419', '1851', '1970'],
['Hartland', 'Martins Mill', 'E off Rte. 5', '43.53250', '-72.39594', 
'1881', 'Null'],
['Hartland', 'Willard', 'E off Rte. 5', '43.59387', '-72.34945', 
'1870', 'Null'],
['Hartland', '(Willard) Twin', 'E off Rte. 5', '43.59368', 
'-72.35015', '2001', 'Null'],
['Marshfield', 'Orton Farm', 'S off Rte. 2', '44.28756', '-72.40818', 
'1890', 'Null'],
['Middlebury', 'Pulp Mill', 'Seymour St. Ext.', '44.02466', 
'-73.17748', '1820', '2002'],
['Middlebury', 'Halpin', 'E off Rte. 7', '44.05013', '-73.14084', 
'1850', 'Null'],
['Northfield', 'Stony Brook', 'W off Rte. 12A', '44.12040', 
'-72.68918', '1899', 'Null'],
['Northfield', 'Northfield Falls

[OSRM-talk] Some question/issue using the trips service

2020-10-11 Diskussionsfäden Stephen Woodbridge

Hi,

I'm trying to use the trips service and I'm confused by the 
waypoint_index. If I pass 50 coordinates on input, is this index back to 
the original list of coordinates?


Because, the lon,lat of the waypoint in the result does not appear to 
map back to the index of the coordinate in the request. I can see these 
don't match exactly, but close enough to know something is amiss, 
probably my understanding.


For example, Here is a list of covered bridges in Vermont with an 
arbitrary START location in the first location:


[['', 'START', '', 43.16477, -72.8958, '', ''],
['Belvidere', 'Mill', 'W off Rte. 109', '44.74373', '-72.74143', '1895', 
'Null'],
['Belvidere', 'Morgan', 'W off Rte. I 09', '44.74357', '-72.72809', 
'1887', 'Null'],
['Cambridge', 'Grist Mill', 'E off Rte. 108', '44.63668', '-72.82537', 
'1872', 'Null'],
['Cambridge', 'Poland', 'N off Rte. 15', '44.65134', '-72.81465', 
'1887', '2001'],
['Charlotte', 'Holmes Creek', 'W off Rte. 7', '44.33312', '-73.28230', 
'1870', 'Null'],
['Charlotte', 'Sequin', 'E off Quinlan Bridge', '44.28906', '-73.15032', 
'1850', '1994'],
['Charlotte', 'Quinlan\\u0027s', 'Off Rte. 7 to N Ferrisburgh', 
'44.27641', '-73.18388', '1849', '1950'],
['Danville', 'Greenbanks Hollow', 'S off Rte. 2', '44.37762', 
'-72.12200', '1886', '2002'],
['Enosburg', 'Hopkins', 'W next to Rte. 118', '44.92062', '-72.67309', 
'1875', 'Null'],
['Fairfax', 'Maple Street', 'S off Rte. 104', '44.66369', '-73.01043', 
'1865', '2002'],
['Fairfield', 'East Fairfield', 'Adjacent to Rte. 36', '44.78616', 
'-72.86229', '1865', 'Null'],
['Island Pond', 'Island Pond Footbridge', 'At railroad depot off Main 
St.', '44.81629', '-71.88105', '2003', 'Null'],
['Johnson', 'Power House', 'W next to Rte. lOOC', '44.63611', 
'-72.67041', '1872', '2002'],
['Johnson', 'Scribner', 'E off Rte. lOOC', '44.63822', '-72.64855', 
'Null', 'Null'],
['Lemington', 'Columbia', 'Off Rte. 102 to NH', '44.85324', '-71.55169', 
'1912', 'Null'],
['Lunenburg', 'Mount Orne', 'South Lancaster Rd. to NH', '44.46024', 
'-71.65270', '1911', '1999'],
['Lyndon', 'Schoolhouse', 'Rte. 5 E, Lyndon Corner', '44.51617', 
'-72.01014', '1879', 'Null'],
['Lyndon', 'Chamberlin', 'W off Rte. 5', '44.51659', '-72.01647', 
'1881', 'Null'],
['Lyndon', 'Millers Run', 'On Rte. 122', '44.54220', '-72.00989', 
'1878', '1995'],
['Montgomery', 'Comstock', 'S next to Rte. 118', '44.89963', 
'-72.64484', '1883', 'Null'],
['Montgomery', 'West Hill', 'S off Rte. 118', '44.86762', '-72.64831', 
'1883', 'Null'],
['Montgomery', 'Fuller', 'N next to Rte. 118', '44.90334', '-72.64011', 
'1890', '2000'],
['Montgomery', 'Hectorville', 'W off Rte. 118', '44.85378', '-72.61359', 
'1883', '2003'],
['Montgomery', 'Hutchins', 'W off Rte. 118', '44.85862', '-72.61255', 
'1883', 'Null'],
['Montgomery', 'Longley', 'W next to Rte. 118', '44.90723', '-72.65594', 
'1863', 'Null'],
['Morristown', 'Red', 'W off Rte. l00', '44.51869', '-72.67772', '1896', 
'Null'],
['Shelburne', 'Shelburne Museum', 'Facing Rte. 7', '44.37700', 
'-73.22952', '1845', '1950'],
['Stowe', 'Emily\\u0027s', 'E off Rte. 100', '44.44048', '-72.67983', 
'1844', '1969'],
['Waterville', 'Village', 'W off Rte. 109', '44.69015', '-72.77098', 
'1877', 'Null'],
['Waterville', 'Montgomery', 'E next to Rte. 109', '44.70573', 
'-72.76023', '1877', '1998'],
['Waterville', 'Codding Hollow', 'E next to Rte. l09', '44.71216', 
'-72.75624', '1877', 'Null'],
['Westford', 'Browns River', 'Off Rte. 128', '44.61259', '-73.00808', 
'1873', '2001'],
['Wolcott', 'Fisher Railroad', 'S off Rte. 15', '44.53248', '-72.42783', 
'1908', 'Null'],
['Brandon', 'Sanderson', 'S off Rte. 7', '43.78966', '-73.11176', 
'1840', 'Null'],
['Chelsea', 'Moxley .', 'E next to Rte. 110', '43.95703', '-72.46340', 
'1883', 'Null'],
['Clarendon', 'Kingsley', 'SW off Rte. 103', '43.52386', '-72.94106', 
'1870', '2003'],
['Coventry', 'Black River', 'Town highway 36', '44.86098', '-72.27332', 
'1881', 'Null'],
['East Montpelier', 'Coburn', 'NW off Rte. 2', '44.28084', '-72.45419', 
'1851', '1970'],
['Hartland', 'Martins Mill', 'E off Rte. 5', '43.53250', '-72.39594', 
'1881', 'Null'],
['Hartland', 'Willard', 'E off Rte. 5', '43.59387', '-72.34945', '1870', 
'Null'],
['Hartland', '(Willard) Twin', 'E off Rte. 5', '43.59368', '-72.35015', 
'2001', 'Null'],
['Marshfield', 'Orton Farm', 'S off Rte. 2', '44.28756', '-72.40818', 
'1890', 'Null'],
['Middlebury', 'Pulp Mill', 'Seymour St. Ext.', '44.02466', '-73.17748', 
'1820', '2002'],
['Middlebury', 'Halpin', 'E off Rte. 7', '44.05013', '-73.14084', 
'1850', 'Null'],
['Northfield', 'Stony Brook', 'W off Rte. 12A', '44.12040', '-72.68918', 
'1899', 'Null'],
['Northfield', 'Northfield Falls', 'W off Rte. 12', '44.17249', 
'-72.65146', '1872', 'Null'],
['Northfield', 'Slaughter House', 'W off Rte. 12', '44.16856', 
'-72.65457', '1872', 'Null'],
['Northfield', 'Lower Cox Brook', 'W off Rte. 12', '44.17278', 
'-72.65303', '1872', 'Null'],
['Northfield', 'Upper Cox Brook', 'W off Rte. 12', '44.17380', 

Re: [OSRM-talk] OSRM 5.0.0 Released

2016-04-23 Diskussionsfäden Stephen Woodbridge

On 4/23/2016 6:46 PM, Daniel Patterson wrote:

Hi Steve,

  You're probably remembering this
ticket: https://github.com/Project-OSRM/osrm-backend/issues/483


Yes, that is the one, thanks! OK, I saw a bunch of comments about 
restrictions and turn penalties so I thought I would check on it as I 
would like to see it implemented.



  We still haven't added support for this kind of restriction.

  Support for the `via node` restrictions exists because it maps fairly
directly to OSRM's internal data model.  All we have to do is remove the
corresponding edge-based-edge identified by the edge-node-edge values.

  For edge-edge-edge restrictions, we'll need a more complex graph to
represent a restricted intersection.  Instead of just removing the
restricted edge-based-edge, we'll need to replace the existing simple
edges with a set of synthetic edges that represent the permitted
routes.  This is quite a bit more involved than the current approach,
and is the reason that nobody has tackled it yet.


I confess some ignorance in how these gets implemented, but in the 
simple model in my mind when doing Dijkstra, I would think that that 
when you are at a node in the graph and you are deciding which of the 
next nodes to evaluate, that if you had a restriction(s) for arriving at 
following node, then the restriction could be defined based on the path 
of arrival to that node.


So for example we can represent edge based restriction of say: AB,BC,CD 
as a path sequentially through nodes A, B, C, arriving at D.


So if we are at node C and the next node in the graph to be evaluated is 
D and D's parent is C, and C's parent is B, and B's parent is A, then 
you can not go to D and you evaluate the other following nodes if any 
that follow on from C.


But if you were at C and your parentage was say C, B, Z, then you could 
proceed to D, unless you also had a restriction for Z->B->C->D.


But I suspect that it is not this simple because of the contracted graph 
and you probably have to transform the intersection into some analogous 
representation that removes restricted paths through the intersection or 
something like that.


Regardless, thank you for your response, the issue number and 
explanation. It would be a nice feature to support if anyone is up for 
the challenge.


Thanks,
  -Steve


daniel

On Sat, Apr 23, 2016 at 2:09 PM, Stephen Woodbridge
<wood...@swoodbridge.com <mailto:wood...@swoodbridge.com>> wrote:

Patrick, et al,

Congrats! Nice job on a major effort to pull this release together.

I have one question, regarding turn restrictions. Last I knew, OSRM
only supported edge-node-edge restrictions and not a more complex
edge-edge-edge-... style restriction.

There used to be issue for this, but I can't find it now. Has this
been implemented and I just missed it? I believe there are cases for
this in the OSM data and I can provide some simple use cases if needed.

Thanks,
  -Steve


On 4/23/2016 7:12 AM, Patrick Niklaus wrote:

Hey,

I'm proud to announce the 5.0.0 OSRM release. This is by far one
of our biggest
releases in terms of lines of code changed, since... a while. It
was a
real team effort featuring contributions from:

@akaiser, Aleksei Potov, Bas Couwenberg, Wilhelm Berg, Dane
Springmeyer, Daniel J. Hofmann, Daniel Patterson, David Low,
Johan Uhle, Jeff Miccolis, Karen Shea, Kerrick Staley, Lauren
Budorick, Lev Dragunov, Mathias Gug,
Michael Krasnyk, Moritz Kobitzsch, Mortada Mehyar and yours truly.

This release features a completely revamped API (both HTTP API
and C++
library), a completely new guidance generation engine,
replacing the Ruby based cucumber tests suit with its Javascript
sibling cucumber-js and various other improvements and fixes.
See the detailed changelog at the end of this post.

Checkout the new documentation:

https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api
https://github.com/Project-OSRM/osrm-backend/wiki/Library-API
https://github.com/Project-OSRM/osrm-backend/wiki/node-osrm-api

On the development side, we removed the two branch system of
having a
`develop` and master `branch`.
`master` now is _unstable_ and `develop` was removed.  This model is
now implemented in both `osrm-backend` and `node-osrm`.
If you have a look at the structure of the source tree, you will
notice we also re-arranged it a lot to more match the module
structure.
Combined with consistent namespacing, this makes the code a lot
easier
to navigate now.

Changes with regard 5.0.0 RC2:
- API:
  - if `geometry=geojson` is passed the resulting geometry can be a
LineString or Point
depending on how many co

Re: [OSRM-talk] OSRM 5.0.0 Released

2016-04-23 Diskussionsfäden Stephen Woodbridge

Patrick, et al,

Congrats! Nice job on a major effort to pull this release together.

I have one question, regarding turn restrictions. Last I knew, OSRM only 
supported edge-node-edge restrictions and not a more complex 
edge-edge-edge-... style restriction.


There used to be issue for this, but I can't find it now. Has this been 
implemented and I just missed it? I believe there are cases for this in 
the OSM data and I can provide some simple use cases if needed.


Thanks,
  -Steve

On 4/23/2016 7:12 AM, Patrick Niklaus wrote:

Hey,

I'm proud to announce the 5.0.0 OSRM release. This is by far one of our biggest
releases in terms of lines of code changed, since... a while. It was a
real team effort featuring contributions from:

@akaiser, Aleksei Potov, Bas Couwenberg, Wilhelm Berg, Dane
Springmeyer, Daniel J. Hofmann, Daniel Patterson, David Low,
Johan Uhle, Jeff Miccolis, Karen Shea, Kerrick Staley, Lauren
Budorick, Lev Dragunov, Mathias Gug,
Michael Krasnyk, Moritz Kobitzsch, Mortada Mehyar and yours truly.

This release features a completely revamped API (both HTTP API and C++
library), a completely new guidance generation engine,
replacing the Ruby based cucumber tests suit with its Javascript
sibling cucumber-js and various other improvements and fixes.
See the detailed changelog at the end of this post.

Checkout the new documentation:

https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api
https://github.com/Project-OSRM/osrm-backend/wiki/Library-API
https://github.com/Project-OSRM/osrm-backend/wiki/node-osrm-api

On the development side, we removed the two branch system of having a
`develop` and master `branch`.
`master` now is _unstable_ and `develop` was removed.  This model is
now implemented in both `osrm-backend` and `node-osrm`.
If you have a look at the structure of the source tree, you will
notice we also re-arranged it a lot to more match the module
structure.
Combined with consistent namespacing, this makes the code a lot easier
to navigate now.

Changes with regard 5.0.0 RC2:
- API:
  - if `geometry=geojson` is passed the resulting geometry can be a
LineString or Point
depending on how many coordinates are present.
  - the removal of the summary field was revered. for `steps=flase`
the field will always be an empty string.

Changes with regard to 4.9.1:
- API:
  - BREAKING: Complete rewrite of the HTTP and library API. See
detailed documentation in the wiki.
  - BREAKING: The default coordinate order is now `longitude,
latidue`. Exception: Polyline geometry
  which follow the original Google specification of `latitdue, longitude`.
  - BREAKING: Polyline geometries now use precision 5, instead of previously 6
  - BREAKING: Removed GPX support
  - New service `tile` which serves debug vector tiles of the road network
  - Completely new engine for guidance generation:
 - Support for highway ramps
 - Support for different intersection types (end of street, forks, merges)
 - Instruction post-processing to merge unimportant instructions
 - Improved handling of roundabouts

- Tools:
  - BREAKING: Renamed osrm-prepare to osrm-contract
  - BREAKING: Removes profiles from osrm-contract, only needed in osrm-extract.
  - Abort processing in osrm-extract if there are no snappable edges remaining.
  - Added .properties file to osrm-extract ouput.
  - Enables the use of multiple segment-speed-files on the
osrm-contract command line

- Profile changes:
  - Remove movable bridge mode
  - Add `maxspeed=none` tag to car profile.
  - A `side_road` tag support for the OSRM car profile.

- Fixes:
  - Issue #2150: Prevents routing over delivery ways and nodes
  - Issue #1972: Provide uninstall target
  - Issue #2072: Disable alternatives by default and if core factor < 1.0
  - Issue #1999: Fix unpacking for self-loop nodes not in core.

- Infrastructure:
  - Cucumber test suit is now based on cucumber-js, removes Ruby as dependency
  - Updated to mapbox/variant v1.1
  - Updated to libosmium v2.6.1
  - Remove GeoJSON based debugging output, replaced by debug tiles

Obtain the new release of node-osrm via:

npm install osrm

Or obtain our C++ core engine here:

https://github.com/Project-OSRM/osrm-backend/archive/v5.0.0.tar.gz

Cheers,
Patrick

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Route Optimizing

2015-07-06 Diskussionsfäden Stephen Woodbridge

Emil,

See this for a good explanation of the various algorithms:
http://www2.isye.gatech.edu/~mgoetsch/cali/VEHICLE/TSP/TSP003__.HTM

Click the right arrow at the bottom of the page to see more algorithms.


 The heuristics for the traveling salesman problem fall into the following 
classes:

Tour construction algorithms (creating an initial sub-tour and / or 
inserting remaining points if necessary)
Tour improvement algorithms (improving the existing tour)

Most of the time, a combination of algorithms from both of these classes is 
used. These are called composite procedures.


The farthest insertion is a Tour construction algorithm and it could 
benefit from adding a simulated annealing of a tabu search optimizer to 
improve the initial tour construction.


-Steve

On 7/6/2015 4:16 PM, Emil Tin wrote:

Seems it the farthest insertion algorithm although i'm not familiar with it.

Sendt fra min iPhone


Den 06/07/2015 kl. 21.40 skrev Stephen Woodbridge wood...@swoodbridge.com:

I have not looked at the round_trip feature code, but if it is solving a TSP 
problem it really need to solve it for an asymmetric matrix and not a symmetric 
matrix. Most of the algorithms you find around the web solve the symmetric 
case, but because we are dealing with oneway streets and turn restrictions, etc 
there can be some big differences in cost based on the direction of travel 
between nodes.

There is a way to convert an asymmetric matrix into a symmetric matrix that 
might be an option. Or if you are only looking for an approximate optimization 
solution then the symmetric matrix might be good enough.

You can look at pgRouting and see what we have done there.

-Steve


On 7/6/2015 2:03 PM, Jonas Plass wrote:
Thank you guys for the Inspiration. I will have a Look at it tomorrow.





Am 06.07.2015 um 18:03 schrieb Stephen Woodbridge wood...@swoodbridge.com:

A simple trick if you want to do start-via-via-...-via-end optimization like 
TSP is to use TSP and artificially set the distance between end and start 
locations to zero and this will keep those two city bound together. Then in the 
result just remove that link.

This will allow the same code that solves TSP round trip to also optimize the 
vis points between a start and end trip.

-Steve


On 7/6/2015 10:02 AM, Emil Tin wrote:


The OSRM team is working on a new API call to compute a round-trip that visits 
a list of point:

https://github.com/Project-OSRM/osrm-backend/tree/feature/round_trip


Med venlig hilsen

Emil Tin
IT- og Processpecialist
Trafik
___
KØBENHAVNS KOMMUNE
Teknik- og Miljøforvaltningen
Byens Anvendelse

Njalsgade 13, 1035
Postboks 380
2300 København S

Direkte 2369 5986
Mobil 2369 5986
Email z...@tmf.kk.dk
EAN 5798009493149

-Oprindelig meddelelse-
Fra: Hans Gregers Petersen [mailto:greg...@septima.dk]
Sendt: 6. juli 2015 15:55
Til: Mailing list to discuss Project OSRM
Emne: Re: [OSRM-talk] Route Optimizing

Hi Jonas,



Are there any ambitions to create something like an optimization for route 
stops?
And when not do you know any other way to do this via rest request?



If you are thinking of the TSP -
https://en.wikipedia.org/wiki/Travelling_salesman_problem - then it is a simple problem of I 
need to visit X places after each other, please optimize the order to visit those places in. 
The solution is well-described in the WikiPedia link. You can write a little JavaScript, Python or 
whatever - and optimize on either distance or time. It is fairly simple, and all you use OSRM for 
is getting the costs. If you want as few calls to the OSRM-server as possible, then have a look at 
the table-service  ( 
https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#available-services
)

Best regards,

Greg


Hans Gregers Petersen
Partner, Seniorkonsulent
greg...@septima.dk
--
Septima P/S
Frederiksberggade 28, 2. tv.
1459 København K
www.septima.dk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org

Re: [OSRM-talk] Route Optimizing

2015-07-06 Diskussionsfäden Stephen Woodbridge
I have not looked at the round_trip feature code, but if it is solving a 
TSP problem it really need to solve it for an asymmetric matrix and not 
a symmetric matrix. Most of the algorithms you find around the web solve 
the symmetric case, but because we are dealing with oneway streets and 
turn restrictions, etc there can be some big differences in cost based 
on the direction of travel between nodes.


There is a way to convert an asymmetric matrix into a symmetric matrix 
that might be an option. Or if you are only looking for an approximate 
optimization solution then the symmetric matrix might be good enough.


You can look at pgRouting and see what we have done there.

-Steve

On 7/6/2015 2:03 PM, Jonas Plass wrote:

Thank you guys for the Inspiration. I will have a Look at it tomorrow.





Am 06.07.2015 um 18:03 schrieb Stephen Woodbridge wood...@swoodbridge.com:

A simple trick if you want to do start-via-via-...-via-end optimization like 
TSP is to use TSP and artificially set the distance between end and start 
locations to zero and this will keep those two city bound together. Then in the 
result just remove that link.

This will allow the same code that solves TSP round trip to also optimize the 
vis points between a start and end trip.

-Steve


On 7/6/2015 10:02 AM, Emil Tin wrote:


The OSRM team is working on a new API call to compute a round-trip that visits 
a list of point:

https://github.com/Project-OSRM/osrm-backend/tree/feature/round_trip


Med venlig hilsen

Emil Tin
IT- og Processpecialist
Trafik
___
KØBENHAVNS KOMMUNE
Teknik- og Miljøforvaltningen
Byens Anvendelse

Njalsgade 13, 1035
Postboks 380
2300 København S

Direkte 2369 5986
Mobil 2369 5986
Email z...@tmf.kk.dk
EAN 5798009493149

-Oprindelig meddelelse-
Fra: Hans Gregers Petersen [mailto:greg...@septima.dk]
Sendt: 6. juli 2015 15:55
Til: Mailing list to discuss Project OSRM
Emne: Re: [OSRM-talk] Route Optimizing

Hi Jonas,



Are there any ambitions to create something like an optimization for route 
stops?
And when not do you know any other way to do this via rest request?



If you are thinking of the TSP -
https://en.wikipedia.org/wiki/Travelling_salesman_problem - then it is a simple problem of I 
need to visit X places after each other, please optimize the order to visit those places in. 
The solution is well-described in the WikiPedia link. You can write a little JavaScript, Python or 
whatever - and optimize on either distance or time. It is fairly simple, and all you use OSRM for 
is getting the costs. If you want as few calls to the OSRM-server as possible, then have a look at 
the table-service  ( 
https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#available-services
)

Best regards,

Greg


Hans Gregers Petersen
Partner, Seniorkonsulent
greg...@septima.dk
--
Septima P/S
Frederiksberggade 28, 2. tv.
1459 København K
www.septima.dk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Route Optimizing

2015-07-06 Diskussionsfäden Stephen Woodbridge
A simple trick if you want to do start-via-via-...-via-end optimization 
like TSP is to use TSP and artificially set the distance between end and 
start locations to zero and this will keep those two city bound 
together. Then in the result just remove that link.


This will allow the same code that solves TSP round trip to also 
optimize the vis points between a start and end trip.


-Steve

On 7/6/2015 10:02 AM, Emil Tin wrote:



The OSRM team is working on a new API call to compute a round-trip that visits 
a list of point:

https://github.com/Project-OSRM/osrm-backend/tree/feature/round_trip


Med venlig hilsen

Emil Tin
IT- og Processpecialist
Trafik
___
KØBENHAVNS KOMMUNE
Teknik- og Miljøforvaltningen
Byens Anvendelse

Njalsgade 13, 1035
Postboks 380
2300 København S

Direkte 2369 5986
Mobil 2369 5986
Email z...@tmf.kk.dk
EAN 5798009493149

-Oprindelig meddelelse-
Fra: Hans Gregers Petersen [mailto:greg...@septima.dk]
Sendt: 6. juli 2015 15:55
Til: Mailing list to discuss Project OSRM
Emne: Re: [OSRM-talk] Route Optimizing

Hi Jonas,



Are there any ambitions to create something like an optimization for route 
stops?
And when not do you know any other way to do this via rest request?



If you are thinking of the TSP -
https://en.wikipedia.org/wiki/Travelling_salesman_problem - then it is a simple problem of I 
need to visit X places after each other, please optimize the order to visit those places in. 
The solution is well-described in the WikiPedia link. You can write a little JavaScript, Python or 
whatever - and optimize on either distance or time. It is fairly simple, and all you use OSRM for 
is getting the costs. If you want as few calls to the OSRM-server as possible, then have a look at 
the table-service  ( 
https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#available-services
)

Best regards,

Greg


Hans Gregers Petersen
Partner, Seniorkonsulent
greg...@septima.dk
--
Septima P/S
Frederiksberggade 28, 2. tv.
1459 København K
www.septima.dk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Reverting 11c6713 fixed at least 5 open issues

2015-05-18 Diskussionsfäden Stephen Woodbridge

Hi all,

Over the weekend commit 11c673 was reverted and this appears to have 
fixed issues #1429, #1451, #1474, #1475, #1479


I have verified that the change fixes these tickets and comment on each 
ticket.


Thank you to everyone involved with reporting, chasing the issue, and 
resolving it.


-Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] I'm getting a crazy route in Montevideo

2015-04-23 Diskussionsfäden Stephen Woodbridge

This looks like it is OSRM weirdness, but it might be a data problem:

This is very crazy with lots of weird loops, 12 turns.

http://osrm.at/bYh

But if I add one more position the looping goes away, Granted this 
changes the exit strategy. but the next route does not.


http://osrm.at/bYi

Even this would be better, it is about the same time but shorter 
distance and 9 turns compared to the first route.


http://osrm.at/bYj

The looping is what makes this stand out. I thought we had turn 
penalties (but maybe they are not all that impactful) and that we should 
get few turns for routes of about the same distance going through 
similar via points.


-Steve

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Can hints be used to identify a common segment?

2015-04-21 Diskussionsfäden Stephen Woodbridge

Hi Fernando,

Thank you that is a useful observation but my problem is a little 
different. I have many positions and I would like to determine those 
that lie on the same segment so that I can group them together.


If I remember correctly the hint is a base64 encoded pointer to the edge 
plus something like and offset along the edge. I could be useful to take 
advantage of this information to group and order locations along a path.


I'll see if I can figure it out from the source code.

-Steve

On 4/21/2015 8:28 AM, Fernando Pacheco wrote:

If both points are in the same segment, their position (third element in
route_instructions) should be consecutive.

Located on the same street but in different segments (3 and 5):
[9, General José Esteban Brito del Pino 122,3,14, 121m, S, 193.1]
[9, General José Esteban Brito del Pino, 57,5,21, 56m, S, 191.1]

In the same segment (4 and 5):
[9, General José Esteban Brito del Pino, 35,4,5, 34m, S, 191.1]
[9, General José Esteban Brito del Pino, 56,5,21, 56m, S, 190.1]

May be?. Fernando.

El 21/04/15 a las 00:24, Stephen Woodbridge escribió:

Hi,

I have a need to be able to identify if two locations are on the same
segment. We already have the hints for each location and there seems to
be some commonality in the hints for location on the same segment.

I'm wondering if there is a safe way to use the hints to determine if
they are on the same segment.

Thanks,
   -Steve

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk





---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Can hints be used to identify a common segment?

2015-04-20 Diskussionsfäden Stephen Woodbridge

Hi,

I have a need to be able to identify if two locations are on the same 
segment. We already have the hints for each location and there seems to 
be some commonality in the hints for location on the same segment.


I'm wondering if there is a safe way to use the hints to determine if 
they are on the same segment.


Thanks,
  -Steve

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] OSRM-talk Digest, Vol 28, Issue 4

2015-04-12 Diskussionsfäden Stephen Woodbridge

Hi Francisco,

I am a little confused by the concept of user preferences when taken in 
context of OSRM and CH (contraction hierarchy). Because of the extensive 
preprocessing required when using CH, there is not really an ability to 
offer user preferences at routing because the hierarchy would change 
based on user preferences. Everything is sort of pre-baked into the 
graph during osrm-prepare and there is little that you can do for 
preferences during routing.


Maybe I'm confused and don't understand what you are try to accomplish. 
Are you proposing creating another routing engine that is not based on 
contraction hierarchy that would solve the bi- or multi-criteria 
problem? which would be cool to have an alternative solver as an option.


Thanks,
  -Steve

On 4/12/2015 5:06 PM, Francis wrote:

-First of all, my apologies if you receive duplicated this message, I
sent it 2 days ago, but due to the length of the text it was sent to the
moderator of the list.-

Hi Mohammed,

I should have mentioned this option, the linear combination of criteria
is naturally the obvious solution when the multiobjective problem is
approached for the first time.

To define a ranking procedure for the solutions can reduce the
multiobjective problem to a single objective problem, but it has many
drawbacks:
- An arbitrary vector of weights must be defined. Who should define that
weights? each user? the routing machine? How do you measure that travel
time is for example w_i more or less important than the economic cost,
or the CO2 emissions? In the majority of the cases these weights would
be totally arbitrary and will not reflect the user preferences.
- The linear combination function would add different measures, in our
case we are adding euros + minutes, or euros + meters + minutes, and the
resulting value would not have much sense.  Moreover, if you are adding
meters and euro cents for example, the first criterion (or metric) is
going to be several orders of magnitude greater than the second, i.e. if
you are adding a solution path with 15 meters that costs you 900
euro cents (150km and 9 euros), when you add both magnitudes the second
one will become quite irrelevant, and solution paths that minimize the
distance are always preferred.
- To avoid the second problem, you can normalize all the criteria to be
expressed in a scale from 0 to 100, from the minimum value for that
criterion (optimum) to the worst possible one, but this would still be a
bad solution to model the user preferences.

Thanks anyway for you answer Mohammed, it helped me to further develop
the purpose of multiobjective graph search algorithms.
In summary, routing on road maps with a single criterion have been
practically solved, it is enough to see that OSRM calculates an optimum
route in the order of milliseconds, and my guess is that other variants
like routing with multiple criteria or dynamic costs (like traffic
information) will be soon included in routing services. (if they are not
yet).

Best regards,
Francisco J.


Message: 2
Date: Thu, 9 Apr 2015 19:16:18 +0100
From: Mohammed Ayoub NEGGAZ am_neg...@esi.dz
mailto:am_neg...@esi.dz
To: Mailing list to discuss Project OSRM
osrm-talk@openstreetmap.org mailto:osrm-talk@openstreetmap.org
Subject: Re: [OSRM-talk] OSRM-talk Digest, Vol 27, Issue 12
Message-ID:

CAKxYid4dzUESz_a=vxvgrjgd7u0l9w7rs++2jz7rzqri808...@mail.gmail.com
mailto:vxvgrjgd7u0l9w7rs%2b%2b2jz7rzqri808...@mail.gmail.com
Content-Type: text/plain; charset=utf-8

Hi Francis,

I'm working on the dynamic case of the problem but I think I
might help you.

What if you create a formula for your critera for example, for
the costs
that you gave you can define :

weight = (Travel Time * TT_Weight) + (Cost * C_Weight) where TT_ and
C_Weight are factors and weight will allways give a scalar.

If we are interrested in travel time we define TT_Weight = 2 
C_Weight = 4
and then

A= (60 min, 30€) = 60*2 + 30*4 = 240
B= (65 min, 25€) = 65*2 + 25*4 = 230
C= (85 min, 20€) = 85*2 + 20*4 = 250
D= (90 min, 15€) = 90*2 = 15*4 = 240

The algorithm can respond with B which (he thinks) the best
route if we
prefere spending less than arriving in time.

With this modelization, you need to define a static vector of
weights (on
for each property) and therefore you can use CH with Bi-Dijkstra
provided
by OSRM.

I wish this can help you.

Good luck in your work.

With respect,


2015-04-09 17:28 GMT+01:00 Francis francisr...@gmail.com
mailto:francisr...@gmail.com:

  Hi Romain,
 
  I would also be pretty interested in a bicriteria (or
multicriteria) OSRM
  version. What bicriteria algorithm would you like to use?

Re: [OSRM-talk] arrive to destination on the adequate side in two-way streets

2015-03-12 Diskussionsfäden Stephen Woodbridge

Fernando,

I open this issue to document the use case:

https://github.com/Project-OSRM/osrm-backend/issues/1413

You can watch this issue to get informed of updates and to add 
additional comments to it.


-Steve

On 3/10/2015 10:18 AM, Stephen Woodbridge wrote:

Fernando,

Here are some other oddities that are related to this problem:

http://osrm.at/blp

In this example the route should be from green, yellow, to red. But in
this case it appears to not honor the implied direction and reorders the
points or it does a uturn at the yellow that is not noted in the
directions. What the route should look like  is similar to this:

http://osrm.at/a3p

I have moved it over to the oneway streets to force the path. Or the
path could like like this:

http://osrm.at/blq

where it bypasses the red going the wrong direction, around the block to
yellow then back to red.

This is a good application to see how OSRM responds to various route
requests given different conditions.

-Steve

On 3/10/2015 5:31 AM, Fernando Pacheco wrote:

I understand the idea.

I had imagined something similar but with existing spatial information
and using OSRM directly.

The definition of that stretch of the road goes from node i (OSM-Ni) to
node j (OSM-Nj). The street is two-way. A is an intermediate point of
my route (client). a is the nearest point of A on the street. The
vehicles driven on the right side of the street.

  A
OSM-Ni + --- a --- + OSM-Nj


If A is the left side of the street: 1 - find the point nearest the
street (a); 2 - add the node OSM-Nj (before node a) to the route.


OSM-Ni + --- a --- + OSM-Nj
  A

If A is the right side of the street: 1 - find the point nearest the
street (a); 2 - add the node OSM-Ni (before node a) to the route.

[The first point of the route should be approached in a similar way but
the subsequent node is added after a (in flow direction).]

Is this a possible approach to solve the problem with OSRM ?. Thank you
very much. Fernando.

El 09/03/15 a las 16:34, Stephen Woodbridge escribió:

On 3/9/2015 1:54 PM, Fernando Pacheco wrote:

Hi all.

We are developing an application for routing solid waste collection
trucks. We use OSRM to calculate distances between collecting points
(intermediate points).

Some customers are located in two-way streets (simple, no separators)
... How can I say to OSRM that must arrive to the collecting points at
the adequate side of the street? That is, on the side where the client
is, without crossing the opposite direction of the street to access the
load.

Is it possible?. Thanks in advance. Fernando.



Hi Fernando,

When the street is represented as a single street center line, a via
point is just located on the street segment and then the route is
computed to that point. I do not believe there is any way to say arrive
at this node from a given direction.

One idea for a work around to this problem is to take advantage of the
fact that OSRM does not make u-turns at via points so it might be
possible if you know the location is on the right side of a street (in
right side drive countries) and you can access the geometry to generate
an additional via point before or after the collecting point and then
include both points in order in the route.

so for a simple street:

 B A
---
  C  D

with 4 collection points and you want to collect A and B only when
traversing the street from right to left and C and D only when
traversing the street from left to right. So if we add the lower case
points a,b,c,d as:

 B  b  A  a
---
   c  C   d  D

Then we can compute a route from say Z (not shown) to A we would compute
the route Z-a-A and this should force OSRM to arrive at A after point a
and this would put it in the correct direction.

Say you want to route A to C then presumably you should be able to route
a-A-c-C, this makes some presumptions that would need to be validated
but the idea is that a-A forces the direction along the street for the
start of the route, then it would have to exit the left end of the
street and either make a u-turn or drive around a block and re-enter the
street from the left to get to c then to C moving in the correct
direction.

But as you can see this greatly complicates the problem by potentially
doubling the number of nodes and requiring a lot of pre-computation to
assess the side and direction.

-Steve W


___
OSRM-talk mailing list
osrm-t...@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk





___
OSRM-talk mailing list
osrm-t...@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
osrm-t...@openstreetmap.org
https

Re: [OSRM-talk] osrm route directly from command line not via http possible?

2015-03-11 Diskussionsfäden Stephen Woodbridge

On 3/11/2015 10:12 AM, Michael Leonard wrote:

Hi Steve

Thanks for the message!  Yes I found simpleclient.cpp before... but
unfortunately I don't know where to start to turn that into a command I
can call from the command line to generate a route I'm afraid.

If it's not too much trouble, would you be able to share any example
code or tips on how to turn simpleclient.cpp into something I can call
from the command line?  I'd really really appreciate any help!


Micheal,

It is a command line the generates a route from start_coordinate to 
end_coordinate and prints out the result.


Mimic this code and substitute your coordinates and do something with 
the output.


You have not defined your requirements in enough detail for anyone to be 
more specific. Also you will need to do some C++ programming to 
implement whatever you need.


-Steve

PS: If you want some consulting help to build a specific tool contact me 
off-list.





Thanks

Kind regards

Mike

PS

On 10 March 2015 at 16:26, Stephen Woodbridge wood...@swoodbridge.com
mailto:wood...@swoodbridge.com wrote:

Michael,

Take a look at this.


https://github.com/Project-__OSRM/osrm-backend/blob/master/__tools/simpleclient.cpp

https://github.com/Project-OSRM/osrm-backend/blob/master/tools/simpleclient.cpp

I have used it to wrap OSRM into some VRP code. I also recommend
using osrm-datastore to host the data, then you can make multiple
parallel request to that and we were getting 5-8ms responses to
route queries.

-Steve


On 3/10/2015 12:14 PM, Michael Leonard wrote:

Hi

I'm new to OSRM and the mailing list but have managed to get it all
working well on a 64bit Ubuntu 14.04 server.

I’m writing looking for help to get OSRM’s routing algorithm working
directly from the command line rather than via http.


More info

OSRM is already extremely fast when called using |curl
http://localhost
…| - however I’m looking to include it an algorithm to generate
millions
of realistic driving routes, and am hoping that the underlying C++
routing function might be accessible from the command line
directly in
some way. With a command line function that wraps around OSRM’s
routing
algorithm, I could call this from within R where I’m writing the
rest of
my code.

My C++ skills are unfortunately at the extreme beginner level, but I
have found where I might start if I were much more advanced:
either the
file simpleclient.cpp in the OSRM github repo or the
node_osrm.cpp file
in the node-osrm repo which looks like it's similar to
simpleclient.cpp.

Hopefully someone has already crossed this bridge and could I'm
hoping
provide some kind of simple command-line wrapper function to these
underlying c++ functions so that I can avoid the http approach
which I'm
guessing slows things down.


Thanks in advance...

Thanks so much in advance I really appreciate any help or tips
to get
this working

Love osrm by the way


Mike


PS

I posted this on stackoverflow but found this mailing list and
thought I
might have more luck using it.


http://stackoverflow.com/__questions/28958577/open-__source-routing-machine-via-__the-commandl

http://stackoverflow.com/questions/28958577/open-source-routing-machine-via-the-commandl


_
OSRM-talk mailing list
OSRM-talk@openstreetmap.org mailto:OSRM-talk@openstreetmap.org
https://lists.openstreetmap.__org/listinfo/osrm-talk
https://lists.openstreetmap.org/listinfo/osrm-talk



_
OSRM-talk mailing list
OSRM-talk@openstreetmap.org mailto:OSRM-talk@openstreetmap.org
https://lists.openstreetmap.__org/listinfo/osrm-talk
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Using OSRM linked into other code?

2014-11-15 Diskussionsfäden Stephen Woodbridge

Hi,

As a follow up to this, I wanted to report some progress.

Using Tools/simpleclient.cpp as a model, it was pretty easy to create a 
class that mimic that code for our limited needs. We connect via shared 
memory and we are able to get response times from viaroute requests of 
11-20 ms where they used to be about 500 ms.


And this is still passing json documents in the response so some of this 
time is spend encoding and decoding the json.


If you need to do something similar, I recommend looking at 
Tools/simpleclient.cpp and then wrapping those ideas into a class as you 
require.


Thank you everyone that offered ideas and suggests.

-Steve

On 11/7/2014 2:42 PM, Stephen Woodbridge wrote:

I'll answer a bunch of the reply's here:

1. we do pre-compute a distance matrix and use that already but if you
have a situation like:

o--t--uv-
|  ||
B  C|
|  ||
A--x--yz---D

and you want the route A-B-C-D if you use a precomputed distance matrix
you get a path A-x-B-x-y-C-y-z-D (depending on where B and C are in
those segments (ie: the vehicle makes a u-turn at B and C) when we want
a route like A-x-B-t-u-C-y-z-D. OSRM will generate the later route if
you ask for the route A,B,C,D with via points. So a simple distance
matrix does not work well.

2. The performance issue is not with the C++, we get basically the same
performance using Perl (GET) or curl at the command line, or curl from C
or from c++.

3. I will look at the node-osrm code. I remember seeing that posted, but
had forgotten. Thanks for the reminder of that.

4. I am some what stuck on an older version of the source code because
I'm not in a position to upgrade my server OS and packages. :( So this
is somewhat problematic for me at the moment.

Anyway, lots of great ideas. I appreciate them all and will be digging
into them over the weekend.

Best regards,
   -Steve

On 11/7/2014 12:46 PM, John Firebaugh wrote:

Hi Steve,

Recent versions of osrm-backend build a library which you can link
against. See https://github.com/Project-OSRM/node-osrm/ for an example.

cheers,
John

On Fri, Nov 7, 2014 at 7:13 AM, Stephen Woodbridge
wood...@swoodbridge.com mailto:wood...@swoodbridge.com wrote:

Hi,

I seem to remember a while back that there was a discussion about
the possibility to embed the OSRM routing engine at the code level
rather than doing HTTP requests to a server.

I now find myself in a position that this would be desirable to do.
I have a small coverage area like a city, but I'm getting killed by
the overhead of formatting requests as strings, making a socket
connection to osrm-routed, parsing the responses, etc. Making local
requests my server this is taking 4-500 ms per request.

Basically, I'm doing viaroute requests with 2-100 via points. 99% of
the time all I need to know is the travel time.

Since I'm developing in C++, I thought it might be easy and much
faster to instantiate the routing engine and then have a simple
interface where I can pass a container of points and get back the
travel time for that route and/or the path coordinates. But I could
live without the coordinates if I had to.

Has anyone done this already? Can you share?

I have started digging through the source to see if I can do this,
but working my way in from osrm-routed or Tools/simpleclient.cpp the
code is very entangled with all the http request/response stuff that
I would ideally like to avoid. So far the most promising path looks
like using some variant of the simpleclient, but its not obvious if
or how to untangle all the json stuff and simply return a struct or
class to the caller without that. I spent most of yesterday, digging
through this and made a lot of progress just understanding
simpleclient and getting ti to compile and work and get it to actual
return results using a shared memory connection.

A little help in this direction would be appreciated.

Thanks,
   -Steve

_
OSRM-talk mailing list
OSRM-talk@openstreetmap.org mailto:OSRM-talk@openstreetmap.org
https://lists.openstreetmap.__org/listinfo/osrm-talk
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Using OSRM linked into other code?

2014-11-07 Diskussionsfäden Stephen Woodbridge

Hi,

I seem to remember a while back that there was a discussion about the 
possibility to embed the OSRM routing engine at the code level rather 
than doing HTTP requests to a server.


I now find myself in a position that this would be desirable to do. I 
have a small coverage area like a city, but I'm getting killed by the 
overhead of formatting requests as strings, making a socket connection 
to osrm-routed, parsing the responses, etc. Making local requests my 
server this is taking 4-500 ms per request.


Basically, I'm doing viaroute requests with 2-100 via points. 99% of the 
time all I need to know is the travel time.


Since I'm developing in C++, I thought it might be easy and much faster 
to instantiate the routing engine and then have a simple interface where 
I can pass a container of points and get back the travel time for that 
route and/or the path coordinates. But I could live without the 
coordinates if I had to.


Has anyone done this already? Can you share?

I have started digging through the source to see if I can do this, but 
working my way in from osrm-routed or Tools/simpleclient.cpp the code is 
very entangled with all the http request/response stuff that I would 
ideally like to avoid. So far the most promising path looks like using 
some variant of the simpleclient, but its not obvious if or how to 
untangle all the json stuff and simply return a struct or class to the 
caller without that. I spent most of yesterday, digging through this and 
made a lot of progress just understanding simpleclient and getting ti to 
compile and work and get it to actual return results using a shared 
memory connection.


A little help in this direction would be appreciated.

Thanks,
  -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Using OSRM linked into other code?

2014-11-07 Diskussionsfäden Stephen Woodbridge

Per,

Thank your for responding. We are also doing the HTTP requests, but the 
performance is killing us. So just a quick update on what I have found 
out so far:


time GET 'http://localhost:5000/viaroute?...'

takes about 500 ms on my system.

time ./simpleclient --sharedmemory

takes about 44 ms with all the default options in the code turned on
takes about 22 ms with all the options turned off

And these numbers are based on still returning json output and parsing that.

So if it were possible to turn simpleclient into object with a few 
simple options we could get something close to the performance 
improvement above.


And if we can untangle the json encoding and parse and just pass back 
raw data we would probably see some additional improvement over those 
numbers.


This seems like a worthy path to follow, hence my request for some help 
or pointers untangling json encoding and parsing.


Thanks,
  -Steve

On 11/7/2014 10:41 AM, Per Lindberg wrote:

I guess that was me. We also would love to have a single
sharable object file (.dll and .so) with a documented API.
All we need is travel time from A to B. We currently do
gazillions of HTTP calls to a separate process, so a more
direct call would be wonderful.

Keep me posted if you see any progress in this.

Cheers,
Per Lindberg
Facility labs



On 2014-11-07 16:13, Stephen Woodbridge wrote:

Hi,

I seem to remember a while back that there was a discussion about the
possibility to embed the OSRM routing engine at the code level rather
than doing HTTP requests to a server.

I now find myself in a position that this would be desirable to do. I
have a small coverage area like a city, but I'm getting killed by the
overhead of formatting requests as strings, making a socket connection
to osrm-routed, parsing the responses, etc. Making local requests my
server this is taking 4-500 ms per request.

Basically, I'm doing viaroute requests with 2-100 via points. 99% of the
time all I need to know is the travel time.

Since I'm developing in C++, I thought it might be easy and much faster
to instantiate the routing engine and then have a simple interface where
I can pass a container of points and get back the travel time for that
route and/or the path coordinates. But I could live without the
coordinates if I had to.

Has anyone done this already? Can you share?

I have started digging through the source to see if I can do this, but
working my way in from osrm-routed or Tools/simpleclient.cpp the code is
very entangled with all the http request/response stuff that I would
ideally like to avoid. So far the most promising path looks like using
some variant of the simpleclient, but its not obvious if or how to
untangle all the json stuff and simply return a struct or class to the
caller without that. I spent most of yesterday, digging through this and
made a lot of progress just understanding simpleclient and getting ti to
compile and work and get it to actual return results using a shared
memory connection.

A little help in this direction would be appreciated.

Thanks,
   -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk





___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Selectively avoiding London Congestion Charge

2014-05-19 Diskussionsfäden Stephen Woodbridge
So there might be a work around to this problem is you want to place 
high costs on the congested area. This would cause the routes to avoid 
this area but still allow you to start or end a route in the congested area.


The side effect of doing this it the the cost might not reflect accurate 
drive times.


-Steve W

On 5/19/2014 9:43 AM, John Aherne wrote:

Emil


Thanks for the information. Not what I wanted to hear,  but there we are.

I shall have to go away and ponder on this.

Anyway  I got my routing via motorways working - not 100% - so I still
need to do some tweaks.

Thanks

John Aherne




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Cannot find route between points

2014-02-12 Diskussionsfäden Stephen Woodbridge

On 2/12/2014 8:48 AM, John Aherne wrote:




On Wed, Feb 12, 2014 at 1:19 PM, Rodolphe Quiédeville
rodol...@quiedeville.org mailto:rodol...@quiedeville.org wrote:


John Aherne jjahe...@gmail.com mailto:jjahe...@gmail.com writes:
[...]
 
  Rodolphe
 
  Thanks for the quick reply.
 
  I tried your suggestion using the webconsole.
 
  I then mimiced the url used by the javascript adding on the zoom
level and
  instructions=true for good measure and rounded the coordinates to
match.
 
  I still get the same result - status 207
 
  I was already trying zoom levels from 1 to 18 without any luck.
 
  If the map is using the same routing engine then I am baffled.

It's really weird, how do you call the router ie with which tool ? Do
you use a webrowser or a tool like curl or wget ? May be you can paste
some logs off your shell console on a pastie to share with us, may be
will find something.

Regards

--
Rodolphe Quiédeville
Expert Tsung - Consulting en performance des SI
Tel : 06 13 79 63 41
http://blog.rodolphe.quiedeville.org


Thanks for responding.

I use a simple python script for this test.

import urllib2
from datetime import datetime
import json
import urllib

URL =
'http://router.project-osrm.org/viaroute?z=14loc=51.502874,-0.119249loc=51.534750,-0.135230instructions=true'
req = urllib2.Request(URL)
try:
 response = urllib2.urlopen(req)
except Exception, e:
 print 'Error', str(e)
 print 'Error msg', e.msg
 print 'Error hdrs', e.hdrs
 print 'Error fp', e.fp
res = response.read()
print 'the res', res
my_data = json.loads(res)
for item in my_data:
 print 'ITEM',item, my_data[item],'\r\n'

I can send a wireshark capture of the actual wire data if anyone thinks
it is useful.

But the python call is about as simple as it can get.


I can reproduce this with:

$ GET 
'http://router.project-osrm.org/viaroute?z=14loc=51.502874,-0.119249loc=51.534750,-0.135230instructions=true'


{status:207,status_message: Cannot find route between points}[]

And I get the same thing in a browser.

-Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] problem OSRM compilying

2014-02-06 Diskussionsfäden Stephen Woodbridge

On 2/6/2014 4:33 AM, marcos...@virgilio.it wrote:

Hello everybody
I want to compile the extractor file on my OSRM-Project, I follow the
github guide for my ubuntu pc( I do this on my shell :/|sudo apt-get
install build-essential git cmake pkg-config libprotoc-dev libprotobuf7
\ protobuf-compiler libprotobuf-dev libosmpbf-dev libpng12-dev \
libbz2-dev libstxxl-dev libstxxl-doc libstxxl1 libxml2-dev \ libzip-dev
libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev libluajit-5.1-dev|/)

but when i try this command :

*/gcc -Wall -W -Werror extractor.cpp -o Extractor /*

on my shell there are some errors:

/*In file included from Extractor/ScriptingEnvironment.h:34:0,
  from extractor.cpp:30:
Extractor/../Util/LuaUtil.h:32:21: fatal error: lua.h: File o directory
non esistente
compilation terminated.*

/
Why?thank you/
/


I have these lua packages installed and have not problem compiling:

liblua5.1-0/precise uptodate 5.1.4-12ubuntu1
liblua5.1-0-dev/precise uptodate 5.1.4-12ubuntu1
libluabind-dev/precise uptodate 0.9.1+dfsg-4
libluabind0.9.1/precise uptodate 0.9.1+dfsg-4
libluajit-5.1-2/precise uptodate 2.0.0~beta9+dfsg-1
libluajit-5.1-common/precise uptodate 2.0.0~beta9+dfsg-1
libluajit-5.1-dev/precise uptodate 2.0.0~beta9+dfsg-1

-Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Run more than one instance on same host

2014-02-05 Diskussionsfäden Stephen Woodbridge

On 2/5/2014 4:53 AM, Rodolphe Quiédeville wrote:


Rodolphe Quiédeville rodol...@quiedeville.org writes:


Hi,

Is it possible to run more than one instance on the same host, obviously
I'll use a different tcp port for listenning, but what about files in
/dev/shm ?


I had a look at the source code, and a solution could be to concatenate
the tcp port number to filename in /dev/shm as is the filenames will
for example for sem.query rename to :

/dev/shm/sem.query.5000

What do you think about this solution ?
May I implement it and propose a path in this way ?

Regards,


Rodolphe,

I think it makes sense to open a ticket for this.
Describe the problem. Your proposed fix as above. Ask what branch they 
would like a pull request for. I'm guessing that it should be a recent 
version of develop.


-Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Getting viaroute response where name if zero bytes

2014-01-22 Diskussionsfäden Stephen Woodbridge

Dennis,

I'm getting a viaroute response where the street name is a string of 
zero bytes. here is a hexdump of the response text:


http://codepad.org/UJ6Nwoyh

look at line 57-59.

If it matters I'm using master

[master] ~/work/Project-OSRM$ git show
commit fbbd6caf97e3366f358df0a17c976d1d7f46c47a
Merge: 992458a 58a5754
Author: Dennis Luxen i...@project-osrm.org
Date:   Fri Dec 6 04:14:59 2013 -0800

Merge pull request #818 from rodo/master

Add missing option '-p' in help message

Got any ideas?

thanks,
  -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Initial release of OSRM-Tools has been pushed to github

2013-12-14 Diskussionsfäden Stephen Woodbridge

I'm happy to announce that OSRM-Tools has been pushed to to github:

https://github.com/woodbri/osrm-tools

This project provides some basic tools to:

1. extract pgRouting tables from a database into OSRM normalized file 
format that can be used to load the data into and OSRM Router instance


2. provide a PostgreSQL extension so you can access the OSRM instance 
from within the database via postgresql functions.


Sorry, it currently has very little documentation but I will add more 
over time.


Since this project is a cross-over between pgRouting and Project-OSRM, 
and I'm on both email lists lets use these for now and if there is a lot 
of traffic then we can look at getting dedicated list.


Thanks,
  -Steve W

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] via_points in output

2013-11-18 Diskussionsfäden Stephen Woodbridge

On 11/18/2013 12:09 PM, Florian Lohoff wrote:

On Mon, Nov 18, 2013 at 09:08:47AM -0500, Stephen Woodbridge wrote:

Or would it be more feasible to extend the OSRM output a bit to dump
these interesting nodes additionally?


Why not take the route geometries and load them into postgis where
you can intersect the routes and get the crossing points? You  could
alternatively probably do this in C, PHP, Perl or Python using a
libgeos wrapper which is the geometry engine that is in PostGIS.


I am talking about multiple million routes - My testset has 26k routes.

And the point is that after discoverying the intersections i need to
delete the routes and calculate 3 new routes.


A --x B
 |
 |
 |
 C


Calculating A - B
Calculating C - B
   Finding x
   Calculating A - x
   Calculating x - B
   Calculating C - c

Flo



Flo,

pgRouting has a function to node a network of lines. It basically does 
exactly this.


It takes a table of linestring geometries, chops all the strings at the 
intersection and forms a correctly noded result in a new table, 
maintaining a back reference to the original table so you can move any 
attributes over to the new table.


https://github.com/pgRouting/pgrouting/blob/master/src/common/sql/pgrouting_node_network.sql

Let me know if you want to try this and need help getting started.

-Steve

___
OSRM-talk mailing list
osrm-t...@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] What is the maximum number of alternate routes?

2013-11-18 Diskussionsfäden Stephen Woodbridge

Dennis,

What is the maximum number of potential alternate routes I can safely 
assume will be returned? Or is there no fixed number?


Thanks,
  -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] What is the maximum number of alternate routes?

2013-11-18 Diskussionsfäden Stephen Woodbridge

On 11/18/2013 12:05 PM, Florian Lohoff wrote:

On Mon, Nov 18, 2013 at 11:55:56AM -0500, Stephen Woodbridge wrote:

Dennis,

What is the maximum number of potential alternate routes I can
safely assume will be returned? Or is there no fixed number?


Computer says no :)

The code says currently only 1 alternative route - at least thats what i
found in the code ...


Thank you for looking at the code, I was confused by the fact that:

route_geometry: string
alternative_geometries:[string,...]

So alternative_geometries is plural and it is and array object.
And route_geometry is singular and returns an string object.

Thanks,
  -Steve


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Need help understanding the json responses

2013-11-18 Diskussionsfäden Stephen Woodbridge

Hi,

I'm parsing the json responses and the is going well, but my question is 
more related what is all this stuff? :)


Most of it makes sense, but I'm a little confused by the following:

The instructions indicate road names: N20, N60, N2, N61, N28, 
So the  is on the arrive at destination maneuver, but not sure what 
the rationale for not having a name there.


The route summary otherwise states the start point and end point names 
correctly as N20, N28


How is route_name determined? The wiki page states Array of strings 
giving the name of roads. There does not appear to be an 
alternative_names item so this must be unique to the route regardless 
of alternatives?


What are the via_points? How are they determined? These appear to be 
the mapped locations for the start and end points like if I called 
nearest?loc=lat,lon


Is the position field in the instructions an index into a point in the 
route geometry array?


BTW, thanks for putting up with all my questions, this is all starting 
to come together. Great job all around!


Thanks
-Steve

GET 
'http://imaptools.com:5000/viaroute?instructions=truealt=truez=18loc=43.235198,-76.420898loc=43.709579,-76.286316'

{version: 0.3,
 status:0,
 status_message: Found route between points,
 route_geometry: 
{|zmqA`qjwpC?wyP?o{qBl{qB??m{qBm{qB?o{qB?m{qB?o{qB?m{qB?o{qB?m{qB?o{qB?m{qB??ufN,

 route_instructions: [
[10,N20,5506,0,2915,5506m,E,90],
[3,N60,6542,2,562,6542m,S,180],
[7,N2,4771,3,146,4771m,E,90],
[7,N61,58884,4,1797,58884m,N,0],
[3,N28,627,13,153,627m,E,90],
[15,,0,14,0,,N,0.0]],
  route_summary:{
total_distance:76332,
total_time:4676,
start_point:N20,
end_point:N28
  },
  alternative_geometries: [],
  alternative_instructions:[],
  alternative_summaries:[],
  route_name:[N60,N61],
  alternative_names:[[,]],
  via_points:[[43.235294,-76.420897 ],[43.705882,-76.286315 ]],
  hint_data: {
checksum:52824373,
locations: [Dw0AAA4AAADwOAAAdgoAAJqulHdeCOs_3reTAt_ocfs,
  MRIAABYAAADkBgAAES0AAEeiWVys-sA_GuaaApX2c_s]
  },
  transactionId: OSRM Routing Engine JSON Descriptor (v0.3)
}

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Update on OSRM-pgRouting integration

2013-11-15 Diskussionsfäden Stephen Woodbridge

Hi all,

Here is a demo of using OSRM and pgrouting using php to glue things 
together.


http://imaptools.com:8081/demo/osrm.html

Sorry for the weird test grid. The roads have some randomly assigned 
speed_cat and direction of travel which can make for some unexpected 
routes. When I have a chance I'll build a real work graph.


Read the HELP that comes up when you load the page.

Here is a description of how it works. The [Route Path] function just 
collects the marker locations and makes a direct call to the OSRM 
server. No magic there, you can look at the Javascript to see how to 
make Leaflet do that. I was going to add dragging the route or markers, 
but it more interesting to get this working in pgrouting.


For the [Optimize *] functions, I call a PHP script to glue everything 
together for the moment. The basic logic is:


1. get and array of points
2. loop through the points calling OSRM N*(N-1) times to build a 
distance matrix and cache the result in an NxN array
3. call pgrouting pgr_tsp(dmatrix, start, stop) to get an ordered list 
of points

4. Get the cached route_geometry for the ordered pairs of nodes
5. return that as jsonp object.

Time vs Distance

Currently there is no easy way to ask OSRM to compute shortest time vs 
shortest distance. I understand that I might be able to do this using 
profile.lua files but this would require having two OSRM servers running 
using different profiles.


For the time being, I compute a routes for the distance matrix calling 
OSRM and build my distance matrix based on the route_distance vs the 
route_time values returned in the request. Then TSP orders the nodes to 
minimize the cost values used. I suspect we would get different results 
if we could compute the routes based on either time or distance.


My next step is to move the php code into C code in the database. And at 
some point build out a real road network for a better demo.


-Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Shortest time versus shortest distance

2013-11-13 Diskussionsfäden Stephen Woodbridge

Hi Dennis,

I noticed that in the map.osrm for edges we define both edge length and 
edge weight that is in 1/10s units.


Is is possible to get routes based on shortest path versus shortest time?

When I was reading somewhere (maybe in the profile.lua) that you can 
apply a cost for traffic lights which implies to me that this is adding 
some time to the route.


Maybe this is all defined in the profile.lua and I need to look more 
into these.


Thanks,
  -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] All route requests report status: 207

2013-11-13 Diskussionsfäden Stephen Woodbridge

Dennis,

I can't get osrm-routed to generate a route. I'm guessing I did 
something wrong in the process of generating the graph or extracting it 
into the intermediate file.


All I get is status:207

GET 'http://localhost:5000/viaroute?loc=42.5,-74.5loc=44.0,-75.5'
{version: 0.3,status:207,status_message: Cannot find route 
between points,route_geometry: ,route_instructions: 
[],route_summary:{total_distance:0,total_time:214748365,start_point:,end_point:},alternative_geometries: 
[],alternative_instructions:[],alternative_summaries:[],route_name:[,],alternative_names:[[,]],via_points:[],hint_data: 
{checksum:66848108, locations: 
[pssrALsDfwAAXaRDAHCdiv8, 
pssrALsDfwAAXaRDAHCdiv8]},transactionId: OSRM 
Routing Engine JSON Descriptor (v0.3)}


Since it is late here, I'll check things in the morning. I'll build a 
mapserver mapfile to display the graph and a web app to allow us to 
interact with the map and the router.


Running osrm-prepare reported the following. Can you look this over and 
see if anything looks off in it.


Thanks,
  -Steve

$ osrm-prepare st.osrm
[info] Input file: st.osrm
[info] Restrictions file: st.osrm.restrictions
[info] Profile: profile.lua
[info] Threads: 8
[info] Importing n = 3069975 nodes
[info]  and 3066984 edges
[info] Graph loaded ok and has 3066984 edges
[info] 0 restrictions, 0 bollard nodes, 0 traffic lights
[info] Generating edge-expanded graph representation
[info] Identifying components of the road network
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] identified: 284018 many components
[info] generating edge-expanded nodes
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Generated 4632706 nodes in edge-expanded graph
[info] generating edge-expanded edges
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Generated 4632706 edge based nodes
[info] Node-based graph contains 4632706 edges
[info] Edge-expanded graph ...
[info]   contains 4631249 edges
[info]   skips 0 turns, defined by 0 restrictions
[info] writing node map ...
[info] building r-tree ...
[info] constructing r-tree of 4632706 elements
[info] finished r-tree construction in 10.2177 seconds
[info] using software based CRC32 computation
[info] CRC32: 66848108
[info] initializing contractor
merged 0 edges out of 9262498
contractor finished initalization
Contractor is using 1 threads
initializing elimination PQ ...ok
preprocessing 4632706 nodes  10% . 20% . 30% . 40% . 50% . 60% . 
[flush 3081249 nodes]  70% . 80% . 90% . 100%

 100% [info] Contraction took 44.2668 sec
[info] Getting edges of minimized graph
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info] Building Node Array
[info] Serializing compacted graph of 9196634 edges
[info] Preprocessing : 134.197 seconds
[info] Expansion  : 90165.2 nodes/sec and 136063 edges/sec
[info] Contraction: 104654 nodes/sec and 207754 edges/sec
[info] finished preprocessing

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] osrm-extract on xml file generates weird file names

2013-11-12 Diskussionsfäden Stephen Woodbridge

Hi,

I just got a small map.osm.xml extract file from openstreetmap and ran 
it with:


$ osrm-extract map.osm.xml
$ ls
map.osm.xml
map.osrm.restrictionsxml
map.osrmxml
map.osrmxml.names


It looks like there is a bug generating the restrictions file name. 
Shouldn't that be:


map.osrmxml.restrictions

rather than:

map.osrm.restrictionsxml

as this will be a problem when you run:

$ osrm-prepare map.osrmxml

it will not find map.osrmxml.restrictions!

Thanks,
  -Steve


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Questions on OSRM normalized file format

2013-11-09 Diskussionsfäden Stephen Woodbridge

Hi all,

I'm currently the lead developer for pgRouting and I'm interested in 
being able to create a local instance of OSRM that can be accessed via 
pgRouting. This all seems pretty straight forward to prototype up.


At the moment, I have a few questions on OSRM normalized file format. I 
want to be able to write a utility program for postgresql to prep and 
dump a pgRouting topology to an OSRM normalized file.


Looking at the edge section:

It appears that edges can be entered as undirected (ie: twoway with same 
costs in both directions) or directed in the case of oneway streets.


1. if I have a edge with different to-from and from-to costs am I 
correct in assuming that the way to enter this is to split the edge and 
enter it as two oneway edges with the appropriate costs?


2. oneway edges must be entered where from-to is the direction of the 
edge, ie: the direction must be to the target node?


3. Can you expound on the rank of the speed profile? Is this still 
used? in the Speedprofile page it says that this is now handled as LUA 
scripts.


Looking at the turn restrictions section:

Is there a graphic that explains this better. It is a little bit hard to 
follow where the various items come into play. There are references to 
via-node, from-node, to-node, from-way, and to-way.


Here is a common use case that I need to model. It is a majow road 
digitized as separated north and south bound lanes and intersected by a 
two way street digitized as a single line.


  e h
  | |
  | |
  | |
a-b-c-d
  | |
  | |
  | |
  f g

Traffic is allowed:
ab-bc-cd   - east bound cross traffic
dc-cb-ba   - west bound cross traffic
eb-bf  - one way south bound traffic
gc-ch  - one way north bound traffic
ab-bc-ch   - east bound onto north bound
ab-bf  - east bound onto south bound
dc-ch  - west bound onto north bound
dc-cb-bf   - west bound onto south bound
eb-ba  - south bound onto west bound
gc-cd  - north bound onto east bound

U-Turns are not allowed:
eb-bc-ch   - south bound u-turn to north bound
gc-cb-bf   - north bound u-turn to south bound

and more obviously any turn the wrong way down a oneway edge.

Any help in understanding this would be greatly appreciated.

Thanks,
  -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Questions on OSRM normalized file format

2013-11-09 Diskussionsfäden Stephen Woodbridge

Yes, but I will read it again.
I'm still trying to get up to speed on everything.

Dennis, if you can answer my questions below that would be appreciated.

By the way, I'm extremely pleased that you have redone this under the 
BSD license. I look forward to workign with you guys and integrating 
this into pgRouting.


Thanks,
  -Steve

On 11/9/2013 12:17 PM, Emil Tin wrote:


Hi Stephen,

Back in April I wrote a wiki page detailing the internal processing flow
and data structures, did you see it?
https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow

Maybe there is some useful info there.

Dennis can probably tell you what has changed since April.


Best regards,
Emil




On 09 Nov 2013, at 17:38 , Stephen Woodbridge wood...@swoodbridge.com
mailto:wood...@swoodbridge.com wrote:


Hi all,

I'm currently the lead developer for pgRouting and I'm interested in
being able to create a local instance of OSRM that can be accessed via
pgRouting. This all seems pretty straight forward to prototype up.

At the moment, I have a few questions on OSRM normalized file format.
I want to be able to write a utility program for postgresql to prep
and dump a pgRouting topology to an OSRM normalized file.

Looking at the edge section:

It appears that edges can be entered as undirected (ie: twoway with
same costs in both directions) or directed in the case of oneway streets.

1. if I have a edge with different to-from and from-to costs am I
correct in assuming that the way to enter this is to split the edge
and enter it as two oneway edges with the appropriate costs?

2. oneway edges must be entered where from-to is the direction of the
edge, ie: the direction must be to the target node?

3. Can you expound on the rank of the speed profile? Is this still
used? in the Speedprofile page it says that this is now handled as LUA
scripts.

Looking at the turn restrictions section:

Is there a graphic that explains this better. It is a little bit hard
to follow where the various items come into play. There are references
to via-node, from-node, to-node, from-way, and to-way.

Here is a common use case that I need to model. It is a majow road
digitized as separated north and south bound lanes and intersected by
a two way street digitized as a single line.

 e h
 | |
 | |
 | |
a-b-c-d
 | |
 | |
 | |
 f g

Traffic is allowed:
ab-bc-cd   - east bound cross traffic
dc-cb-ba   - west bound cross traffic
eb-bf  - one way south bound traffic
gc-ch  - one way north bound traffic
ab-bc-ch   - east bound onto north bound
ab-bf  - east bound onto south bound
dc-ch  - west bound onto north bound
dc-cb-bf   - west bound onto south bound
eb-ba  - south bound onto west bound
gc-cd  - north bound onto east bound

U-Turns are not allowed:
eb-bc-ch   - south bound u-turn to north bound
gc-cb-bf   - north bound u-turn to south bound

and more obviously any turn the wrong way down a oneway edge.

Any help in understanding this would be greatly appreciated.

Thanks,
 -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org mailto:OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Questions on OSRM normalized file format

2013-11-09 Diskussionsfäden Stephen Woodbridge
OK, I have read most all the wiki pages and I'm not getting how the 
restrictions are being defined. So a little help getting over the mind 
block I seem to be having for this.


Everything else seems really straight forward, so I can't imagine that 
the restrictions are all the complicated, but it is not clicking with 
any confidence in my head yet.


If I have the following:

ab-c
 |
 |
 d

ab, bc, and db are all two way
and there is no right turn from db to bc

Then is the restriction:

b, d, c, forbidden, 7F 00 00

where:

b is the via-node
d is the from-node
c is the to-node

and the records should then be sorted by EDGE[via-node, to-node] ref.

Is this correct?

Thanks,
  -Steve

On 11/9/2013 2:52 PM, Stephen Woodbridge wrote:

Yes, but I will read it again.
I'm still trying to get up to speed on everything.

Dennis, if you can answer my questions below that would be appreciated.

By the way, I'm extremely pleased that you have redone this under the
BSD license. I look forward to workign with you guys and integrating
this into pgRouting.

Thanks,
   -Steve

On 11/9/2013 12:17 PM, Emil Tin wrote:


Hi Stephen,

Back in April I wrote a wiki page detailing the internal processing flow
and data structures, did you see it?
https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow

Maybe there is some useful info there.

Dennis can probably tell you what has changed since April.


Best regards,
Emil




On 09 Nov 2013, at 17:38 , Stephen Woodbridge wood...@swoodbridge.com
mailto:wood...@swoodbridge.com wrote:


Hi all,

I'm currently the lead developer for pgRouting and I'm interested in
being able to create a local instance of OSRM that can be accessed via
pgRouting. This all seems pretty straight forward to prototype up.

At the moment, I have a few questions on OSRM normalized file format.
I want to be able to write a utility program for postgresql to prep
and dump a pgRouting topology to an OSRM normalized file.

Looking at the edge section:

It appears that edges can be entered as undirected (ie: twoway with
same costs in both directions) or directed in the case of oneway
streets.

1. if I have a edge with different to-from and from-to costs am I
correct in assuming that the way to enter this is to split the edge
and enter it as two oneway edges with the appropriate costs?

2. oneway edges must be entered where from-to is the direction of the
edge, ie: the direction must be to the target node?

3. Can you expound on the rank of the speed profile? Is this still
used? in the Speedprofile page it says that this is now handled as LUA
scripts.

Looking at the turn restrictions section:

Is there a graphic that explains this better. It is a little bit hard
to follow where the various items come into play. There are references
to via-node, from-node, to-node, from-way, and to-way.

Here is a common use case that I need to model. It is a majow road
digitized as separated north and south bound lanes and intersected by
a two way street digitized as a single line.

 e h
 | |
 | |
 | |
a-b-c-d
 | |
 | |
 | |
 f g

Traffic is allowed:
ab-bc-cd   - east bound cross traffic
dc-cb-ba   - west bound cross traffic
eb-bf  - one way south bound traffic
gc-ch  - one way north bound traffic
ab-bc-ch   - east bound onto north bound
ab-bf  - east bound onto south bound
dc-ch  - west bound onto north bound
dc-cb-bf   - west bound onto south bound
eb-ba  - south bound onto west bound
gc-cd  - north bound onto east bound

U-Turns are not allowed:
eb-bc-ch   - south bound u-turn to north bound
gc-cb-bf   - north bound u-turn to south bound

and more obviously any turn the wrong way down a oneway edge.

Any help in understanding this would be greatly appreciated.

Thanks,
 -Steve

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org mailto:OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk




___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk