<?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: SAS OPTGRAPH ERROR in Initializing in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495426#M2397</link>
    <description>&lt;P&gt;The TSP statement was not added to PROC OPTGRAPH until version 12.3 (SAS 9.4):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/solutions/optgraph/index.html" target="_blank"&gt;http://support.sas.com/documentation/solutions/optgraph/index.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also access the TSP algorithm via PROC OPTNET or PROC OPTMODEL (solve with network) in SAS/OR, or via PROC OPTNETWORK or the Network Optimization action set in SAS Optimization on SAS Viya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Sep 2018 17:46:29 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2018-09-13T17:46:29Z</dc:date>
    <item>
      <title>SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495345#M2395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Geeks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run SAS OPTGRAPH Procedure as to learn more about Travelling Salesman problem (for ShortestPath) using SAS 9.2 version but unfortunately I keep getting "ERROR: 22-322, Expecting an Integer Constant" where more details of this error is in the attached picture.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the same instructions in&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/procgralg/68145/HTML/default/viewer.htm#procgralg_optgraph_details98.htm" target="_blank" rel="nofollow noopener noreferrer"&gt;this SAS&amp;nbsp;Support Forum&amp;nbsp;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample data includes two nodes (the starting point which is classified as "FROM" and the end point classified as "TO") in addition to the weight of this transaction coded as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STEP 1:&amp;nbsp;&amp;nbsp;Loading the data&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; LinkSetIn&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;from&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt; to &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;weight&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;datalines&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;A B &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; A C &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; A D &lt;SPAN class="token number"&gt;1.5&lt;/SPAN&gt; B C &lt;SPAN class="token number"&gt;2.0&lt;/SPAN&gt; B D &lt;SPAN class="token number"&gt;4.0&lt;/SPAN&gt;B E &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt; C D &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt; C F &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt; C H &lt;SPAN class="token number"&gt;4.0&lt;/SPAN&gt; D E &lt;SPAN class="token number"&gt;1.5&lt;/SPAN&gt;D F &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt; D G &lt;SPAN class="token number"&gt;4.0&lt;/SPAN&gt; E F &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; E G &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; F G &lt;SPAN class="token number"&gt;2.0&lt;/SPAN&gt;F H &lt;SPAN class="token number"&gt;4.0&lt;/SPAN&gt; H I &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt; I J &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; C J &lt;SPAN class="token number"&gt;5.0&lt;/SPAN&gt; F J &lt;SPAN class="token number"&gt;3.0&lt;/SPAN&gt;F I &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt; H J &lt;SPAN class="token number"&gt;1.0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 2: Run PROC OPTGRAPH MACRO&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; optgraphloglevel &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; moderatedata_links &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; LinkSetInout_nodes &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; NodeSetOut&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;tspout &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; TSPTour&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%put&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;_OPTGRAPH_&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%put&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;_OPTGRAPH_TSP_&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the error is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper lia-message-image-actions-narrow lia-message-image-actions-below"&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/23264i353AB4B60F1A90A0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 15:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495345#M2395</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2018-09-13T15:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495410#M2396</link>
      <description>&lt;P&gt;There is no need to go through extra steps to make images of logs and paste them. Best is to copy directly from the log and then paste into a code window opened with either of&amp;nbsp; the forums {I} or "running man" icons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error about the expected integer constant means that the procedure is looking for just that: a number such as&lt;/P&gt;
&lt;P&gt;loglevel=2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "out of order" error often is associated with placing a semicolon before a Proc option. The ; would end the procedure statement so the option is not valid in the location of the code encountered.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495410#M2396</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-13T17:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495426#M2397</link>
      <description>&lt;P&gt;The TSP statement was not added to PROC OPTGRAPH until version 12.3 (SAS 9.4):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/solutions/optgraph/index.html" target="_blank"&gt;http://support.sas.com/documentation/solutions/optgraph/index.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also access the TSP algorithm via PROC OPTNET or PROC OPTMODEL (solve with network) in SAS/OR, or via PROC OPTNETWORK or the Network Optimization action set in SAS Optimization on SAS Viya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495426#M2397</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-09-13T17:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495889#M2398</link>
      <description>&lt;P&gt;The forum has more restricted roles to post a question. For the out of order, the code was retrieved from SAS support documentation. The problem might be related to SAS version 9.2 which TSP has been supported since 9.4&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 09:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495889#M2398</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2018-09-15T09:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495893#M2399</link>
      <description>&lt;P&gt;Thanks for this useful reply but when I ran&amp;nbsp;&lt;SPAN&gt;PROC OPTNET I keep getting "ERROR: Procedure Not Found", it seems that it is also supported from 9.3 (where I have 9.2) Right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For PROC OPTMODEL , I followed the same instructions as in &lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/67517/HTML/default/viewer.htm#ormpug_networksolver_details37.htm" target="_self"&gt;this SAS Support&amp;nbsp;TSP:&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data LinkSetIn;
   input from $ to $ weight @@;
   datalines;
A B 1.0   A C 1.0   A D 1.5   B C 2.0   B D 4.0
B E 3.0   C D 3.0   C F 3.0   C H 4.0   D E 1.5
D F 3.0   D G 4.0   E F 1.0   E G 1.0   F G 2.0
F H 4.0   H I 3.0   I J 1.0   C J 5.0   F J 3.0
F I 1.0   H J 1.0
;

proc optmodel;
   set&amp;lt;str,str&amp;gt; EDGES;
   set&amp;lt;str&amp;gt; NODES = union{&amp;lt;i,j&amp;gt; in EDGES} {i,j};
   num weight{EDGES};
   read data LinkSetIn into EDGES=[from to] weight;
   num tsp_order{NODES};
   set&amp;lt;str,str&amp;gt; TOUR;

   solve with NETWORK /
      loglevel = moderate
      links    = (weight=weight)
      tsp
      out      = (order=tsp_order tour=TOUR)
   ;

   put TOUR;
   print {&amp;lt;i,j&amp;gt; in TOUR} weight;
   print tsp_order;
   create data NodeSetOut from [node] tsp_order;
   create data TSPTour from [from to]=TOUR weight;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;but I got the following error as well:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23292i4A6E08803E43F3C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 10:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495893#M2399</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2018-09-15T10:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495971#M2400</link>
      <description>&lt;P&gt;PROC OPTNET was released in August 2012 with SAS/OR 12.1 (on SAS 9.3M1).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SOLVE WITH NETWORK statement was added to PROC OPTMODEL in&amp;nbsp;&lt;SPAN class="mw-headline"&gt;December 2013 with SAS/OR 13.1 (on SAS 9.4M1).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would strongly recommend that you&amp;nbsp;upgrade to the latest release (SAS/OR 14.3 on SAS 9.4M5) to take advantage of these features and to benefit from the significant performance improvements over the last several years.&amp;nbsp; Until then, you might be interested in the subtour formulation from this SAS/OR 9.22 example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/63352/HTML/default/viewer.htm#ormpug_milpsolver_sect020.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/63352/HTML/default/viewer.htm#ormpug_milpsolver_sect020.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 20:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/495971#M2400</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-09-16T20:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/496009#M2401</link>
      <description>&lt;P&gt;Thanks again for your reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked this article before, but the library at&amp;nbsp;&lt;A href="http://elib.zib.de/pub/Packages/mp-testdata/tsp/tsplib/tsplib.html" target="_blank"&gt;http://elib.zib.de/pub/Packages/mp-testdata/tsp/tsplib/tsplib.html&lt;/A&gt; is not found. This is where I should start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 06:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/496009#M2401</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2018-09-16T06:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OPTGRAPH ERROR in Initializing</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/496079#M2402</link>
      <description>&lt;P&gt;Please try this link instead:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/" target="_blank"&gt;https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 20:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/SAS-OPTGRAPH-ERROR-in-Initializing/m-p/496079#M2402</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-09-16T20:47:38Z</dc:date>
    </item>
  </channel>
</rss>

