dea.gms : Data Envelopment Analysis - DEA

Description

```Data Envelopment Analysis (DEA) is a technique for measuring the relative
performance of organizational units where presence of multiple inputs and
outputs makes comparison difficult.

efficiency = weighted sum of output / weighted sum of input

Find weights that maximize the efficiency for one unit while ensuring
that no other units has an efficiency < 1 using these weights. A primal
and dual formulation is presented.
```

Small Model of Type : LP

Category : GAMS Model library

Main file : dea.gms

``````\$title Data Envelopment Analysis - DEA (DEA,SEQ=192)

\$onText
Data Envelopment Analysis (DEA) is a technique for measuring the relative
performance of organizational units where presence of multiple inputs and
outputs makes comparison difficult.

efficiency = weighted sum of output / weighted sum of input

Find weights that maximize the efficiency for one unit while ensuring
that no other units has an efficiency < 1 using these weights. A primal
and dual formulation is presented.

Dyson, Thanassoulis, and Boussofiane, A DEA Tutorial.

Keywords: linear programming, data envelopment analysis, statistics
\$offText

Set
i         'units'
is(i)     'selected unit'
j         'inputs and outputs'
ji(j)     'inputs'
jo(j)     'outputs';

Parameter
data(i,j) 'unit input  output'
vlo       'v lower bound'
ulo       'u lower bound'
norm      'normalizing constant';

Variable
v(ji)     'input weights'
u(jo)     'output weights'
eff       'efficiency'
var       'dual convexity'
lam(i)    'dual weights'
vs(ji)    'input duals'
us(jo)    'output duals'
z;

Positive Variable u, v, vs, us, lam;

Equation
defe(i)   'efficiency definition - weighted output'
denom(i)  'weighted input'
lime(i)   'output / input < 1'
dii(i,ji) 'input duals'
dio(i,jo) 'output dual'
dobj      'dual objective';

* primal model
defe(is)..   eff =e= sum(jo, u(jo)*data(is,jo)) - 1*var;

denom(is)..  sum(ji, v(ji)*data(is,ji)) =e= norm;

lime(i)..    sum(jo, u(jo)*data(i,jo)) =l= sum(ji, v(ji)*data(i,ji)) + var;

* dual model
dii(is,ji).. sum(i, lam(i)*data(i,ji)) + vs(ji) =e= z*data(is,ji);

dio(is,jo).. sum(i, lam(i)*data(i,jo)) - us(jo) =e= data(is,jo);

defvar..     sum(i, lam(i)) =e= 1;

dobj..       eff =e= norm*z - vlo*sum(ji, vs(ji)) - ulo*sum(jo, us(jo));

Model
deap  'primal'        / defe, denom, lime         /
deadc 'dual with CRS' / dobj, dii,   dio          /
deadv 'dual with VRS' / dobj, dii,   dio, defvar  /;

Set
i     'units'              / Depot1*Depot20                       /
j     'inputs and outputs' / stock, wages, issues, receipts, reqs /
ji(j) 'inputs'             / stock, wages                         /
jo(j) 'outputs'            /               issues, receipts, reqs /;

Table data(i,j)
stock  wages  issues  receipts  reqs
Depot1     3      5        40        55    30
Depot2     2.5    4.5      45        50    40
Depot3     4      6        55        45    30
Depot4     6      7        48        20    60
Depot5     2.3    3.5      28        50    25
Depot6     4      6.5      48        20    65
Depot7     7     10        80        65    57
Depot8     4.4    6.4      25        48    30
Depot9     3      5        45        64    42
Depot10    5      7        70        65    48
Depot11    5      7        45        65    40
Depot12    2      4        45        40    44
Depot13    5      7        65        25    35
Depot14    4      4        38        18    64
Depot15    2      3        20        50    15
Depot16    3      6        38        20    60
Depot17    7     11        68        64    54
Depot18    4      6        25        38    20
Depot19    3      4        45        67    32
Depot20    3      6        57        60    40;

\$eolCom //
option limCol   = 0         // no column listing
limRow   = 0         // no row listing
solveOpt = replace;  // don't keep old var and equ values

var.fx = 0;       // to run CRS with the primal model
*var.lo = -inf;   // to run VRS with the primal model
*var.up = +inf;   // to run VRS with the primal model
vlo  = 1e-4;
ulo  = 1e-4;
norm = 100;

v.lo(ji) = vlo;
u.lo(jo) = ulo;

*deap.solPrint  = %solPrint.quiet%;

Set ii(i) 'set of units to analyze' / depot1, depot2, depot18 /;

*ii(i) = yes;      // use to run all depots
is(i) = no;

Parameter rep 'summary report';

loop(ii,
is(ii) = yes;

solve deap us lp max eff;
rep(i,ii) =  sum(jo, u.l(jo)*data(i,jo))/sum(ji, v.l(ji)*data(i,ji));
rep('MStat-p',ii) = deap.modelStat;

solve deadc us lp min eff;
is(ii) = no;
);

rep(i,'Min') = smin(ii, rep(i,ii));
rep(i,'Max') = smax(ii, rep(i,ii));
rep(i,'Avg') =  sum(ii, rep(i,ii))/card(ii);

display rep;
``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170
GAMS is a registered trademark of GAMS Software GmbH in the European Union