Operations 15 min read

How Data Envelopment Analysis (DEA) Optimizes Airline Efficiency with Python

Data Envelopment Analysis (DEA) is a non‑parametric technique for evaluating relative efficiency of decision‑making units, with CRS and VRS models explained, followed by a Python implementation using PuLP to assess airline route efficiency and interpret overall, technical, and scale efficiencies.

Model Perspective
Model Perspective
Model Perspective
How Data Envelopment Analysis (DEA) Optimizes Airline Efficiency with Python

Data Envelopment Analysis

Data Envelopment Analysis (DEA) is a non‑parametric evaluation method used to assess relative efficiency and efficiency frontiers. It can be applied to evaluate productivity and efficiency, compare performance of different institutions, companies, or departments, and more.

In DEA, each unit (e.g., company, school, hospital) is treated as a production unit, with inputs and outputs represented as vectors. These vectors may include various performance indicators such as staff count, revenue, production cost, service quality, etc. DEA determines the most efficient unit—the efficiency frontier.

DEA can be used in many fields such as production management, investment management, financial analysis, marketing analysis, etc., helping entities discover strengths and weaknesses and take improvement measures.

CRS Model and VRS Model

In DEA, CRS (Constant Returns to Scale) and VRS (Variable Returns to Scale) are two common models used to evaluate the technical efficiency of Decision Making Units (DMUs) by comparing inputs and outputs.

The CRS model assumes constant scale efficiency, i.e., inputs and outputs are linearly proportional. The VRS model relaxes this assumption, allowing variable scale efficiency with a non‑linear relationship.

For convenience, we first define the following symbols.

Notation

Sets:

J: set of decision units (DMUs).

I: set of inputs.

R: set of outputs.

Decision variables:

λ_k: dual decision variable for DMU k.

θ_r: dual variable for DMU r.

u_i: weight of the i‑th input variable.

v_j: weight of the j‑th output variable.

Parameters:

x_{i,k}: value of the i‑th input for DMU k.

y_{j,k}: value of the j‑th output for DMU k.

CRS Model

Charnes, Cooper and Rhodes (CCR) introduced the CRS DEA model in 1978, also known as the CCR model. It can measure overall efficiency (OE) and determine the most productive scale (MPSS) for a specific firm.

Original Form

The original form is a fractional programming problem.

This form contains

m decision variables

n constraints

Dual Form

Because the original formulation is a fractional and nonlinear program, dual theory can transform it into a dual linear program to simplify computation.

This form also contains

m decision variables

n constraints

VRS Model

Banker, Charnes, and Cooper (BCC) introduced the VRS DEA model in 1984, also known as the BCC model, which relaxes the constant returns‑to‑scale assumption. It can be used to measure technical efficiency (TE) of a specific firm.

Original Form

Dual Form

Efficiency Evaluation

The input‑oriented model aims to proportionally reduce inputs without changing outputs, while the output‑oriented model aims to proportionally expand outputs without changing inputs.

Efficiency is decomposed into:

Overall Efficiency (OE) : optimal solution of the CRS DEA model.

Technical Efficiency (TE) : optimal solution of the VRS DEA model.

Scale Efficiency (SE) : calculated as OE divided by TE; scale effects influence productivity.

Case Study: Airline Route Efficiency

This case evaluates 13 airlines (DMUs) with three inputs (Aircraft fleet size, Fuel, Employees) and two outputs (Passenger‑miles, Freight‑miles).

<code>DMU  Aircraft  Fuel  Employee  Passenger  Freight
A    109       392   8259      23756      870
B    115       381   9628      24183      1359
C    767      2673  70923     163483    12449
D     90       282   9683      10370       509
E    461      1608  40630      99047      3726
F    628      2074  47420     128635      9214
G     81        75   7115      11962       536
H    153       458  10177      32436      1462
I    455      1722  29124      83862      6337
J    103       400   8987      14618       785
K    547      1217  34680      99636      6597
L    560      2532  51536     135480     10928
M    423      1303  32683      74106      4258</code>

We use the PuLP library to solve the problem.

<code>X={'Aircraft':{'A':109.0,'B':115.0,'C':767.0,'D':90.0,'E':461.0,'F':628.0,'G':81.0,'H':153.0,'I':455.0,'J':103.0,'K':547.0,'L':560.0,'M':423.0},
'Fuel':{'A':392.0,'B':381.0,'C':2673.0,'D':282.0,'E':1608.0,'F':2074.0,'G':75.0,'H':458.0,'I':1722.0,'J':400.0,'K':1217.0,'L':2532.0,'M':1303.0},
'Employee':{'A':8259.0,'B':9628.0,'C':70923.0,'D':9683.0,'E':40630.0,'F':47420.0,'G':7115.0,'H':10177.0,'I':29124.0,'J':8987.0,'K':34680.0,'L':51536.0,'M':32683.0}}
Y={'Passenger':{'A':23756.0,'B':24183.0,'C':163483.0,'D':10370.0,'E':99047.0,'F':128635.0,'G':11962.0,'H':32436.0,'I':83862.0,'J':14618.0,'K':99636.0,'L':135480.0,'M':74106.0},
'Freight':{'A':870.0,'B':1359.0,'C':12449.0,'D':509.0,'E':3726.0,'F':9214.0,'G':536.0,'H':1462.0,'I':6337.0,'J':785.0,'K':6597.0,'L':10928.0,'M':4258.0}}
K=["A","B","C","D","E","F","G","H","I","J","K","L","M"]
I=["Aircraft","Fuel","Employee"]
J=["Passenger","Freight"]
</code>

Construct the input‑oriented CRS DEA model in dual form.

<code>model = LpProblem('CRS_model', LpMinimize)</code>
<code>theta_r = LpVariable('theta_r')
lambda_k = LpVariable.dicts('lambda_k', lowBound=0, indexs=K)</code>
<code>model += theta_r  # Dual formulation</code>
<code>for i in I:
    model += lpSum([lambda_k[k] * X[i][k] for k in K]) <= theta_r * float(X[i][K[r]])
for j in J:
    model += lpSum([lambda_k[k] * Y[j][k] for k in K]) >= float(Y[j][K[r]])
</code>
<code>model.solve()</code>

Collect and print efficiency results.

<code>OE_outputText = 'These are OE of all DMUs\n-------------\n'
TE_outputText = 'These are TE of all DMUs\n-------------\n'
SE_outputText = 'These are SE of all DMUs\n-------------\n'
for k in range(len(K)):
    OE_text, OE_val = getOverallEfficiency(k)
    TE_text, TE_val = getTechnicalEfficiency(k)
    OE_outputText += OE_text
    TE_outputText += TE_text
    SE_outputText += f'{K[k]}:{round(OE_val / TE_val,3)}\n'
print(OE_outputText)
print(TE_outputText)
print(SE_outputText)
</code>
<code>DMU  Efficiency  Aircraft  Fuel  Employee  Passenger  Freight
A    0.977957    0         5.182 0         0         533.679
B    0.968391    0         0    1240.56   0         0
C    1           0         0   -6.92576e-07 -1.63483e-07 0
D    0.536876    0         0    1867.64   0         0
E    0.969087    0         0    5968.96   0         1983.57
F    0.977955    0         0    0         0         0
G    1          -2.38463e-10 0   0         4.17023e-09 0
H    1           0         0    0         0         0
I    1          -2.21486e-10 -2.15657e-09 0 -1.30176e-07 0
J    0.618572    0         0    374.339   0         193.414
K    1           2.62189e-10 0    0        -1.82691e-08 0
L    1           0         0    0         0         0
M    0.83467     0         0    2397.89   0         0
</code>

Results

We find that DMUs C, G, H, I, K, and L are on the efficient frontier, while D, J, and M exhibit low efficiency. Scale efficiency (SE) can be decomposed with input and output data to understand and improve low‑efficiency states.

<code>DMU  OE    TE    SE
A    0.978 1    0.978
B    0.968 1    0.968
C    1     1    1
D    0.537 0.9  0.597
E    0.969 0.996 0.973
F    0.978 1    0.978
G    1     1    1
H    1     1    1
I    1     1    1
J    0.619 0.886 0.698
K    1     1    1
L    1     1    1
M    0.835 0.849 0.984
</code>

Conclusion

DEA provides a reliable technique for benchmarking different airlines or bank branches and is applicable to any industry requiring efficiency assessment of homogeneous units, especially manufacturing. While DEA compares relative efficiency, it does not prescribe improvement actions, so additional methods are needed to identify solutions.

References

[1] Coelli, T. J., Rao, D. S. P., O'Donnell, C. J., & Battese, G. E. (2005). An introduction to efficiency and productivity analysis. Springer. [2] Data envelopment analysis. Wikipedia, 2020. [3] Lee, C. Y., & Johnson, A. L. (2012). Two‑dimensional efficiency decomposition to measure the demand effect in productivity analysis. European Journal of Operational Research, 216(3), 584‑593. [4] Returns to scale. Wikipedia, 2020. [5] Vörösmarty, G., & Dobos, I. (2020). A literature review of sustainable supplier evaluation with Data Envelopment Analysis. Journal of Cleaner Production, 121672.

Pythonoperations researchDEAData Envelopment AnalysisEfficiency EvaluationCRSVRS
Model Perspective
Written by

Model Perspective

Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.