GAMS code for Data Envelopment Analysis

Chapter 5 (Fig. 5.06) – The mathematical formulation for Technical and Revenue Efficiency

$Title Chapter 5 (Fig. 5.6)
$Title Mathematical formulation for Technical and Revenue Efficiency 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 /Prodc, Trn, Inv, SatDem, Quantity/
        i(g)  Inputs /Prodc, Trn, Inv/
        r(g) Outputs /SatDem, Quantity/;
        alias(jj,j);
        alias(k,jj);

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

        Prodc        Trn        Inv      SatDem   Quantity
DMU1        10        100       61        20        100
DMU2        52        125       100        6        150
DMU3        24        54        56        17        50
DMU4        45        91        14        2         510
DMU5        51        10        67        19        400
DMU6        52        26        56        17        60
DMU7        22        35        34        17        250
DMU8        91        56        101       10        35
DMU9        43        72        55         9        90
DMU10       34        39        16         8        650;



Table Price(j,r) Cost Data for inputs

        SatDem      Quantity
DMU1        2        2.64
DMU2        3        5.29
DMU3        10       2.43
DMU4        5        8.99
DMU5        1        2.94
DMU6        3        0.75
DMU7        7        6.36
DMU8        8        7.2
DMU9        3        2.16
DMU10       9        7.3;



Variables efficiency objective function
          rev_efficiency revenue efficiency for input DEA model
          Phi     efficiency (Phi values);

Nonnegative variables
          l(j) dual weights (Lambda values)
          y_t(r) auxilliary variable for p*phi;

Parameters DMU_data(g) slice of data
           prs(r) slice of price data
           eff(j) efficiency
           tech_eff(j) technical efficiency
           rev_eff(j) revenue efficiency
           lamres(j,j) peers for each DMU;

Equations OBJ_OUT objective function for output VRS model
          OBJ_REV objective function for revenue efficiency model
          CON1_REV(r) inputs for revenue efficiency model
          CON1_OUT(i) input duals for output VRS model
          CON2_OUT(r) output dual for output VRS model
          CON3 VRS orientation;

OBJ_OUT..       efficiency=E=Phi;

CON1_OUT(i)..  SUM(j, l(j)*Data(j,i))=L=DMU_data(i);

CON2_OUT(r)..  SUM(j, l(j)*Data(j,r))=G=Phi*DMU_data(r);

CON3..         SUM(j, l(j))=E=1;

OBJ_REV..       rev_efficiency=E=SUM(r,prs(r)*y_t(r));

CON1_REV(r)..   SUM(j, l(j)*Data(j,r))=G=y_t(r);

model OUTPUT_DEA_VRS input oriented DEA VRS / OBJ_OUT, CON1_OUT, CON2_OUT, CON3/;
model REV_DEA_VRS input oriented DEA VRS / OBJ_REV, CON1_OUT, CON1_REV, CON3/;


loop(jj,
   DMU_data(g) = Data(jj,g);
   prs(r) = Price(jj,r);
   solve OUTPUT_DEA_VRS using LP maximizing Phi;
   solve REV_DEA_VRS using LP maximizing rev_efficiency;
   rev_eff(jj) = SUM(r,prs(r)*DMU_data(r))/SUM(r,prs(r)*y_t.l(r));
   eff(jj)=Phi.l;
   tech_eff(jj)= 1/eff(jj);
   loop(k,
      Lamres(jj,k)=l.l(k);
    );
);

display  eff,  tech_eff, rev_eff;

execute_unload