Hi,
How Do I show the allowed increased right han side for an specific constraint in SAS
Thanks for Help
apcor
Please describe what you mean by "increased right hand side"."Increased" from what? to what value?
It might be best to show an example of the code you are working with or attempting.
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
Ok Thanks
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.