Re: [OSRM-talk] OSRM Table Service

2020-12-10 Thread Sasha Khapyorsky
Hello,

On Thu, Dec 10, 2020 at 12:43 PM Ata Abdollahi 
wrote:

> Hello
> I want to use the table service. It gives an error when I use annotations.
> I use the Windows version of OSRM
> please guide me
>

https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md




> ___
> 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] points order

2018-08-07 Thread Sasha Khapyorsky
Hi Daniel,

That is really interesting, I will look deeper in this. Thanks for the point.

Sasha

On Mon, Aug 6, 2018 at 1:09 PM, Daniel Hofmann  wrote:
> Check out https://github.com/mapbox/node-or-tools#node-or-tools
>
> The pickup and delivery feature makes sure
> - the delivery location is served by the same car serving the pickup
> location
> - the delivery location is served after the pickup location
>
> For example for (pickup, delivery)-pairs (4, 12), (9, 8) you can set:
>
>   pickups: [4, 9],
>   deliveries: [12, 8]
>
> pickups Array with node indices for picking up good. The corresponding
> delivery node index is in the deliveries Array at the same position
> (parallel arrays). For a pair of pickup and delivery indices: pickup
> location comes before the corresponding delivery location and is served by
> the same vehicle.
>
> deliveries Array with node indices for delivering picked up goods. The
> corresponding pickup node index is in the pickups Array at the same position
> (parallel arrays). For a pair of pickup and delivery indices: pickup
> location comes before the corresponding delivery location and is served by
> the same vehicle.
>
> Hope that helps,
> Daniel J H
>
>
>
> On Sun, Aug 5, 2018 at 9:56 AM, Sasha Khapyorsky  wrote:
>>
>> Hi Guys,
>>
>> May be another "ordering" example: pickup and dropoff points . Let's
>> say I'm delivery man with 10 orders for today, each one should be
>> picked up first and dropped off later. This looks like 20 points TSP,
>> but there are also dependencies - some job(s) can be dependant from
>> another job(s). Any thoughts?
>>
>> I know, it is not really OSRM stuff, but related to the topic.
>>
>> Sasha
>>
>> On Sat, Aug 4, 2018 at 11:22 PM, Julien Coupey  wrote:
>> > Hi Valerio,
>> >
>> > In your example, if the 3 ordered points need to be visited in a row,
>> > then
>> > you can easily transform your problem into a TSP by treating them as a
>> > single "job". You'd just have to adjust the matrix by ensuring that from
>> > any
>> > other place, the cost to that job is the cost to the first point, and
>> > the
>> > cost from that job is the cost from the third point.
>> >
>> > HTH
>> > Julien
>> >
>> >
>> > On 02/08/2018 15:12, Valerio Paruscio wrote:
>> >>
>> >> Hi,
>> >> i'm wandering if its possible to set the order of some points in the
>> >> routing service.
>> >> I mean, I need to keep 3 out of 10 points in a certain order, while the
>> >> remaining 7 can be in whatever order.
>> >> Is that possible
>> >>
>> >> Thank you very much
>> >>
>> >> Valerio
>> >>
>> >>
>> >> ___
>> >> 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] points order

2018-08-05 Thread Sasha Khapyorsky
Hi Guys,

May be another "ordering" example: pickup and dropoff points . Let's
say I'm delivery man with 10 orders for today, each one should be
picked up first and dropped off later. This looks like 20 points TSP,
but there are also dependencies - some job(s) can be dependant from
another job(s). Any thoughts?

I know, it is not really OSRM stuff, but related to the topic.

Sasha

On Sat, Aug 4, 2018 at 11:22 PM, Julien Coupey  wrote:
> Hi Valerio,
>
> In your example, if the 3 ordered points need to be visited in a row, then
> you can easily transform your problem into a TSP by treating them as a
> single "job". You'd just have to adjust the matrix by ensuring that from any
> other place, the cost to that job is the cost to the first point, and the
> cost from that job is the cost from the third point.
>
> HTH
> Julien
>
>
> On 02/08/2018 15:12, Valerio Paruscio wrote:
>>
>> Hi,
>> i'm wandering if its possible to set the order of some points in the
>> routing service.
>> I mean, I need to keep 3 out of 10 points in a certain order, while the
>> remaining 7 can be in whatever order.
>> Is that possible
>>
>> Thank you very much
>>
>> Valerio
>>
>>
>> ___
>> 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] map matching service for a huge number of requests

2018-05-11 Thread Sasha Khapyorsky
Technically it is possible (for example
https://stackoverflow.com/questions/145270/calling-c-c-from-python),
but I'm pretty sure that you will need to create sort of c++ envelop,
shared lib, etc.. It would be easier just to do what you need in c++
instead of python.

Sasha

On Fri, May 11, 2018 at 9:37 PM, Patrick Agin <agin.patr...@gmail.com> wrote:
> thanks Sasha. And do you know if it's possible to do calls to libosrm
> functions directly from Python?
>
> 2018-05-11 14:33 GMT-04:00 Sasha Khapyorsky <sash...@gmail.com>:
>>
>> Hi again, Patrick,
>>
>> On Fri, May 11, 2018 at 9:22 PM, Patrick Agin <agin.patr...@gmail.com>
>> wrote:
>> >
>> > And are you aware of some python code that would do the calls to
>> > osrm-routed
>> > in parallel threads?
>>
>> There are lot of examples of how to make python things in parallel
>> threads. For example:
>> https://stackoverflow.com/questions/2846653/how-to-use-threading-in-python
>>
>> Sasha
>>
>> > Regards,
>> > Patrick
>> >
>> > 2018-05-11 14:07 GMT-04:00 Daniel Patterson <dan...@mapbox.com>:
>> >>
>> >> Patrick,
>> >>
>> >>   There are about a million possible paths you could take here, a lot
>> >> of
>> >> it will depend on what skills you have available.  Off the top of my
>> >> head:
>> >>
>> >> 1) Speed things up by avoiding HTTP overhead and calling the
>> >> libosrm.a
>> >> functions directly instead of hitting `osrm-routed` over HTTP
>> >> 2) Modify the OSRM C++ source code and strip out the parts of the
>> >> map-matching response you don't need
>> >> 3) Simplify your trace geometries to speed up map-matching
>> >> 4) Break your trace list into sets and run these on multiple
>> >> machines
>> >> in parallel (make copies of the OSRM data onto multiple machines)
>> >> 5) Just wait 10 hours, and get a good nights sleep
>> >>
>> >>   libosrm.a is thread-safe, so if you're calling functions from threads
>> >> you can do many at once.
>> >>
>> >>   osrm-routed is multi-threaded, so you can run many queries in
>> >> parallel -
>> >> how many will depend on how many CPUs your machine has.  Profiling
>> >> multi-threaded server performance is kind of beyond the scope of OSRM
>> >> itself, there is lots of literature on it.
>> >>
>> >> daniel
>> >>
>> >> On Fri, May 11, 2018 at 10:57 AM, Patrick Agin <agin.patr...@gmail.com>
>> >> wrote:
>> >>>
>> >>> Sorry for the newbie question but what's the difference between
>> >>> osrm-routed and libosrm? Is it mandatory to use the latter for a
>> >>> parallel
>> >>> usage? And do you have an example of code that does the calls in
>> >>> parallel
>> >>> threads? Thanks Sasha for your help.
>> >>> Patrick
>> >>>
>> >>> 2018-05-11 13:50 GMT-04:00 Sasha Khapyorsky <sash...@gmail.com>:
>> >>>>
>> >>>> Hi Patrick,
>> >>>>
>> >>>> If you are using libosrm (which reported to be thread safe:
>> >>>> https://github.com/Project-OSRM/osrm-backend/issues/4966) you can
>> >>>> just
>> >>>> split your list and run its parts in different parallel threads.
>> >>>>
>> >>>> Sasha
>> >>>>
>> >>>> On Fri, May 11, 2018 at 8:14 PM, Patrick Agin
>> >>>> <agin.patr...@gmail.com>
>> >>>> wrote:
>> >>>> > Hi,
>> >>>> > I want to call the map matching service for nearly a million of
>> >>>> > routes. I
>> >>>> > calculated that the task could take 10 hours on my laptop to
>> >>>> > complete.
>> >>>> > I was
>> >>>> > wondering if there's someone who faced the same problem and who
>> >>>> > addressed it
>> >>>> > in parallel, maybe with Spark? Another tool or way?
>> >>>> > Any hint is greatly appreciated!
>> >>>> > Patrick
>> >>>> >
>> >>>> > ___
>> >>>> > OSRM-talk mailing list
>> >>>> > OSRM-talk@openstreetmap.org

Re: [OSRM-talk] map matching service for a huge number of requests

2018-05-11 Thread Sasha Khapyorsky
Hi again, Patrick,

On Fri, May 11, 2018 at 9:22 PM, Patrick Agin <agin.patr...@gmail.com> wrote:
>
> And are you aware of some python code that would do the calls to osrm-routed
> in parallel threads?

There are lot of examples of how to make python things in parallel
threads. For example:
https://stackoverflow.com/questions/2846653/how-to-use-threading-in-python

Sasha

> Regards,
> Patrick
>
> 2018-05-11 14:07 GMT-04:00 Daniel Patterson <dan...@mapbox.com>:
>>
>> Patrick,
>>
>>   There are about a million possible paths you could take here, a lot of
>> it will depend on what skills you have available.  Off the top of my head:
>>
>> 1) Speed things up by avoiding HTTP overhead and calling the libosrm.a
>> functions directly instead of hitting `osrm-routed` over HTTP
>> 2) Modify the OSRM C++ source code and strip out the parts of the
>> map-matching response you don't need
>> 3) Simplify your trace geometries to speed up map-matching
>> 4) Break your trace list into sets and run these on multiple machines
>> in parallel (make copies of the OSRM data onto multiple machines)
>> 5) Just wait 10 hours, and get a good nights sleep
>>
>>   libosrm.a is thread-safe, so if you're calling functions from threads
>> you can do many at once.
>>
>>   osrm-routed is multi-threaded, so you can run many queries in parallel -
>> how many will depend on how many CPUs your machine has.  Profiling
>> multi-threaded server performance is kind of beyond the scope of OSRM
>> itself, there is lots of literature on it.
>>
>> daniel
>>
>> On Fri, May 11, 2018 at 10:57 AM, Patrick Agin <agin.patr...@gmail.com>
>> wrote:
>>>
>>> Sorry for the newbie question but what's the difference between
>>> osrm-routed and libosrm? Is it mandatory to use the latter for a parallel
>>> usage? And do you have an example of code that does the calls in parallel
>>> threads? Thanks Sasha for your help.
>>> Patrick
>>>
>>> 2018-05-11 13:50 GMT-04:00 Sasha Khapyorsky <sash...@gmail.com>:
>>>>
>>>> Hi Patrick,
>>>>
>>>> If you are using libosrm (which reported to be thread safe:
>>>> https://github.com/Project-OSRM/osrm-backend/issues/4966) you can just
>>>> split your list and run its parts in different parallel threads.
>>>>
>>>> Sasha
>>>>
>>>> On Fri, May 11, 2018 at 8:14 PM, Patrick Agin <agin.patr...@gmail.com>
>>>> wrote:
>>>> > Hi,
>>>> > I want to call the map matching service for nearly a million of
>>>> > routes. I
>>>> > calculated that the task could take 10 hours on my laptop to complete.
>>>> > I was
>>>> > wondering if there's someone who faced the same problem and who
>>>> > addressed it
>>>> > in parallel, maybe with Spark? Another tool or way?
>>>> > Any hint is greatly appreciated!
>>>> > Patrick
>>>> >
>>>> > ___
>>>> > 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


Re: [OSRM-talk] map matching service for a huge number of requests

2018-05-11 Thread Sasha Khapyorsky
Hi again,

On Fri, May 11, 2018 at 9:01 PM, Patrick Agin <agin.patr...@gmail.com> wrote:
> Ok I found some explanations about libosrm here:
> https://github.com/Project-OSRM/osrm-backend/blob/master/docs/libosrm.md
> My second questions remains though: is libosrm mandatory for parallel use?

It is not mandatory. Just faster.

> or could I use osrm-routed too (even if it is slower)?
> All my code is written is Python so it could be great if I can integrate
> python code to do the calls in parallel.

The same you can do with Python run osrm-routed request in parallel
threads (or even parallel processes).

Sasha

> Thanks again
> P.
>
> 2018-05-11 13:57 GMT-04:00 Patrick Agin <agin.patr...@gmail.com>:
>>
>> Sorry for the newbie question but what's the difference between
>> osrm-routed and libosrm? Is it mandatory to use the latter for a parallel
>> usage? And do you have an example of code that does the calls in parallel
>> threads? Thanks Sasha for your help.
>> Patrick
>>
>> 2018-05-11 13:50 GMT-04:00 Sasha Khapyorsky <sash...@gmail.com>:
>>>
>>> Hi Patrick,
>>>
>>> If you are using libosrm (which reported to be thread safe:
>>> https://github.com/Project-OSRM/osrm-backend/issues/4966) you can just
>>> split your list and run its parts in different parallel threads.
>>>
>>> Sasha
>>>
>>> On Fri, May 11, 2018 at 8:14 PM, Patrick Agin <agin.patr...@gmail.com>
>>> wrote:
>>> > Hi,
>>> > I want to call the map matching service for nearly a million of routes.
>>> > I
>>> > calculated that the task could take 10 hours on my laptop to complete.
>>> > I was
>>> > wondering if there's someone who faced the same problem and who
>>> > addressed it
>>> > in parallel, maybe with Spark? Another tool or way?
>>> > Any hint is greatly appreciated!
>>> > Patrick
>>> >
>>> > ___
>>> > 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] map matching service for a huge number of requests

2018-05-11 Thread Sasha Khapyorsky
Hi Patrick,

If you are using libosrm (which reported to be thread safe:
https://github.com/Project-OSRM/osrm-backend/issues/4966) you can just
split your list and run its parts in different parallel threads.

Sasha

On Fri, May 11, 2018 at 8:14 PM, Patrick Agin  wrote:
> Hi,
> I want to call the map matching service for nearly a million of routes. I
> calculated that the task could take 10 hours on my laptop to complete. I was
> wondering if there's someone who faced the same problem and who addressed it
> in parallel, maybe with Spark? Another tool or way?
> Any hint is greatly appreciated!
> Patrick
>
> ___
> 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] OSRM trip service (TSP) limitation

2017-10-31 Thread Sasha Khapyorsky
Hi Julien,

Thanks for the helpful reply and links. i've tried VROOM, so far looks
good - usually it generates faster TSP routes than OSRM Trip() does,
at least in my test cases. Found some small issues, will write on your
github...

Sasha

On Sat, Oct 7, 2017 at 4:07 PM, Julien Coupey <o...@coupey.fr> wrote:
> Oops sorry, forgot links in previous message:
>
> [1]: https://github.com/Project-OSRM/osrm-backend/issues/1623
> [2]: http://map.vroom-project.org/
>
>
> Le 07/10/2017 à 14:49, Julien Coupey a écrit :
>>
>> Hi Sasha,
>>
>> For the record, you can read the ticket[1] where fixed start/end
>> implementation has been discussed.
>>
>> TL;DR: the same kind of approach should allow to serve your use-case (fix
>> start but end at any location that is preferable for optimization). This is
>> how I did it myself anyway, see link in the ticket or this demo[2].
>>
>> Hope that helps,
>> Julien
>>
>> Le 06/10/2017 à 16:17, Sasha Khapyorsky a écrit :
>>>
>>> Hi Guys,
>>>
>>> I've tried to use OSRM recently. Great stuff!
>>>
>>> When using OSRM trip service, I've figured out that this call is
>>> limited by option combintions:
>>>
>>> rountrip=true&* or roundtrip=false=first=last
>>>
>>> And rest combinations (such as
>>> roundtrip=false=first=any , which I'm looking for)
>>> marked as not implemented.
>>>
>>> Do you have any idea about when such implementation is planned?
>>>
>>> I'm very new with osrm-backend code (yet), but after commenting out
>>> this limitation and using roundtrip=false=first=any
>>> options OSRM provides the similar and valid paths (at least in couple
>>> of tests, didn't check it in deep yet).
>>>
>>> Any ideas, suggestions?
>>>
>>> Many Thanks,
>>> Sasha
>>>
>>> ___
>>> 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] OSRM trip service (TSP) limitation

2017-10-06 Thread Sasha Khapyorsky
Hi Guys,

I've tried to use OSRM recently. Great stuff!

When using OSRM trip service, I've figured out that this call is
limited by option combintions:

rountrip=true&* or roundtrip=false=first=last

And rest combinations (such as
roundtrip=false=first=any , which I'm looking for)
marked as not implemented.

Do you have any idea about when such implementation is planned?

I'm very new with osrm-backend code (yet), but after commenting out
this limitation and using roundtrip=false=first=any
options OSRM provides the similar and valid paths (at least in couple
of tests, didn't check it in deep yet).

Any ideas, suggestions?

Many Thanks,
Sasha

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