<?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 Optimization question in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149877#M782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I am trying to solve the following problem:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-12-14_11-24-38.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/8394_2014-12-14_11-24-38.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I need help identifying the proper procedure and structuring the statements.&lt;/P&gt;&lt;P&gt;Your help is apprecated.&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 16:31:09 GMT</pubDate>
    <dc:creator>chittajs</dc:creator>
    <dc:date>2014-12-14T16:31:09Z</dc:date>
    <item>
      <title>Optimization question</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149877#M782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I am trying to solve the following problem:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-12-14_11-24-38.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/8394_2014-12-14_11-24-38.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I need help identifying the proper procedure and structuring the statements.&lt;/P&gt;&lt;P&gt;Your help is apprecated.&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 16:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149877#M782</guid>
      <dc:creator>chittajs</dc:creator>
      <dc:date>2014-12-14T16:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization question</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149878#M783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use PROC OPTMODEL in SAS/OR to formulate the problem and call either the MILP solver or possibly the CLP solver:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/67517/HTML/default/viewer.htm#ormpug_milpsolver_toc.htm" title="http://support.sas.com/documentation/cdl/en/ormpug/67517/HTML/default/viewer.htm#ormpug_milpsolver_toc.htm"&gt;SAS/OR(R) 13.2 User's Guide: Mathematical Programming&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides the v and w decision variables, you need a binary decision variable x[j,k] that indicates whether observation j fails constraint k.&amp;nbsp; You want to fix x[j,k] = 0 for all observations j with FLAG = 0 and all constraints k.&amp;nbsp; If you are using the MILP solver, you can enforce this relationship by introducing big-M constraints (assuming DC also depends on j):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* if x[j,k] = 1 then v&lt;K&gt; + sum {i in ISET&lt;K&gt;} w&lt;I&gt; * DC[i,j] &amp;gt;= 0 */&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;-v&lt;K&gt; - sum {i in ISET&lt;K&gt;} w&lt;I&gt; * DC[i,j] &amp;lt;= M1[j,k] * (1 - x[j,k])&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* if x[j,k] = 0 then v&lt;K&gt; + sum {i in ISET&lt;K&gt;} w&lt;I&gt; * DC[i,j] &amp;lt; 0 */&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;v&lt;K&gt; + sum {i in ISET&lt;K&gt;} w&lt;I&gt; * DC[i,j] + epsilon &amp;lt;= M2[j,k] * x[j,k]&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where M1[j,k] and M2[j,k] are upper bounds on the left hand sides, and epsilon is a small positive number, say 1e-6, that represents how far away from 0 you consider "negative" to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the CLP solver, you can enforce the relationship with a single set of REIFY constraints, without big-M or epsilon:&lt;/P&gt;&lt;P&gt;REIFY(x[j,k], v&lt;K&gt; + sum {i in ISET&lt;K&gt;} w&lt;I&gt; * DC[i,j] &amp;gt;= 0)&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But note that the CLP solver requires all variables to be integer, and I don't know whether your v and w have that restriction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a bit of ambiguity in the problem statement.&amp;nbsp; Does "fail these constraints" mean fail all constraints or fail at least one constraint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In either case, you need another binary variable y&lt;J&gt; that indicates whether observation j fails, and your objective is to maximize sum {j in JSET} y&lt;J&gt;.&amp;nbsp; If y&lt;J&gt; = 1 means fail all, then you want y&lt;J&gt; &amp;lt;= x[j,k] for all k.&amp;nbsp; If y&lt;J&gt; = 1 means fail at least one, then you want y&lt;J&gt; &amp;lt;= sum {k in KSET} x[j,k].&lt;/J&gt;&lt;/J&gt;&lt;/J&gt;&lt;/J&gt;&lt;/J&gt;&lt;/J&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 18:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149878#M783</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-12-14T18:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization question</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149879#M784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RobPratt ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the detailed reply. That was really helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the questions in your post..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. "But note that the CLP solver requires all variables to be integer, and I don't know whether your v and w have that restriction."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my problem, v and w are real numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. "There is a bit of ambiguity in the problem statement.&amp;nbsp; Does "fail these constraints" mean fail all constraints or fail at least one constraint?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You have it right. "Fail these constraints" means "Fail at least one constraint".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 18:25:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149879#M784</guid>
      <dc:creator>chittajs</dc:creator>
      <dc:date>2014-12-14T18:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization question</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149880#M785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help.&amp;nbsp; Please mark this question as Answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 15:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Optimization-question/m-p/149880#M785</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-12-15T15:37:13Z</dc:date>
    </item>
  </channel>
</rss>

