Detour points

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
clegroux
Posts: 8
Joined: Mon Jun 12, 2017 9:41 am

Detour points

Post by clegroux »

Hello,

I would like to solve a problem and don't know if it's possible to do it easily with PTV xServer.

Here is my problem :-)

Let's take 2 locations A et B. It takes (for example) 30 minutes to go from A to B. I'm at point A and want to go to point B but I have 2 hours (for example) to do this trip.
How can I get all the points that I can reach within these 2 hours ? That's to say, how can I get all the points X that match this condition : (travel time between A and X) + (travel time between X and B) <= 2 hours ?

Charlie
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Detour points

Post by Joost »

What order of magnitude of possible candidate points are we talking about? A few? tenfold, hundredfold? etc
Joost Claessen
Senior Technical Consultant
PTV Benelux
clegroux
Posts: 8
Joined: Mon Jun 12, 2017 9:41 am

Re: Detour points

Post by clegroux »

Oh sorry I forgot to talk about one important thing :-)

In fact I don't want to get the points that match the condition. I would like to get the area that contains all these points (like an isochrone).
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Detour points

Post by Bernd Welter »

You want something like the blue ellipse, the geometry?
&quot;Distance&quot; between A and B is smaller than the available horizon, so there is a search space to be reacheable
"Distance" between A and B is smaller than the available horizon, so there is a search space to be reacheable
I assume we don't have a function for this but maybe you can use some simple (A:N) + (N:B) matrix requests?
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
clegroux
Posts: 8
Joined: Mon Jun 12, 2017 9:41 am

Re: Detour points

Post by clegroux »

Yes exactly!

You're right I could use matrix requests but I would prefer to avoid calculating a distance matrix. Using a distance matrix means divide my map into a lot of squares (for me it's the best way to get a precise area). Do you have another simple way to solve my problem ?

You assume you don't have a function for calculating such a area. Do you plan to develop such a function ?
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Detour points

Post by Bernd Welter »

To be honest: the function you'd like to have is requested once every two years ;-)
Therefore I wouldn't expect this feature to come soon . . . Sorry for that.

Getting back to the functional requirement:
What do you mean by "slicing into rectangles"?

Are you doubting in performance or in quality of results?
I'm sure e can find at least some approaches of how to solve the given operational tasks...

Best regards
Bernd
Two 30min isochrones, checking for 1 hour. <br />Any point outside both isochrones will not be a candidate for the given task.<br />Any point inside both isochrones is reacheable within 60 minutes.<br />Attention: doesn't guarantee anything for points inside exactly one isochrone.
Two 30min isochrones, checking for 1 hour.
Any point outside both isochrones will not be a candidate for the given task.
Any point inside both isochrones is reacheable within 60 minutes.
Attention: doesn't guarantee anything for points inside exactly one isochrone.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
clegroux
Posts: 8
Joined: Mon Jun 12, 2017 9:41 am

Re: Detour points

Post by clegroux »

Arf... So let's forget the function :-)

First I'm doubting in quality of results. Yes, in your example, any point inside both isochrones is reachable within 60 minutes but we miss a lot of points (as you said, points inside exactly one isochrone may match the condition).

The only way I see to get a maximum of points is to populate an union of isochrone intersections. Going back to your example, we have to calculate the intersection of isochrone(Karlsruhe, 5 minutes) and isochrone(Pforzheim, 55 minutes), the intersection of isochrone(Karlsruhe, 10 minutes) and isochrone(Pforzheim, 50 minutes), etc. and then populate the union of these intersections. But I'm doubting in performance if we populate this union...

Finally I wonder if it's not faster to slice my map into rectangles, to calculate the distance matrix between all the centers of these rectangles and then identifying all the rectangles that match the condition. It may be faster but not easier because slicing the map is an hard work :-(

What do you think about that ?
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Detour points

Post by Bernd Welter »

Could you provide an image how you'd like to slice the map?
I don't get the point :cry:

How about using xTour.findUnscheduledOrdersForTour?

http://xserver.ptvgroup.com/fileadmin/f ... s%7C_____8
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Detour points

Post by Bernd Welter »

And you can still calculate an airline ellipse to filter the candidates C for a later validation.
The (A:C)+(C:B) routings should then be performant enough...
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
clegroux
Posts: 8
Joined: Mon Jun 12, 2017 9:41 am

Re: Detour points

Post by clegroux »

Here is a map example :-)

Yeah good idea! I could first define the area with two isochrones and then calculate the "squared" ellipsochrone with (A:N) + (N:B) matrix requests.

I would like to ask you others questions about the distance matrix :
  • 1- My map will be sliced into (approximatively) 6000 squares. How long will it take with xDima to calculate this matrix?
    2- According to your experience, could it be possible to define the "squared" ellipsochrone with (A:N) + (N:B) matrix requests with a 6000x6000 distance matrix?
Thanks a lot for all your posts Bernd :-)
Attachments
- 30 minutes to go from A to B<br />- I have 60 minutes to go from A to B<br />- I want to know the area containing all the points that match the condition (A:X) + (X:B) &lt; 60 minutes
- 30 minutes to go from A to B
- I have 60 minutes to go from A to B
- I want to know the area containing all the points that match the condition (A:X) + (X:B) < 60 minutes
Post Reply