Hi, For example in this case: data profit_per_Lot;
input product $ profit;
datalines;
High 400
Supreme 1000
;
data Additive_per_Lot;
input additive $ High Supreme;
datalines;
A 15 10
B 5 15
;
%let Capacity_Plant = 22; /*Capacidad de la Planta*/
%let UB_AdditiveA = 300;
%let UB_AdditiveB = 280;
proc optmodel;
set <string> Products;
num Profit {Products};
read data profit_per_lot into Products = [product] Profit = profit;
print Profit;
set <string> Additive;
num Composition {Products, Additive};
read data Additive_per_Lot into Additive = [additive] {i in Products}
<Composition[i, additive] = col(i)>;
print Composition;
var Prod {Products} >=0; /*How much should I produce from each product*/
impvar Revenue = sum {i in Products} Profit[i]*Prod[i];
con AdditiveAvailableA {j in Additive: j='A'}:
sum {i in Products} Prod [i] * Composition [i,j] <= &UB_AdditiveA;
con AdditiveAvailableB {j in Additive: j='B'}:
sum {i in Products} Prod [i] * Composition [i,j] <= &UB_AdditiveB;
con CapacityAvailable:
sum {i in Products} Prod [i] <= &Capacity_Plant;
max R = Revenue;
solve;
print Prod AdditiveAvailableA.body AdditiveAvailableB.body;
print AdditiveAvailableA.dual AdditiveAvailableA.lb AdditiveAvailableA.ub AdditiveAvailableA.status;
print AdditiveAvailableB.dual AdditiveAvailableB.lb AdditiveAvailableB.ub;
QUIT; For the restriction AdditiveAvailableA I would like to know in which range the dual price of this resource is kept (UB_AdditiveA = 300). I know I can calculate it manually because it is a simple example but is there a command that allows me to get this range directly? Thanks for Help
... View more