Operations 11 min read

How to Evaluate Airline Route Efficiency with DEA and Python

This article presents a full case study that uses Data Envelopment Analysis (DEA) with Python to assess the efficiency of 13 airlines based on fleet size, fuel consumption, employee count, passenger‑miles and freight‑ton‑miles, detailing data preparation, model construction, solution steps, results and practical conclusions.

Model Perspective
Model Perspective
Model Perspective
How to Evaluate Airline Route Efficiency with DEA and Python

Case Study: Airline Route Efficiency

Data Preparation

In this case, 13 airlines (DMUs) are evaluated with three inputs (fleet size, fuel consumption, employee count) and two outputs (passenger‑miles and freight‑ton‑miles). The raw numbers for each airline are listed in the original source.

Programming Environment

<code>Python 3.7.4 + PuLP 2.0</code>

Execution Steps

Step 1 – Import Packages

<code>from pulp import LpProblem, LpMinimize, LpVariable, lpSum, value</code>

Step 2 – Build Data Sets

<code>K = ["A","B","C","D","E","F","G","H","I","J","K","L","M"]
I = ["Aircraft","Fuel","Employee"]
J = ["Passenger","Freight"]
# X and Y dictionaries contain the input and output values for each DMU</code>

Step 3 – Construct CRS DEA Model (input‑oriented dual)

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

Step 4 – Solve Model

<code>model.solve()</code>

Step 5 – Construct VRS DEA Model (input‑oriented dual)

<code>model = LpProblem('VRS_model', LpMinimize)
theta_r = LpVariable('theta_r')
lambda_k = LpVariable.dicts('lambda_k', lowBound=0, indexs=K)
model += theta_r
# same input and output constraints as CRS
# convex‑combination constraint for variable returns to scale
model += lpSum([lambda_k[k] for k in K]) == 1
model.solve()</code>

Step 6 – Extract Efficiencies

<code>OE_outputText = 'These are OE of all DMUs\n...'
TE_outputText = 'These are TE of all DMUs\n...'
SE_outputText = 'These are SE of all DMUs\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>

Results show that airlines C, G, H, I, K and L achieve full efficiency (OE = TE = SE = 1), while D, J and M have lower overall and technical efficiencies, indicating that scale effects should be examined to improve their performance.

Conclusion

DEA is a reliable benchmarking technique for homogeneous decision‑making units such as airlines or bank branches. It provides relative efficiency scores but does not prescribe specific improvement actions, so additional analysis is needed to design concrete efficiency‑enhancement strategies.

Pythonefficiencyoperations researchData Envelopment AnalysisAirline
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.