<?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: Need Help with my Code in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356839#M1815</link>
    <description>&lt;P&gt;Plz post it at OR forum.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp;is there.&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2017 12:08:55 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2017-05-08T12:08:55Z</dc:date>
    <item>
      <title>Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356793#M1810</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, can anyone help me with my code? I am getting always "semantic error".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 06:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356793#M1810</guid>
      <dc:creator>jfm00</dc:creator>
      <dc:date>2017-05-08T06:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356796#M1811</link>
      <description>&lt;P&gt;Do not use Office Files for posting code. Those files are often used to transport malware and are therefore blocked by many, if not most, corporate firewalls.&lt;/P&gt;
&lt;P&gt;The proper way to post SAS code is the "little running man" icon. It preserves formatting and gives a look similar to the SAS Enhanced Editor.&lt;/P&gt;
&lt;P&gt;For logs and non-SAS code, use the {i} icon.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 07:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356796#M1811</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-08T07:19:33Z</dc:date>
    </item>
    <item>
      <title>Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356806#M1812</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When I run this code, I get errors. Can anyone help me correct my code? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this problem, I have fixed costs per plant and per product and also minimum and maximum production per plant and per product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc optmodel;&lt;BR /&gt;set Plant = {'P1','P2','P3','P4','P5'};&lt;BR /&gt;set Product = {'T1','T2','T3','T4'};&lt;BR /&gt;&lt;BR /&gt;number Supply {Plant} = [615 635 650 573 634] ;&lt;BR /&gt;number Demand {Product} = [510 450 458 521];&lt;BR /&gt;number VariaCost {Plant,Product} = [&lt;BR /&gt;22.45 24.05 23.2 25&lt;BR /&gt;21.85 24.35 24.25 24.8&lt;BR /&gt;25.15 24.9 25.45 24.2&lt;BR /&gt;25&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 25.75&amp;nbsp; 21.75 21.15&lt;BR /&gt;21.6 23.6 21.7 24.05];&lt;BR /&gt;number FixedCost {Plant,Product} = [&lt;BR /&gt;971&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;429&amp;nbsp;&amp;nbsp;&amp;nbsp; 1138 1001&lt;BR /&gt;1188 845&amp;nbsp; 485 1336&lt;BR /&gt;529&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 975&amp;nbsp;&amp;nbsp;&amp;nbsp; 1227 1280&lt;BR /&gt;1325 1164 485&amp;nbsp;&amp;nbsp; 302&lt;BR /&gt;1297 979&amp;nbsp; 536 769];&lt;BR /&gt;number M = 1000000;&lt;BR /&gt;number MinUse {Plant,Product} = [&lt;BR /&gt;146&amp;nbsp; 53&amp;nbsp;&amp;nbsp; 125&amp;nbsp; 147&lt;BR /&gt;105&amp;nbsp; 104&amp;nbsp; 125&amp;nbsp; 122&lt;BR /&gt;141&amp;nbsp; 53&amp;nbsp;&amp;nbsp; 128&amp;nbsp; 50&lt;BR /&gt;69&amp;nbsp;&amp;nbsp; 132&amp;nbsp; 89&amp;nbsp;&amp;nbsp; 57&lt;BR /&gt;95&amp;nbsp;&amp;nbsp; 84&amp;nbsp;&amp;nbsp; 108&amp;nbsp; 116];&lt;BR /&gt;number MaxUse {Plant,Product} = [&lt;BR /&gt;283&amp;nbsp; 346&amp;nbsp; 328&amp;nbsp; 306&lt;BR /&gt;356&amp;nbsp; 366&amp;nbsp; 278&amp;nbsp; 336&lt;BR /&gt;371&amp;nbsp; 373&amp;nbsp; 347&amp;nbsp; 355&lt;BR /&gt;282&amp;nbsp; 340&amp;nbsp; 346&amp;nbsp; 332&lt;BR /&gt;334&amp;nbsp; 332&amp;nbsp; 295&amp;nbsp; 348];&lt;BR /&gt;&lt;BR /&gt;var X {Plant,Product} integer &amp;gt;= 0;&lt;BR /&gt;var Y {Plant} binary;&lt;BR /&gt;&lt;BR /&gt;minimize TotalCost = sum {i in Plant} ( sum {j in Product} ( X[i,j]*VariaCost[i,j] ) + Y[i]*FixedCost[i,j] );&lt;BR /&gt;&lt;BR /&gt;con SupplyConst {i in Plant} : sum {j in Product} X[i,j]&amp;lt;=Supply[i];&lt;BR /&gt;con DemandConst {j in Product} : sum {i in Plant} X[i,j]&amp;gt;=Demand[j];&lt;BR /&gt;con Producing {i in Plant} : sum {j in Product} X[i,j] &amp;lt;= M * Y[i];&lt;BR /&gt;con UseMinimum {i in Plant} : sum {j in Product} (sum {i in Plant}) X[i,j] &amp;gt;= MinUse[i,j] * Y[i];&lt;BR /&gt;con UseMaximum {i in Plant} : sum {j in Product} (sum {i in Plant}) X[i,j] &amp;lt;= MaxUse[i,j];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;solve;&lt;BR /&gt;&lt;BR /&gt;print TotalCost X;&lt;BR /&gt;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356806#M1812</guid>
      <dc:creator>jfm00</dc:creator>
      <dc:date>2017-05-08T08:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356808#M1813</link>
      <description>&lt;P&gt;When you need help with a SAS error, post the log (of the whole step!). And &lt;U&gt;as I already stated&lt;/U&gt;(!), use the proper icons for posting code and log.&lt;/P&gt;
&lt;P&gt;If the ERROR could be caused by the data, post example data in a data step as described &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356808#M1813</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-08T08:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356810#M1814</link>
      <description>&lt;P&gt;PS a quick google search for "proc optmodel semantic error" gave me this result:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/67517/HTML/default/ormpug_networksolver_details01.htm" target="_blank"&gt;Input Data for the Network Solver :: SAS/OR(R) 13.2 User's Guide: Mathematical Programming&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So you might have a null graph in your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maxim 6: Google is your friend.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356810#M1814</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-08T08:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356839#M1815</link>
      <description>&lt;P&gt;Plz post it at OR forum.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp;is there.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 12:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356839#M1815</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-05-08T12:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356842#M1816</link>
      <description>&lt;P&gt;I moved the topic to the OR community.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 12:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356842#M1816</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-08T12:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with my Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356882#M1817</link>
      <description>&lt;P&gt;See &lt;A href="https://communities.sas.com/t5/Mathematical-Optimization/Sas-Studio-Proc-Optmodel-Multi-part-constraint/m-p/319066/highlight/true#M1597" target="_self"&gt;this related post&lt;/A&gt; from December.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 14:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Need-Help-with-my-Code/m-p/356882#M1817</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-05-08T14:43:39Z</dc:date>
    </item>
  </channel>
</rss>

