<?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: optimization problem with inequality contraints in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/306846#M1473</link>
    <description>&lt;P&gt;Yes,&amp;nbsp;your constrained regression problem&amp;nbsp;sounds like a good fit for SAS/OR.&amp;nbsp; You can use the OPTMODEL procedure to model and solve the problem:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To solve separate groups independently, see this Usage Note, which has a quadratic objective and uses the QP solver:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/42/332.html" target="_blank"&gt;http://support.sas.com/kb/42/332.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS/OR 13.1 or later, you can even solve these independent problems in parallel by using a COFOR loop:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_syntax11.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_syntax11.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This example illustrates changing a DO loop to a COFOR loop:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpex/68157/HTML/default/viewer.htm#ormpex_ex22_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpex/68157/HTML/default/viewer.htm#ormpex_ex22_toc.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 15:17:20 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2016-10-24T15:17:20Z</dc:date>
    <item>
      <title>optimization problem with inequality contraints</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/306819#M1472</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;first of all, I am quite new to optimization&amp;nbsp;problems and their programming, so I apologize for any possible lack of clarity.&lt;/P&gt;
&lt;P&gt;I would like to calculate coeffincients x(i)'s, as much as possibe close to d(i)'s, &amp;nbsp;such that a weighted sum of x(i) is equal to a known value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;min f((x(i),d(i))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;s.t. sum(y(i)x(i))=Y&lt;/P&gt;
&lt;P&gt;s.t. y(i)x(i) &amp;gt;=0&lt;/P&gt;
&lt;P&gt;s.t.&amp;nbsp;&lt;SPAN&gt;y(i)x(i)&amp;lt;=c*z(i)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where f(.) would be a distance function summarizing the distances between x(i) and d(i), e.g&amp;nbsp;a quadratic function (suggestions are welcome).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;y(i),Y,,c,z(i),d(i) are known values&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In other terms it is a calibration problem with the addition of inequality constraints.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;These values are stored in a sas dataset, and i would like the procedure to add the x(i)'s to the dataset.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A second issue is to repeat the algorithm for a number of groups. So a solution with a by processing would be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;a group may have up to 200000 observations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can use&amp;nbsp;SAS-OR or sas IML. I would prefer the first choice in order to learn a new tool.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thank you very much in advance&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 14:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/306819#M1472</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2016-10-24T14:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: optimization problem with inequality contraints</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/306846#M1473</link>
      <description>&lt;P&gt;Yes,&amp;nbsp;your constrained regression problem&amp;nbsp;sounds like a good fit for SAS/OR.&amp;nbsp; You can use the OPTMODEL procedure to model and solve the problem:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To solve separate groups independently, see this Usage Note, which has a quadratic objective and uses the QP solver:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/42/332.html" target="_blank"&gt;http://support.sas.com/kb/42/332.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS/OR 13.1 or later, you can even solve these independent problems in parallel by using a COFOR loop:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_syntax11.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_optmodel_syntax11.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This example illustrates changing a DO loop to a COFOR loop:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpex/68157/HTML/default/viewer.htm#ormpex_ex22_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpex/68157/HTML/default/viewer.htm#ormpex_ex22_toc.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 15:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/306846#M1473</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-10-24T15:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: optimization problem with inequality contraints</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/307072#M1474</link>
      <description>&lt;P&gt;It looks like IML can get it.&lt;/P&gt;
&lt;P&gt;Can you post a real example ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;y(i)x(i) &amp;gt;=0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;means&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;y(i)*x(i) &amp;gt;=0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/optimization-problem-with-inequality-contraints/m-p/307072#M1474</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-10-25T09:30:23Z</dc:date>
    </item>
  </channel>
</rss>

