+ Reply to Thread
Results 1 to 5 of 5

Traveling Salesman Problem Chart Plotting

  1. #1
    Registered User
    Join Date
    10-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    2

    Red face Traveling Salesman Problem Chart Plotting

    Hi,
    I'm working on using excel solver to solve for TSP.
    Let's say I have coordinates for 50 cities and plotted using scatter plot in excel as shown in the graph below:
    1.jpg
    After using solver to solve for TSP, I managed to get the sequence of visiting the 50 cities,
    let's say:
    11 18 31 33 14 6 7 5 15 16 17 8 41 20 49 39 35 36 44 30 42 37 9 19 48 12 10 23 32 13 24 38 29 25 26 47 4 27 3 50 40 22 34 43 21 45 1 28 2 46
    However, I don't know how can I connect these dots in the above graph according to the sequence of cities I got from solver.
    Can anyone help me with the plotting?
    Thanks!
    Last edited by Yicheng Jing; 01-06-2014 at 03:10 AM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Traveling Salesman Problem Chart Plotting

    Hi
    are your dots in a xy scatter chart, and data in adjacent columns?

    if so, you could try copying the order of each city into an blank adjacent column and sorting your data (including xy coordinates) by this column. Then, when you plot your data, use both a marker and a line - the line should follow the order you want.

  3. #3
    Registered User
    Join Date
    10-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Traveling Salesman Problem Chart Plotting

    Hey Nicky,

    Thanks a lot for the idea! It works!
    Appreciate your help!

  4. #4
    Registered User
    Join Date
    05-06-2018
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    1

    Re: Traveling Salesman Problem Chart Plotting

    Hi guys
    I have a similar problem like Jing. I'm working on a different kind of TSP. It is Orienteering Problem in which visiting all of the nodes are not necessary. I want to show the resulted path (after solving) in a scatter-plot contains all nodes and connects some of nodes (not all of them) and not just with lines but with arrows.
    could anyone help me?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Traveling Salesman Problem Chart Plotting

    siavash_ark welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2007 : Traveling salesman problem
    By Pink_123 in forum Excel General
    Replies: 0
    Last Post: 05-06-2011, 09:02 PM
  2. Traveling Salesman Problem
    By davegugg in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 07-20-2010, 03:54 PM
  3. Plotting a chart problem
    By turbofatty in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 02-12-2010, 09:27 AM
  4. [SOLVED] Excel 2003 xy chart - problem plotting more than 330 points
    By ehmcneill in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-16-2005, 08:25 PM
  5. Replies: 3
    Last Post: 08-19-2005, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1