<?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: passing conditonal constraint in optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/passing-conditonal-constraint-in-optmodel/m-p/598307#M2917</link>
    <description>&lt;P&gt;I don't quite follow why you define variable n_mac_price and variable new_mac_price if you want them to always be equal to each other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see the EXPAND output closer to what you expect, you can do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   expand / solve;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The fixed values will be substituted and trivial constraints removed.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2019 03:37:56 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2019-10-22T03:37:56Z</dc:date>
    <item>
      <title>passing conditonal constraint in optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/passing-conditonal-constraint-in-optmodel/m-p/598263#M2913</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i have the following problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for {i in rxid} do;&lt;BR /&gt;if is_reprice_allowed[i] = 0 then fix new_mac_price[i] = mac_price[i];&lt;BR /&gt;else if is_reprice_allowed[i] = 1 and is_present_in_gpi[i] = 1 then fix new_mac_price[i] = new_mac_price_by_user[i];&lt;BR /&gt;else if is_reprice_allowed[i] = 0 and is_present_in_gpi[i] = 1 then do;&lt;BR /&gt;new_mac_price[i].lb = lower_bound[i];&lt;BR /&gt;new_mac_price[i].ub = upper_bound[i];&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;con c1 {i in rxid}: n_mac_price[i] =new_mac_price[i];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am trying to pass the fixed values to the constraints, but after i&amp;nbsp; expand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con c1:n_mac_price[1]-new_mac_price[2]=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where n_mac_price is unknown for now and&amp;nbsp;new_mac_price is found using the above condition, hence my constraint should be like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con c1:n_mac_price[1] = 27 something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am i heading in the right direction?please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 20:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/passing-conditonal-constraint-in-optmodel/m-p/598263#M2913</guid>
      <dc:creator>sarathgk</dc:creator>
      <dc:date>2019-10-21T20:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: passing conditonal constraint in optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/passing-conditonal-constraint-in-optmodel/m-p/598307#M2917</link>
      <description>&lt;P&gt;I don't quite follow why you define variable n_mac_price and variable new_mac_price if you want them to always be equal to each other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see the EXPAND output closer to what you expect, you can do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   expand / solve;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The fixed values will be substituted and trivial constraints removed.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 03:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/passing-conditonal-constraint-in-optmodel/m-p/598307#M2917</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-10-22T03:37:56Z</dc:date>
    </item>
  </channel>
</rss>

