<?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: proc optmodel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/494016#M130104</link>
    <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I found another way to make it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2018 06:45:05 GMT</pubDate>
    <dc:creator>LouiseS</dc:creator>
    <dc:date>2018-09-10T06:45:05Z</dc:date>
    <item>
      <title>proc optmodel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/492019#M129228</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a syntaxe problem with the following procedure, someone can help me? I think that it is with the objectif function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&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;data fooddata; infile datalines;&lt;BR /&gt;input name $ prod $ cost prot fat carb cal Moy; datalines;&lt;BR /&gt;Breadb B 2.5 4 1 15 90 150&lt;BR /&gt;Breadc C 2 4 1 15 90 212&lt;BR /&gt;Milkb B 4 8 5 11.7 120 0&lt;BR /&gt;Milkc C 3.5 8 5 11.7 120 350&lt;BR /&gt;Cheeseb B 12 7 9 0.4 106 20&lt;BR /&gt;Cheesec C 8 7 9 0.4 106 50&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc optmodel; /* declare index set */ set&amp;lt;str&amp;gt; FOOD;&lt;BR /&gt;/* declare variables */ var diet{FOOD} &amp;gt;= 0;&lt;BR /&gt;/* objective function */&lt;BR /&gt;num Moy{FOOD}; num cost{FOOD}; min f=(sum{i in FOOD, j=2i-1}((Moy[j]+Moy[j+1])-(diet[j]+diet[j+1]))**2)+sum{i in FOOD}cost[i]*diet[i];&lt;/P&gt;&lt;P&gt;/* constraints */&lt;BR /&gt;num prot{FOOD}; num fat{FOOD}; num carb{FOOD}; num cal{FOOD};&lt;BR /&gt;num min_cal, max_prot, min_carb, min_fat; con cal_con: sum{i in FOOD}cal[i]*diet[i] &amp;gt;= 300;&lt;BR /&gt;con prot_con: sum{i in FOOD}prot[i]*diet[i] &amp;lt;= 10; con carb_con: sum{i in FOOD}carb[i]*diet[i] &amp;gt;= 10;&lt;BR /&gt;con fat_con: sum{i in FOOD}fat[i]*diet[i] &amp;gt;= 8;&lt;/P&gt;&lt;P&gt;/* read parameters */ read data fooddata into FOOD=[name] cost prot fat carb cal Moy;&lt;/P&gt;&lt;P&gt;/* solve and print the optimal solution */ solve with lp/logfreq=1; /* print each iteration to log */ print diet;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 09:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/492019#M129228</guid>
      <dc:creator>LouiseS</dc:creator>
      <dc:date>2018-09-03T09:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/493804#M129993</link>
      <description>&lt;P&gt;Please show the log for this program.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 18:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/493804#M129993</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-09-08T18:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc optmodel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/494016#M130104</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I found another way to make it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 06:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-optmodel/m-p/494016#M130104</guid>
      <dc:creator>LouiseS</dc:creator>
      <dc:date>2018-09-10T06:45:05Z</dc:date>
    </item>
  </channel>
</rss>

