<?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: How to create Combinations and Permutations in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559299#M2752</link>
    <description>&lt;P&gt;Here's a way to do it with the CLP solver in PROC OPTMODEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   num n = 5;
   num k = 3;
   var X {1..k} &amp;gt;= 1 &amp;lt;= n integer;
   con Permutation: alldiff(X);
   solve with clp / findallsolns;
   for {s in 1.._NSOL_} print {j in 1..k} X[j].sol[s];
   create data want from [s]=(1.._NSOL_) {j in 1..k} &amp;lt;col('X'||j)=X[j].sol[s]&amp;gt;;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 May 2019 13:16:06 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2019-05-16T13:16:06Z</dc:date>
    <item>
      <title>How to create Combinations and Permutations</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559093#M2749</link>
      <description>&lt;P&gt;how to create the permutation of k items out of total n items.I don't have IML.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 18:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559093#M2749</guid>
      <dc:creator>jchang_70</dc:creator>
      <dc:date>2019-05-15T18:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Combinations and Permutations</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559103#M2750</link>
      <description>&lt;P&gt;SAS has some CALL routines that handles this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a blog post covering permutations within a data step, no IML needed.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2010/10/13/generate-all-permutations-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2010/10/13/generate-all-permutations-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. Please note I've modified your subject line to be more relevant to your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274307"&gt;@jchang_70&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;how to create the permutation of k items out of total n items.I don't have IML.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 18:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559103#M2750</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-15T18:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Combinations and Permutations Made Easy in SAS Studio 4.3</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559111#M2751</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274307"&gt;@jchang_70&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out the combinatorial functions and CALL routines (see section "Combinatorial" in the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n01f5qrjoh9h4hn1olbdpb5pr2td.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;list of all functions&lt;/A&gt;), e.g. &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0rag3bzl2l7dsn16xc6bwufqg5a.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;ALLCOMB&lt;/A&gt; and &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0vsfgz28s9z6in1r24ytst1i2x5.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;LEXPERK&lt;/A&gt;, if you have access to these. (I'm not quite sure because of potential limitations of SAS &lt;EM&gt;Studio&lt;/EM&gt;&amp;nbsp;to "&lt;SPAN&gt;functions that run on the CAS server.")&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 18:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559111#M2751</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-05-15T18:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Combinations and Permutations</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559299#M2752</link>
      <description>&lt;P&gt;Here's a way to do it with the CLP solver in PROC OPTMODEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   num n = 5;
   num k = 3;
   var X {1..k} &amp;gt;= 1 &amp;lt;= n integer;
   con Permutation: alldiff(X);
   solve with clp / findallsolns;
   for {s in 1.._NSOL_} print {j in 1..k} X[j].sol[s];
   create data want from [s]=(1.._NSOL_) {j in 1..k} &amp;lt;col('X'||j)=X[j].sol[s]&amp;gt;;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 May 2019 13:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/How-to-create-Combinations-and-Permutations/m-p/559299#M2752</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-05-16T13:16:06Z</dc:date>
    </item>
  </channel>
</rss>

