<?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: Non negative decision variable (x ) in CALL NLPQN in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46883#M280</link>
    <description>Just add x &amp;lt;= 0 to your constraint module:&lt;BR /&gt;
&lt;BR /&gt;
start con(x) global(cl1,l); &lt;BR /&gt;
  c=j(3,1,0); &lt;BR /&gt;
  sumc1=0; &lt;BR /&gt;
  do i = 1 to 2;&lt;BR /&gt;
    sumc1 = sumc1 + (cl1&lt;I&gt;**2 *l&lt;I&gt;/(l&lt;I&gt;+x)**2);&lt;BR /&gt;
  end; &lt;BR /&gt;
  c[1]= 10-sumc1; &lt;BR /&gt;
  c[2]=(max(l)/min(l))-(max(l)+x)/(min(l)+x);&lt;BR /&gt;
  c[3]= x;                /* to satisfy x &amp;gt;= 0   */&lt;BR /&gt;
  return (c);&lt;BR /&gt;
finish con;&lt;BR /&gt;
&lt;BR /&gt;
You will also need to change optn[10] to 3&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
    <pubDate>Fri, 08 Apr 2011 15:08:26 GMT</pubDate>
    <dc:creator>Hutch_sas</dc:creator>
    <dc:date>2011-04-08T15:08:26Z</dc:date>
    <item>
      <title>Non negative decision variable (x ) in CALL NLPQN</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46882#M279</link>
      <description>I want to put x as non negative decision variable in the following code, so how can I put this constraint in the code?&lt;BR /&gt;
&lt;BR /&gt;
proc iml;&lt;BR /&gt;
start fun(x)global(m,l,g);&lt;BR /&gt;
sumf=0;&lt;BR /&gt;
do i = 1 to 3;&lt;BR /&gt;
sumf = sumf + (m*l&lt;I&gt;)+ (g&lt;I&gt;* k)**2  /(l&lt;I&gt;+  x)**2;&lt;BR /&gt;
end;return (sumf);finish fun;&lt;BR /&gt;
start con(k) global(cl,l);&lt;BR /&gt;
c=j(2,1,0);&lt;BR /&gt;
sumc1=0; do i = 1 to 2;sumc1 = sumc1 + (cl1&lt;I&gt;**2 *l&lt;I&gt;/(l&lt;I&gt;+x)**2);end;&lt;BR /&gt;
c[1]= 10-sumc1;&lt;BR /&gt;
c[2]=(max(l)/min(l))-(max(l)+x)/(min(l)+x);&lt;BR /&gt;
return (c);&lt;BR /&gt;
finish con;&lt;BR /&gt;
k=j(1,1,0);&lt;BR /&gt;
optn=j(1,11,.);  optn[11]=0; optn[10]=2;&lt;BR /&gt;
call nlpqn (rc, kres,  "fun", k, optn) nlc="con";&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 08 Apr 2011 14:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46882#M279</guid>
      <dc:creator>aya123</dc:creator>
      <dc:date>2011-04-08T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Non negative decision variable (x ) in CALL NLPQN</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46883#M280</link>
      <description>Just add x &amp;lt;= 0 to your constraint module:&lt;BR /&gt;
&lt;BR /&gt;
start con(x) global(cl1,l); &lt;BR /&gt;
  c=j(3,1,0); &lt;BR /&gt;
  sumc1=0; &lt;BR /&gt;
  do i = 1 to 2;&lt;BR /&gt;
    sumc1 = sumc1 + (cl1&lt;I&gt;**2 *l&lt;I&gt;/(l&lt;I&gt;+x)**2);&lt;BR /&gt;
  end; &lt;BR /&gt;
  c[1]= 10-sumc1; &lt;BR /&gt;
  c[2]=(max(l)/min(l))-(max(l)+x)/(min(l)+x);&lt;BR /&gt;
  c[3]= x;                /* to satisfy x &amp;gt;= 0   */&lt;BR /&gt;
  return (c);&lt;BR /&gt;
finish con;&lt;BR /&gt;
&lt;BR /&gt;
You will also need to change optn[10] to 3&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 08 Apr 2011 15:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46883#M280</guid>
      <dc:creator>Hutch_sas</dc:creator>
      <dc:date>2011-04-08T15:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Non negative decision variable (x ) in CALL NLPQN</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46884#M281</link>
      <description>don't know what happend to the last reply:&lt;BR /&gt;
&lt;BR /&gt;
start con(x) global(cl1,l); &lt;BR /&gt;
  c=j(3,1,0); &lt;BR /&gt;
  sumc1=0; &lt;BR /&gt;
  do i = 1 to 2;&lt;BR /&gt;
    sumc1 = sumc1 + (cl1&lt;I&gt;**2 *l&lt;I&gt;/(l&lt;I&gt;+x)**2);&lt;BR /&gt;
  end; &lt;BR /&gt;
  c[1]= 10-sumc1; &lt;BR /&gt;
  c[2]=(max(l)/min(l))-(max(l)+x)/(min(l)+x);&lt;BR /&gt;
  c[3]= x;    /* satisfy x &amp;gt;= 0 */            &lt;BR /&gt;
  return (c);&lt;BR /&gt;
finish con;&lt;BR /&gt;
&lt;BR /&gt;
You will also need to change optn[10] to 3&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 08 Apr 2011 15:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46884#M281</guid>
      <dc:creator>Hutch_sas</dc:creator>
      <dc:date>2011-04-08T15:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Non negative decision variable (x ) in CALL NLPQN</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46885#M282</link>
      <description>I'll remind everyone that this text editor treats LeftBracket-i-RightBracket&lt;BR /&gt;
as "begin italicize."  To work around this, use a different index variable (such as x&lt;J&gt;) or put a space between the brackets (such as x[ i ]).&lt;/J&gt;</description>
      <pubDate>Fri, 08 Apr 2011 15:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-negative-decision-variable-x-in-CALL-NLPQN/m-p/46885#M282</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-04-08T15:24:36Z</dc:date>
    </item>
  </channel>
</rss>

