GAMS code for Data Envelopment Analysis

Chapter 7 (Fig. 7.08) – The Mathematical formulation for MLPI (Malmquist–Luenberger Productivity Index) and the corresponding GAMS code

$Title Chapter 7 (Fig. 7.8)
$Title Mathematical formulation for MLPI (Malmquist–Luenberger Productivity Index) 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*DMU6/
        t years /Y2007, Y2008/
        g Inputs and Outputs /IN1, IN2, OUT1, OUT2, UND/
        i(g)  Inputs /IN1, IN2/
        r(g) Desirable Outputs /OUT1, OUT2/
        k(g) Undesirable Outputs /UND/;
        alias(jj,j);

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

                 IN1        IN2       OUT1      OUT2  UND
DMU1.Y2007        15        2         14        3.5    5
DMU2.Y2007        40        7         14        21     6
DMU3.Y2007        32        12        42        10.5   10
DMU4.Y2007        52        20        28        42     4
DMU5.Y2007        35        12        19        30     3
DMU6.Y2007        32        7         14        38     11
DMU1.Y2008        10        1.5       17        2.5    15
DMU2.Y2008        45        5.6       16        22     10
DMU3.Y2008        35        11        40        10      5
DMU4.Y2008        50        27        28        30     11
DMU5.Y2008        30        14        19        25      2
DMU6.Y2008        38        9         13        12      3;


Variables beta1  � for D1 model
          beta2  � for D2 model
          beta3  � for D3 model
          beta4  � for D4 model;

Nonnegative variables
          l(j) dual weights (Lambda values);

Parameters DMU_data(g,t) slice of data
           MLPI_D_1(j) calculated efficiency for mixed period t+1 and t
           MLPI_D_2(j) calculated efficiency for mixed period t and t+1
           MLPI_D_3(j) calculated efficiency for period t
           MLPI_D_4(j) calculated efficiency for period t+1
           max_t max period of time
           MPLI_Deff(j) Efficiency change for each DMU
           MPLI_Dtech(j) Technical efficiency change for each DMU
           MLPI(j) Malmquist Luenberger Productivity Index for each DMU;

max_t = SMAX(t,ORD(t));

Equations  CON1(i,t) Input constraint for D1 model
           CON2(r,t) Desirable Output constraints for D1 model
           CON3(k,t) Undesirable Output constraints for D1 model

           CON4(i,t) Input constraint for D2 model
           CON5(r,t) Desirable Output constraints for D2 model
           CON6(k,t) Undesirable Output constraints for D2 model

           CON7(i,t) Input constraint for D3 model
           CON8(r,t) Desirable Output constraints for D3 model
           CON9(k,t) Undesirable Output constraints for D3 model

           CON10(i,t) Input constraint for D4 model
           CON11(r,t) Desirable Output constraints for D4 model
           CON12(k,t) Undesirable Output constraints for D4 model
;


CON1(i,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t+1,i))=L=DMU_data(i,t);
CON2(r,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t+1,r))=G=(1+beta1)*DMU_data(r,t);
CON3(k,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t+1,k))=E=(1-beta1)*DMU_data(k,t);

CON4(i,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,i))=L=DMU_data(i,t+1);
CON5(r,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,r))=G=(1+beta2)*DMU_data(r,t+1);
CON6(k,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,k))=E=(1-beta2)*DMU_data(k,t+1);


CON7(i,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,i))=L=DMU_data(i,t);
CON8(r,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,r))=G=(1+beta3)*DMU_data(r,t);
CON9(k,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t,k))=E=(1-beta3)*DMU_data(k,t);

CON10(i,t)$(ORD(t)<max_t)..  SUM(j, l(j)*Data(j,t+1,i))=L=DMU_data(i,t+1);
CON11(r,t)$(ORD(t)<max_t).. SUM(j, l(j)*Data(j,t+1,r))=G=(1+beta4)*DMU_data(r,t+1);
CON12(k,t)$(ORD(t)<max_t).. SUM(j, l(j)*Data(j,t+1,k))=E=(1-beta4)*DMU_data(k,t+1);


model MLPI_D1 /CON1, CON2, CON3/;
model MLPI_D2 /CON4, CON5, CON6/;
model MLPI_D3 /CON7, CON8, CON9/;
model MLPI_D4 /CON10, CON11, CON12/;

loop(jj,
   DMU_data(g,t) = Data(jj,t,g);
   solve MLPI_D1 using LP maximizing beta1;
   MLPI_D_1(jj) = 1+beta1.l;
   solve MLPI_D2 using LP maximizing beta2;
   MLPI_D_2(jj) = 1+beta2.l;
   solve MLPI_D3 using LP maximizing beta3;
   MLPI_D_3(jj) = 1+beta3.l;
   solve MLPI_D4 using LP maximizing beta4;
   MLPI_D_4(jj) = 1+beta4.l;
*   Deff(jj) = D_4(jj)/D_3(jj);
*   Dtech(jj) = ((D_2(jj)/D_4(jj))*(D_3(jj)/D_1(jj)))**(0.5);
*   MPI(jj) = Deff(jj)*Dtech(jj);
 );

Display MLPI_D_1, MLPI_D_2, MLPI_D_3, MLPI_D_4;

execute_unload