Dear all,
I am using Proc Optmodel to solve a inventoory problem. I have the code pasted below.
I am getting notes like below. I have used similar structure earlier as well but I never got those notes.
706 NOTE 706-782: The name 'RR' hides an outer declaration.
NOTE 706-782: The name 'ITEMID' hides an outer declaration.
NOTE 706-782: The name 'STOREID' hides an outer declaration.
NOTE 706-782: The name 'RR' hides an outer declaration.
/***Code******/
Proc optmodel FDIGITS=3 printlevel=3 ; /*ods output SolutionSummary=objective_value;*/ /**** declare index sets *****/ /***creating the dimension variables to read the data dimensions *********/ set <num,num,num> SKU_STORE_RR_DIM; set <num,num> BUDGET_DIM; Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ ITEMID STOREID RR ]; /****** decalaring parameter for Total cost (backorder +Holding) and then reading***/ num Total_Cost{SKU_STORE_RR_DIM}; num InvCost{SKU_STORE_RR_DIM}; num Avg_Onhand{SKU_STORE_RR_DIM}; num Budget{BUDGET_DIM}; /****reading data for Total_Cost***********/ Read data OPT_RR_DATA_V1 into SKU_STORE_RR_DIM=[ITEMID STOREID RR] Total_Cost=totalcost_Store InvCost=InvCost Avg_Onhand; Read data Budget_Table into BUDGET_DIM=[ITEMID STOREID ] Budget;
Var SKU_STORE_RR_BIN {SKU_STORE_RR_DIM} binary ;
/**Total Cost****/ max OPTIMUM_COST =sum {<ITEMID, STOREID, RR> in SKU_STORE_RR_DIM } (Total_Cost[ITEMID,STOREID,RR]*SKU_STORE_RR_BIN[ITEMID, STOREID, RR]);
/*****Binding constraint to select only one RR is selected******/ con RR_BINARY_CONSTRAINT{<ITEMID,STOREID,RR> in SKU_STORE_RR_DIM}: sum{<(ITEMID),(STOREID),RR> in SKU_STORE_RR_DIM} SKU_STORE_RR_BIN[ITEMID,STOREID,RR]=1;
con BUDGET_CONSTRAINT{<ITEMID,STOREID,RR> in SKU_STORE_RR_DIM}: sum{<ITEMID,STOREID,RR> in SKU_STORE_RR_DIM} SKU_STORE_RR_BIN[ITEMID,STOREID,RR]*InvCost[ITEMID,STOREID,RR]*Avg_Onhand[ITEMID,STOREID,RR] <=sum{<ITEMID,STOREID> in Budget_dim} Budget[ITEMID,STOREID]; solve;
Create data Solution_RR from [ITEMID STOREID RR] ={<ITEMID,STOREID,RR> in SKU_STORE_RR_DIM : SKU_STORE_RR_BIN[ITEMID,STOREID,RR].sol > 0} SKU_STORE_RR_BIN = SKU_STORE_RR_BIN;
Quit;
thanks
LOkendra
... View more