# Improving a Manufacturing Process using Recursive Artificial Intelligence

Jose Antonio Marmolejo-Saucedo, Roman Rodriguez-Aguilar, Uriel Perea, Manuel Garrido Vaqueiro, Regina Robredo Hernandez, Fernando Sanchez Ramirez, Ana Paula Martinez

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Jose Antonio Marmolejo-Saucedo, Roman Rodriguez-Aguilar, Uriel Perea, Manuel Garrido Vaqueiro, Regina Robredo Hernandez, et al.. Improving a Manufacturing Process using Recursive Artificial Intelligence. IFIP International Conference on Advances in Production Management Systems (APMS), Sep 2021, Nantes, France. pp.266-275, 10.1007/978-3-030-85910-7_28. hal-03806538

HAL Id: hal-03806538

https://inria.hal.science/hal-03806538

Submitted on 7 Oct 2022

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Improving a manufacturing process using recursive artificial intelligence*

Jose Antonio Marmolejo-Saucedo<fnref n="1" />[0000-0002-8539-9828], Roman

Rodriguez-Aguilar<fnref n="2" />[0000-0002-6496-4453], Uriel Abel Romero

Perea<fnref n="1" />[0000-0002-7779-2240], Manuel Garrido Vaqueiro<fnref n="1" />[0000-0002-3861-4329],

Regina Robredo Hernandez<fnref n="1" />[0000-0002-7339-8019], Fernando Sanchez

Ramirez<fnref n="1" />[0000-0002-7654-398X], and Ana Paula Martinez<fnref n="1" />

**Abstract.** This work explores the improvements that can be made in the process of parametrization of discrete-event simulation models. A manufacturing process is modeled through queuing systems and alternative decisions to perform production, transport, and merchandise handling tasks. The use of recursive artificial intelligence is suggested to improve the quality of the parameters used in the simulation model. Specifically, a vector support machine is used for statistical learning. A relevant characteristic of the proposed model is the integration of different information technology platforms so that the simulation can be recursive.

**Keywords:** Discrete Event Simulation · Digital Twins · Support Vector Machines.

## 1 Introduction

Typically, manufacturing processes have been the target of multiple strategies for optimization. From the classic techniques of process improvement, through the optimization and simulation techniques among others. In recent years, artificial intelligence has taken off and is one of the most used techniques to improve repetitive processes such as a manufacturing process. Some examples range from logistics and other areas such as health services.

In these cases, Emergency Medical Services faces significant challenges due to the complex nature of pre-hospital events, coordinating several resources according to the collected information in a short time. In this context, both agent-based and discrete event simulation seem to be excellent approaches to find

<footnote n="1">¹ Universidad Panamericana. Facultad de Ingenieria. Augusto Rodin 498, Ciudad de Mexico, 03920, Mexico.
jmarmolejo@up.edu.mx</footnote>

<footnote n="2">² Universidad Panamericana. Facultad de Ciencias Economicas y Empresariales. Augusto Rodin 498, Ciudad de Mexico, 03920, Mexico.
rrodrigueza@up.edu.mx</footnote>

<footnote>* Supported by Universidad Panamericana</footnote>
new strategies for facing this complexity. Our general process benefits from an
intensive exchange with a multi- disciplinary group of experts from medicine,
including practitioners, paramedics, coordination center managers, and stake-
holders, among others. Furthermore, we validated our simulation model using
real-world data from an emergency coordination center from North Germany.

The accelerated evolution of Information and Communication Technologies
has allowed the use of mobile communication devices has increased in the last
two decades. Becoming a luxury to a need, allowing the diversification of its costs
to access people of any kind social, opening unlimited communication channels
(voice, video, and data), constant access to various social networks, joining the
daily life of the vast majority of people in the world, moving from a specific
operating team to one that can be used as a camera, for the management of
bank accounts, such as GPS, personal agenda, email, e-book reader, music and
video player, videogames, texting, etc.

## 2 Literature Review

According to Monostori's research, [5] since the beginning of the Century, re-
searchers began asking what would it be the application of artificial intelligence
(AI) and machine learning (ML) in the future, which benefits they could bring
combining AI, ML and simulation into manufacturing? The answer was divided
into three main fields: production processes and process chains, flexible manufac-
turing systems (FMS's) and holonic manufacturing systems (HMS). To achieve
this EU implemented a project name "Zero defect manufacturing of composite
parts in the aerospace industry" which consists in the combination of informa-
tion acquired from a fibre orientation sensor and data taken from a laser profile
scanner, in order to make a simulation that serves to optimize the movement
of the production and the inspections only do it make quality inspections at
key points so that operating costs are saved and quality is equal or higher. [8]
Moving forward, at the beginning of 2021 we found out that more than 20 years
later, AI and ML haven't placed themselves as a standard in manufacturing,
even more, making emphasis on the car manufacturing, one of the most impor-
tant sectors worldwide, this is not a reality, new laws and regulations, customers
demanding self-driving cars and the global SARS-CoV-2 (COVID-19) pandemic
led into high investments and the ROI has not waged it, as Fiat Group World
posted on their website, as is shown in [13], vehicle sales fell a 43% in April.
Despite that, Demlehner [3] found key areas in which AI may be implemented,
contrasting realizability and business value, as is shown in Figure 1.

## 3 Application of machine learning methods for the estimation of strategic variables

The parameter prediction problem is a central issue in the design and analysis of
production systems. By integrating simulation methods and artificial intelligence
<figure><img src="image_4.png" /><figcaption>Fig. 1. Realizability vs business value of AI application in car manufacturing. See [3]</figcaption></figure>

in the process analysis, the need arises to feed the models in a first stage with historical data, later to integrate information from the real operation, and in a prospective analysis to make projections on key indicators of the operation of the system. In a production system, demand is a fundamental variable for production planning, financial prospects as well as company management. There are various methods commonly used to make demand projections, depending on the particular objective of the projections. [2], [7], [9], [12]

The integration of simulation methods with machine learning methodologies allows the construction of innovative and comprehensive strategies that allow improving the estimates made in the operation of companies. In the case of demand as a key variable, the classic methods for estimating demand, such as exponential smoothing methods or time series analysis, have shown some limitations in reference to the need for sufficient historical information, forecasting
<figure><img src="image_5.png" /><figcaption>Fig. 2. Discrete Event Simulation Model</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 3. ROC for SVM model (Area under ROC curve 0.71450)</figcaption></figure>

capacity, as well as problems. with the treatment of non-linear behavior pre-
sented in the variables. One of the drawbacks in estimating demand forecasts
using traditional methods is the non-linear treatment since the margin of error in
the predictions increases in those variables that present non-linear behaviors. In
practice, the assumption of linearity in many cases is far from reality. Therefore,
this work proposes the use of the support vector machine (SVM) method that
allows considering the non-linear treatment in the variables as well as using a
smaller amount of data as inputs for the estimates. It is proposed to integrate
into the simulation model of the system the interaction with a machine learning
model that allows integrating the prediction of demand in different horizons as
a key input for the simulation.

**3.1 Support vector machines for non-linear treatment**

The Support Vector Machines (SVM) method consists of finding the separation
hyperplane with the greatest margin of separation between the classes. That is
the linear discriminant function:
$$g(x) = w^T x + b \qquad (1)$$

With the widest margin to ensure a robust generalization resistant to outliers. The vectors formed by the points closest to the hyperplane are called support vectors. Generally, SVM is used to solve classification problems, however since the objective is to build a separation hyperplane that is determined by a set of variables, it is also possible to use the methodology to perform prediction. Among all the possible separation hyperplanes, finding the one with the widest margin becomes an optimization problem. Sometimes the data are separable but noisy. This can generate a poor solution for the maximal margin classifier so is possible use a soft margin by adding a regularization parameter C (cost parameter). [4]

$$MaxM[\beta_0, \beta_1, ..., \beta_p] \qquad (2)$$

Subject to

$$\sum_{j=1}^{p} \beta_{j}^{2}=1 \qquad (3)$$

$$y_i (\beta_0 + \beta_1 x_{i1} + ... + \beta_p x_{ip}) \geq M (1 - \varepsilon_i) \qquad (4)$$

$$\varepsilon_i \geq 0, \sum_{i=1}^{n} \varepsilon_i \leq C \qquad (5)$$

The cost parameter is also established, which refers to the acceptable number of erroneously classified observations and the smaller the number of support vectors increases, making it more precise. In the case in which the separation hyperplane with the highest margin cannot be found with the linear discriminant function, we would seek to smooth the separation and expand the space of functions with non-linear curves through Kernel functions with the projection of the information to a larger-dimensional feature space to find the optimal spacing hyperplane in the original dimension. The most used types of kernel functions are linear, polynomial, radial, exponential, and perceptron multilayer. The process of integrating kernel functions through transformations to the variables used allows projecting the data to a p-dimensional space to a M > p. This allows SVM to fit in the enlarged space, this implies being able to generate non-linear borders in the original space. The SVM in the enlarged space solves the problem in the lower dimensional space. Using the concept of inner product between vectors, it is possible to express the SVM alternatively as the sum of inner products of the observations with new data. For a new observation x, the SVM with kernel functions would be: [4]

$$f(x) = \beta_0 + \sum_{i \in S} \hat{\alpha}_i \langle x, x_i \rangle \qquad (6)$$
This last specification of SVM allows the use of the method for prediction, thus being the variable to predict the new observation and the explanatory variables used as part of the support vectors. In the same way, this allows the generated prediction or the adjustment made for the prediction to consider the non-linear behavior of the variable to be predicted.

## 3.2 Demand prediction using an SVM

SVMs were originally conceptualized to solve non-linear classification problems [2] [1]. But in recent years they have been applied to regression problems [11] [7] as well as time series prediction. [6] [10] In this work demand data are used for a company of agricultural products, the tons demanded per year are considered and a period from 1990-2020 is analyzed (Fig. 4).

<figure><img src="image_7.png" /><figcaption>Fig. 4. Historical demand (thousands of tons)</figcaption></figure>

Based on these historical data, we want to build the forecast for the next five years using a comparison of different kernel functions for SVM and using an ARIMA model as a reference methodology. The estimation of the SVM models was carried out by cross-validation in order to optimize the hyperparameters of the model: a) kernel function, b) Cost function, c) Gamma and d) Epsilon. In the case of the ARIMA model, the AIC was considered as a model selection criterion and an ARIMA model (0, 1, 1) was estimated. The selection criterion between the different forecasting models is the square root of the mean square of the error (RMSE). Table 1 shows the results of the contrasted models.

<table><caption>Table 1. Model of statistical learning proposed</caption><thead><tr><td>Model</td><td>Specification/Kernel</td><td>RSME</td></tr></thead><tbody><tr><td>ARIMA</td><td>(0,1,1)</td><td>1, 748</td></tr><tr><td>SVM1</td><td>Radial</td><td>1, 031</td></tr><tr><td>SVM2</td><td>Linear</td><td>1,678</td></tr><tr><td>SVM3</td><td>Polynomial</td><td>3, 396</td></tr></tbody></table>
According to the performance of the forecast of the compared models, it can be observed that the non-linear behavior of the series is better captured through the SVM with radial kernel function, this allows generating a lower RMSE, the second-best model it is the SVM with kernel and linear and in third place the ARIMA model (Fig. 5).

<figure><img src="image_8.png" /><figcaption>Fig. 5. Comparison of the forecast between the different models</figcaption></figure>

It is observed that the fit of the SVM model with radial kernel is the closest to the real behavior of the series. However, it should be noted that it is a semi-parametric method, so it is not possible to estimate confidence inverts in the estimates as in the case of the ARIMA models, in the same way, the forecast horizon is short-term. Based on the selected model, forecasts with a 3-year horizon were estimated, which will be updated according to the frequency of the information (Fig. 6). The proposed model will be one more component of the simulation model, through an interface the simulation data will be updated as well as the forecasts in real-time and at the desired frequency when required.

The integration of machine learning methodologies, especially SVM, have shown great adaptability to real data that present non-linear behavior, likewise the performance of the model as part of a simulation model allows the integration of better quality parameters and constitute an artificial intelligence module, that can interact directly with the simulation model, providing feedback for decision-making in real time as well as the evaluation of feasible scenarios in the medium and short term.

## 4 Results

The process of elaboration of our product, being this furniture's elaborated with wood, consists of two phases; The first being the manufacturing process of the
<figure><img src="image_9.png" /><figcaption>Fig. 6. Forecast SVM (Kernel radial) vs ARIMA (0, 1, 1)</figcaption></figure>

<table><caption>**Table 2.** Support Vector Machine</caption><thead><tr><td>Parameter</td><td>Value</td></tr></thead><tbody><tr><td>Kernel</td><td>Kernel</td></tr><tr><td>Optimal Cost</td><td>0.01</td></tr><tr><td>Gamma-Value</td><td>0.005319149</td></tr><tr><td>Number of Support Vectors</td><td>4086</td></tr><tr><td>Mean square error</td><td>0.2172682</td></tr></tbody></table>

pieces that will later make up an ornamental article, the second process is the one in which the initial inspection of the manufactured pieces is carried out, to later put them together and make a final product.

In the first phase of the process, the raw material is required, which is collected and transported by means of a forklift vehicle to a lathe, which is the set of machines and tools that allow machining, threading, cutting, drilling, turning, roughing and grooving the pieces in a geometric way by means of their revolution. Once the pieces leave the lathe, they go through the first inspection stage, in which it is verified that the pieces have been made correctly and that they have the size and quality required to continue with the following processes.

Once the piece goes through this inspection process and it has been verified that it is in optimal conditions, it is transferred to the table drill, where the piece is drilled with the help of HSS Drills. At the same time that this happens, in the same table drill, the part goes through a removal process using brushes and sanding discs. Once again, after this process, the part is inspected and if it is in good condition, it goes to the next stage of the process.

If the piece requires a bending process, which refers to the process in which an electric motor is used to power a flywheel, which, adjusted to a clutch, moves the crank that drives the piston up and down, this they exert force on the cylinder with air pressure and thus, the part bends, the procedure is carried out and after this process, it is inspected again to know its state. However, if the part does not require this process, it goes directly to the next stage.

When the piece passes the inspection, it is transferred through a conveyor (conveyor belts), to the second phase of the process, the final inspection of the
<figure><img src="image_10.png" /><figcaption>Fig. 7. Plant Layout</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 8. Manufacturing process flow chart</figcaption></figure>

pieces. In this part, the pieces are valued and inspected to determine if they are
in an optimal state to be used as parts of a final piece (furniture).

If the pieces are approved in each of the previous processes, they are used
for the assembly of the furniture. In the event that any of the aforementioned
inspections do not pass, the pieces are returned to the beginning of the process
and reworked.

Once the furniture has been assembled with the pieces made in the initial
processes, it goes to the last inspection stage, in which it is verified that it is in
the optimal conditions to be used and that it passes all the quality principles.

Finally, the final piece is transferred to a winery, where the batches will be
created that will later be marketed.

The results show how product demand can be predicted using a recursive
process based on SVM. In this work, an interface was developed to connect
the SVM process encoded in Python and the discrete event simulation process
in specialized software. This proposal corroborates how it is possible to nest
machine learning processes in the simulation and optimization of events.

References

1. Belousov, A., Verzakov, S., Von Frese, J.: A flexible classification approach with optimal generalisation performance: support vector machines. Chemometrics and intelligent laboratory systems **64**(1), 15–25 (2002)

2. Burges, C.J.: A tutorial on support vector machines for pattern recognition. Data mining and knowledge discovery **2**(2), 121–167 (1998)

3. Demlehner, Q., Schoemer, D., Laumer, S.: How can artificial intelligence en-
hance car manufacturing? a delphi study-based identification and assessment
of general use cases. International Journal of Information Management **58**,
102317 (2021). https://doi.org/https://doi.org/10.1016/j.ijinfomgt.2021.102317,
https://www.sciencedirect.com/science/article/pii/S0268401221000104

4. Hastie, T., Tibshirani, R., Friedman, J.: The elements of statistical learning: data mining, inference, and prediction. Springer Science & Business Media (2009)

5. Monostori, L., Kádár, B., Viharos, Z., Mezgár, I., Stefán, P.: Ai and ml techniques combined with simulation for designing and controlling manufacturing processes and systems. IFAC Proceedings Volumes **33**(20), 181–186 (2000). https://doi.org/https://doi.org/10.1016/S1474-6670(17)38046-1, https://www.sciencedirect.com/science/article/pii/S1474667017380461, iFAC Symposium on Manufacturing Modelling, Management and Control (MIM 2000), Rio, Greece, 12-14 July 2000

6. Mukherjee, S., Osuna, E., Girosi, F.: Nonlinear prediction of chaotic time series using support vector machines. In: Neural Networks for Signal Processing VII. Proceedings of the 1997 IEEE Signal Processing Society Workshop. pp. 511–520. IEEE (1997)

7. Smola, A.J., Schölkopf, B.: A tutorial on support vector regression. Statistics and computing **14**(3), 199–222 (2004)

8. Steringer, R., Zörrer, H., Zambal, S., Eitzinger, C.: Using discrete event simulation in multiple system life cycles to support zero-defect composite manufacturing in aerospace industry. IFAC-PapersOnLine **52**(13), 1467–1472 (2019). https://doi.org/https://doi.org/10.1016/j.ifacol.2019.11.406, https://www.sciencedirect.com/science/article/pii/S2405896319313874, 9th IFAC Conference on Manufacturing Modelling, Management and Control MIM 2019

9. Tay, F.E., Cao, L.: Application of support vector machines in financial time series forecasting. omega **29**(4), 309–317 (2001)

10. Thissen, U., Van Brakel, R., De Weijer, A., Melssen, W., Buydens, L.: Using support vector machines for time series prediction. Chemometrics and intelligent laboratory systems **69**(1-2), 35-49 (2003)

11. Vapnik, V., Golowich, S.E., Smola, A., et al.: Support vector method for function approximation, regression estimation, and signal processing. Advances in neural information processing systems pp. 281–287 (1997)

12. Velásquez, J.D., Olaya, Y., Franco, C.J.: Time series prediction using support vector machines. Ingeniare **18**(1), 64–75 (2010)

13. Vieira, J.F.M.: Global vehicle sales fell 43% in april (2020), https://fiatgroupworld.com/2020/06/03/global-vehicle-sales-fell-43-in-april/