BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
apcor
Calcite | Level 5

Hi,

How Do I show the allowed increased right han side for an specific constraint in SAS

 

Thanks for Help

apcor

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

It is SAS/OR problem. Plz post it at OR forum, @RobPratt  is there .

View solution in original post

4 REPLIES 4
ballardw
Super User

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.

 

 

 

apcor
Calcite | Level 5

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

 

 

Ksharp
Super User

It is SAS/OR problem. Plz post it at OR forum, @RobPratt  is there .

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 449 views
  • 0 likes
  • 3 in conversation