MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Traveling Salesman problem in Streets and Trips

This is a discussion on Traveling Salesman problem in Streets and Trips within the Virtual Earth Blogs forums, part of the Blogs category; I saw this post on SlashGeo yesterday asking about solving the traveling salesman problem in online maps, and more specifically ...


Go Back   MapPoint Forums > Blogs > Virtual Earth Blogs

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 01-18-2008
Senior Member
Blue Belt
 
Join Date: Sep 2007
Posts: 161
Traveling Salesman problem in Streets and Trips

I saw this post on SlashGeo yesterday asking about solving the traveling salesman problem in online maps, and more specifically why no one has done it. I think there are a few reasons starting with the fact that route optimization isn't something most of us need to do very often. but probably more importantly, when done correctly route optimization is pretty cpu intensive and most web users of online mapping software wouldn't want to wait for the results. For in-city trips, not so bad, but spread your stops over a larger area and it can be costly. You can cut corners by eliminating a number of possibilities with fast crow-flies estimates, but that's cheating and will yield crappy results. Any online mapping site could provide this functionality, but i'm not sure anyone would be happy with the results or perf.

As for solving via a Web API, this is also possible but would take a lot of real-time. if your optimization code sits close to the routing engine you can solve much more quickly, but for the number of remote calls needed latency kills. Most applications that call for this type of functionality (logistics, delivery, etc...) have their own optimization code that needs to consider more than just time and distance (its cheaper to run a truck with a full take of gas downhill for instance)

But for the rest of us, there's Streets and Trips S&T solves the traveling salesman problem quite well and is a popular and easy to use feature especially among business travelers. To use it, just add your stops to a route, hit the 'optimize stops' button on the directions panel, then wait while S&T crunches away. When its done your stops are presented in optimal order. You can even specify stop restrictions such as the time of day you need to be at a particular location! Below are screen shots of the process.

DEVELOPER NOTE: MapPoint 200X has the same functionality built in and is exposed via our API making MapPoint a popular choice in logistics and fleet management applications. Check it out if you need to add this type of calculation to your apps.

Here's a look at how to solve the traveling salesman problem with Streets and Trips or MapPoint 200X:

1. Add Your stops. Here I am traveling around Portland. The trip starts at my hotel and ends at the airport. In between I have 6 stops to make.


2. Optionally Set Restrictions on stops. I want to leave my Hotel at 9am and be at 148th Ave at noon for lunch. the other stops are flexible. Oh, and I need to finish at the airport.


3. Optionally set other global options. The optimizer can consider many factors that you can control such as rest stops and your personal tolerance for being late.


4. Hit the optimize Stops Button. For this trip consisting of 8 stops in the same city, it took about 8 seconds on my modest laptop.



Here are the re-ordered stops:

5. Calculate directions. Now that your stops are optimized, you probably want Streets and Trips to give you directions between all of them. Hit the 'Get Directions' button.


If you have a GPS device connected to your laptop, S&T will also give you voice assisted navigation instructions as you drive.



Click here to view the full post.

Last edited by Eric Frost; 01-18-2008 at 10:42 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
problem, salesman, streets, traveling, trips


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/traveling-salesman-problem-streets-trips-7016.html

Posted By For Type Date
The Magazine for MapPoint - MP2K Magazine This thread Refback 01-22-2008 02:00 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
MapPoint, Pocket Streets, Streets and Trips chpw MapPoint 2006/2009 Discussion 3 01-04-2006 10:54 AM
Streets&Trips Anonymous MapPoint 2006/2009 Discussion 1 01-19-2005 10:41 AM
Streets and Trips Alex Chow MapPoint 2006/2009 Discussion 1 11-09-2004 03:22 PM
streets and trips Anonymous MapPoint 2006/2009 Discussion 1 12-02-2003 09:13 PM
MS Streets And Trips and VB6 NickSP MapPoint 2006/2009 Discussion 2 02-05-2003 12:37 AM


All times are GMT -5. The time now is 01:46 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54