GAMS code for Data Envelopment Analysis

Chapter 4 (Fig. 4.01) – The mathematical formulation of the non-radial VRS DEA model

$Title Chapter 4 (Fig. 4.1)
$Title Mathematical formulation of the non-radial VRS DEA model and the corresponding GAMS code

$onText

If using this code, please cite:

---------------------------------------------------------------------------------
Emrouznejad, A., P. Petridis, and V. Charles (2023). Data Envelopment Analysis
with GAMS: A Handbook on Productivity Analysis, and Performance Measurement,
Springer, ISBN: 978-3-031-30700-3.
---------------------------------------------------------------------------------

Website: https://dataenvelopment.com/GAMS/

$offText

Sets    j DMUs /DMU1*DMU10/
        g Inputs and Outputs /ProdCost, TrnCost, HoldInv, SatDem, Rev/
        i(g)  Inputs /ProdCost, TrnCost, HoldInv/
        r(g) Outputs /SatDem, Rev/;
        alias(jj,j);
        alias(k,jj);

Table Data(j,g) Data for inputs and outputs

           ProdCost     TrnCost      HoldInv     SatDem      Rev
DMU1        0.255        0.161        0.373        20        2.64
DMU2        0.98         0.248        0.606        6         5.29
DMU3        0.507        0.937        0.749        17        2.43
DMU4        0.305        0.249        0.841        2         8.99
DMU5        0.659        0.248        0.979        19        2.94
DMU6        0.568        0.508        0.919        17        0.75
DMU7        0.583        0.628        0.732        17        6.36
DMU8        0.627        0.675        0.738        10        7.2
DMU9        0.772        0.657        0.486        9         2.16
DMU10       0.917        0.639        0.234        8         7.3;


Variables efficiency objective function for radial model
          efficiency_nr objective function for non-radial model
          Theta(i)     efficiency (Theta values) for second stage
          Lambda(j) dual weights (Lambda values)
          splus(r) slacks assigned to inputs;

Nonnegative variables
          Lambda(j)
          sminus(i)
          splus(r);

Parameters DMU_data(g) slice of data
           eff(j,i) Optimal values for Theta(i) for each DMU
           slice_theta(i) slice of efficiency for second stage of non-radial model
           lamres(j,j) peers for each DMU
           slacks(j,g) slacks for inputs and outputs
           m ;
           m=CARD(i);

Equations OBJ objective function
          CON1(i) input duals
          CON2(r) output dual
          CON3(i) Theta less than 1
          CON4 VRS orientation
          OBJ_nr objective function of input slack non-radial model
          CON1_nr(i) input duals non-radial model
          CON2_nr(r) output duals non-radial model;

OBJ..       efficiency=E=1/m*{SUM(i,Theta(i))-1E-6*SUM(r,splus(r))};

CON1(i)..  SUM(j, Lambda(j)*Data(j,i))=E=Theta(i)*DMU_data(i);

CON2(r)..  SUM(j, Lambda(j)*Data(j,r))-splus(r)=E=DMU_data(r);

CON3(i)..  Theta(i)=L=1;

CON4..     SUM(j, Lambda(j))=E=1;

OBJ_nr..       efficiency_nr=E=SUM(r,splus(r));

CON1_nr(i)..  SUM(j, Lambda(j)*Data(j,i))=E=Theta(i)*DMU_data(i);

CON2_nr(r)..  SUM(j, Lambda(j)*Data(j,r))-splus(r)=E=DMU_data(r);

model DEA_radial_VRS input oriented for radial
         / OBJ, CON1, CON2, CON3, CON4/;

model DEA_non_radial_VRS input slack for non-radial
         / OBJ_nr, CON1_nr, CON2_nr, CON4/;

loop(jj,
   DMU_data(g) = Data(jj,g);
   solve DEA_radial_VRS using LP minimizing Efficiency;
   eff(jj,i)=Theta.l(i);
   loop(k,
      Lamres(jj,k)=Lambda.l(k);
    );
);

loop(jj,
   DMU_data(g) = Data(jj,g);
   slice_theta(i)=eff(jj,i);
   solve DEA_non_radial_VRS using LP maximizing Efficiency_nr ;
   slacks(jj,r)=splus.l(r);
   loop(kk,
      Lamres(jj,k)=Lambda.l(k);
    );
);

Execute_unload