<?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: Using PROC OPTMODEL to calculate profit and shadow price in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583710#M2850</link>
    <description>&lt;P&gt;You can use SAS formats with the PRINT statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;print NetProfit dollar7.2;
print NumProd;
print AmountUsed availability
   {r in RESOURCES} (AmountUsed[r]/availability[r]) percent.
   Usage.dual;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 24 Aug 2019 21:16:56 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2019-08-24T21:16:56Z</dc:date>
    <item>
      <title>Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583708#M2849</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to solve the problem as shown.&lt;/P&gt;&lt;P&gt;sss&lt;/P&gt;&lt;P&gt;I used to following code to solve this:&lt;/P&gt;&lt;PRE&gt;PROC OPTMODEL;
	/* declare sets and parameters */
	set RESOURCES = /W B S/;
	set PRODUCTS = /SWEET PROTEIN/;

	num selling_price {PRODUCTS} = [1.84 3.45];
	num cost {RESOURCES} = [0.2 0.4 0.8];
	num availability {RESOURCES} = [100 250 50];
	num required {PRODUCTS, RESOURCES} = 
				[0.5  0.25 
				0.4  0.5  
				0.1  0.25  
				];

	/* declare variables */
	var NumProd {PRODUCTS} &amp;gt;= 0;

	impvar Revenue = sum {p in PRODUCTS}
		selling_price[p] * NumProd[p];

	impvar AmountUsed {r in RESOURCES} = 
		sum {p in PRODUCTS} NumProd[p] * required[p,r];

	impvar TotalCost = sum {r in RESOURCES}
		cost[r] * AmountUsed[r];

	/* declare constraints */
	con Usage {r in RESOURCES}: 
		AmountUsed[r] &amp;lt;= availability[r];

	/* declare objective */
	max NetProfit = Revenue - TotalCost;

	/*print model formulation*/
	expand;

	/*solve the model*/
	solve;

	/*print parts of the model*/
	print NumProd;
quit;&lt;/PRE&gt;&lt;P&gt;but I get wrong answer.&lt;/P&gt;&lt;P&gt;I want to answer the following question:&lt;/P&gt;&lt;P&gt;• the profit (formatted as a $XXX.XX),&lt;BR /&gt;• the amount of each type of feed produced,&lt;BR /&gt;• a resource usage table showing for each resource: the amount used, the amount available,&lt;BR /&gt;the percentage used (formatted as a percentage), and the shadow price.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can someone help&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 05:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583708#M2849</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-25T05:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583710#M2850</link>
      <description>&lt;P&gt;You can use SAS formats with the PRINT statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;print NetProfit dollar7.2;
print NumProd;
print AmountUsed availability
   {r in RESOURCES} (AmountUsed[r]/availability[r]) percent.
   Usage.dual;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Aug 2019 21:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583710#M2850</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-08-24T21:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583711#M2851</link>
      <description>&lt;P&gt;Thank you so much for the reply.&lt;/P&gt;&lt;P&gt;I tried using it but I am not getting the answer which I got graphically. I mean Sweet=125 , Protein=150 and optimal value 637.5.Here I am getting Sweet=0 ...please can you fix my code. thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2019 21:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583711#M2851</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-24T21:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583713#M2852</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num required {PRODUCTS, RESOURCES} = [
   0.5  0.4 0.1
   0.25 0.5 0.25
];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Aug 2019 21:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583713#M2852</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-08-24T21:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583729#M2853</link>
      <description>&lt;P&gt;Just one question please.In the output&amp;nbsp; is the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;Usage.DUAL&lt;/STRONG&gt; is the name for Shadow Price ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you so much for your help.The code is working with correct answers.....thankssss&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 05:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583729#M2853</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-08-25T05:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC OPTMODEL to calculate profit and shadow price</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583759#M2854</link>
      <description>&lt;P&gt;Yes, dual values and shadow prices are synonymous:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_details50.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_details50.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 14:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-PROC-OPTMODEL-to-calculate-profit-and-shadow-price/m-p/583759#M2854</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-08-25T14:58:31Z</dc:date>
    </item>
  </channel>
</rss>

