Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Tue, 06 Mar 2007 19:16:22 -0500,    group: microsoft.public.mappoint.webservice        back       


Finding best route   
Hello.

Can anyone tell me how to use the MapPoint WebService to get the
shortest route between several locations?

My application would have a starting (home) location, and a list of
other locations (delivery stops), which can be visited in any order.

I need MapPoint WebService to tell my application the best order in
which to visit the delivery locations, to result in the shortest
overall route.

This is known in Computer Science as the "Classic Traveling Salesman
Problem" (in case that helps anyone figure out what I mean).


I'm not looking for anyone to write an entire routine for me -- just
point me to the right object method.  I couldn't find it in the
documentation online.


Thanks.

Tom.
date: Tue, 06 Mar 2007 19:16:22 -0500   author:   Tom

RE: Finding best route   
Tom,

What your looking for is the SegmentPreference class.  Your looking for the 
SegmentPreference.Shortest.  Here's the link on the MSDN.

http://msdn2.microsoft.com/en-us/library/aa492545.aspx

Hope that helps,
-- 
Infusion Development
http://www.infusiondev.com


"Tom" wrote:

> Hello.
> 
> Can anyone tell me how to use the MapPoint WebService to get the
> shortest route between several locations?
> 
> My application would have a starting (home) location, and a list of
> other locations (delivery stops), which can be visited in any order.
> 
> I need MapPoint WebService to tell my application the best order in
> which to visit the delivery locations, to result in the shortest
> overall route.
> 
> This is known in Computer Science as the "Classic Traveling Salesman
> Problem" (in case that helps anyone figure out what I mean).
> 
> 
> I'm not looking for anyone to write an entire routine for me -- just
> point me to the right object method.  I couldn't find it in the
> documentation online.
> 
> 
> Thanks.
> 
> Tom.
>
date: Wed, 7 Mar 2007 11:31:23 -0800   author:   Derek Chan

Re: Finding best route   
> 
> What your looking for is the SegmentPreference class.  
> Your looking for the SegmentPreference.Shortest.  
> 
> http://msdn2.microsoft.com/en-us/library/aa492545.aspx



Actually, I looked at that, but I don't think that will help me.


I haven't used the webservice yet, but according to MSDN:
> 
> 
> SegmentPreference Enumeration = The possible travel preferences 
>     for a particular route segment.
> 
> 
> The SegmentPreference enumeration is used with the
> SegmentOptions.Preference property.
> 
> 
> SegmentOptions Class = Contains the preferences for how the route 
>      and map views are calculated for the specified segment.
> 
> 
> The SegmentOptions object is passed in the
>    SegmentSpecification.Options property when calling 
>    the RouteServiceSoap.CalculateRoute method
> 
> 
> 
> RouteServiceSoap.CalculateRoute Method
> 
> Parameters
>     specification = The route (RouteSpecification object) 
>          to calculate
> 
> 
> RouteSpecification Class 
> 
> Public Properties
>     Segments = The specification of each segment that makes up the
>          route as an array of SegmentSpecification[] objects. 
>          The order of the array is the order of the stops on 
>          the route. Required.
> 



So I gather from this that if I call RouteServiceSoap.CalculateRoute
with a list of n waypoints, this method will always return driving
directions for visiting these n destinations in the same order in 
which I specified them in the RouteSpecification.Segments array.


This would not be what I need at all.  I need MapPoint to TELL ME
what order to visit the n waypoints in, not just provide me with
the shortest-route driving directions from waypoint 0 to waypoint 1,
and the shortest-route driving directions from point 1 to point 2,
and so on....


My software has a list of orders that need to be delivered.  The
delivery truck driver will log into my software and click a button,
and my software needs to tell him which of his deliveries to make
first, which to make second, which to make third, and so on.

My software needs to send mappoint a list of the delivery addresses
and mappoint needs to RE-ORDER that list of locations into the
shortest route.  From what I understand of the documentation,
RouteServiceSoap.CalculateRoute will NOT do that.


Is there any other method to call that WILL do that?






Thank you for your time, everyone.


Tom.
date: Wed, 07 Mar 2007 18:28:29 -0500   author:   Tom

Re: Finding best route   
Tom,

On Wed, 07 Mar 2007 18:28:29 -0500, Tom 
wrote:

>So I gather from this that if I call RouteServiceSoap.CalculateRoute
>with a list of n waypoints, this method will always return driving
>directions for visiting these n destinations in the same order in 
>which I specified them in the RouteSpecification.Segments array.
>
>
>This would not be what I need at all.  I need MapPoint to TELL ME
>what order to visit the n waypoints in, not just provide me with
>the shortest-route driving directions from waypoint 0 to waypoint 1,
>and the shortest-route driving directions from point 1 to point 2,
>and so on....
>
>
>My software has a list of orders that need to be delivered.  The
>delivery truck driver will log into my software and click a button,
>and my software needs to tell him which of his deliveries to make
>first, which to make second, which to make third, and so on.
>
>My software needs to send mappoint a list of the delivery addresses
>and mappoint needs to RE-ORDER that list of locations into the
>shortest route.  From what I understand of the documentation,
>RouteServiceSoap.CalculateRoute will NOT do that.
>

This functionality is called "Optimize Stops" in the MapPoint desktop
product (MapPoint North America 2006). Last time I looked (which is
some time ago) it was not available in the MapPoint web service, maybe
things have changed though. For MapPoint desktop, this is available
programmatically via the "Optimize" method of the Waypoints collection
- maybe this helps find it in the web service in case it has been
added in recent versions, I'm not too familiar with MapPoint web
service unfortunately.

   Regards,
   Gilles [MVP].

   (Please reply to the group, not via email.
   Find my MVP profile with past articles / downloads here: 
   http://www.gilleskohl.de/mvpprofile.htm)
date: Thu, 08 Mar 2007 07:44:19 +0100   author:   Gilles Kohl [MVP]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us