<?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: Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529030#M144476</link>
    <description>&lt;P&gt;PROC IML 's Genetic Algorithm can do it.&lt;/P&gt;
&lt;P&gt;But better use SAS/OR , so post it at OR forum.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp;is there.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 12:52:12 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-01-22T12:52:12Z</dc:date>
    <item>
      <title>Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529004#M144466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a simplified case, let's assume, I have following data:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;id&lt;/TD&gt;&lt;TD&gt;cost&lt;/TD&gt;&lt;TD&gt;profit_in_case1&lt;/TD&gt;&lt;TD&gt;profit_in_case2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;-0.6&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;-0.75&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;10.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;-0.75&lt;/TD&gt;&lt;TD&gt;10.5&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;And I have to maximize my profit with decisions,so if I just see the profits as individual rows, I'll have decisions like -&amp;nbsp;&lt;/P&gt;&lt;P&gt;A - case2, B - case1, C - case2, D-case1.&lt;/P&gt;&lt;P&gt;But I have constraints like, I can only avail costs up to 1.5, so I can't choose A-case2 and B-case1 or A-case2 and C-case2(D-case1), instead I have to choose : C-case2 and D-case1. The final decision for maximum profit will look like:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;decision_Cost&lt;/TD&gt;&lt;TD&gt;decision_profit_case1&lt;/TD&gt;&lt;TD&gt;decision_profit_case2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, we have minimized cost (Total = 1.33) and maximized profit (Total = 21) in the constraints that we can chose only one of the decisions to be 1 and total cost doesn't breach the boundary of 1.5.&lt;/P&gt;&lt;P&gt;My original problem has other constraints as well, but if I can get a solution to this one in PROC IML or PROC OPTMODEL, I think I can build from there. Any help is deeply appreciated. I am using SAS 9.4.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 09:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529004#M144466</guid>
      <dc:creator>thepushkarsingh</dc:creator>
      <dc:date>2019-01-22T09:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529030#M144476</link>
      <description>&lt;P&gt;PROC IML 's Genetic Algorithm can do it.&lt;/P&gt;
&lt;P&gt;But better use SAS/OR , so post it at OR forum.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp;is there.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529030#M144476</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-22T12:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529359#M144617</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;, can you please help me with the solution in PROC IML? We need a dynamic solution as no one is sure how many constraints, how many columns will be there. There may be many constraints added in each period and I want the code to be reuseable. Kindly suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 09:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529359#M144617</guid>
      <dc:creator>thepushkarsingh</dc:creator>
      <dc:date>2019-01-23T09:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529376#M144627</link>
      <description>&lt;P&gt;As far as I know, SAS/OR is the best choice . If you are using GA ,that would cost you lots of time. Doesn't&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp; answer your Q, or he is just in busy time .&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 12:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529376#M144627</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-23T12:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Optimization with constraints on Sum of Columns conditional on selection of Rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529377#M144628</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt; answered the question and the solution is great. Many thanks to both of you.</description>
      <pubDate>Wed, 23 Jan 2019 12:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constrained-Optimization-with-constraints-on-Sum-of-Columns/m-p/529377#M144628</guid>
      <dc:creator>thepushkarsingh</dc:creator>
      <dc:date>2019-01-23T12:48:56Z</dc:date>
    </item>
  </channel>
</rss>

