<?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: Creating a set from a data set within optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Creating-a-set-from-a-data-set-within-optmodel/m-p/443162#M2203</link>
    <description>&lt;P&gt;You almost had it.&amp;nbsp; You just need square brackets around the key column(s):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Read data H into Hubs=[ids];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might find &lt;A href="http://go.documentation.sas.com/?docsetId=ormpex&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;this book of examples&lt;/A&gt; useful for learning about PROC OPTMODEL.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 02:47:28 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2018-03-07T02:47:28Z</dc:date>
    <item>
      <title>Creating a set from a data set within optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Creating-a-set-from-a-data-set-within-optmodel/m-p/443157#M2202</link>
      <description>&lt;P&gt;Hey! (working on SAS Studio)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a set in the proc optmodel&amp;nbsp;body of my program, but so far I haven't&amp;nbsp;been successful.&lt;/P&gt;&lt;P&gt;For small sets is ok to create the sets for variables, parameters in the declaration statement but right now I am working with a problem instance that has 200+ elements in one set and 1300+ in another one, so I wonder if there is a way to create a set from a previous data set I can create beforehand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data H;
input ids;
datalines;
131
199
229
512
;
Run;

proc optmodel;
set Hubs;
Read data H into Hubs=ids;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 02:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Creating-a-set-from-a-data-set-within-optmodel/m-p/443157#M2202</guid>
      <dc:creator>jfreyes</dc:creator>
      <dc:date>2018-03-07T02:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a set from a data set within optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Creating-a-set-from-a-data-set-within-optmodel/m-p/443162#M2203</link>
      <description>&lt;P&gt;You almost had it.&amp;nbsp; You just need square brackets around the key column(s):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Read data H into Hubs=[ids];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might find &lt;A href="http://go.documentation.sas.com/?docsetId=ormpex&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;this book of examples&lt;/A&gt; useful for learning about PROC OPTMODEL.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 02:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Creating-a-set-from-a-data-set-within-optmodel/m-p/443162#M2203</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-03-07T02:47:28Z</dc:date>
    </item>
  </channel>
</rss>

