<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Eulidean distance in TSP in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256441#M1276</link>
    <description>&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table BurmaDist as
   select 
      a.Mesta as Mesta1, a.x as lat1, a.y as long1,
      b.Mesta as Mesta2, b.x as lat2, b.y as long2,
      euclid(lat1, long1, lat2, long2) as distance
      from Burma as a, Burma as b
      where a.Mesta &amp;lt; b.Mesta;
quit;
proc optnet 
   loglevel   = moderate
   data_links = BurmaDist 
   out_nodes  = TSPTourNodes;
   data_links_var 
      from    = Mesta1 
      to      = Mesta2 
      weight  = distance;
   tsp 
      out     = TSPTourLinks;
run;
%put &amp;amp;_OROPTNET_;
%put &amp;amp;_OROPTNET_TSP_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Log:&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                               21:36 Sunday, March 13, 2016

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Pokus';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          %LET _SASPROGRAMFILE=;
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         GOPTIONS XPIXELS=0 YPIXELS=0;
11         FILENAME EGSR TEMP;
12         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
13             STYLE=HtmlBlue
14             STYLESHEET=(URL="file:///C:/SAS/SASHome/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
15             NOGTITLE
16             NOGFOOTNOTE
17             GPATH=&amp;amp;sasworklocation
18             ENCODING=UTF8
19             options(rolap="on")
20         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
21         
22         GOPTIONS ACCESSIBLE;
23         proc sql;
24            create table BurmaDist as
25            select
26               a.Mesta as Mesta1, a.x as lat1, a.y as long1,
27               b.Mesta as Mesta2, b.x as lat2, b.y as long2,
28               euclid(lat1, long1, lat2, long2) as distance
29               from Burma as a, Burma as b
30               where a.Mesta &amp;lt; b.Mesta;
NOTE: The execution of this query involves performing one or more Cartesian product joins that can not be optimized.
NOTE: Table WORK.BURMADIST created, with 18721 rows and 7 columns.

31         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

32         proc optnet
33            loglevel   = moderate
34            data_links = BurmaDist
35            out_nodes  = TSPTourNodes;
36            data_links_var
37               from    = Mesta1
38               to      = Mesta2
39               weight  = distance;
40            tsp
41               out     = TSPTourLinks;
42         run;

NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Running OPTNET version 13.1.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Reading the links data set.
2                                                          The SAS System                               21:36 Sunday, March 13, 2016

NOTE: There were 18721 observations read from the data set WORK.BURMADIST.
NOTE: Data input used 0.05 (cpu: 0.04) seconds.
NOTE: Building the input graph storage used 0.02 (cpu: 0.02) seconds.
NOTE: The input graph storage is using 2.3 MBs of memory.
NOTE: The number of nodes in the input graph is 194.
NOTE: The number of links in the input graph is 18721.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Processing the traveling salesman problem.
NOTE: The initial TSP heuristics found a tour with cost 15722636.846 using 4.23 (cpu: 4.12) seconds.
NOTE: The MILP presolver value NONE is applied.
NOTE: The MILP solver is called.
          Node  Active    Sols    BestInteger      BestBound      Gap    Time
             0       1       1       15722637       15722636    0.00%       0
             0       1       1       15722637       15722636    0.00%       0
NOTE: Optimal within relative gap.
NOTE: Objective = 15722636.846.
NOTE: Processing the traveling salesman problem used 5.23 (cpu: 4.99) seconds.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Creating nodes data set output.
NOTE: Creating traveling salesman data set output.
NOTE: Data output used 0.00 (cpu: 0.01) seconds.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: The data set WORK.TSPTOURNODES has 194 observations and 2 variables.
NOTE: The data set WORK.TSPTOURLINKS has 194 observations and 3 variables.
NOTE: PROCEDURE OPTNET used (Total process time):
      real time           5.33 seconds
      cpu time            5.35 seconds
      

43         %put &amp;amp;_OROPTNET_;
STATUS=OK  TSP=OPTIMAL_RGAP
44         %put &amp;amp;_OROPTNET_TSP_;
STATUS=OPTIMAL_RGAP  OBJECTIVE=15722636.846  RELATIVE_GAP=4.703E-8  ABSOLUTE_GAP=0.7394683491  PRIMAL_INFEASIBILITY=0  
BOUND_INFEASIBILITY=0  INTEGER_INFEASIBILITY=0  BEST_BOUND=15722636.106  NODES=1  ITERATIONS=544  CPU_TIME=4.99  REAL_TIME=5.23
45         
46         GOPTIONS NOACCESSIBLE;
47         %LET _CLIENTTASKLABEL=;
48         %LET _CLIENTPROJECTPATH=;
49         %LET _CLIENTPROJECTNAME=;
50         %LET _SASPROGRAMFILE=;
51         
52         ;*';*";*/;quit;run;
53         ODS _ALL_ CLOSE;
54         
55         
56         QUIT; RUN;
57         &lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Optimal Value should be:&amp;nbsp; 9352&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Mar 2016 20:44:08 GMT</pubDate>
    <dc:creator>Adam1012</dc:creator>
    <dc:date>2016-03-13T20:44:08Z</dc:date>
    <item>
      <title>Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256336#M1267</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I find here code for calculate&lt;/P&gt;&lt;P&gt;Traveling Salesman Problem&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/ornoaug/65289/HTML/default/viewer.htm#ornoaug_optnet_examples07.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/ornoaug/65289/HTML/default/viewer.htm#ornoaug_optnet_examples07.htm&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I a little modified it to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table BurmaDist as
   select 
      a.Mesta as Mesta1, a.x as lat1, a.y as long1,
      b.Mesta as Mesta2, b.x as lat2, b.y as long2,
      geodist(lat1, long1, lat2, long2,'D' ) as distance
      from Burma as a, Burma as b
      where a.Mesta &amp;lt; b.Mesta;
quit;
proc optnet 
   loglevel   = moderate
   data_links = BurmaDist 
   out_nodes  = TSPTourNodes;
   data_links_var 
      from    = Mesta1 
      to      = Mesta2 
      weight  = distance;
   tsp 
      out     = TSPTourLinks;
run;
%put &amp;amp;_OROPTNET_;
%put &amp;amp;_OROPTNET_TSP_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem is, that my Dataset is in&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;EUC_2D-norm.&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;Could someone help me, modify the code for&amp;nbsp;&lt;SPAN&gt;EUC_2D-norm?? Please&amp;nbsp;&lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Example of dataset:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;1 24748.3333 50840.0000
2 24758.8889 51211.9444
3 24827.2222 51394.7222
4 24904.4444 51175.0000
5 24996.1111 51548.8889
6 25010.0000 51039.4444
7 25030.8333 51275.2778
8 25067.7778 51077.5000
9 25100.0000 51516.6667
10 25103.3333 51521.6667
11 25121.9444 51218.3333
12 25150.8333 51537.7778
13 25158.3333 51163.6111
14 25162.2222 51220.8333
15 25167.7778 51606.9444&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp;Thank you&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 20:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256336#M1267</guid>
      <dc:creator>Adam1012</dc:creator>
      <dc:date>2016-03-12T20:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256361#M1268</link>
      <description>&lt;P&gt;I don't work in OR but I'm going to make some guesses.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your starting data is in a similar form so the difference would only be in the distance calculation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your using Euclidean distance replace the geodist formula with the Euclidean distance formula. There's probably even a function to do so.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 01:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256361#M1268</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-13T01:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256365#M1271</link>
      <description>&lt;P&gt;Note that EUC_2D is rounded Euclidean distance. &amp;nbsp;You can replace the GEODIST call with an expression that uses the ROUND and SQRT (or ROUND and EUCLID) functions.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 01:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256365#M1271</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-03-13T01:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256432#M1274</link>
      <description>&lt;P&gt;I used EUCLID functions, but my result is still wrong. Not even close to right result. &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; Do not know, what I am doing wrong.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 19:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256432#M1274</guid>
      <dc:creator>Adam1012</dc:creator>
      <dc:date>2016-03-13T19:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256439#M1275</link>
      <description>Please show the code and log.&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Mar 2016 20:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256439#M1275</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-03-13T20:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256441#M1276</link>
      <description>&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table BurmaDist as
   select 
      a.Mesta as Mesta1, a.x as lat1, a.y as long1,
      b.Mesta as Mesta2, b.x as lat2, b.y as long2,
      euclid(lat1, long1, lat2, long2) as distance
      from Burma as a, Burma as b
      where a.Mesta &amp;lt; b.Mesta;
quit;
proc optnet 
   loglevel   = moderate
   data_links = BurmaDist 
   out_nodes  = TSPTourNodes;
   data_links_var 
      from    = Mesta1 
      to      = Mesta2 
      weight  = distance;
   tsp 
      out     = TSPTourLinks;
run;
%put &amp;amp;_OROPTNET_;
%put &amp;amp;_OROPTNET_TSP_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Log:&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                               21:36 Sunday, March 13, 2016

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Pokus';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          %LET _SASPROGRAMFILE=;
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         GOPTIONS XPIXELS=0 YPIXELS=0;
11         FILENAME EGSR TEMP;
12         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
13             STYLE=HtmlBlue
14             STYLESHEET=(URL="file:///C:/SAS/SASHome/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
15             NOGTITLE
16             NOGFOOTNOTE
17             GPATH=&amp;amp;sasworklocation
18             ENCODING=UTF8
19             options(rolap="on")
20         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
21         
22         GOPTIONS ACCESSIBLE;
23         proc sql;
24            create table BurmaDist as
25            select
26               a.Mesta as Mesta1, a.x as lat1, a.y as long1,
27               b.Mesta as Mesta2, b.x as lat2, b.y as long2,
28               euclid(lat1, long1, lat2, long2) as distance
29               from Burma as a, Burma as b
30               where a.Mesta &amp;lt; b.Mesta;
NOTE: The execution of this query involves performing one or more Cartesian product joins that can not be optimized.
NOTE: Table WORK.BURMADIST created, with 18721 rows and 7 columns.

31         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

32         proc optnet
33            loglevel   = moderate
34            data_links = BurmaDist
35            out_nodes  = TSPTourNodes;
36            data_links_var
37               from    = Mesta1
38               to      = Mesta2
39               weight  = distance;
40            tsp
41               out     = TSPTourLinks;
42         run;

NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Running OPTNET version 13.1.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Reading the links data set.
2                                                          The SAS System                               21:36 Sunday, March 13, 2016

NOTE: There were 18721 observations read from the data set WORK.BURMADIST.
NOTE: Data input used 0.05 (cpu: 0.04) seconds.
NOTE: Building the input graph storage used 0.02 (cpu: 0.02) seconds.
NOTE: The input graph storage is using 2.3 MBs of memory.
NOTE: The number of nodes in the input graph is 194.
NOTE: The number of links in the input graph is 18721.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Processing the traveling salesman problem.
NOTE: The initial TSP heuristics found a tour with cost 15722636.846 using 4.23 (cpu: 4.12) seconds.
NOTE: The MILP presolver value NONE is applied.
NOTE: The MILP solver is called.
          Node  Active    Sols    BestInteger      BestBound      Gap    Time
             0       1       1       15722637       15722636    0.00%       0
             0       1       1       15722637       15722636    0.00%       0
NOTE: Optimal within relative gap.
NOTE: Objective = 15722636.846.
NOTE: Processing the traveling salesman problem used 5.23 (cpu: 4.99) seconds.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: Creating nodes data set output.
NOTE: Creating traveling salesman data set output.
NOTE: Data output used 0.00 (cpu: 0.01) seconds.
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------------------------------------------
NOTE: The data set WORK.TSPTOURNODES has 194 observations and 2 variables.
NOTE: The data set WORK.TSPTOURLINKS has 194 observations and 3 variables.
NOTE: PROCEDURE OPTNET used (Total process time):
      real time           5.33 seconds
      cpu time            5.35 seconds
      

43         %put &amp;amp;_OROPTNET_;
STATUS=OK  TSP=OPTIMAL_RGAP
44         %put &amp;amp;_OROPTNET_TSP_;
STATUS=OPTIMAL_RGAP  OBJECTIVE=15722636.846  RELATIVE_GAP=4.703E-8  ABSOLUTE_GAP=0.7394683491  PRIMAL_INFEASIBILITY=0  
BOUND_INFEASIBILITY=0  INTEGER_INFEASIBILITY=0  BEST_BOUND=15722636.106  NODES=1  ITERATIONS=544  CPU_TIME=4.99  REAL_TIME=5.23
45         
46         GOPTIONS NOACCESSIBLE;
47         %LET _CLIENTTASKLABEL=;
48         %LET _CLIENTPROJECTPATH=;
49         %LET _CLIENTPROJECTNAME=;
50         %LET _SASPROGRAMFILE=;
51         
52         ;*';*";*/;quit;run;
53         ODS _ALL_ CLOSE;
54         
55         
56         QUIT; RUN;
57         &lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Optimal Value should be:&amp;nbsp; 9352&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 20:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256441#M1276</guid>
      <dc:creator>Adam1012</dc:creator>
      <dc:date>2016-03-13T20:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256446#M1277</link>
      <description>&lt;P&gt;Hint 1:&lt;/P&gt;
&lt;P&gt;The arguments&amp;nbsp;for the EUCLID function are the numbers to be squared:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/syntaxidx/68719/HTML/default/index.htm#/documentation/cdl/en/lefunctionsref/67960/HTML/default/p01uvzvdpw514in18j8xy1hwsd8d.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/syntaxidx/68719/HTML/default/index.htm#/documentation/cdl/en/lefunctionsref/67960/HTML/default/p01uvzvdpw514in18j8xy1hwsd8d.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint 2:&lt;/P&gt;
&lt;P&gt;You also need to use the ROUND function.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2016 21:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256446#M1277</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-03-13T21:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256460#M1278</link>
      <description>&lt;P&gt;I added ROUND function and SQRT, but probably in wrong place, because I still have incorrect result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table BurmaDist as
   select 
      a.Mesta as Mesta1, a.x as lat1, a.y as long1,
      b.Mesta as Mesta2, b.x as lat2, b.y as long2,
      sqrt(round(euclid(round(lat1,1), round(long1,1),round(lat2,1), round(long2,1)),1)) as distance
from Burma as a, Burma as b
      where a.Mesta &amp;lt; b.Mesta;
quit;
proc optnet 
   loglevel   = moderate
   data_links = BurmaDist 
   out_nodes  = TSPTourNodes;
   data_links_var 
      from    = Mesta1 
      to      = Mesta2 
      weight  = distance;
   tsp 
      out     = TSPTourLinks;
run;
%put &amp;amp;_OROPTNET_;
%put &amp;amp;_OROPTNET_TSP_;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Mar 2016 23:48:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256460#M1278</guid>
      <dc:creator>Adam1012</dc:creator>
      <dc:date>2016-03-13T23:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256553#M1280</link>
      <description>&lt;P&gt;round(euclid(lat1-lat2, long1-long2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; round(sqrt((lat1-lat2)**2 + (long1-long2)**2))&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 14:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256553#M1280</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-03-14T14:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Eulidean distance in TSP</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256591#M1281</link>
      <description>Thank you very much</description>
      <pubDate>Mon, 14 Mar 2016 16:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Eulidean-distance-in-TSP/m-p/256591#M1281</guid>
      <dc:creator>Adam1012</dc:creator>
      <dc:date>2016-03-14T16:28:12Z</dc:date>
    </item>
  </channel>
</rss>

