<?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 Question on Notes in Optimization log while using Proc Optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Question-on-Notes-in-Optimization-log-while-using-Proc-Optmodel/m-p/338733#M1682</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using Proc Optmodel to solve a inventoory problem. I have the code pasted below.&lt;/P&gt;
&lt;P&gt;I am getting notes like&amp;nbsp;below. I have used similar structure earlier as well but I never got those notes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;706&lt;BR /&gt;NOTE 706-782: The name 'RR' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'ITEMID' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'STOREID' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'RR' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/***Code******/&lt;/P&gt;
&lt;P&gt;Proc optmodel FDIGITS=3 printlevel=3 ;&lt;BR /&gt;/*ods output SolutionSummary=objective_value;*/&lt;BR /&gt; /**** declare index sets *****/&lt;BR /&gt;/***creating the dimension variables to read the data dimensions *********/&lt;BR /&gt; set &amp;lt;num,num,num&amp;gt; SKU_STORE_RR_DIM;&lt;BR /&gt; set &amp;lt;num,num&amp;gt; BUDGET_DIM;&lt;BR /&gt; Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ ITEMID STOREID RR ];&lt;BR /&gt; /****** decalaring parameter for Total cost (backorder +Holding) and then reading***/&lt;BR /&gt; num Total_Cost{SKU_STORE_RR_DIM};&lt;BR /&gt; num InvCost{SKU_STORE_RR_DIM};&lt;BR /&gt; num Avg_Onhand{SKU_STORE_RR_DIM};&lt;BR /&gt; num Budget{BUDGET_DIM};&lt;BR /&gt; &lt;BR /&gt; /****reading data for Total_Cost***********/&lt;BR /&gt; Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ITEMID STOREID RR] Total_Cost=totalcost_Store InvCost=InvCost Avg_Onhand;&lt;BR /&gt; Read data Budget_Table into BUDGET_DIM=[ITEMID STOREID ] Budget;&lt;/P&gt;
&lt;P&gt;Var SKU_STORE_RR_BIN {SKU_STORE_RR_DIM} binary ;&lt;/P&gt;
&lt;P&gt;/**Total Cost****/&lt;BR /&gt;max OPTIMUM_COST =sum {&amp;lt;ITEMID, STOREID, RR&amp;gt; in SKU_STORE_RR_DIM }&lt;BR /&gt;(Total_Cost[ITEMID,STOREID,RR]*SKU_STORE_RR_BIN[ITEMID, STOREID, RR]);&lt;/P&gt;
&lt;P&gt;/*****Binding constraint to select only one RR is selected******/&lt;BR /&gt;con RR_BINARY_CONSTRAINT{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}:&lt;BR /&gt;sum{&amp;lt;(ITEMID),(STOREID),RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR]=1;&lt;/P&gt;
&lt;P&gt;con BUDGET_CONSTRAINT{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}:&lt;BR /&gt;sum{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR]*InvCost[ITEMID,STOREID,RR]*Avg_Onhand[ITEMID,STOREID,RR]&lt;BR /&gt; &amp;lt;=sum{&amp;lt;ITEMID,STOREID&amp;gt; in Budget_dim} Budget[ITEMID,STOREID];&lt;BR /&gt;solve;&lt;/P&gt;
&lt;P&gt;Create data Solution_RR&lt;BR /&gt;from [ITEMID STOREID RR] &lt;BR /&gt;={&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM :&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR].sol &amp;gt; 0} &lt;BR /&gt;SKU_STORE_RR_BIN = SKU_STORE_RR_BIN;&lt;/P&gt;
&lt;P&gt;Quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;LOkendra&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2017 09:54:36 GMT</pubDate>
    <dc:creator>lokendra_devangan_corecompete_com</dc:creator>
    <dc:date>2017-03-07T09:54:36Z</dc:date>
    <item>
      <title>Question on Notes in Optimization log while using Proc Optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Question-on-Notes-in-Optimization-log-while-using-Proc-Optmodel/m-p/338733#M1682</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using Proc Optmodel to solve a inventoory problem. I have the code pasted below.&lt;/P&gt;
&lt;P&gt;I am getting notes like&amp;nbsp;below. I have used similar structure earlier as well but I never got those notes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;706&lt;BR /&gt;NOTE 706-782: The name 'RR' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'ITEMID' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'STOREID' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;NOTE 706-782: The name 'RR' hides an outer declaration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;/***Code******/&lt;/P&gt;
&lt;P&gt;Proc optmodel FDIGITS=3 printlevel=3 ;&lt;BR /&gt;/*ods output SolutionSummary=objective_value;*/&lt;BR /&gt; /**** declare index sets *****/&lt;BR /&gt;/***creating the dimension variables to read the data dimensions *********/&lt;BR /&gt; set &amp;lt;num,num,num&amp;gt; SKU_STORE_RR_DIM;&lt;BR /&gt; set &amp;lt;num,num&amp;gt; BUDGET_DIM;&lt;BR /&gt; Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ ITEMID STOREID RR ];&lt;BR /&gt; /****** decalaring parameter for Total cost (backorder +Holding) and then reading***/&lt;BR /&gt; num Total_Cost{SKU_STORE_RR_DIM};&lt;BR /&gt; num InvCost{SKU_STORE_RR_DIM};&lt;BR /&gt; num Avg_Onhand{SKU_STORE_RR_DIM};&lt;BR /&gt; num Budget{BUDGET_DIM};&lt;BR /&gt; &lt;BR /&gt; /****reading data for Total_Cost***********/&lt;BR /&gt; Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ITEMID STOREID RR] Total_Cost=totalcost_Store InvCost=InvCost Avg_Onhand;&lt;BR /&gt; Read data Budget_Table into BUDGET_DIM=[ITEMID STOREID ] Budget;&lt;/P&gt;
&lt;P&gt;Var SKU_STORE_RR_BIN {SKU_STORE_RR_DIM} binary ;&lt;/P&gt;
&lt;P&gt;/**Total Cost****/&lt;BR /&gt;max OPTIMUM_COST =sum {&amp;lt;ITEMID, STOREID, RR&amp;gt; in SKU_STORE_RR_DIM }&lt;BR /&gt;(Total_Cost[ITEMID,STOREID,RR]*SKU_STORE_RR_BIN[ITEMID, STOREID, RR]);&lt;/P&gt;
&lt;P&gt;/*****Binding constraint to select only one RR is selected******/&lt;BR /&gt;con RR_BINARY_CONSTRAINT{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}:&lt;BR /&gt;sum{&amp;lt;(ITEMID),(STOREID),RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR]=1;&lt;/P&gt;
&lt;P&gt;con BUDGET_CONSTRAINT{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}:&lt;BR /&gt;sum{&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR]*InvCost[ITEMID,STOREID,RR]*Avg_Onhand[ITEMID,STOREID,RR]&lt;BR /&gt; &amp;lt;=sum{&amp;lt;ITEMID,STOREID&amp;gt; in Budget_dim} Budget[ITEMID,STOREID];&lt;BR /&gt;solve;&lt;/P&gt;
&lt;P&gt;Create data Solution_RR&lt;BR /&gt;from [ITEMID STOREID RR] &lt;BR /&gt;={&amp;lt;ITEMID,STOREID,RR&amp;gt; in SKU_STORE_RR_DIM :&lt;BR /&gt;SKU_STORE_RR_BIN[ITEMID,STOREID,RR].sol &amp;gt; 0} &lt;BR /&gt;SKU_STORE_RR_BIN = SKU_STORE_RR_BIN;&lt;/P&gt;
&lt;P&gt;Quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;LOkendra&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 09:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Question-on-Notes-in-Optimization-log-while-using-Proc-Optmodel/m-p/338733#M1682</guid>
      <dc:creator>lokendra_devangan_corecompete_com</dc:creator>
      <dc:date>2017-03-07T09:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Notes in Optimization log while using Proc Optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Question-on-Notes-in-Optimization-log-while-using-Proc-Optmodel/m-p/338872#M1683</link>
      <description>&lt;P&gt;Those notes arise because the same dummy parameter appears as both a constraint index and a summation index within the constraint. &amp;nbsp;I don't know your optimization model, but I suspect you want the following instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;con RR_BINARY_CONSTRAINT{&amp;lt;ITEMID,STOREID&amp;gt; in Budget_dim}:&lt;BR /&gt; sum{&amp;lt;(ITEMID),(STOREID),RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt; SKU_STORE_RR_BIN[ITEMID,STOREID,RR]=1;&lt;BR /&gt;con BUDGET_CONSTRAINT{&amp;lt;ITEMID,STOREID&amp;gt; in Budget_dim}:&lt;BR /&gt; sum{&amp;lt;(ITEMID),(STOREID),RR&amp;gt; in SKU_STORE_RR_DIM}&lt;BR /&gt; SKU_STORE_RR_BIN[ITEMID,STOREID,RR]*InvCost[ITEMID,STOREID,RR]*Avg_Onhand[ITEMID,STOREID,RR]&lt;BR /&gt; &amp;lt;= Budget[ITEMID,STOREID];&lt;/PRE&gt;
&lt;P&gt;At least that will avoid the notes. &amp;nbsp;To see whether the new declarations correctly express your desired model, you can use the &lt;A href="http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_optmodel_syntax11.htm&amp;amp;locale=en#ormpug.optmodel.npxexpandstmt" target="_self"&gt;EXPAND statement&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more explanation of this implicit slice, see &lt;A href="http://go.documentation.sas.com/?docsetId=ormpex&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpex_ex5_toc.htm&amp;amp;locale=en" target="_self"&gt;Manpower Planning&lt;/A&gt;&amp;nbsp;and other examples in the &lt;A href="http://go.documentation.sas.com/?docsetId=ormpex&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en" target="_self"&gt;Mathematical Programming Examples&lt;/A&gt; documentation.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 16:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Question-on-Notes-in-Optimization-log-while-using-Proc-Optmodel/m-p/338872#M1683</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-03-07T16:01:34Z</dc:date>
    </item>
  </channel>
</rss>

