<?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: Constraint help: proc optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725215#M3350</link>
    <description>&lt;P&gt;Here are two ways:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con buyAtMost10even: sum {a in ADWORDS: mod(a,2) = 0} buy[a] &amp;lt;= 10;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con buyAtMost10even: sum {a in 2..100 by 2} buy[a] &amp;lt;= 10;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 10 Mar 2021 17:49:25 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2021-03-10T17:49:25Z</dc:date>
    <item>
      <title>Constraint help: proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725208#M3349</link>
      <description>&lt;P&gt;I need help adding a constraint to the below model that restricts the sum of "buy" for even numbered adwords to be at most 10.&lt;/P&gt;&lt;P&gt;proc optmodel;&lt;BR /&gt;set ADWORDS = 1..100;&lt;BR /&gt;num cost_per_click{ADWORDS} = ranuni(123);&lt;BR /&gt;num clicks{ADWORDS} = ranuni(567);&lt;BR /&gt;num conversions{ADWORDS} = ranuni(789);&lt;BR /&gt;num revperconversion=10;&lt;BR /&gt;var buy{ADWORDS} &amp;gt;=0;&lt;BR /&gt;max effectiveness =sum{a in ADWORDS}((revperconversion*conversions[a])-(clicks[a]*cost_per_click[a]))*buy[a];&lt;BR /&gt;con buyAtMost50: sum{a in ADWORDS}buy[a]&amp;lt;=50;&lt;BR /&gt;solve;&lt;BR /&gt;Quit;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 17:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725208#M3349</guid>
      <dc:creator>SAScowboy</dc:creator>
      <dc:date>2021-03-10T17:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint help: proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725215#M3350</link>
      <description>&lt;P&gt;Here are two ways:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con buyAtMost10even: sum {a in ADWORDS: mod(a,2) = 0} buy[a] &amp;lt;= 10;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con buyAtMost10even: sum {a in 2..100 by 2} buy[a] &amp;lt;= 10;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Mar 2021 17:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725215#M3350</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-03-10T17:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint help: proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725221#M3351</link>
      <description>Thank you so much. I’m still learning.</description>
      <pubDate>Wed, 10 Mar 2021 17:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-help-proc-optmodel/m-p/725221#M3351</guid>
      <dc:creator>SAScowboy</dc:creator>
      <dc:date>2021-03-10T17:56:40Z</dc:date>
    </item>
  </channel>
</rss>

