<?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: Excel Solver code for SAS in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174313#M907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's solve function in proc fcmp.&lt;/P&gt;&lt;P&gt;Have you tried it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm" style="text-decoration: underline;" title="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 08:36:24 GMT</pubDate>
    <dc:creator>asdfasdadsf</dc:creator>
    <dc:date>2014-07-24T08:36:24Z</dc:date>
    <item>
      <title>Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174305#M899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to find a way to create a code in SAS that would imitate the Excel Solver Add in. I am trying to obtain a list of records that when you sum some of them together will give you the target you are looking for. For example the data below was pasted from excel spreadsheet where I use Solver, You will see 10 records, but only the sum of 5 of them will give you the target figure. My ideal solution will be an exact match, but I can have a tolerance included in the match of 1% difference between the sum of records and the target figure. Can anyone help me with this. I am kind of new in programming and I am having a difficult time creating this.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4921_Capture.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 21:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174305#M899</guid>
      <dc:creator>ismahero2</dc:creator>
      <dc:date>2014-02-13T21:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174306#M900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one way to do it with the MILP solver in PROC OPTMODEL, by minimizing the absolute error between the sum and the target:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data indata;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; input wages;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; datalines;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 14611&lt;BR /&gt;&amp;nbsp; 250125&lt;BR /&gt; 2000135&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&lt;BR /&gt;&amp;nbsp; 502525&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 55458&lt;BR /&gt;&amp;nbsp; 248788&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2211&lt;BR /&gt;11252458&lt;BR /&gt; 2251215&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;%let target = 11520255;&lt;/P&gt;&lt;P&gt;proc optmodel;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set RECORDS;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; num wages {RECORDS};&lt;BR /&gt;&amp;nbsp;&amp;nbsp; read data indata into RECORDS=[_N_] wages;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var UseRecord {RECORDS} binary;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var Surplus &amp;gt;= 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var Slack &amp;gt;= 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; min Error = Surplus + Slack;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; con Error_con:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum {i in RECORDS} wages&lt;I&gt; * UseRecord&lt;I&gt; - Surplus + Slack = &amp;amp;target;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; solve;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; print wages UseRecord;&lt;BR /&gt;quit;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 22:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174306#M900</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-02-13T22:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174307#M901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having this error...&amp;nbsp; Does this means I can do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ERROR: Procedure OPTOMODEL not found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 23:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174307#M901</guid>
      <dc:creator>ismahero2</dc:creator>
      <dc:date>2014-02-13T23:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174308#M902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have SAS/OR licensed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 23:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174308#M902</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-13T23:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174309#M903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I think i have a license.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any way I can do it without optomodel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 00:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174309#M903</guid>
      <dc:creator>ismahero2</dc:creator>
      <dc:date>2014-02-14T00:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174310#M904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have an extra O in the procedure name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 01:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174310#M904</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-02-14T01:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174311#M905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats ok, I just found out we dont have that OPTMODEL available to use in out license.&amp;nbsp; &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;&lt;/P&gt;&lt;P&gt;Any other options that you can think of?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 13:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174311#M905</guid>
      <dc:creator>ismahero2</dc:creator>
      <dc:date>2014-02-14T13:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174312#M906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For n&amp;lt;= 20, you could do an exhaustive search in a datastep with function GRAYCODE. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 15:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174312#M906</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-14T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174313#M907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's solve function in proc fcmp.&lt;/P&gt;&lt;P&gt;Have you tried it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm" style="text-decoration: underline;" title="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003193738.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 08:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174313#M907</guid>
      <dc:creator>asdfasdadsf</dc:creator>
      <dc:date>2014-07-24T08:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Solver code for SAS</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174314#M908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this session. HaiKuo has already give you answer by using graycode() . But first of all ,we should thank PG who bring graycode() in front of us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/message/139013#139013" title="https://communities.sas.com/message/139013#139013"&gt;https://communities.sas.com/message/139013#139013&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck.&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 12:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Excel-Solver-code-for-SAS/m-p/174314#M908</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-07-24T12:17:09Z</dc:date>
    </item>
  </channel>
</rss>

