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

How can I return the input and output slacks using the DEA example from the SAS/OR(R) 12.1 User's Guide?

 

Here is a link:  https://support.sas.com/documentation/cdl/en/ormpex/65555/HTML/default/viewer.htm#ormpex_ex22_sect00...

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

If I understand correctly, the following changes should do what you want:

 

   num input_slack  {GARAGES, INPUTS};
   num output_slack {GARAGES, OUTPUTS};
   do k = GARAGES;
      solve;
      efficiency_number[k] = 1 / Inefficiency.sol;
      for {j in GARAGES}
         weight_sol[k,j] = (if Weight[j].sol > 1e-6 then Weight[j].sol else .);
      for {i in INPUTS}
         input_slack[k,i] = round(Input_con[i].ub - Input_con[i].body, 1e-6);
      for {i in OUTPUTS}
         output_slack[k,i] = round(Output_con[i].body - Output_con[i].lb, 1e-6);
   end;

   set EFFICIENT_GARAGES = {j in GARAGES: efficiency_number[j] >= 1 - 1e-6};
   set INEFFICIENT_GARAGES = GARAGES diff EFFICIENT_GARAGES;

   create data slack_data from [garage]=INEFFICIENT_GARAGES garage_name efficiency_number
      {i in INPUTS} <col(i)=input_slack[garage,i]>
      {i in OUTPUTS} <col(i)=output_slack[garage,i]>;

 

 

 

View solution in original post

4 REPLIES 4
RobPratt
SAS Super FREQ

By slacks, do you mean the differences between the two sides of the inequalities?

input[i,k] - sum {j in GARAGES} input[i,j] * Weight[j]

sum {j in GARAGES} output[i,j] * Weight[j] - output[i,k] * Inefficiency

 And do you want to print the values or save them to a data set?

Sypert
Calcite | Level 5

By slacks, I'm trying to get specific potential input and output variable improvements for the inefficient garages.  My understanding is the slacks show the further increases in output or reduction in input that could be gained beyond that from the radial projection (equal increase in all outputs, or decrease in all inputs) or a radial efficiency score equal to 1.  I'd like to save it to a data set.

 

I hope this helps.  Thanks for your time.

RobPratt
SAS Super FREQ

If I understand correctly, the following changes should do what you want:

 

   num input_slack  {GARAGES, INPUTS};
   num output_slack {GARAGES, OUTPUTS};
   do k = GARAGES;
      solve;
      efficiency_number[k] = 1 / Inefficiency.sol;
      for {j in GARAGES}
         weight_sol[k,j] = (if Weight[j].sol > 1e-6 then Weight[j].sol else .);
      for {i in INPUTS}
         input_slack[k,i] = round(Input_con[i].ub - Input_con[i].body, 1e-6);
      for {i in OUTPUTS}
         output_slack[k,i] = round(Output_con[i].body - Output_con[i].lb, 1e-6);
   end;

   set EFFICIENT_GARAGES = {j in GARAGES: efficiency_number[j] >= 1 - 1e-6};
   set INEFFICIENT_GARAGES = GARAGES diff EFFICIENT_GARAGES;

   create data slack_data from [garage]=INEFFICIENT_GARAGES garage_name efficiency_number
      {i in INPUTS} <col(i)=input_slack[garage,i]>
      {i in OUTPUTS} <col(i)=output_slack[garage,i]>;

 

 

 

Sypert
Calcite | Level 5

That is exactly what I was after.  Thank you so much for your time and the fast response!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 903 views
  • 1 like
  • 2 in conversation