<?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: Problem in reading data in proc optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136139#M724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please show us your declarations of these parameters, as well as your READ DATA statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, did you get any warnings in the log?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2014 15:22:49 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2014-04-29T15:22:49Z</dc:date>
    <item>
      <title>Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136136#M721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a parameter 'slope' which depends on 3 parameters (Sets): physician, product and linear_piece&lt;/P&gt;&lt;P&gt;I want to read this data in proc optmodel using 'Read data into...'&lt;/P&gt;&lt;P&gt;My code is something like this:&lt;/P&gt;&lt;P&gt;read data Slope1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into Slope1 = [Physician Product Linear_piece] Slope&lt;/P&gt;&lt;P&gt;&amp;nbsp; Slope[Physician, Product, Linear_piece] = col("Slope");&lt;/P&gt;&lt;P&gt;However this doesn't seem to be working. Is there anything wrong with the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 15:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136136#M721</guid>
      <dc:creator>abhik_giri</dc:creator>
      <dc:date>2014-04-28T15:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136137#M722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following works fine for me.&amp;nbsp; Maybe you have not declared your index set Slope1 properly.&amp;nbsp; (You will need to change my declarations if some of your data set variables are strings instead of numbers.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Slope1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; input Physician Product Linear_piece Slope;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; datalines;&lt;BR /&gt;1 2 3 4&lt;BR /&gt;5 6 7 8&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc optmodel;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set &amp;lt;num,num,num&amp;gt; Slope1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; num slope {Slope1};&lt;BR /&gt;&amp;nbsp;&amp;nbsp; read data Slope1 into Slope1 = [Physician Product Linear_piece] Slope;&lt;BR /&gt;/*&amp;nbsp;&amp;nbsp;&amp;nbsp; Slope[Physician, Product, Linear_piece] = col("Slope");*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp; print slope;&lt;BR /&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 16:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136137#M722</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-04-28T16:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136138#M723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the solution - it worked.&lt;/P&gt;&lt;P&gt;One more question. In the same model, after importing data from excel, SAS shows the values of all the parameters stored as 0.&lt;/P&gt;&lt;P&gt;I checked it with this code after the 'Read Data' statements.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print {c in customers,p in products,q in prices: c='1'} likelihood_to_apply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {c in customers,p in products,q in prices: c='1'} expected_profit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;The value comes as 0. However in the temporary dataset created by SAS, we have the correct values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;I am totally clueless as to why SAS is considering all the numeric values as 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136138#M723</guid>
      <dc:creator>abhik_giri</dc:creator>
      <dc:date>2014-04-29T15:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136139#M724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please show us your declarations of these parameters, as well as your READ DATA statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, did you get any warnings in the log?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136139#M724</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-04-29T15:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136140#M725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply. No there were no warnings in the log, but I did get notes after the READ DATA statements.&lt;/P&gt;&lt;P&gt;Below is one of the READ DATA statements and the note.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;824 read data Slope&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;825 into [Physician Product Linear_piece]Slope= col("Slope");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: 1254 non-missing values were discarded due to invalid target indices.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136140#M725</guid>
      <dc:creator>abhik_giri</dc:creator>
      <dc:date>2014-04-29T15:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in reading data in proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136141#M726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That note is probably because you did not populate the index set for Slope.&amp;nbsp; Compare to the READ DATA in my first reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is hard to tell what's going on without seeing the rest of your code.&amp;nbsp; Please show at least the declarations and READ DATA statements related to likelihood_to_apply and expected_profit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Problem-in-reading-data-in-proc-optmodel/m-p/136141#M726</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-04-29T15:54:36Z</dc:date>
    </item>
  </channel>
</rss>

