<?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 write un available route in sas in tranportation problem to minimize cost? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/582749#M165814</link>
    <description>&lt;P&gt;Ha. It is SAS/OR problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post it at OR forum .&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp; is there .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data Products;
length Name $10.;
input Name $ Profit;
datalines;
Chocolate 0.25
Toffee 0.75
;
data Processes;
length Name $15.;
input Name $ Available_time Chocolate Toffee;
datalines;
Cooking 27000 15 40
Color/Flavor 27000 0 56.25
Condiments 27000 18.75 0
Packaging 27000 12 50
;
proc optmodel;
/ * declare sets and data indexed by sets * /
set &amp;lt;string&amp;gt; Products;
set &amp;lt;string&amp;gt; Processes;
num Profit{Products};
num AvailableTime{Processes};
num RequiredTime{Products,Processes};
/ * declare the variable * /
var Amount{Products};
/ * maximize objective function (profit) * /
maximize TotalProfit = sum{p in Products} Profit[p] * Amount[p];
/ * subject to constraints * /
con Availability{r in Processes}:
sum{p in Products} RequiredTime[p,r] * Amount[p] &amp;lt;= AvailableTime[r];
/ * abstract algebraic model that captures the structure of the * /
/ * optimization problem has been defined without referring * /
/ * to a single data constant * /
/ * populate model by reading in the specific data instance * /
read data Products into Products=[name] Profit;
read data Processes into Processes=[name] AvailableTime=Available_time
{p in Products} &amp;lt;RequiredTime[p,name]= col(p)&amp;gt;;
/ * solve LP using primal simplex solver * /
solve with lp / solver = primal_spx;
/ * display solution * /
print Amount;
quit;
&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Aug 2019 12:20:10 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-08-21T12:20:10Z</dc:date>
    <item>
      <title>How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/582588#M165718</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I am trying to solve a transportation problem where some routes are un available.I am able to solve the solution by hand but in SAS, can someone help me write solution for the following transportation problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas0.png" style="width: 460px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31893i073BF640BD063B3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas0.png" alt="sas0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this problem, some routes are un available and since total capacity is not equal to total demand(i.e difference of 30), I added dummy variables to it as shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.png" style="width: 507px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31892iA22FBA1BB9680636/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas.png" alt="sas.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added dummy variable here. I dont know how can I write the un available route in sas. When solving by hand, I assigned infinity to these routes.&lt;/P&gt;&lt;P&gt;Can someone help me how to write the solution in sas?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 20:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/582588#M165718</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-20T20:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/582749#M165814</link>
      <description>&lt;P&gt;Ha. It is SAS/OR problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post it at OR forum .&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&amp;nbsp; is there .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data Products;
length Name $10.;
input Name $ Profit;
datalines;
Chocolate 0.25
Toffee 0.75
;
data Processes;
length Name $15.;
input Name $ Available_time Chocolate Toffee;
datalines;
Cooking 27000 15 40
Color/Flavor 27000 0 56.25
Condiments 27000 18.75 0
Packaging 27000 12 50
;
proc optmodel;
/ * declare sets and data indexed by sets * /
set &amp;lt;string&amp;gt; Products;
set &amp;lt;string&amp;gt; Processes;
num Profit{Products};
num AvailableTime{Processes};
num RequiredTime{Products,Processes};
/ * declare the variable * /
var Amount{Products};
/ * maximize objective function (profit) * /
maximize TotalProfit = sum{p in Products} Profit[p] * Amount[p];
/ * subject to constraints * /
con Availability{r in Processes}:
sum{p in Products} RequiredTime[p,r] * Amount[p] &amp;lt;= AvailableTime[r];
/ * abstract algebraic model that captures the structure of the * /
/ * optimization problem has been defined without referring * /
/ * to a single data constant * /
/ * populate model by reading in the specific data instance * /
read data Products into Products=[name] Profit;
read data Processes into Processes=[name] AvailableTime=Available_time
{p in Products} &amp;lt;RequiredTime[p,name]= col(p)&amp;gt;;
/ * solve LP using primal simplex solver * /
solve with lp / solver = primal_spx;
/ * display solution * /
print Amount;
quit;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 12:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/582749#M165814</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-08-21T12:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583419#M166083</link>
      <description>&lt;P&gt;thank you so much...where is OR forum...i tried to search but couldnt find it..can you help how to find OR forum..thanks&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 09:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583419#M166083</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-23T09:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583438#M166095</link>
      <description>Here is :

&lt;A href="https://communities.sas.com/t5/Mathematical-Optimization/bd-p/operations_research" target="_blank"&gt;https://communities.sas.com/t5/Mathematical-Optimization/bd-p/operations_research&lt;/A&gt;</description>
      <pubDate>Fri, 23 Aug 2019 11:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583438#M166095</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-08-23T11:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583701#M166184</link>
      <description>&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;I posted my question there but no one is answering &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please can you answer my question. This is the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Mathematical-Optimization/using-proc-optmodel-first-time/m-p/583422#M2848" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Mathematical-Optimization/using-proc-optmodel-first-time/m-p/583422#M2848&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry I deleted the above post. Now I posted it here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583708#M2849" target="_blank"&gt;https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583708#M2849&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will greatly appreciate your kind help&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2019 21:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583701#M166184</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-24T21:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to write un available route in sas in tranportation problem to minimize cost?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583747#M166211</link>
      <description>&lt;P&gt;Sorry. I am a rookie of SAS/OR . But you can refer to the example above I posted.&lt;/P&gt;
&lt;P&gt;Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt; is too busy to answer your question, tomorrow might he will present at this forum .&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 11:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-un-available-route-in-sas-in-tranportation-problem/m-p/583747#M166211</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-08-25T11:52:39Z</dc:date>
    </item>
  </channel>
</rss>

