jafingi Posted April 26, 2010 Share Posted April 26, 2010 Hi I'm having an assignment regarding the "Salesman Travelling Problem". Basically, I have a set of coordinates, and I have to find the shortest possible distance which I can travel through all those coordinaes. So I have found a script and modified it to my needs. Here's the code: http://pastebin.com/rQRqGquX It works totally fine - but I need to be able to set a starting and ending point (see line 94 and 101). Basically, what I need is to make the script running from the startposition and find the shortest possible travel through the assigned coordinates, and ending in endposition. I have looked and looked at this, and I simply cant figure out how to do it. Can anyone help me with that? Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/199827-salesman-travelling-problem-start-and-endpoint/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.