Jump to content

Salesman Travelling Problem - Start- and endpoint.


jafingi

Recommended Posts

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!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.