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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.