2.1. Business Problem Description
The realization of the forecasting system started with building an appropriate problem understanding together with the subject matter experts. Therefore, meetings with them were held in order to learn the most relevant characteristics of the logistic network, the data quality and availability, as well as the specific expectation of a forecasting system designed for the freight forwarders. From a methodological point of view, a time series approach was the most suitable tool since the problem comprises multiple hundreds of monthly time-related data. The system was developed using the programming language R.
The problem concerns the supply chain of an international automotive company with an Area Forwarding Inbound Logistics Network. This network consists of three major participants, (1) the assembly plant which has to be supplied with goods; (2) the suppliers which produce the material required by the plants. The suppliers are classified into groups, most likely regarding their geographical location. Such a group is called area forwarding. (3) Furthermore, the freight forwarder organizes the transportation of materials between the suppliers and the plants. In different areas, different freight forwarders can be hired by the same supplier. The freight forwarder operates a consolidation center within the area, collects goods from the suppliers, and gathers them in their consolidation center. This action is limited to cross-docking, i.e., there is no warehousing in the consolidation center. The pre-leg or first leg is the transportation step from the supplier to the consolidation center. At this point on, the goods from different suppliers in the area forwarding can be consolidated together. The transportation from the consolidation center to the assembly plants is called main leg transport. If the load in the pre-leg exceeds the volume of one vehicle, the materials are transported directly to the plants. This transportation type is called full truckload [
5]. This network structure can be seen in
Figure 1.
Syntetos’ Supply Chain Structure Framework is well known in the literature to help outline the components of a Logistics Supply Chain when it comes to forecasting [
10]. Based on this framework, the company’s Inbound Logistics Network can be described as follows [
1], (1) at the product dimension level the forecast regards all material components aggregated as tons; (2) at the location dimension it concerns all main leg material flows from the inbound material forwarding areas to the assembly plants; (3) at the time dimension forecasts are generated on a monthly basis for the next following 4 months and 12 months; and finally (4) at the echelon dimension the supply chain level corresponds to the material flows connections among the consolidation centers and the assembly plants.
2.2. Time Series Analysis
The project consisted of generating an adaptive and automated forecasting system for more than 400 main-leg material flows. Data were available on a monthly basis since 2014. The material flows display almost all possible demand patterns, i.e., positive and negative trends, seasonality, and irregular demand except for intermittent demand. Additionally, most of the time series contain outliers or missing values.
It is important to point out that a high correlation between the monthly production planning units and the monthly delivered material to the plants can be observed in the data. Another noticeable fact is that the monthly production planning forecasts are available up to 24 months into the future for every plant, giving an idea about how many vehicles are expected to be produced and how much material is expected to be delivered. Therefore, in order to make use of these data, rather than forecasting the monthly material volumes directly, a forecast of the ratio of material volume, and the production units (tons/vehicle units) is carried out:
This new time series is then referred to as
time series (
1). This is a smoother time series that is able to correct for outliers or extreme events in the material volumes. Finally, the business forecast in material tons is then given by the vehicle’s production forecast multiplied by the
time series forecast. It is important to consider that since the vehicle’s production forecast is itself uncertain, its error is further propagated through the material volume forecast. This issue is addressed in version 3.0 of the forecasting system [
11].
Regarding the error measures, the Mean Squared Error (MSE) was used to choose the best forecasting method in the model selection framework for a given material flow time series [
4]. On the other hand, the Symmetric Mean Absolute Percentage Error (SMAPE) was used to evaluate the forecasts from the business perspective. Additionally, the SMAPE is a better estimator of the error than the MAPE when the true value of the forecast is close or equals zero since those tend to generate extremely large errors or infinite values [
12]. Time series, with zero transported material volume, are common in this logistics network, and during the coronavirus crisis, it was even more likely to appear. When evaluating forecast accuracy, it is better to have different forecast error measures which can be then compared [
4,
13]. Therefore, the MSE was used to select the best-performing model; however, the interpretation from the business perspective and, therefore, the impact of the models will be analyzed using the SMAPE.
2.3. Model Selection Framework
According to the Logility Consulting Group [
2], for many supply chain scenarios, it is best to employ a variety of methods to achieve optimal forecasts. Ideally, supply chain planners should take advantage of different methods and build them into the foundation of the forecast. The best practice is to use automated methods which switch to accommodate the selection and deployment of the most appropriate forecast method for optimal results. Henceforth, due to the nature of the problem, multiple models are evaluated and then the best-performing model on each material flow connection is selected to generate the monthly forecasts. To be precise, the Forward Chaining Nested Cross Validation with origin recalibration [
4,
14,
15,
16,
17] method was implemented to carry out the model training and testing so that the best model can be chosen to generate the monthly forecasts. This method, explained in
Figure 2, is able to replicate the data generation process so that the forecasting system learns in every iteration to select the best-performing forecasting algorithm; in consequence, it can dynamically adapt to short-term changes.
A Nested Cross Validation approach provides an almost unbiased estimate of the true error of a model [
17]. This refers to having two for loops in the train–test process; the inner for loop finds the best parameters estimates in the training set, then the outer for loop validates the true accuracy of the model using a rolling test window. Specifically, every time series, of n values, is split up into two sections, the training set and test set. Then, every model is fit using the training set and the best parameters are selected (inner for loop), then the model uses the best parameters to generate a forecast for the test window, and the MSE is calculated. Afterward, the training dataset increases by 1 value, and the test window is also moved 1 position into the future and the process is carried out repeatedly until no more test windows can be generated; this is called the literature forecast origin recalibration [
16].
Due to the time dependency between the out-of-sample error measures of the cross-validation tests, a simple average of the resulting errors generates a biased indicator for choosing the best-performing model. Therefore, an exponential weighting approach can be applied to circumvent this problem [
14]. The Exponentially Weighted Moving Average (EWMA) is a weighted average of all current and previous forecast errors, whose weights decrease geometrically with the “age” of the forecast error [
4]. Therefore, the lowest resulting EWMA MSE is then used to select the best-performing model.
The resulting performance metrics are then stored in a database so that every month only the newest performance metrics for every material flow time series are added. This method enables the reduction in computing time and the forecast output for all the time series can be calculated in less than 30 min using a computer with 32 GB RAM and an Intel Core i7 Processor.
2.4. Forecasting System Version 1.0: First System Implementation
To create a forecasting system for monthly inbound material flows, first of all, meetings with the subject matter experts were held. From which the most relevant results were (1) the definition of the target variable, the monthly freight volume in tons; (2) the scope of the inbound logistics network, main legs; and (3) the forecast horizons, 4 months for mid-term and 12 months for long-term scenarios.
The subject matter experts pointed out the importance of including the production volume forecast as a feature in the forecasting process. For this, the
time series transformation was implemented (see Equation (
1)). This accounts for modeling the relationship between the monthly material flows in tons and the vehicles produced by each assembly plant and also the adjustment of extreme values in the times series. This is important since when outliers and missing values are incorrectly handled, they can certainly reduce the forecast accuracy [
8,
18].
Version 1.0 of the forecasting system was developed using the programming language R. The system focused on forecasting more than 400 main leg material flows within Europe. Furthermore, the model selection framework explained in
Section 2 was also set up. This initial framework included the forecasting methods of Naive, ARIMA, Neural Network, Exponential Smoothing, and Ensemble Forecast. The last one refers to the average of the forecasts delivered by the other methods [
19].
2.5. Forecasting System Version 2.0: New Forecasting Methods
Version 2.0 of the forecasting system implemented three additional forecasting methods to improve the forecast accuracy, namely Prophet Algorithm, Automated Simple Moving Average, and Multivariate Timeseries Method: Vector Autoregression.
The Prophet Algorithm from Facebook displays two main features, (1) parameters can easily accommodate seasonality with multiple periods and let the analyst make different assumptions about trends, (2) as opposed to ARIMA models, the measurements do not need to be regularly spaced, and missing values do not need to be interpolated, e.g., from removing outliers [
6].
On the other hand, there are also important features that are left out when only using univariate methods. For this, Multivariate Methods are able to consider lag–cross correlations among different time series [
7]. This cross-correlation feature, along with the historical data, considers the influence of past values of a time series A on the future value of a time series B and vice versa. Since there are multiple suppliers delivering to the same plants, the material quantity delivered from one supplier is highly correlated with the material delivered by other suppliers. This means a relevant cross-correlation between these material flows connections exist and can be exploited by this method.
Furthermore, a simple but useful method still not considered is the Simple Moving Average. The Simple Moving Average is the best model for products whose demand histories have random variations, including no seasonality or trend, or fairly flat demand [
2]. However, finding the optimal parameters can be time-consuming. Therefore, using the R package smooth can help automate this process.
Additionally, the Ensemble Forecast method, which considers the simple linear combination (simple average) of the forecast values from the other methods, can be also extended, i.e., the Prophet Algorithm, Simple Moving Average, and Multivariate Time Series can also be included in the linear combination so that the likelihood of better forecasts accuracy increases [
20].
One additional issue was the elimination of some past values due to a database update to the main Enterprise Resource System (ERP) Database. This leads to incomplete time series. Enabling a linear interpolation algorithm to find the missing values instead of using the mean of the observations can also improve forecasting accuracy. Linear interpolation is easy to implement [
18], this enables us to find missing values for the time series in short computing run time. This method is efficient and most of the time is better than non-linear interpolations for predicting missing values [
9].
Furthermore, an automated outlier detection and cleaning method was added. A common approach to deal with outliers in a time series is to identify the locations and the types of outliers and then use intervention models [
21]. There are some main important issues caused by outliers, i.e., (a) the presence of outliers might result in an inappropriate model, (b) even if the model is appropriately specified, outliers in a time series might still produce bias in parameter estimates and, therefore, might affect the efficiency of outlier detection. A typical problem found in this approach is that both the types and locations of outliers may change at different iterations of model estimation, and (c) some outliers may not be identified due to a masking effect. For problems (b) and (c), Chen and Liu [
8] designed a procedure that is less prone to the spurious and masking effects during outlier detection and is able to jointly estimate the model parameters and outlier effects. The approach is to classify an outlier impact into four types, an innovational outlier (IO), an additive outlier (AO), a level shift (LS), and a temporary change (TC). This method can be easily implemented using the R package tsoutliers. The process starts with setting SARIMA models to the time series, then the automated outlier detection method is applied to these ARIMA models, which delivers the outliers and their corresponding adjusted value. These adjusted values are then used instead of the outliers and a newly adjusted time series is generated, which can be later used for model training.
2.6. Forecasting System Version 3.0: Production Accuracy Improvement
Version 3.0 of the forecasting system focused on reducing the impact of the coronavirus crisis and the chip crisis by means of handling the increased volatility of both the material flows and the production planning so that reliable forecast values can still be delivered.
According to (Gultekin et. al, 2022), one of the most important freight forwarders’ risk areas, caused by the COVID-19 pandemic, was demand fluctuation. The pandemic increased the volatility in supply chain demand planning, making it even harder to generate accurate forecasts [
22]. In total, 68% of the respondents on a 1000-company survey made by Capgemini 2020 stated that they experienced difficulties in demand planning due to a lack of data on fluctuating demand [
23]. Furthermore, the current chip crisis is also one of the most relevant disruptive factors in the automotive supply chain. Opposed to forecasts, vehicle sales quickly rebounded within just a few months after the pandemic. Henceforth, imperfect inventory planning caused chip shortages and unprecedented halted production cycles [
24].
Due to the heavy increase in the demand planning variability [
23] post-COVID-19 outbreak, the production forecast has become less reliable. As explained in
Section 2, when calculating the material volume forecast, the approach is to multiply the production demand planning by the
time-series forecast. This leads, however, to error propagation since the production demand planning is itself a forecast. Therefore, in order to reduce this effect in the monthly material forecasting system, an additional data preprocessing approach was implemented.
This approach is called Production Planning Error Deviation Adjustment and helps to reduce the error propagation [
11,
25,
26]. Since the production planning forecast is updated on a monthly basis, a database of monthly historical production plans was created. In other words, not only the actual number of vehicles to be produced are available but also the planning values in the previous months. The database consists of the monthly production plans since February 2019.
The approach is quite straightforward. The idea is to track the deviation of an actual production quantity from the forecast values in the past. For example, a plant produced 1000 in December 2020. If the planning value for this particular month is traced back to the previous months, then in some months the planning value would be over 1000 and in others under 1000, due to the variability in demand planning, as well as other internal and external factors. In consequence, using historical data, the relative error deviation to the actual produced cars can be calculated. The month distance from the production planning month to the actual production month will be called lag or planning horizon. Henceforth, let the Relative Planning Error Deviation for a lag
l be
where
= Relative Planning Error for lag
l,
corresponds to the planning vehicles for lag
l, and
to the actual produced vehicles.
This metric can be interpreted as follows. A value greater than 1 indicates that the planning demand was higher than the actual demand, therefore it was a planning overestimation. The opposite is a lower planning value than the actual demand, which is considered a planning underestimation.
Thence, to track the most recent changes in production planning the
is calculated for every actual month available for the planning horizons 1 to 12 for every plant. To that end, the mean
for lag
l for every plant can be computed as
where
is the number of
values which could be calculated for the lag
l with the available planning data. If the
for a given plant for
is 1.09, it means that historically the production planning overestimates on average about 9% the number of vehicles to be produced. Henceforth, the planning value can be adjusted by this amount.
Using the properties of the expected value of
, assuming that the realizations of these errors are independent and identically distributed, an adjusted value of the vehicle’s demand planning
can be computed. Since the actual number of produced vehicles in a month
v is a constant and the expected value of
is estimated with the most recent planning value, then the actual number of produced vehicles can be estimated as:
This formula enables us to estimate the true value of v, which the resulting demand planning values are now used to calculate the future monthly volume forecasts.
Figure 3 shows the Relative Mean Error Deviation (Production Forecast/Production Actual) for 4 plants. As expected, the further the forecasting horizon, the lower the quality of the forecasting values. Therefore, using the proposed method helps adjust the production planning data quality, and the forecast error propagation in the forecasting system is reduced therewith.
This was added as a data preprocessing step in the Forecasting System, enabling the future production demand planning values to be adjusted up to 12 months in the future.