<?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: Output views in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566066#M2794</link>
    <description>&lt;P&gt;One way is to use a WHERE= data set option in the CREATE DATA statement:&lt;/P&gt;
&lt;PRE&gt;create data outdata(where=(Inbound_Linehaul_Costs_p_c &amp;gt; 0)) from [p c]={p in Ports, c in IC}&lt;BR /&gt;   Inbound_Linehaul_Costs_p_c=(InboundLinehaul[p,c] * sum {d in DC} ContainersfromPortstoICtoDC[p,c,d]);&lt;/PRE&gt;
&lt;P&gt;If you instead declared Inbound_LInehaul_Costs_p_c as an IMPVAR, you can also accomplish this by using a logical condition in the index set:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create data outdata from [p c]={p in Ports, c in IC: Inbound_Linehaul_Costs_p_c[p,c] &amp;gt; 0}&lt;BR /&gt;   Inbound_Linehaul_Costs_p_c;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Jun 2019 21:41:19 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2019-06-13T21:41:19Z</dc:date>
    <item>
      <title>Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/565962#M2784</link>
      <description>&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;This is from&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Mathematical-Optimization/Open-a-Facility-with-constraint/m-p/565617/highlight/true#M2772" target="_blank"&gt;https://communities.sas.com/t5/Mathematical-Optimization/Open-a-Facility-with-constraint/m-p/565617/highlight/true#M2772&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to see the results my various cost buckets. For example, if i want to see my&amp;nbsp;Inbound_Linehaul_Costs (that is an implicit variable in the model) by different lanes (lanes are Ports-IC combinations), how do i do that? Can you help me with that. My model succesfully solved. I just dont know how to extract the relevant outputs.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/565962#M2784</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T18:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566005#M2785</link>
      <description>&lt;P&gt;Does this do what you want?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   print {p in Ports, c in IC} (sum {d in DC} Inbound_Linehaul_Costs[p,c,d]);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566005#M2785</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-06-13T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566009#M2786</link>
      <description>&lt;P&gt;HI rob&lt;/P&gt;&lt;P&gt;I tried that.&amp;nbsp; I got an error that said:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR 616-782: The name 'Inbound_Linehaul_Costs' must be an array.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Inbound_Linehaul_Costs is an impvar in my model&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566009#M2786</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566018#M2787</link>
      <description>&lt;P&gt;Sorry, try this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   print {p in Ports, c in IC} (InboundLinehaul [p,c] * sum {d in DC} ContainersfromPortstoICtoDC [p,c,d]);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 20:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566018#M2787</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-06-13T20:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566025#M2788</link>
      <description>&lt;P&gt;HI Rob.&lt;/P&gt;&lt;P&gt;Thank you ,. That worked like a charm. But a question I have, so we have to do the formula of Number of containers * Costs again . Right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, how do I create a dataset of this printstatement you mentioned. Because if we can do that, I can probably download that into xls or whatever format is convenient for the end user. Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 20:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566025#M2788</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T20:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566033#M2789</link>
      <description>&lt;P&gt;Here's one way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   create data outdata from [p c]={p in Ports, c in IC}
      Inbound_Linehaul_Costs_p_c=(InboundLinehaul[p,c] * sum {d in DC} ContainersfromPortstoICtoDC[p,c,d]);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alternatively, you can declare another IMPVAR so that the formula appears in only one place:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   impvar Inbound_Linehaul_Costs_p_c {p in Ports, c in IC} 
      = InboundLinehaul[p,c] * sum {d in DC} ContainersfromPortstoICtoDC[p,c,d];
   impvar Inbound_Linehaul_Costs
      = sum {p in Ports, c in IC} Inbound_Linehaul_Costs_p_c[p,c];
   create data outdata from [p c] Inbound_Linehaul_Costs_p_c;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 20:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566033#M2789</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-06-13T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566034#M2790</link>
      <description>&lt;P&gt;Ok. Let me try these and let you know. Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 20:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566034#M2790</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T20:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566049#M2791</link>
      <description>&lt;P&gt;Awesome. That worked. Your guidance had greatly helped me from start to finish for my first sas model. Eager to learn more in future.&lt;/P&gt;&lt;P&gt;Thanks for your time and effort&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 20:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566049#M2791</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T20:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566058#M2792</link>
      <description>&lt;P&gt;Glad to help.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 21:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566058#M2792</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-06-13T21:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566059#M2793</link>
      <description>&lt;P&gt;If i want to restrict to only those where the costs &amp;gt;0 ,how do i specify that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create data outdata from [p c]={p in Ports, c in IC}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inbound_Linehaul_Costs_p_c=(InboundLinehaul[p,c] * sum {d in DC} ContainersfromPortstoICtoDC[p,c,d]);&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 21:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566059#M2793</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-06-13T21:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Output views</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566066#M2794</link>
      <description>&lt;P&gt;One way is to use a WHERE= data set option in the CREATE DATA statement:&lt;/P&gt;
&lt;PRE&gt;create data outdata(where=(Inbound_Linehaul_Costs_p_c &amp;gt; 0)) from [p c]={p in Ports, c in IC}&lt;BR /&gt;   Inbound_Linehaul_Costs_p_c=(InboundLinehaul[p,c] * sum {d in DC} ContainersfromPortstoICtoDC[p,c,d]);&lt;/PRE&gt;
&lt;P&gt;If you instead declared Inbound_LInehaul_Costs_p_c as an IMPVAR, you can also accomplish this by using a logical condition in the index set:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create data outdata from [p c]={p in Ports, c in IC: Inbound_Linehaul_Costs_p_c[p,c] &amp;gt; 0}&lt;BR /&gt;   Inbound_Linehaul_Costs_p_c;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 21:41:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Output-views/m-p/566066#M2794</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-06-13T21:41:19Z</dc:date>
    </item>
  </channel>
</rss>

