Streets's profileStreets & Trips SpacePhotosBlogListsMore Tools Help

Blog


    Traveling Salesman problem in Streets and Trips

    The Virtual Earth / Live Maps blog has recently created a post about route optimization and why S&T has it yet the online sites do not.
     
    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.

    image

    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.

    image

    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.

    image

    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.

    image

    image

    Here are the re-ordered stops:
    image

    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.

    image

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

    Comments (7)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    George Hookwrote:
    It would be really nice if you could select multiple push-pins and delete them. It is extremely annoying having to delete them one at a time.
    June 29
    T8tube.comwrote:
    so good
    Mar. 18
    No namewrote:
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/dc4800.htm kodak dc4800 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/k5000.htm kodak k5000 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-5001.htm kodak klic-5001 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-5001.htm kodak klic-5001 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7000.htm kodak klic-7000 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic7000.htm kodak klic7000 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7001.htm kodak klic-7001 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7002.htm kodak klic-7002 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7003.htm kodak klic-7003 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/k7004.htm kodak k7004 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7004.htm kodak klic-7004 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/k7005.htm kodak k7005 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/kodak/klic-7005.htm kodak klic-7005 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/bn-v101.htm jvc bn-v101 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/bnv101.htm jvc bnv101 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/gc-s5.htm jvc gc-s5 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/mx-600x.htm jvc mx-600x battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/bn-vf815.htm jvc bn-vf815 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/bn-vf808.htm jvc bn-vf808 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/jvc/n-vf823.htm jvc n-vf823 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cgr-s602e.htm panasonic cgr-s602e battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bl14.htm panasonic dmw-bl14 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bc14.htm panasonic dmw-bc14 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s101se.htm panasonic cga-s101se battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cgr-s101a.htm panasonic cgr-s101a battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bc7.htm panasonic dmw-bc7 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s001.htm panasonic cga-s001 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bca7.htm panasonic dmw-bca7 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bm7.htm panasonic dmw-bm7 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s002.htm panasonic cga-s002 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmc-fz1.htm panasonic dmc-fz1 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/vw-vba05.htm panasonic vw-vba05 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/vwvba05.htm panasonic vwvba05 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s003.htm panasonic cga-s003 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cgas003.htm panasonic cgas003 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bcb7.htm panasonic dmw-bcb7 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s004.htm panasonic cga-s004 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s005.htm panasonic cga-s005 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmc-fx07.htm panasonic dmc-fx07 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmc-fx50.htm panasonic dmc-fx50 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s006.htm panasonic cga-s006 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bma7.htm panasonic dmw-bma7 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/cga-s007.htm panasonic cga-s007 battery
    http://www.batterygoshop.co.uk/digital-camera-battery/panasonic/dmw-bcd10.htm panasonic dmw-bcd10 battery
    Mar. 16
    No namewrote:
    http://www.batterygoshop.co.uk/gateway/m680-battery.htm gateway m680 battery ,
    http://www.batterygoshop.co.uk/gateway/m360-battery.htm gateway m360 battery ,
    http://www.batterygoshop.co.uk/gateway/m460-battery.htm gateway m460 battery ,
    http://www.batterygoshop.co.uk/gateway/s62066l-battery.htm gateway s62066l battery ,
    http://www.batterygoshop.co.uk/gateway/squ-412-battery.htm gateway squ-412 battery ,
    http://www.batterygoshop.co.uk/gateway/squ-413-battery.htm gateway squ-413 battery ,
    http://www.batterygoshop.co.uk/gateway/squ-414-battery.htm gateway squ-414 battery ,
    http://www.batterygoshop.co.uk/gateway/solo-1400-battery.htm gateway solo 1400 battery ,
    http://www.batterygoshop.co.uk/gateway/solo-1450-battery.htm gateway solo 1450 battery ,
    http://www.batterygoshop.co.uk/gateway/bat0016-battery.htm gateway bat0016 battery ,
    http://www.batterygoshop.co.uk/gateway/m1200-battery.htm gateway m1200 battery ,
    http://www.batterygoshop.co.uk/gateway/m1300-battery.htm gateway m1300 battery ,
    http://www.batterygoshop.co.uk/gateway/m500-battery.htm gateway m500 battery ,
    http://www.batterygoshop.co.uk/gateway/m505-battery.htm gateway m505 battery ,
    http://www.batterygoshop.co.uk/gateway/btp-68b3-battery.htm gateway btp-68b3 battery ,
    http://www.batterygoshop.co.uk/gateway/btp-51b3-battery.htm gateway btp-51b3 battery ,
    http://www.batterygoshop.co.uk/hp/hstnn-db11-battery.htm hp hstnn-db11 battery ,
    http://www.batterygoshop.co.uk/hp/nc8230-battery.htm hp nc8230 battery ,
    http://www.batterygoshop.co.uk/hp/nc8200-battery.htm hp nc8200 battery ,
    http://www.batterygoshop.co.uk/hp/nw8200-battery.htm hp nw8200 battery ,
    http://www.batterygoshop.co.uk/hp/nx8200-battery.htm hp nx8200 battery ,
    http://www.batterygoshop.co.uk/hp/nc8430-battery.htm hp nc8430 battery ,
    http://www.batterygoshop.co.uk/hp/pb992a-battery.htm hp pb992a battery ,
    http://www.batterygoshop.co.uk/hp/nx7000-battery.htm hp nx7000 battery ,
    http://www.batterygoshop.co.uk/hp/presario-x1000-battery.htm hp presario x1000 battery ,
    http://www.batterygoshop.co.uk/hp/presario-x1100-battery.htm hp presario x1100 battery ,
    http://www.batterygoshop.co.uk/hp/presario-x1200-battery.htm hp presario x1200 battery ,
    http://www.batterygoshop.co.uk/hp/presario-x1300-battery.htm hp presario x1300 battery ,
    http://www.batterygoshop.co.uk/hp/presario-x1400-battery.htm hp presario x1400 battery ,
    http://www.batterygoshop.co.uk/hp/zt3000-battery.htm hp zt3000 battery ,
    http://www.batterygoshop.co.uk/hp/zt3100-battery.htm hp zt3100 battery ,
    http://www.batterygoshop.co.uk/hp/zt3200-battery.htm hp zt3200 battery ,
    http://www.batterygoshop.co.uk/hp/zt3300-battery.htm hp zt3300 battery ,
    http://www.batterygoshop.co.uk/hp/zt3400-battery.htm hp zt3400 battery ,
    http://www.batterygoshop.co.uk/hp/nx6120-battery.htm hp nx6120 battery ,
    http://www.batterygoshop.co.uk/hp/pb994a-battery.htm hp pb994a battery ,
    http://www.batterygoshop.co.uk/hp/nc6100-battery.htm hp nc6100 battery ,
    http://www.batterygoshop.co.uk/hp/nc6120-battery.htm hp nc6120 battery ,
    http://www.batterygoshop.co.uk/hp/nx6100-battery.htm hp nx6100 battery ,
    http://www.batterygoshop.co.uk/hp/nc6400-battery.htm hp nc6400 battery ,
    http://www.batterygoshop.co.uk/hp/nc6230-battery.htm hp nc6230 battery ,
    http://www.batterygoshop.co.uk/hp/nc6110-battery.htm hp nc6110 battery ,
    http://www.batterygoshop.co.uk/hp/dv2000-battery.htm hp dv2000 battery ,
    http://www.batterygoshop.co.uk/hp/dv2100-battery.htm hp dv2100 battery ,
    Feb. 24
    No namewrote:


    <A href="http://www.game4power.com/"><strong>cheapest wow gold</strong></A>
    <A href="http://www.game4power.com/"><strong> buy wow gold </strong></A>
    <A href="http://www.game4power.com/buy-gold/"><strong>buy wow gold</strong></A>
    <A href="http://www.game4power.com/buy-gold/"><strong>cheapest wow gold</strong></A>
    <A href="http://www.vipwarhammergold.com/">warhammer gold</A>
    <A href="http://www.vipwarhammergold.com/War-Gold/">BUY warhammer gold</A>
    <A href="http://www.vipwarhammergold.com/news/news.html">CHEAPER warhammer gold</A>
    <A href="http://www.bestwarhammer.com/">cheap warhammer gold</A>
    <A href="http://www.bestwarhammer.com/news/news.html">cheapest warhammer gold</A>
    <A href="http://www.wowgoldone.com/"><strong> cheap wow gold </strong></A>
    <A href="http://www.game4power.com/"><strong> Buy Wow Gold </strong></A>
    Dec. 21
    Picture of Anonymous
    Curt Gran wrote:
    I use S&T for trip planning and in competition where routing efficiency is key. I don't use it as a GPS and I have purchase every version of S&T since 2004. It's frustrating though to keep hoping for simple planning tweaks that seem to get ignored. Since this thread is on the salesman routing issue (which is very close to my use) I thought I would post some comments/feedback here. This is just a small list of features I would like to see added to make planning/routing easier.

    1. The program estimates fuel stops and even marks them yet there is no way to let the program know when you're getting fuel so after the first suggested fuel stop it's useless. Allow a check box on the scheduled stop dialog to say that you are fueling up at that stop and let the fuel estimator start over from that point.

    2. Optimize stops is great for the most part but as you stated not many people use it. However S&T still insists on rearranging stops when you're entering them into your route without doing anything. Then you spend a lot of time rearranging the stops with the arrow keys which is a major pain. So here are two suggestions, one's easy, one's hard. One, allow the user to turn off the feature that has S&T auto arrange your stops as you put them in. The second would be to also allow you to click and drag the stops in the route planner window instead of having to click the arrow keys all the time to move the stops. Can you move them using the arrow keys on the keyboard? Even that would be quicker. If I want to optimize the stops I'll do it when I click "Optimize Stops" so have a feature that allows me to just do it myself.

    Thanks,
    Curt


    Oct. 9
    Smokeywrote:
    Most times when I optimize 20 to 30 stops it will bring me in a circle back close to the first stop.  I'd prefer if it went straight out.  Sometimes it will bypass a stop within a couple of blocks and have you coming back to it later in the day.
    Jan. 26

    Trackbacks

    Weblogs that reference this entry
    • None