<?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: Constraints for PROC OPTMODEL in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630246#M3010</link>
    <description>&lt;P&gt;Your first attempt is correct if you want &lt;STRONG&gt;each&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;InboundLinehaul[p,t,c,d]&lt;/SPAN&gt; variable to be &amp;gt;= 1000.&amp;nbsp; If you instead want the &lt;STRONG&gt;sum&lt;/STRONG&gt; of all&amp;nbsp;&lt;SPAN&gt;InboundLinehaul[p,t,c,d] variables to be &amp;gt;= 1000, the correct declaration is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con UseProperRates:
   sum {p in Ports, t in Transit, c in LSP, d in DC} InboundLinehaul [p,t,c,d] &amp;gt;= 1000;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Mar 2020 21:22:33 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2020-03-06T21:22:33Z</dc:date>
    <item>
      <title>Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630233#M3009</link>
      <description>&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;I want to add a constraint UseProperRates&amp;nbsp; where I want only if the rates are greater than 1000 to be considered for model.&lt;/P&gt;&lt;P&gt;I did this but it is not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}: InboundLinehaul[p,t,c,d] &amp;gt;=1000;&lt;/P&gt;&lt;P&gt;I added this one. Not sure if this is right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}:&lt;BR /&gt;sum {p in Ports, t in Transit,c in LSP, d in DC} InboundLinehaul [p,t,c,d] &amp;gt;=1000;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 20:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630233#M3009</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-03-06T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630246#M3010</link>
      <description>&lt;P&gt;Your first attempt is correct if you want &lt;STRONG&gt;each&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;InboundLinehaul[p,t,c,d]&lt;/SPAN&gt; variable to be &amp;gt;= 1000.&amp;nbsp; If you instead want the &lt;STRONG&gt;sum&lt;/STRONG&gt; of all&amp;nbsp;&lt;SPAN&gt;InboundLinehaul[p,t,c,d] variables to be &amp;gt;= 1000, the correct declaration is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;con UseProperRates:
   sum {p in Ports, t in Transit, c in LSP, d in DC} InboundLinehaul [p,t,c,d] &amp;gt;= 1000;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 21:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630246#M3010</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-03-06T21:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630252#M3011</link>
      <description>&lt;P&gt;Yes i tried the first one. but i guess infeasibility. Here are my three other constraints.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con Min_Qty_at_LSP_is_Respected {c in LSP}:&lt;BR /&gt;sum{p in Ports,t in Transit,d in DC} ContainersfromPortstoLSPtoDC [p,t,c,d]&amp;gt;=Min_Qty_LSP*Is_LSP[c];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con ModelOutput_Same_As_ModelInput {p in Ports, d in DC}:&lt;BR /&gt;sum {t in Transit,c in LSP} ContainersfromPortstoLSPtoDC[p,t,c, d] = Containers [p,d];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con CheckLSP {c in LSP}: ContainersatLSP[c] &amp;lt;= BigM*Is_LSP[c];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}: InboundLinehaul[p,t,c,d] &amp;gt;=1;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 21:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630252#M3011</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-03-06T21:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630254#M3012</link>
      <description>&lt;P&gt;OK, I see from your other thread that InboundLineHaul is a NUM, not a VAR.&amp;nbsp; The constraints should all contain at least one variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not quite sure what rule you are trying to enforce when you say "&lt;SPAN&gt;I want only if the rates are greater than 1000 to be considered for model."&amp;nbsp; Does this mean that if&amp;nbsp;InboundLinehaul[p,t,c,d] &amp;lt; 1000 you want to treat it as 0 instead?&amp;nbsp; Or maybe&amp;nbsp;if&amp;nbsp;InboundLinehaul[p,t,c,d] &amp;lt; 1000 you want to force&amp;nbsp;ContainersfromPortstoLSPtoDC[p,t,c, d] = 0?&amp;nbsp; Or something else?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 22:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630254#M3012</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-03-06T22:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630257#M3013</link>
      <description>&lt;P&gt;Thanks Rob.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to enforce a rule where I want the model to just use costs when it is more than 1000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anything less than 1000, I dont want model to consider it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 22:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630257#M3013</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-03-06T22:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints for PROC OPTMODEL</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630266#M3014</link>
      <description>&lt;P&gt;Thanks Rob&lt;/P&gt;&lt;P&gt;Based on ur feedback I did this: I declared a binary variable called&amp;nbsp;IsPortsTransitLSPDC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}: IsPortsTransitLSPDC[p,t,c,d]*InboundLinehaul[p,t,c,d] &amp;gt;=1;&lt;/P&gt;&lt;P&gt;this seems to be working. i will check on the numbers closesly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 22:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraints-for-PROC-OPTMODEL/m-p/630266#M3014</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-03-06T22:49:57Z</dc:date>
    </item>
  </channel>
</rss>

