<?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: Linear optimization in SAS/IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341624#M3352</link>
    <description>&lt;P&gt;The &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_langref_sect256.htm" target="_self"&gt;documentation for the MILSOLVE call&lt;/A&gt;&amp;nbsp;says "For complete functionality the SAS/OR product must also be installed, otherwise the maximum number of variables and maximum number of constraints is restricted to 500."&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2017 15:35:04 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-03-16T15:35:04Z</dc:date>
    <item>
      <title>Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340754#M3340</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We trying to solve the next optimization problem?&lt;/P&gt;&lt;P&gt;We have:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Pij, i=1÷3, j=1÷30, Pij are positive&lt;/LI&gt;&lt;LI&gt;Bi, i=1÷3, integer positive&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The searching result is matrix of 3 x 30 of binary values Xij with next conditions:&lt;/P&gt;&lt;P&gt;Constraints:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For each j =1÷30, Sum (by index of i=1÷3)Xij=1&lt;/LI&gt;&lt;LI&gt;For each i =1÷3, Sum by index of (j=1÷3o)Xij≤Bi&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Objective: Optimize:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Maximize (Sum (by index of i=1÷3) Sum (by index of j=1÷30) Pij *Xij)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is it possible to solve the problem by the lpsolve or milpsolve subroutine?&lt;/P&gt;&lt;P&gt;Is there another predefined subroutine in SAS/IML which can be used to solve this problem? We haven’t the SAS/OR.&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Boriana&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340754#M3340</guid>
      <dc:creator>Boriana</dc:creator>
      <dc:date>2017-03-14T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340774#M3341</link>
      <description>&lt;P&gt;What you want is probably&amp;nbsp;the MILPSOLVE (Mixed Integer Linear Program) subroutine well described in this article:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2017/01/18/milp-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2017/01/18/milp-sas.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_langref_sect256.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_langref_sect256.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 13:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340774#M3341</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-03-14T13:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340776#M3342</link>
      <description>&lt;P&gt;I tried to do this with next construction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;iml&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;object = { &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;19&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;30&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;coef = { &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0756&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0782&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0241&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.2657&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1985&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1728&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.1269&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1101&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0609&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.3941&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.5391&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.6155&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.2516&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1239&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1977&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.1269&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1405&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0609&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.4798&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.3912&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.3524&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.2262&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.2216&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.2696&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.3540&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1645&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.2696&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.0367&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0728&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0808&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.7796&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.6506&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.7071&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.7618&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.3593&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.3524&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.4556&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.2055&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1863&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.7796&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.6242&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.5432&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.7870&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.4469&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.4759&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.0298&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0498&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0241&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.0137&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0498&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0241&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.5738&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.2264&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.1224&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.8033&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.7063&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.5289&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;STRONG&gt;0.0367&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0970&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.0474&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;b ={ &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;rowsense = {L,L};&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;cntl = -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; milpsolve(rc,objv,x,relgap,object,coef,b,cntl,,rowsense);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;print&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; objv, x, relgap;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;But it doesn't work. What I should change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is written that the output is vector. I want to 3 x 30 dimension matrix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 13:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340776#M3342</guid>
      <dc:creator>Boriana</dc:creator>
      <dc:date>2017-03-14T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340791#M3343</link>
      <description>&lt;P&gt;The key to this problem is understanding that the variables in your program need to be expressed as vectors, even though you are thinking of them as matrices,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's use a smaller matrix as an example. Instead of 3x30, consider a 3x4 matrix of probabilities called P. Then the binary solution vector X contains&amp;nbsp;nrow(P)*ncol(P) elements. To make X into a vector, string out the elements of X rowwise, so that the first row comes first, then the second, then the third.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two linear constraints, the row constraints and the column constraints. The row constraints say that the sum of the i_th row of X is less than a specified b_i. The column constraints say that there&amp;nbsp;is only one 1 in each column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following program solves a 3x4 example. I don't have time to explain it all, so &lt;A href="http://blogs.sas.com/content/iml/2017/01/18/milp-sas.html" target="_self"&gt;study the MILP blog post&lt;/A&gt;&amp;nbsp;and carefully&amp;nbsp;study how I constructed the constraint matrices for rows and columns. If I wrote the program well and didn't make any errors, you should only need to input your probability matrix for P and specify the values of the B1 vector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the&amp;nbsp;end of the program, the solution vector is reshaped into a matrix, for easy interpretation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
/* Probability matrix */
P = {0.5  0.5 0   0,  
     0    0.5 0.5 0,  
     0.5  0   0   0.5};

/* The binary solution vector X has nrow(P)*ncol(P) elements.
   There are nrow(P) constraints on the row sums.
   There are ncol(P) constraints on the column sums. */

/* information about variables */
colType = j(nrow(P)*ncol(P), 1, 'B');  /* binary */
 
/* objective function */
c = shape(P, 1);        /* reshape into vector for objective function c*x */
 
/* linear constraints */
S = j(1, ncol(P), 1);
A1 = I(nrow(P)) @ S;    /* constraint that sum across row &amp;lt;= B[i] */
print A1;
A2 = j(1,nrow(P),1) @ I(ncol(P));  /* constraint that sum of rows is 1 */
print A2;
A = A1 // A2;           /* both constraints */

b1 = {2, 3, 2};         /* RHS of constraint for A1 */
b2 = j(ncol(P), 1, 1);  /* RHS of constraint for A2 */
b = b1 // b2;

/* specify symbols for constraints:
   'L' for less than or equal
   'E' for equal
   'G' for greater than or equal */
LEG1 = j(nrow(P),1, "L");        /* constraints for A1 */
LEG2 = j(ncol(P),1,"E");         /* constraints for A2 */
LEG = LEG1 // LEG2;

/* control vector for optimization */
ctrl = {-1,       /* maximize objective */
         1};      /* print level */
 
CALL MILPSOLVE(rc, objVal, result, relgap, /* output variables */
               c, A, b,      /* objective and linear constraints */
               ctrl,         /* control vector */
               coltype, LEG); 

X = shape(result, nrow(P), ncol(P));
print rc objVal, X;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/340791#M3343</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-14T14:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341618#M3351</link>
      <description>&lt;P&gt;Thank you for the solution.&lt;/P&gt;&lt;P&gt;It is worked!!!&lt;/P&gt;&lt;P&gt;We have to applie for the large number of customers.&lt;/P&gt;&lt;P&gt;When I check the same with this data I receive the next:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="courier new,courier"&gt;ERROR: The number of variables or constraints exceeds 500 limit, which will require a SAS/OR product license.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="courier new,courier"&gt;ERROR: Either the SAS/OR product with which MILPSOLVE is associated is not licensed for your system or the product license has expired. Please contact your SAS installation representative.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to extend this size of constraints by setting&amp;nbsp;for&amp;nbsp;SAS/IML?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 15:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341618#M3351</guid>
      <dc:creator>Boriana</dc:creator>
      <dc:date>2017-03-16T15:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341624#M3352</link>
      <description>&lt;P&gt;The &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_langref_sect256.htm" target="_self"&gt;documentation for the MILSOLVE call&lt;/A&gt;&amp;nbsp;says "For complete functionality the SAS/OR product must also be installed, otherwise the maximum number of variables and maximum number of constraints is restricted to 500."&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 15:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341624#M3352</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-16T15:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linear optimization in SAS/IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341627#M3353</link>
      <description>Thank you again.</description>
      <pubDate>Thu, 16 Mar 2017 15:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Linear-optimization-in-SAS-IML/m-p/341627#M3353</guid>
      <dc:creator>Boriana</dc:creator>
      <dc:date>2017-03-16T15:38:11Z</dc:date>
    </item>
  </channel>
</rss>

