Date: Thu, 8 Jan 2004 06:40:58 0500
ReplyTo: SUBSCRIBE SASL Anonymous <swanson_d@BLS.GOV>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: SUBSCRIBE SASL Anonymous <swanson_d@BLS.GOV>
Subject: Traveling Salesman Problem
ContentType: text/plain; charset=ISO88591
I’m looking for a macro similar to the TSP.
I have a list of n cities along with their geographic locations, i.e.,
their (x,y) coordinates. I want to find the route I should take in which I
always travel to the nearest unvisited city. Does anybody have a macro
that does it?
I don’t know if it makes any difference, but I want to measure distances
with the L1 distance function instead of the usual L2 Euclidean distance
function. That is, I want the distance from (x0,y0) to (x1,y1) to be ABS
(x0x1) + ABS(y0y1) instead of SQRT((x0x1)**2 + (y0y1)**2). The reason
is that roads in the midwest form a grid.
