You are on page 1of 10

Journal of Engineering Research 11 (2023) 100057

Contents lists available at ScienceDirect

Journal of Engineering Research


journal homepage: www.journals.elsevier.com/journal-of-engineering-research

Demand forecasting of spare parts with regression and machine learning


methods: Application in a bus fleet ]]
]]]]]]
]]

Metin İfraza, , Adnan Aktepeb, Süleyman Ersözb, Tahsin Çetinyokuşa


a
Departman of Industrial Engineering, Gazi University, Ankara 06570, Turkey
b
Departman of Industrial Engineering, Kırıkkale University, Kırıkkale 71450, Turkey

A R T I C L E I N F O A B S T R A C T

Keywords: Forecasting the demand of spare parts of vehicles in bus fleets is a vital issue. Vehicles must operate effectively
Artificial intelligence and must have a high availability rate in the fleet. In maintenance operations, faulty parts or parts that complete
Demand forecasting their lifetime must be replaced with a new one. Spare parts needed must be in inventories with the required
Machine learning amount on time. In this sector, there are thousands of spare parts to manage. The maintenance and repair
Maintenance management
department must operate effectively. In order to accomplish this, accurate forecast of spare parts is required. In
Spare parts
this study, demand forecasting was carried out with regression-based methods (multivariate linear regression,
multivariate nonlinear regression, Gaussian process regression, additive regression, regression by discretion,
support vector regression), rule-based methods (decision table, M5Rule), tree-based methods (random forest,
M5P, Random tree, REPTree) and artificial neural networks. The forecasting model developed in this study
includes critical variables such as the number of vehicles in the fleet, the number of breakdowns that cause parts
to change, the number of periodic maintenance, mean time between failure and demand quantity in previous
years. The application was carried out with real data of eight (2013–2020) years. 2013–2019 data was used for
training and 2020 data was used for testing. In forecasts, support vector regression among regression-based
methods, decision table among rule-based methods, M5P among tree-based methods gave the best results. It has
been observed that the artificial neural network produced more accurate forecasts than all other methods.
Artificial neural network forecasts give the highest forecast accuracy rate and the least deviation.

Introduction enterprise, neither more nor less, but in sufficient quantities. Spare
part demand forecasting is vital for inventory management and
A successful demand forecast provides many benefits to businesses planning. Due to the demand characteristics of spare parts, demand
in production planning, inventory management, financial planning forecasting is difficult. Hence, it is important to manage spare parts
and workforce planning. Forecasts assist managers in decision- effectively in many industries. Some spare parts are used by end-users,
making. In inventory management, the importance of forecasting is while others are used in places such as manufacturing and main-
increasing day by day. Forecasting at a certain accuracy rate in ad- tenance facilities [33,39]. Maintenance and repair departments re-
vance will reduce the costs of overstock and out-of-stock. Inventory quire spare parts to ensure that the operation is not disrupted at the
includes raw materials, semi-finished products, finished products, time of breakdown and periodic maintenance. Spare parts inventory is
spare parts and consumables used in its products. Controlling and essential to be prepared for demand fluctuations and unexpected
adequately maintaining inventories is a vital problem experienced by setbacks. In maintenance and repair departments, spare parts should
almost all businesses. It is very important to manage the inventories be available in the required quality, quantity and time. Otherwise, the
correctly, because inventories occupy a lot of space and occupy the absence of spare parts or excess of the required quantity leads to
production unnecessarily and are a big burden for businesses due to serious costs. Maintenance and spare parts management is a very
their high costs. The main purpose of scientific inventory control is the critical process for fleets with thousands of vehicles since the cost of
execution of the production without interruption by keeping the raw maintenance and spare parts corresponds to approximately 10–60% of
materials, materials, spare parts and other necessities available in the the total expenditures [20].


Corresponding author.
E-mail address: metinifraz@gazi.edu.tr (M. İfraz).

https://doi.org/10.1016/j.jer.2023.100057
Received 20 July 2022; Received in revised form 23 February 2023; Accepted 5 March 2023
2307-1877/© 2023 The Authors. Published by Elsevier B.V. on behalf of Kuwait University. This is an open access article under the CC BY-NC-ND license (http://
creativecommons.org/licenses/by-nc-nd/4.0/).
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

In this study, demand forecasting was applied for a critical spare demand forecasting studies. Alalawin et al. [3] have conducted studies
part in an urban transport bus fleet of a metropolitan municipality. on the price and demand of spare parts. As a variable, number of ve-
Firstly, studies in the related field were examined. Then, inventory hicles, vehicles generation, total maintenance cost, origin country,
classification methods were investigated to choose critical spare part. failure rate, originality, new or used, selling location, repair service
The most critical spare part to be estimated was determined by ABC location, repair or replacement cost, criticality, online price, car type,
analysis. Subsequently, the variables affecting the demand for spare spare part type, car price were determined. In their studies, they used
part were determined. The number of vehicles in the fleet, mean time the MLR method. Yoon and Kim [45] carried out a spare parts demand
between failure (MTBF) the number of periodic maintenance and the forecasting application to increase the availability of ships belonging to
number of failures are inputs of this study [3,11]. The number of ve- the Korean Navy. They determined 42 input variables such as annual
hicles in the fleet represents the number of active vehicles in the fleet consumption amount and ordering rate. The output variable is the
per month, MTBF expresses the time between two failures. The number amount of spare parts purchased in a year. Linear regression (LR), RT
of periodic maintenance refers to how many vehicles in the fleet are model, RF and ANN methods were used. Mean Square Error (MSE) was
serviced periodically within a month, and the number of failures refers used as a performance measure. The model was implemented in R
to the number of failures that will cause the part to change. The output software. In the evaluations, it was seen that the RF gave the best re-
of the model is demand values. sults. Choi and Suh [11] conducted a spare part demand forecast study
In the application phase, four different types of methods were used: for military aircraft in South Korea. The importance of the study is
i.Regression-based methods (multivariate linear regression (MLR), stated as considering variables such as MTBF, which represents the
multivariate nonlinear regression (MNLR), Gaussian process regression reliability of spare parts that were not previously considered. Reliability
(GPR), additive regression (AR), regression by discretion (RBD), sup- including MTBF, information about a spare part, operating environment
port vector regression (SVR)), ii.Rule-based methods (Decision table and consumption performance were determined as the main variable.
(DT), M5Rule), iii.Tree-based methods (Random forest (RF), M5P, LR, RF, SVM and ANN were used as methods.
Random tree (RT), Reduced Error Pruning Tree (REPTree)) and While regression methods are used in spare part demand fore-
iv.Artificial neural networks (ANN). In forecasts, SVR among regres- casting, time series methods are also used to a large extent. Faghidian
sion-based methods, DT among rule-based methods, M5P among tree- et al. [14] proposed a hybrid model for intermittent demand. The hy-
based methods give the best results. It has been observed that the ANN brid model is based on the simultaneous use of three methods (ARMA,
method produced more accurate forecasts than all other methods. SES and multilayer perceptron (MLP)). It has been seen that the pro-
ANN’s forecasts give the highest forecast accuracy and the least de- posed hybrid method increases the accuracy and produces promising
viation. results. Vaitkus et al. [38] conducted a daily and weekly electrical spare
In the studies examined in the literature, it revealed that there was part demand forecasting study. MA, ES, Naive Theory (NT), SVR, feed
limited work on spare parts demand forecasting in maintenance and forward NN, adaptive model selective methods were used. SVR gave the
repair field. Our study will contribute to literature in demand fore- best performance value. Sahin [33] conducted a spare part demand
casting application for maintenance and repair department in fleet forecasting application in an airline company. For these parts with
management in a metropolitan municipality. discrete demand structure, ES, Croston, Syntetos-Boylan Approximation
The remainder of the paper is organized as follows. Section 2 pro- (SBA), Modified Croston, Modified Croston Syntetos, Leven's, two
vides a literature review of studies addressing demand forecasting. parameter Croston and Chua's method and ANN were used. It is aimed
Section 3 presents the methodology frameworks to be used in the ap- to provide information to airline practitioners in determining the best
plication. Section 4 presents a real application and the goodness of the forecasting method for each part according to its own characteristics.
demand forecasting methods are evaluated. Section 5 reports the con- Vargas and Cortes [40] conducted a monthly spare part demand fore-
clusions and the literature gaps for further studies are discussed. casting study in the automobile industry in Mexico. MA, final value, ES,
ARIMA, ANN and ARIMA-ANN hybrid methods were used. ANN
Literature review showed the best performance. Ghobbar and Friend [16] compared 13
different time series techniques to forecast demand for aircraft spare
Demand forecasting methods are generally divided into two as parts with discrete demand structure. It was emphasized that the Ex-
qualitative and quantitative. In the qualitative method, the forecast is ponential Moving Weighted Average and Croston's estimation methods
made subjectively by experts without using any mathematical tech- gave better results than the others. Guimaraes et al. [18] conducted a
nique. Delphi, scenario analysis, nominal group, market research, demand forecasting study for spare parts with high inventory turnover.
survey, structural similarity, judgmental decomposition methods are Box-Jenkins and ES were used in the study. It has been observed that
some of the qualitative methods [8]. In the quantitative approach, the the models adapt well to the problem. Boukhtouta and Jentsch [7] have
future value of the variable is estimated by making mathematical cal- analyzed the potential of SVM in predicting the demand for spare parts
culations with the data of the past periods [17]. Time series methods belonging to the Canadian armed forces. To compare this method, SES,
are based on examining the historical data of an event and making Croston Method, SBA, MA, WMA, HW, ARIMA and ANN methods were
future predictions by revealing certain trends. The purpose of these used. It has been observed that SVM produces equivalent or better re-
methods is to create statistical models using data patterns from past sults than these methods. However, it was observed that the perfor-
observation values and to predict the future with these models [25]. mance of SVM was not good in intermittent data. Menezes et al. [12]
Moving average (MA), weighted moving average (WMA), exponential aimed to evaluate the performance of feed-forward and recurrent
smoothing (ES), single exponential smoothing (SES), Holt linear (HL), neural networks in spare part demand forecasting. Croston and ARIMA
Holt-Winters (HW) are some time series methods. Box-Jenkins methods methods were used for comparison. When experimental results were
are very successful in time series, especially in short-term forecasts, and observed, ANN produced better results than statistical methods in three
are one of the preferred stochastic approaches. The variability and of the four data sets.
uncertain nature of the demand forecasting concept contributed to the While regression and time series methods are used in spare part
development of artificial intelligence methods in demand forecasting. demand forecasting, artificial intelligence methods are also used to a
ANN, fuzzy logic (FL), support vector machines/regression (SVM/SVR) significant extent. Amirkolaii et al. [5] conducted a study for the
are some artificial intelligence methods. forecasting of spare parts demand in the aviation field. They compared
In this section, we present a literature review on demand forecasting the results of the Croston, MA, SES, and ANN. As a result, they figure
models for manufacturing, maintenance and for spare parts. There are out that ANN produces better results for intermittent demands in their
many studies in the literature in which regression methods are used in work. Aktepe et al. [1] carried out a spare part demand forecasting

2
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Fig. 1. Methodology used in this study.

Table 1
ABC analysis data, calculations, and assigned classes.

Spare part Annual consumptionquantity (piece) Cost per Total annual cost Cumulative total cost Cumulative percentage of total Class
code piece (TL) (TL) cost (%)

S9 420 * * * 11,6 A
… … … … … … …
S11 193 * * * 79,85 A
S2 241 * * * 81,14 B
… … … … … … …
S41 77 * * * 90,7 B
S34 110 * * * 91,34 C
… … … … … … …
S43 11 * * * 94,4 C
… … … … … … …
S50 14 * * * 100 C

application in a company that produces spare parts for construction have been found to produce better predicted results. SVR is the best
machinery. The number of construction machinery sold in the world, forecasting method in the study. Huang et al. [23] proposed a hybrid
the USD rate adjusted for inflation, the monthly impact rate is de- approach combining gray relationship analysis (GRA) with SVM. With
termined as inputs. The number of spare parts requested by the custo- the GRA, the degree of gray relationship between the factors affecting
mers per month is determined as output. They utilized MLR, MNLR, the demand for spare parts and the consumption of spare parts is de-
ANN, SVR methods. Compared to regression methods, ANN and SVR termined. The determined main factors are taken as input to the SVM

3
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Table 3
Kernel test results.

Kernel Function MAE RMSE RAE (%) RRSE (%)

Normalized PolyKernel 3,78 4,86 78,56 81,35


PolyKernel 1,64 2,63 34,21 43,99
Puk 1,54 2,49 31,88 41,8
RBF Kernel 2,35 3,4 48,76 56,93

observed that regression-based, rule-based, tree-based and artificial neural


Fig. 2. Pareto chart for spare parts. networks are predominantly utilized among many methods for demand
forecasting. In addition, among these methods, regression-based methods,
and the consumption amount is taken as output. As a result of experi- rule-based methods, tree-based methods and ANN were found to be more
ments with test samples, the proposed method produced better results successful than time series analysis [1,3,5,7,10,11,15,40,45,47,48].
than ANN. Hua and Zhang [22] proposed hybrid SVM and logistic re-
gression method for spare parts with discrete demand structure. Data of Methods
30 different spare parts belonging to a company in China were used. It
has been observed that it produces better results when compared to In this section, i.regression-based methods (MLR, MNLR, GPR, AR,
other estimation methods. Chandriah and Naraganahalli [9] used Re- RBD, SVR), ii.rule-based methods (DT, M5Rule), iii.tree-based methods
current Neural Network/Long-Short Term Memory (RNN-LSTM) (RF, M5P, RT, REPTree) and iv.ANN methods to be applied for demand
method optimized with Adam algorithm to predict automobile spare forecasting are explained in detail.
parts. Alsumaiei [4] used a nonlinear autoregressive with exogenous
input (NARX) based RNN method to forecast monthly water demand in
Kuwait. It has been seen that the proposed method produces successful Regression-based methods
results. Xu and Chan [44] conducted a medical device demand fore-
casting application. They used 3-year daily sales data of a company. As The purpose of the regression method is to determine the relation-
a method; ARIMA, SVM and ANN are used. It was stated that ANN did ships between the dependent variable and the independent variables.
not give better results than ARIMA, and SVM gave the best results. For this purpose, the parameters must first be estimated [46]. In the
Munir et al. [30] used the ANN method to estimate solar photovoltaic multiple linear regression model, X represents independent variables
power. Sixty-three different combinations of six input variables were and Y represents dependent variable. In this study, the multiple linear
tried to find the combination with the best estimation. Aktepe et al. [2] regression model is expressed in Eq. (1). Here the notations are as
determined the optimum values of the input variables with ANN for a follows: a0: Constant value, a1: Weight coefficient of the number of
quality welding process. In the model, they utilized twenty-two input vehicles in the fleet, a2: Weight coefficient of the number of periodic
and three output variables. With this study, the proportion of defective maintenance, a3: Weight coefficient of the number of breakdowns, a4:
products was decreased. Kargul et al. [27] estimated the usage rates of Weight coefficient of the MTBF, X1: The number of vehicles in the fleet,
heavy-duty machines with SVR. Thanks to these estimates, they aimed X2: The number of periodic maintenance, X3: The number of break-
to reduce costs by renting less used machines and purchasing the most downs, X4: MTBF and Y: Monthly demand forecast.
used ones. Hu et al. [21] developed two-dimensional preventive policy Y = a0 + a1X1 + a2X2 + a3X3+ a4X4 (1)
where replacements of spare parts are based on both calendar time and
usage time. The model was developed to forecast spare parts demands In the multiple nonlinear regression model, the relationship be-
in automotive sector with a mathematical model. Chen and Lu [10] tween variables is curvilinear. In the model, X represents independent
conducted a demand forecasting study in the clothing industry. 12 years variables and Y represents dependent variable. In this study, the mul-
of data were used. Extreme learning machine and SVR methods were tiple nonlinear regression model is expressed in Eq. (2).
used. The SVR model gave the best results.
Y = a0 + a1X1 + a2X22 + a3X33+…·+ anXnn (2)
According to literature review, spare parts demand forecasting is
considered as a vital problem due to its strategic effect on the inventory GPR is a non-parametric Bayesian approach. It attempts to capture
cost. In addition, as an inference from literature review, it has been various relationships between inputs and outputs by using a

Table 2
Defined variables and samples.

Years Months The number of vehicles in the fleet The number of periodic maintenance The number of breakdowns MTBF ActualDemand

2013 … …. …. …. … …
Mar 1310 123 25 1,18 24
2014 … … … … … …
Nov 1323 131 29 1,03 32
2015 … … … … … …
June 1386 139 39 1,30 30
2016 … … … … … …
Nov 1409 134 29 0,97 26
2017 … … … … … …
Oct 1433 146 64 0,46 45
2018 … … … … … …
Apr 1469 153 34 0,87 30
2019 … … … … … …
Feb 1497 157 43 0,51 38
2020 … … … … … …
Jan 1499 158 46 1,53 35

4
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Table 4
Forecasted results by regression-based methods.

Months Actual Forecast Values


values
MLR MNLR GPR AR RBD SVR

Jan 35 36 36 37 36 36 36
Feb 34 37 36 36 37 36 35
Mar 36 36 36 35 36 36 36
Apr 45 42 42 38 44 44 43
May 32 33 33 34 31 31 32
June 34 35 34 34 28 36 34
July 27 35 35 34 36 36 35
Aug 35 36 36 35 36 36 36
Sep 37 38 38 36 37 36 36
Oct 33 36 36 35 37 35 35
Nov 40 40 40 37 44 44 39
Dec 32 34 34 34 28 31 34

Table 5 represents another approach to nonlinear relationships. In nonlinear


Forecasted results by rule-based methods. relationships, dichotomization is carried out with the median split
procedure. Two categories are enough for linear relationship and more
Months Actual Forecast Values
values than two categories are necessary to reflect a nonlinear relationship
DT M5Rule [32]. SVM was first proposed by Vapnik [41]. It is based on the basic
theory of statistical learning. The adaptation of SVM for regression,
Jan 35 35 35
commonly used for classification problems, was proposed by Smola
Feb 34 35 37
Mar 36 35 36 et.al. [35]. This method is called SVR. The SVR method tries to mini-
Apr 45 44 43 mize the prediction error and in this way aims to find a function that
May 32 32 30 approximates the training data set. Optimal generalization in SVR is
June 34 32 31 investigated by maximizing the margin between the support vectors
July 27 32 34
Aug 35 35 35
within a specific error tolerance. The ε-insensitive loss function, which
Sep 37 38 38 tolerates data with an error value in the range [-ε, ε] in the regression
Oct 33 35 36 model, allows the data to remain within the margin [29]. The most
Nov 40 31 41 important components that affect the quality and performance of the
Dec 32 32 31
SVR model are the type of core function, the C value, value. Parameter
C determines the relationship between error and complexity. The
Table 6 parameter controls the size of the -insensitive region. In addition, it
Forecasted results by tree-based methods. determines the number of support vectors. Small values of cause more
support vectors. It is unpredictable which C, and gamma (γ) values will
Months Actual Forecast Values
be best for the given problem [41].
values
RF M5P REPTree RT
Rule-based methods
Jan 35 36 35 35 35
Feb 34 36 36 35 35
Mar 36 36 36 35 35 DT is a classifier used to create a majority classifier with a simple
Apr 45 41 43 43 39 decision table [26]. The decision table is a method used for numerical
May 32 31 30 29 30 estimation from decision trees. It is a simpler, less information-compute
June 34 35 31 35 34
July 27 35 34 35 34
algorithm than other decision tree-based approaches. Thus, it creates an
Aug 35 36 35 35 36 ordered set of if-then rules that have the potential to make the rules
Sep 37 36 38 35 35 more understandable. The method evaluates subsets of attributes using
Oct 33 36 36 35 35 the best first search. It uses the k-NN method to determine the class for
Nov 40 41 40 43 41
each instance [24]. The M5 Rules algorithm is an algorithm that uses
Dec 32 29 31 29 24
the divide and conquer technique to create decision lists in regression
problems. The method creates a rule from the best leaf, and then works
on other instances that remain in the dataset according to the created
theoretically unlimited number of parameters and allowing the data to
rule [26].
determine the level of complexity through Bayesian inference [43].
Gaussian processes are used to solve regression problems. Inputs and
outputs are taken from an unknown distribution. The Gaussian process Tree-based methods
looks for a solution to estimate the output variable with the help of the
input vector [19]. This method is not only applicable to forecasting, it Decision trees have a structure that contains the decision variables
can also measure uncertainty in forecasting and provide a range of at the nodes and the prediction values on the leaves. The purpose of
consistency for each point in the forecast. Optimization algorithms decision trees is to minimize the value of the error function. RF is a
present the best parameters of a model for certain data in a stochastic supervised learning algorithm. The RF method, when used for classifi-
way, while Bayesian inference is aimed at providing a complete prob- cation, takes one class vote from each tree and then classifies it by
ability distribution of the model parameters [6]. Generally, linear re- majority vote. When used for regression, the predictions from each tree
gression can produce unsuccessful results in nonlinear real-life pro- at the target x point are averaged [6]. M5P is a reconstruction of the M5
blems. AR, which is one of the more flexible statistical models, can be algorithm to construct a regression tree model from the experimental
used to describe nonlinear regression effects [26]. Discretization data. In an M5P model, the tree stores a linear regression model on each

5
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Fig. 3. ANN network architecture.

Table 7
Systematic experiments for the best architecture.

Number of hidden layers Activation Number of neurons in the hidden layers Training function Learning MAPE
function rate (%)

1 Linear 10 Trainlm 0,5 6,8


Linear 15 Trainlm 0,5 6,1
Linear 20 Trainlm 0,5 5,3
Log. Sig. 20 Trainlm 0,5 11,6
Log. Sig. 20 Trainoss 0,5 4,92
Log. Sig. 20 Trainbfg 0,5 8,18
Log. Sig. 20 Trainrp 0,5 7,58
Log. Sig. 20 Traincgf 0,5 9,93
Log. Sig. 20 Trainbr 0,5 5,44
Tan. Sig. 20 Trainoss 0,5 8,61
Log. Sig. 20 Trainoss 0,4 8,94
Log. Sig. 20 Trainoss 0,6 10,2
2 Log. Sig.-Linear 20-20 Trainoss 0,5 10,3
Log. Sig.-Linear 20–20 Trainoss 0,5 7,58
Log. Sig.-Linear 20–20 Trainlm 0,5 24,6
Linear-Linear 20–20 Trainoss 0,5 4,71
Linear-Linear 20–20 Trainlm 0,5 6,11
Log. Sig.-Tan. Sig. 20–20 Trainoss 0,5 6,35
Linear-Tan. Sig. 20–20 Trainoss 0,5 6,85
3 Linear-Linear-Linear 20–20–10 Trainoss 0,5 4,84
Linear-Linear-Linear 20–20–20 Trainoss 0,5 6,32
Log. Sig.-Linear-Linear 20–20–20 Trainoss 0,5 19,0

branch that estimates the class values of the leaf-reaching part of the criterion and is a quick decision tree tutorial that is pruned using re-
dataset. The standard deviation is often used as a criterion for de- duced error pruning [24]. The method builds a decision-regression tree
termining which attribute is best for splitting the dataset at each node. using information gain/variance and builds it using pruning (with
The attribute to choose is the one that has the maximum expectation to background) with less errors. For numeric properties, their values are
reduce the error [26]. RT is ensemble learning algorithm that generates ordered only once. Missing values are handled by dividing the corre-
rules by learning many individual rules. It uses a bagging idea to con- sponding samples into parts [26].
struct a decision tree and generate a random set of data. In the RT
algorithm, each node is split using the best one among a subset of Artificial Neural Networks (ANN)
randomly selected markers at that node [24]. REPTree is a decision tree
learning method. It creates a decision tree based on reducing variance. Artificial intelligence is the heuristic method used by computers to
It creates a decision tree that uses information gain as a separation produce solutions to problems whose mathematical modelling cannot

6
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Table 8
Forecasted results by ANN.

Months Actual Forecast MAPE Forecast Deviation


values values (%) accuracy (%) (pieces)

Jan 35 35 0,000 100,00 0


Feb 34 36 5,882 94,12 2
Mar 36 36 0,000 100,00 0
Apr 45 42 6,667 93,33 3
May 32 33 3,125 96,88 1
June 34 34 0,000 100,00 0
July 27 34 25,926 74,07 7
Aug 35 35 0,000 100,00 0
Sep 37 38 2,703 97,30 1
Oct 33 36 9,091 90,91 3
Nov 40 40 0,000 100,00 0
Dec 32 33 3,125 96,88 1
Averages 4,7099 95,29 1,5

Table 9 Application
Average forecast accuracy rates of the applied methods.
In this study, spare part demand forecasting was carried out using 8
Methods Averages
years (2013–2020) of maintenance data of a bus fleet. In this study, 7
Forecast MAPE Deviation years (2013–2019) data was used for training, while the 2020 year data
accuracy (%) (%) (pieces) was used for testing. The methodology of the study is explained in
Fig. 1. Firstly, the importance of demand forecasting and inventory
Regression-Based methods 93,44 6,56 2,13
Rule-Based methods 94,36 5,64 1,88 management is mentioned. Afterwards, studies in the related field were
Tree-Based methods 93,34 6,66 2,17 examined. Then, inventory classification methods were investigated to
ANN 95,29 4,71 1,50 choose critical spare part. The most critical spare parts were determined
by meeting with maintenance engineers and managers. Among these
spare parts, the spare part to be demanded forecasting was chosen by
ABC analysis. Then, the variables affecting the demand of the selected
be created and that are difficult to solve. ANN are computer systems spare part were determined by considering the opinions of maintenance
developed to automatically realize the functions of the human brain, engineers and managers and the relevant literature studies. Data on
such as learning, understanding and revealing new information through variables that affect demand were collected. The collected data were
experience. ANN occurs by combining artificial nerve cells, which are divided into training and testing. Determined methods were applied. In
developed inspired by a biological nerve cell. ANN is generally used in the application, SPSS [36] (2017), Weka [42] (2021) and Matlab [28]
classification, forecasting, feature extraction, optimization. ANN can be (2021) softwares are used. Finally, the forecasting results of the models
used in both cause–effect relationship and time series forecasting were compared.
method [31]. Layers in ANN are a structure simulated according to the
nervous system in the human brain. ANN consists of 3 layers including
input, hidden, and output layers. The network is trained by adjusting Application of Always Better Control (ABC)
the weights of the connections between layers. In this way, outputs
corresponding to the given inputs are produced. The most important ABC is the most common method used in inventory classification.
features of ANN are its ability to model nonlinear structures, its parallel The idea of the ABC method was introduced in 1951 by H. Ford Dickie.
distributed structure, its ability to learn and generalize, its adaptability It is also known as the Pareto principle and is based on the Pareto law,
and fault tolerance for different problems [13]. Many parameters such which states that 80% of the total cost covers 20% of the items. This is
as the activation function, the number of hidden layers, and the number based on the observation of Vilfredo Pareto that a very large part of
of neurons in the layers should be systematically adjusted for the ANN total national income is concentrated on a small percentage of the po-
models to be installed specifically to each problem. pulation. The basis of the ABC method is to classify and control a wide

Table 10
Comparison of the forecasted values of the methods.

Forecast Values

Months Actual MLR MNLR GPR AR RBD SVR DT M5Rule RF M5P REPTree RT ANN
values

Jan 35 36 36 37 36 36 36 35 35 36 35 35 35 35
Feb 34 37 36 36 37 36 35 35 37 36 36 35 35 36
Mar 36 36 36 35 36 36 36 35 36 36 36 35 35 36
Apr 45 42 42 38 44 44 43 44 43 41 43 43 39 42
May 32 33 33 34 31 31 32 32 30 31 30 29 30 33
June 34 35 34 34 28 36 34 32 31 35 31 35 34 34
July 27 35 35 34 36 36 35 32 34 35 34 35 34 34
Aug 35 36 36 35 36 36 36 35 35 36 35 35 36 35
Sep 37 38 38 36 37 36 36 38 38 36 38 35 35 38
Oct 33 36 36 35 37 35 35 35 36 36 36 35 35 36
Nov 40 40 40 37 44 44 39 31 41 41 40 43 41 40
Dec 32 34 34 34 28 31 34 32 31 29 31 29 24 33

7
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

variety of inventories according to their costs [34]. In the ABC appli- by the S9 spare part. Not all but the vast majority. Hence, the sum of
cation, two rules must be considered firstly: i.Inventory items with low these specific breakdowns is defined monthly as a variable.
value should be kept abundantly. ii. The quantity of inventory items • Input 4: Mean Time Between Failure (MTBF): The expected
with high value should be kept low and the frequency of control should average time between the two breakdowns is called MTBF. From the
be increased [37]. Due to the costs of inventories in class A, they are of interviews with maintenance engineers and managers, it was
great importance for companies. In order to reduce costs. It is necessary decided that these MTBF values could affect the demand. MTBF
to work on the management and control of inventories in this class. values are calculated monthly. The MTBF formula is described in Eq.
Although it constitutes 10–20% of the total inventories amount of the (3).
inventories in class A, it constitutes 70–80% of all the inventory values.
Total working time
Class B inventories consist of inventories of moderate importance and MTBF =
Number of breakdowns (3)
cost. Although it constitutes 30–40% of the total inventories amount of
the inventories in class B, it constitutes 10–15% of all the inventory
values. Inventories in class C are of little importance for the companies • Output: Demand quantity in previous years: Monthly consumed
and they are low-cost inventories. Although it constitutes 40–50% of S9 spare part data of the previous years is an important variable for
the total inventories amount of the inventories in class C, it constitutes the training phase. This variable indicates the output of our study.
5–10% of all the inventory values. As a result of interviews with
maintenance engineers and managers, the ABC method was decided Data used in this study was obtained from the maintenance man-
with the opinion that the demand forecasts of spare parts, which have agement system of the company. The data are summarized in Table 2.
the highest percentage in total inventory costs, will contribute to more With data of one month in each year.
to the company. ABC analysis application was carried out for 50 spare In this study, the Mean Absolute Percentage Error (MAPE) metric
parts determined by maintenance engineers and managers. The data was utilized to compare the accuracy of forecasting results. The MAPE
used in the ABC analysis are annual consumption quantity and cost per formula is described in Eq. (4). At, Ft and n, respectively, denote actual
piece. With this data, the total annual cost of the spare parts is calcu- value, forecasting value, and the number of samples.
lated. Then, the cumulative total costs of these costs are calculated. n
100 At Ft
Finally, their cumulative percentages are obtained. The data used in the MAPE =
n At (4)
ABC analysis, calculations, and assigned classes are summarized in t=1

Table 1. The ABC analysis study was conducted with the 2020 year
data. As can be seen in Table 1, class assignments, those with a cu- Application of regression-based methods
mulative total cost percentage of up to 80%, were assigned to Class A,
those between 80% and 90% to Class B, others to Class C. In the study, The enter method was found to be the best variable selection
it was observed that 11 spare parts corresponding to approximately method with systematic trials carried out in the multivariate linear
20% of 50 spare parts were assigned to Class A. As can be seen in Fig. 2, regression model. The obtained weigh coefficients of the multivariate
most of the total costs are due to a few spare parts. In this study, The S9 linear regression model are shown in Eq. (5). In the application of
spare part was chosen for demand forecasting because it belongs to multivariate nonlinear regression model, first of all, the curve estima-
Class A and has the highest percentage in the total percentage with tion models formed by each independent variable with dependent
11,6%. variable were examined. From this point of view, it was tried to find the
best nonlinear regression model by conducting systematic experiments.
Determining the variables affecting demand The multivariate nonlinear regression model found is demonstrated in
Eq. (6).
In consequence of ABC analysis, the variables affecting the demand
forecasting of the selected S9 spare part were investigated. The S9 is an Y= - 0,1867+ 0,0076*X1+0,0502*X2+0,3506*X3+0,4877*X4 (5)
irreparable spare part. Since the S9 is a part imported from abroad, it is
Y= 11, 755 + 0, 584* X1 + 0, 049*X2 + 0, 352*X3 + 0, 336*X 4 2
(6)
ordered considering the annual consumption quantity. For this reason,
its demand forecasting is so important. With the related literature stu- SVR model architecture is established with four input and one
dies [3,11] and interviews with maintenance engineers and managers, output. The inputs are the number of vehicles in the fleet, the number of
four input and one output were used for the demand forecasting of the periodic maintenance, the number of breakdowns, and MTBF. The
S9 part. The identified variables are described below. output is only the actual demand quantity. In the study, 2013–2019
data was utilized for training and 2020 data was utilized for testing.
• Input1: The number of vehicles in the fleet: Bus fleets, which Various metrics are utilized to compare the performance of models built
provide urban transportation with the increasing population, grow with different kernel functions and parameters. Some of these are Mean
every year by adding new buses to their bus fleet in order to meet Absolute Error (MAE), Root Mean Square Error (RMSE), Relative
the increasing service demand. This increasing number of buses Absolute Error (RAE), and Root Relative Square Error (RRSE). The best
leads to an increase in breakdowns coming to the maintenance and kernel was determined by trying different kernel functions. Kernel test
repair department. It also increases the variety of spare parts. The S9 results are demonstrated in Table 3.
spare part is found in almost all buses. Therefore, it was decided that As seen in Table 3, The Puk with the lowest error values was chosen
the number of buses operating monthly in the fleet affected the S9 as the kernel function. The optimum parameters of the Puk kernel
demand. function are determined by the grid search algorithm. Decimal values of
• Input 2: The number of periodic maintenance: In periodic the forecasting results are rounded to the nearest number to be an in-
maintenance, the health and condition of S9 are one of the main- teger. Demand forecasts of regression-based methods for 2020 are
tenance activities that need to be checked. The part found to be in shown in Table 4. When Table 4 is examined, it is observed that re-
bad condition is replaced with a new one. Otherwise, it has been gression-based methods produce successful results close to actual va-
observed to lead to serious problems. Therefore, the number of lues. Actual and forecast values are compared in Table 4.MAPE values
monthly periodic maintenance is chosen as a variable. for MLR, MNLR, GPR, AR, RBD and SVR are % 6,25, % 5,76, % 7,05, %
• Input 3: The number of breakdowns: In the analysis carried out, it 8,79, % 6,50 and % 5,02 respectively. The method with the highest
was determined that some specific breakdowns were mostly led to accuracy is SVR.

8
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

Application of rule-based methods In this study, demand forecasting was conducted for a critical spare
part in a bus fleet. Firstly, studies in the related field were examined.
In this section, the applications of DT and M5Rule methods, which Then, inventory classification methods were investigated to choose
are rule-based methods, will be explained. The estimation results of the critical spare part. A spare part was selected for demand forecasting by
rule-based methods are shown in Table 5. When Table 5 is examined, it ABC analysis. The variables used in demand forecasting are the number
is seen that rule-based methods predict values close to the actual values. of vehicles in the fleet, the number of periodic maintenance, the
The average MAPE for DT is % 5,30 and for M5Rule MAPE is % 5,97. number of breakdowns, MTBF, demand quantity in previous years.
Then, demand forecasting was carried out with regression-based
Application of tree-based methods methods (MLR MNLR, GPR, AR, RBD, SVR), Rule-based methods (DT,
M5Rule), Tree-based methods (RF, M5P, RT, REPTree) and ANN. In
In this section, the applications of RF, M5P, REPTree and RT forecasts, SVR among Regression-based methods, DT among Rule-based
methods, which are tree-based methods, will be explained. The esti- methods, M5P among Tree-based methods give the best results. It has
mation results of the tree-based methods are shown in Table 6. been observed that the ANN method produced more accurate forecasts
When Table 6 is examined, it is seen that tree-based methods predict than all other methods. ANN’s forecast give the highest forecast accu-
values close to the actual values. The average MAPE for RF, M5P, RE- racy and the least deviation. After ANN, rule-based methods were found
PTree and RT are % 6,65, % 5,52, % 6,70 and % 7,75 respectively. The to be more successful than others. Although regression and tree-based
MAPE value of the M5P method is lower than the others. Therefore, it methods produce very close results, regression-based methods are more
can be said that the M5P method is more successful than the others. successful when compared.
After, M5P, RF, REPTree and RT methods come respectively. As a result, since the forecast accuracy is high, the company can
reduce costs by using this information when ordering spare parts. In
Application of Artificial Neural Network (ANN) future studies, performances can be compared using other forecasting
methods. In addition, forecast accuracy can be increased by in-
In ANN, the inputs are the number of vehicles in the fleet, the vestigating new variables that affect demand.
number of periodic maintenance, the number of breakdowns, and
MTBF. The output is only the actual demand quantity. In the study,
Funding and acknowledgements
2013–2019 data was utilized for training and 2020 data was utilized for
testing. The ANN network architecture is demonstrated in Fig. 3. A
This work was supported by the Scientific and Technological
systematic approach was applied to find the best ANN architecture. This
Research Council of Turkey (TÜBİTAK) within the 1001 - The Scientific
approach is demonstrated in Table 7.
and Technological Research Projects Funding Program [grant numbers:
The best ANN architecture consists of one input layer, two hidden
MAG-221M438].
layers, and one output layer. There are four neurons in the input layer,
twenty neurons in both the first and second hidden layers, one neuron
in the output layer. The activation in both hidden layers is Linear. Declaration of Competing Interest
Trainoss was chosen as the training function. The learning rate was
determined as 0,5. The forecasting results of ANN are demonstrated in The authors declare that they have no known competing financial
Table 8 and compared with actual demand values. Decimal values of interests or personal relationships that could have appeared to influ-
the forecasting results are rounded to the nearest number to be an in- ence the work reported in this paper.
teger. The MAPE percentage between forecasting and actual values is
4,71%. Forecast accuracy with ANN is 95,29%. References

Computational results and analysis [1] A. Aktepe, E. Yanik, S. Ersoz, Demand forecasting application with regression and
artificial intelligence methods in a construction machinery company, J. Intell.
Manuf. 32 (6) (2021) 1587–1604.
Average accuracy rates, MAPE values and deviations of the applied [2] A. Aktepe, S. Ersoz, M. Luy, Welding process optimization with artificial neural
methods are shown in Table 9. As a result of developed models, the network applications, Neural Netw. World 24 (6) (2014) 655.
[3] Alalawin, A., Arabiyat, L.M., Alalaween, W., Qamar, A., Mukattash, A., 2020.
average forecast accuracy rates of the applied regression-based, rule-
Forecasting vehicle's spare parts price and demand. Journal of Quality in
based, tree-based and artificial neural networks methods are 93,44, Maintenance Engineering.
94,36, 93,34 and 95,29%, respectively. [4] A. Alsumaiei, Short-term forecasting of monthly water consumption in hyper-arid
As seen in Table 9, it has been observed that the ANN method pro- climate using recurrent neural networks, J. Eng. Res. 9 (3B) (2021).
[5] K.N. Amirkolaii, A. Baboli, M.K. Shahzad, R. Tonadre, Demand forecasting for ir-
duced more accurate forecasts than all other methods. The demand regular demands in business aircraft spare parts supply chains by using artificial
forecast results carried out by thirteen methods and their comparison intelligence (AI), IFAC-Pap. 50 (1) (2017) 15221–15226.
with the actual values are demonstrated in Table 10. The values written [6] Ates, B., 2020. The forecasting of stress concentration in ship buildings by using
rough mesh structure and machine learning method. M.Sc.thesis, Istanbul Technic
in bold indicate the correct predicted estimates. The average of devia- University, Istanbul Turkey.
tions of the applied regression-based, rule-based, tree-based and artificial [7] Boukhtouta, A., Jentsch, P., 2018. Support vector machine for demand forecasting
neural networks methods are 2,13, 1,88, 2,17 and 1,5 respectively. of canadian armed forces spare parts. In 2018 6th International Symposium on
Computational and Business Intelligence (ISCBI), pp. 59–64, IEEE.
[8] Cetindere, A., 2022. Demand forecasting methods lecture notes, Date accessed: 2.
Conclusion 07.2022.
[9] K.K. Chandriah, R.V. Naraganahalli, RNN/LSTM with modified Adam optimizer in
deep learning approach for automobile spare parts demand forecasting, Multimed.
In a maintenance-repair department, the spare parts to be used Tools Appl. 80 (17) (2021) 26145–26159.
during periodic or breakdown maintenance should be available in the [10] I.F. Chen, C.J. Lu, Demand forecasting for multichannel fashion retailers by in-
required quantity. However, there are thousands of spare parts that the tegrating clustering and machine learning algorithms, Processes 9 (9) (2021) 1578.
[11] B. Choi, J.H. Suh, Forecasting spare parts demand of military aircraft: comparisons
maintenance department must manage. Lack of spare parts leads to
of data mining techniques and managerial features from the case of South Korea,
serious cost and customer dissatisfaction since the vehicles do not Sustainability 12 (15) (2020) 6045.
perform their duties. The excess of the required quantity leads to [12] Menezes M., B A., de Siqueira Braga, D., Hellingrath, B., de Lima Neto, F.B., 2015.
holding costs. This holding cost includes various costs such as storage, An evaluation of forecasting methods for anticipating spare parts demand. In 2015
Latin America Congress on Computational Intelligence (LA-CCI), pp. 1–6, IEEE.
insurance, handling costs. For these reasons, demand forecasting of [13] H. Es, F.Y. Kalender, C. Hamzaçebi, Forecasting the net energy demand of turkey by
spare parts is a critical process for maintenance departments. artificial neural networks, J. Fac. Eng. Archit. Gazi Univ. 29 (3) (2014).

9
M. İfraz, A. Aktepe, S. Ersöz et al. Journal of Engineering Research 11 (2023) 100057

[14] S.F. Faghidian, M. Khashei, M. Khalilzadeh, Improving intermittent demand fore- [30] A. Munir, A. Khattak, K. Imran, A. Ulasyar, A.U. Haq, A. Khan, Artificial neural
casting based on data structure, J. Eng. Res. 9 (1) (2021). network based simplified one day ahead forecasting of solar photovoltaic power
[15] Y. Feng, D. Gong, Q. Zhang, S. Jiang, L. Zhao, N. Cui, Evaluation of temperature- generation, J. Eng. Res. (2021).
based machine learning and empirical models for predicting daily global solar ra- [31] E. Oztemel, Yapay Sinir Ağları (Artificial Neural Networks), 4.Edition, Papatya
diation, Energy Convers. Manag. 198 (2019) 111780. Publishing House, Istanbul, 2016.
[16] A.A. Ghobbar, C.H. Friend, Evaluation of forecasting methods for intermittent parts [32] D.D. Rucker, B.B. McShane, K.J. Preacher, A researcher's guide to regression, dis-
demand in the field of aviation: a predictive model, Comput. Oper. Res. 30 (14) cretization, and median splits of continuous variables, J. Consum. Psychol. 25 (4)
(2003) 2097–2114. (2015) 666–678.
[17] Gokcel, D., 2009. Demand forecast based category and order system application in [33] Sahin, M., 2011. Forecasting aviation spare parts demand. M.Sc.thesis, Fatih
retail sector. M.Sc.thesis, Yıldız Technic University, Istanbul, Turkey. University, Istanbul, Turkey.
[18] C.B. Guimaraes, U. Tortato, J.M. Marques, Demand forecasting for high-turnover [34] Serhatoglu, F., 2019. The importance of inventory management in health institu-
spare parts in agricultural and construction machines: a case study, South Afr. J. tions: sample application in oral and dental health center. M.Sc. thesis, Istanbul Arel
Ind. Eng. 31 (2) (2020) 116–128. University, Istanbul, Turkey.
[19] D. Guleryuz, Predicting health spending in Turkey using the GPR, SVR, and DT [35] A.J. Smola, B. Schölkopf, A tutorial on support vector regression, Stat. Comput. 14
models, Acta Inform. 5 (1) (2021) 155–166. (3) (2004) 199–222.
[20] M. Haarman, M. Mulders, C. Vassiliadis, Predictive maintenance 4.0: predict the [36] SPSS Software , 2017, 〈https://www.ibm.com/tr-tr/products/spss-statistics〉.
unpredictable, PwC Mainnovation 4 (2017). [37] Tanrıverdi, Y. 2010. Supply chain and application on stock management. M.Sc.
[21] Hu, Q., Bai, Y., Zhao, J., Cao, W., 2015. Modeling spare parts demands forecast thesis, Pamukkale University, Denizli, Turkey.
under two-dimensional preventive maintenance policy. Mathematical Problems in [38] V. Vaitkus, G. Zylius, R. Maskeliunas, Electrical spare parts demand forecasting,
Engineering. Elektron. Ir. Elektro 20 (10) (2014) 7–10.
[22] Z. Hua, B. Zhang, A hybrid support vector machines and logistic regression ap- [39] S. Van der Auweraer, R. Boute, Forecasting spare part demand using service
proach for forecasting intermittent demand of spare parts, Appl. Math. Comput. 181 maintenance information, Int. J. Prod. Econ. 213 (2019) 138–149.
(2) (2006) 1035–1048. [40] C.G. Vargas, M.E. Cortés, Automobile spare-parts forecasting: a comparative study
[23] Huang, Y., Wang, H., Xing, G., Sun, D., 2010. A hybrid grey relational analysis and of time series methods, Int. J. Automot. Mech. Eng. 14 (2017) 3898–3912.
support vector machines approach for forecasting consumption of spare parts. In [41] V. Vapnik, The Nature of Statistical Learning Theory, Springer, New York, 1995, p.
2010 International Conference on Artificial Intelligence and Education (ICAIE), pp. 314,1995.
602–605, IEEE. [42] WEKA Software (2021), 〈https://www.cs.waikato.ac.nz/ml/weka/〉.
[24] K. Isik, S.K. Ulusoy, Determining the factors that affect the production time in metal [43] C.K. Williams, D. Barber, Bayesian classification with Gaussian processes, IEEE
industry utilizing data mining methods, J. Fac. Eng. Archit. Gazi Univ. 36 (4) Trans. Pattern Anal. Mach. Intell. 20 (12) (1998) 1342–1351.
(2021) 1949–1962. [44] S. Xu, H.K. Chan, Forecasting medical device demand with online search queries: a
[25] Kalayci, S., 2003. SPSS applied multivariate statistical technniques, Asil publishing big data and machine learning approach, Procedia Manuf. 39 (2019) 32–39.
house, Ankara, pp. 199 – 259. [45] H. Yoon, S. Kim, Naval vessel spare parts demand forecasting using data mining, J.
[26] S.E. Kara, R. Samli, Comparative analysis of machine learning algorithms in WEKA Soc. Korea Ind. Syst. Eng. 40 (4) (2017) 253–259.
for cost estimation of software projects, Eur. J. Sci. Technol. 23 (2021) 415–426. [46] Yuzuk, F., 2019. Multiple regression analysis and neural networks with Turkish
[27] A. Kargul, A. Glaese, S. Kessler, W.A. Gunthner, Heavy equipment demand pre- energy demand forecast. M.Sc.thesis, Sivas Cumhuriyet University, Sivas, Turkey.
diction with support vector machine regression towards a strategic equipment [47] M.K.M. Shapi, N.A. Ramli, L.J. Awalin, Energy consumption prediction by using
management, Int. J. Struct. Civ. Eng. Res. 6 (2) (2017) 137–143. machine learning for smart building: Case study in Malaysia, Developments in the
[28] MATLAB Software, 2021, 〈https://www.mathworks.com/products/matlab.html〉. Built Environment 5 (2021) 100037.
[29] Muller, K.R., Smola, A.J., Rätsch, G., Schölkopf, B., Kohlmorgen, J., Vapnik, V., [48] R. Svoboda, V. Kotik, J. Platos, Short-term natural gas consumption forecasting
1997. Predicting time series with support vector machines. In International con- from long-term data collection, Energy 218 (2021) 119430.
ference on artificial neural networks, pp. 999–1004, Springer, Berlin, Heidelberg.

10

You might also like