Comparative DEA-CCR analysis (Data Envelopment Analysis — Charnes, Cooper, Rhodes) is a method used to assess the efficiency of Decision-Making Units (DMUs), such as enterprises, institutions or branches, which transform inputs (e.g. resources, expenditures) into outputs (e.g. products, services).
DEA-CCR makes it possible to assess the relative efficiency of decision-making units by determining an efficiency frontier on which the most efficient units are located. Units below this frontier are regarded as less efficient. The method also identifies the degree of inefficiency and suggests opportunities for improvement by reducing inputs or increasing results while keeping resources unchanged.
DEA-CCR is particularly useful in situations where it is difficult to compare different units on the basis of traditional efficiency indicators, enabling efficiency to be assessed under conditions of multidimensional input and output data.
W-MOSZCZYNSKI-2024-6-38Comparing the incomparable
Let us assume that we own several dozen mills and must create a bonus system for employees operating the weighbridges. There is a weighbridge in front of each mill, but weighing time varies depending on the infrastructure, the size of the vehicles being weighed, and even the type of raw material being weighed. Queues form at some weighbridges, while others stand empty. The owner of the mill network faces a very difficult task: how should bonuses be allocated fairly? What criteria should be applied? After all, the weighbridges are different; pears cannot be compared with apples.
Let us consider that our mills are located in different parts of the country. In one region there are large landed estates, while in another there are numerous small farms. Each mill has its own unique history and, as a result, different technology and a different number of office employees. Some devices break down more often; others are new, but their leases cost a great deal. How can we assess which mill operates efficiently and which does not, if each one is different? Can we compare apples with oranges?
A comparative method of “apples and pears”?
I encountered the DEA-CCR method several years ago and it immediately made a tremendous impression on me. I worked for 15 years as a financial analyst in large organizations. One of my responsibilities was comparing the efficiency of different units, of which there could be a dozen or several dozen. These included hotels, shops, logistics bases, forwarding companies and production plants. Every unit was different; each operated under different conditions.
To compare them, I had to use standard indicators and assign appropriate weights to them. For example, when I compared two logistics bases, one of which had a dozen or so vehicles and the other several dozen, it was clear that the smaller base had a larger share of fixed costs and a higher percentage share of administrative costs. I tried to place the two units on an equal footing by applying weights that I determined myself. However, these weights were set subjectively, which meant that my comparative method had shortcomings. Nevertheless, the work had to be done and efficiency rankings presented, even though I was aware that the method was imperfect.
It was only long after I had finished working as a financial analyst that I discovered the DEA method.
The Data Envelopment Analysis (DEA) method was created to meet the fundamental need to measure the efficiency of organizations in which inputs and outputs have many dimensions. It is used to optimize operations, identify efficiency leaders and indicate potential improvements in less efficient units.
Many organizations (e.g. schools, hospitals and public institutions) operate in conditions in which traditional efficiency measures are poorly suited. DEA made it possible to assess these units without having to predetermine weights for every variable. DEA’s measurement of relative efficiency enables units to be assessed against one another, with efficient units designated as a reference for the others. This makes it possible to identify the units that are the best (on the efficiency frontier) and those that have potential for improvement. The method allows many inputs and outputs to be taken into account without the need to reduce them to individual indicators, which makes it useful in many different contexts.
Application of DEA-CCR analysis in assessing the efficiency of a mill network
The milling industry consists of mills as well as grain elevators, forwarding operations, etc. In Poland, there are companies that manage networks of mills—units similar to one another because they must operate under the strictures of numerous regulations, including phytosanitary regulations, the Labour Code, the Commercial Companies Code and good practices applicable in the milling industry.
To assess the efficiency of a network of 20 mills, the DEA-CCR analysis method can be applied. It enables the efficiency of units to be compared using different inputs and outputs. Below is an example of inputs and outputs that can be used in such an analysis.
Inputs:
- Fixed costs connected with the technical maintenance of the mill
- Fixed costs connected with mill administration
- Number of vehicles unloading during the month
- Number of square metres of production area
- Percentage share of administrative costs in total costs
- Average time, in minutes, required to unload one tonne of grain
Output vector:
- Total number of tonnes of grain milled during the month
- Monthly profit from flour sales
- Number of unloaded vehicles or railway wagons carrying grain
The following calculation example shows how a DEA-CCR analysis can be carried out for a network of 20 mills using Python.
Step 1. I launch the programming libraries
import numpy as np
import pandas as pd
np.random.seed(148)
# Number of mills
num_mills = 20
Step 2. I create a matrix of fictional input data (inputs), which I listed earlier
# Generating input data
data_inputs = pd.DataFrame({
"Maintenance_Cost": np.round(np.random.uniform(100000, 500000, num_mills)).astype(int),
# Fixed technical-maintenance costs
"Admin_Cost": np.round(np.random.uniform(50000, 200000, num_mills)).astype(int),
# Administrative costs
"Trucks_Unloading": np.random.randint(50, 300, num_mills),
# Number of vehicles/month
"Production_Area": np.round(np.random.uniform(1000, 5000, num_mills)).astype(int),
# Production area (m2)
"Admin_Cost_Percentage": np.round(np.random.uniform(5, 20, num_mills)).astype(int),
# Percentage share of administrative costs
"Avg_Unloading_Time": np.round(np.random.uniform(10, 60, num_mills)).astype(int)
# Average unloading time (min/tonne)
})
Step 3. I create a fictional matrix of output data (outputs)
# Generating output data
data_outputs = pd.DataFrame({
"Milled_Grain_Tons": np.random.uniform(500, 3000, num_mills).astype(int),
# Total tonnes of grain milled/month
"Monthly_Profit": np.random.uniform(50000, 300000, num_mills).astype(int),
# Monthly profit
"Unloaded_Vehicles": np.random.randint(40, 300, num_mills).astype(int)
# Number of unloaded vehicles or railway wagons
})
Data for the 20 mills can be generated “off the top of one’s head” or similar data from actual units can be obtained from the accounting department. For the first 4 of the 20 mills, the data will be as follows:
Input data (inputs)
| Maintenance_Cost | Admin_Cost | Trucks_Unloading | Production_Area | Admin_Cost_Percentage | Avg_Unloading_Time | |
|---|---|---|---|---|---|---|
| 0 | 174751 | 175299 | 195 | 4267 | 13 | 60 |
| 1 | 490658 | 131695 | 139 | 3160 | 15 | 11 |
| 2 | 392405 | 179033 | 176 | 2511 | 6 | 54 |
| 3 | 435183 | 56044 | 254 | 3531 | 6 | 23 |
Output data (outputs)
| Milled_Grain_Tons | Monthly_Profit | Unloaded_Vehicles | |
|---|---|---|---|
| 0 | 2466 | 219872 | 233 |
| 1 | 2722 | 275694 | 253 |
| 2 | 1662 | 188888 | 281 |
| 3 | 2582 | 296249 | 207 |
These data may be somewhat distorted in relation to the realities of mill operations. The most important thing here is to show the various data needed to conduct the analysis.
Step 4. We build the main calculation “engine.” The most important thing is to standardize the data first
def calculate_dea_ccr(inputs, outputs):
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
scaled_inputs = scaler.fit_transform(inputs)
scaled_outputs = scaler.fit_transform(outputs)
# Efficiency assessment (for simplification, we use aggregate efficiency measures)
efficiency_scores = np.sum(scaled_outputs, axis=1) / np.sum(scaled_inputs, axis=1)
return efficiency_scores
Step 5. Calculating efficiency results
inputs = data_inputs.values
outputs = data_outputs.values
efficiency_scores = calculate_dea_ccr(inputs, outputs)
# Displaying the results
result_df.set_index("Mill_ID", inplace=True)
print(result_df)
As a result of these few lines of code, we obtain a table showing the leaders and laggards in efficiency.
Interpretation of the analysis results for 20 mills
The mills with the highest efficiency indicators are Mill 4 (0.979) and Mill 6 (0.910). These units are very close to the efficiency frontier (1.0), which means that they use their resources almost optimally in relation to the outputs achieved.
The moderately efficient units are mills 2 (0.876), 18 (0.788) and 19 (0.771). They achieve relatively high efficiency indicators, but still have some room for improvement in order to match the leaders. These units are close to efficiency, but can use a comparison with the leaders to adjust their operations.
| Mill_ID | Efficiency_Score |
|---|---|
| 4 | 0.979135 |
| 6 | 0.910291 |
| 2 | 0.876303 |
| 18 | 0.787929 |
| 19 | 0.771081 |
| 17 | 0.636867 |
| 5 | 0.610127 |
| 3 | 0.597836 |
| 1 | 0.579244 |
| 12 | 0.463178 |
| 15 | 0.408164 |
| 13 | 0.391725 |
| 10 | 0.388735 |
| 7 | 0.384174 |
| 9 | 0.341174 |
| 14 | 0.339898 |
| 11 | 0.292286 |
| 16 | 0.262455 |
| 20 | 0.238177 |
| 8 | 0.099524 |
Mills 17 (0.637), 5 (0.610), 3 (0.598) and 1 (0.579) display poor efficiency, having obtained efficiency indicators below 0.7. This means that there is considerable room for improving their operations, both by reducing costs and by increasing the outputs achieved.
The worst performers were mills 8 (0.099) and 20 (0.238). These units operate significantly below the level of efficiency and may require more comprehensive changes, such as improved management, optimization of inputs, or increased production and profits.
Summary
The results of the DEA-CCR analysis make it possible to gain an understanding of the actual efficiency of units operating under similar legal, procedural and economic conditions. Probably the worst thing is to assess a unit unfairly. Those that face an uphill struggle with the market, old technology or a disastrous location, even though they make a great effort to achieve the highest possible efficiency, will lose to a plant that, despite an excellent location or favourable economic conditions, achieves poor marginal efficiency, yet solely because of its location achieves much better results and wins in the ranking.
The DEA method detects these injustices and indicates who is the true winner of the race for the highest efficiency.
Wojciech Moszczyński — graduate of the Department of Econometrics and Statistics of Nicolaus Copernicus University in Toruń; specialist in econometrics, finance, data science, and management accounting. He specializes in the optimization of production and logistics processes. He conducts research in the area of the development and application of artificial intelligence. For years he has been engaged in the popularization of machine learning and data science in business environments.

Dodaj komentarz