+ Reply to Thread
Results 1 to 5 of 5

Calculate minimum distance between points

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Calculate minimum distance between points

    Hi, I need to be calculate the minimal distance between some points.

    I attached a jpeg with an example.

    So if i want to travel from point 1 to 3 the direct route would be 5 km long, but if i go through point 2 (point 1 -> point 2 -> point 3) than the total distance is only 2 km.

    Another example is if i want to go from 1 to 4 the direct distance is 7 km but, the minimal distance is only 4km.

    So how do i make this work in excel.

    Thanks for the help.
    Attached Images Attached Images
    Last edited by ciprian; 11-08-2011 at 06:21 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Calculate minimum distance between points

    Are you asking us for a method to do it, or how to implement in Excel? If the former, what is your method? And post a workbook please, not a picture.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Calculate minimum distance between points

    If you are looking for the method, you might find this Wikipedia article interesting.
    http://en.wikipedia.org/wiki/Pathfinding A couple of algorithms for such problems are suggested, and pseudocode for each algorithm is included in the pages for each algorithm.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Calculate minimum distance between points

    This could be a starting point by defining distance cost between all routes.

    Then calculate all possibilites as in example:
    - if returned to same point drop out
    - if not defined then error (like here no G defined)
    - otherwise SUM...

    Now.. Who has enought free time to do this
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Calculate minimum distance between points

    Quote Originally Posted by zbor View Post
    This could be a starting point by defining distance cost between all routes.

    Then calculate all possibilites as in example:
    - if returned to same point drop out
    - if not defined then error (like here no G defined)
    - otherwise SUM...

    Now.. Who has enought free time to do this
    i couldn't have given a better example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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