An Economic Order Quantity Stochastic Dynamic Optimization Model in a Logistic 4.0 Environment

: This paper proposes a stock dynamic sizing optimization under the Logistic 4.0 environment. The safety stock is conceived to ﬁll up the demand variability, providing continuous stock availability. Logistic 4.0 and the smart factory topics are considered. It focuses on vertical integration to implement ﬂexible and reconﬁgurable smart production systems using the information system integration in order to optimize material ﬂow in a 4.0 full-service approach. The proposed methodology aims to reduce the occurring stock-out events through a link among the wear-out items rate and the downstream logistic demand. The failure rate items trend is obtained through life-cycle state detection by a curve ﬁtting technique. Therefore, the optimal safety stock size is calculated and then validated by an auto-tuning iterative modiﬁed algorithm. In this study, the reorder time has been optimized. The case study refers to the material management of a very high-speed train.


Introduction
This study proposes a new inventory management method that can ensure companies the right service level, despite the possible complex operating conditions. In literature, many inventory management models, such as economic order quantity or probabilistic models, are present. Courtois et al. [1] showed how safety stock can be reduced with a simple forecasting model. The model often simplifies the hypothesis in order to develop a mathematical model for case studies. The full-service techniques proposed were highlighted, analyzing the gaps in the literature and the problems present in the companies. The results in literature show low innovation about stock management in the full-service environment. Deterministic and stochastic models support the studied approaches. The ultimate purpose is to define a demand forecast based on statistical modeling that mainly involves historical series elaboration and synthesis. Demand uncertainty is the risk factor that is supposed to have the most significant impact on supply chain performance [2]. This consideration is one of the major problems of companies; in fact, they are not able to figure out historical data because they are affected by extreme variability. It is necessary to follow operative steps to model out reality and draw from its physical characteristics by hypotheses and constraints. Therefore, it will be necessary to make assumptions that simplify the phenomenon structure to make it mathematically treatable. It develops a model to evaluate the stock demand analytically. The wear-out rate evaluation is a fundamental parameter to determine the stock as a function of items life-cycle analytically. The Economic Order Quantity (EOQ) model of inventory management is used to mark the optimum size of delivery and to choose the cheapest deliverer [3]. The warehouse is so informed in real-time about the useful life item status. In order to avoid stock-out cases, it is necessary to size the safety stock and fill up the demand variability. Traditional data warehouse systems have static structures of their schemas and demand variability. Traditional data warehouse systems have static structures of their schemas and relationships between data and therefore are not able to support any dynamics in their structure and content [4]. The safety stock is sized analytically by the proposed methodology, and the reorder point allows for the stock warehouse to not reach zero values. The solution of the problem is proposed thanks to a Logistics 4.0 approach, which can increase the material flow efficiency. The main aim of this paper is to optimize the safety stock level in a railway context. This study begins by analyzing the critical in the warehouse company, and an innovative stock sizing model is proposed in order to avoid the overstock risk. The remainder of this paper is organized as follows. The second section reviews the most relevant studies from the literature. Demand forecasting models are defined in the second section. The model formulation and the solution approach are presented in Section 3. Section 4 presents the results of a numerical study, and Section 5 draws a final results sensitivity analysis from the simulations conducted. Finally, the paper concludes with suggestions and future research directions.

Literature Review
Maintenance is closely related to the concepts of continuity of any service system, not only of an industrial nature. This section will investigate the activities and the specific tasks of maintenance in a different kind of work-flow.

Faults and Analysis
Failure consists of the aptitude cessation of an entity to perform the requested function according to the UNI 9910 norm. Any component, device, plant, or system is subject to various types of stress during operation that causes deterioration and reduces its stress resistance. Faults can be divided according to the component type involved by failure or to the frequency. If sophisticated devices or system failure behavior are analyzed, it has been observed that, during the operating life, nonsystematic faults occur. The time interval in which the system or components fall is called the useful life. The components of progressive aging are the leading cause of wear-out in the form of the natural chemical-physical degradation process of materials. In literature, probabilistic models find success in fault detection analysis for the robust system [5]. Fault Tree Analysis suggests that each system can be divided into subsystems, more comfortable to track [6]. Figure 1 shows failure development. In particular, any wear parameter trend during an item's useful life is shown. In this, the correct step in fault detection is focused. The challenge is to associate the fault value with the life-status step. However, through capable techniques of evaluating the machines and plants' health in operating conditions, i.e., machine monitoring, it is possible to predict the possible need for a maintenance intervention, thus making possible a predictive maintenance strategy.

Maintenance Strategy
The ideal condition for any maintenance technician is to program plant shutdowns to replace the component just a moment before its useful end-term life. The maintenance engineering will have The challenge is to associate the fault value with the life-status step. However, through capable techniques of evaluating the machines and plants' health in operating conditions, i.e., machine monitoring, it is possible to predict the possible need for a maintenance intervention, thus making possible a predictive maintenance strategy.

Maintenance Strategy
The ideal condition for any maintenance technician is to program plant shutdowns to replace the component just a moment before its useful end-term life. The maintenance engineering will have to identify the right trade-off between a planned strategy and a breakdown one. The oldest Sustainability 2020, 12, 4075 3 of 25 maintenance policy is replacing the items when the faults occur [7,8]. Recently, predictive and productive maintenance approaches have been developed which, through greater integration of the service in the company reality, promote a process whose tendency is to reduce maintenance workers, through greater integration of the service in the company reality in favor of more considerable training in the repair for production operators. Previously, maintenance was designed just to reduce costs, without considering other factors influencing reliability. Nowadays, systems are increasingly complex, and the difficulty of collecting accurate data is growing. The difficulties of obtaining complete data are well known to the industry due to resource limitations, non-systematic data management, human errors, and economic constraints [9]. Reference modeled a Bayesian network (BN) to identify the most critical causes of failure, so that an analytical trend has been developed [10]. The failure curve presents an instantaneous rate of decreasing failure with speed proportional to the machine capacity to come into operation. Once a stable operating phase is reached, it generally continues for an extended period, in which faults appear mainly due to damage and to regular use of the components (physiological faults). The pivot represents the useful life, and the machine operates at the nominal capacity. Therefore, because of the components' aging, it is not possible to restore the nominal functions, and the failure rate increases until the component breaks. In [11], a guarantee policy was proposed for repairable products with bathtub breakage rate by analytical models. The time of machine unavailability will depend on the maintenance service capacity, rather than on bureaucratic slowdowns or the lack of spare parts in stock. The maintenance service is closely related to the concepts of continuous flow in an industrial plant. Therefore, it is essential to understand the activities that have the task of maintaining the system functionality over time. Maintenance operations are planned based on actual operating conditions, measuring the state of degradation. In this regard, if they report the time on the abscissa and the residual parameter value on the ordinate (or the degradation value that the component undergoes), it can have a qualitative diagram, shown in Figure 2. to identify the right trade-off between a planned strategy and a breakdown one. The oldest maintenance policy is replacing the items when the faults occur [7,8]. Recently, predictive and productive maintenance approaches have been developed which, through greater integration of the service in the company reality, promote a process whose tendency is to reduce maintenance workers, through greater integration of the service in the company reality in favor of more considerable training in the repair for production operators. Previously, maintenance was designed just to reduce costs, without considering other factors influencing reliability. Nowadays, systems are increasingly complex, and the difficulty of collecting accurate data is growing. The difficulties of obtaining complete data are well known to the industry due to resource limitations, non-systematic data management, human errors, and economic constraints [9]. Reference modeled a Bayesian network (BN) to identify the most critical causes of failure, so that an analytical trend has been developed [10]. The failure curve presents an instantaneous rate of decreasing failure with speed proportional to the machine capacity to come into operation. Once a stable operating phase is reached, it generally continues for an extended period, in which faults appear mainly due to damage and to regular use of the components (physiological faults). The pivot represents the useful life, and the machine operates at the nominal capacity. Therefore, because of the components' aging, it is not possible to restore the nominal functions, and the failure rate increases until the component breaks. In [11], a guarantee policy was proposed for repairable products with bathtub breakage rate by analytical models. The time of machine unavailability will depend on the maintenance service capacity, rather than on bureaucratic slowdowns or the lack of spare parts in stock. The maintenance service is closely related to the concepts of continuous flow in an industrial plant. Therefore, it is essential to understand the activities that have the task of maintaining the system functionality over time.
Maintenance operations are planned based on actual operating conditions, measuring the state of degradation. In this regard, if they report the time on the abscissa and the residual parameter value on the ordinate (or the degradation value that the component undergoes), it can have a qualitative diagram, shown in Figure 2. The first literature analysis to be conducted concerns the inspection of the component's degradation status. Reference considered a similar approach, in which the inspection process is subject to error, and false positives and false negatives are possible [12]. Regarding the problem of data acquisition, several studies have tried to develop Condition Based Maintenance (CBM) models monitoring the system flow [13]; a first problem is related to transforming a continuous signal into a measure, therefore discontinuous [14]. In particular, the system monitoring system activities may concern one or more variables that characterize the wear process. Thanks to a control information system, data can be acquired in real-time and the related trends analyzed. In maintenance, the digital model can reflect the real-time status of machines. Through the analysis of physical data, sensor data, and maintenance methods, the digital model can quickly identify components and parts showing signs of damage [15]. The inspection plan on the status of a machine or a specific component is often advantageously related to a scheduled maintenance program. Total Productive Maintenance (TPM) The first literature analysis to be conducted concerns the inspection of the component's degradation status. Reference considered a similar approach, in which the inspection process is subject to error, and false positives and false negatives are possible [12]. Regarding the problem of data acquisition, several studies have tried to develop Condition Based Maintenance (CBM) models monitoring the system flow [13]; a first problem is related to transforming a continuous signal into a measure, therefore discontinuous [14]. In particular, the system monitoring system activities may concern one or more variables that characterize the wear process. Thanks to a control information system, data can be acquired in real-time and the related trends analyzed. In maintenance, the digital model can reflect the real-time status of machines. Through the analysis of physical data, sensor data, and maintenance methods, the digital model can quickly identify components and parts showing signs of damage [15]. The inspection plan on the status of a machine or a specific component is often advantageously related to a scheduled maintenance program. Total Productive Maintenance (TPM) Sustainability 2020, 12, 4075 4 of 25 is a method to plan and schedule maintenance activities. The continuous monitoring of the TPM can help to optimize the tack-time, defining a rhythm based on the maintenance requirements of each machine [16]. The researchers used both a qualitative and quantitative approach to validate how TPM maintenance performs. They determined KPIs (Key Performance Indicators) and OEE (Overall Equipment Effectiveness), with subsequent spread of the obtained results [17]. However, with continuous improvement in the Industry 4.0 environment, choosing a maintenance approach depends on the complexity of systems in terms of machines and human resources [18].

Full Service and Maintenance
The term "service" includes all the necessary activities in order to guarantee the request Customer Mission Profile. Increasingly, companies are extending their product/service offerings, providing customers with full-service contracts [19]. The trend is pervading almost all industries, is customer demand-driven, and perceived by corporations as sharpening their competitive edges. Modern corporations are increasingly offering fuller market packages or "bundles" of customer-focused combinations of goods, services, support, self-service, and knowledge [20]. Large companies tend to transfer maintenance management to external companies mainly to optimize the core business availability levels. This particular policy covers any business sector; thanks to big data analytics (BDA), operational and customer level intelligence are provided in Internet of Things (IoT) systems [21]. The IoT field provides full-service warranty support for all those components for which it does not have the know-how. Structured algorithms have been defined in the smart mobility too: [22] performed analyses and made estimates regarding how cities can be catalysts for better health and wellness and what governments should do to incentivize investment in smart technologies; [23] collected statistical data and performed analyses and made estimates regarding the biggest obstacle to the growth of autonomous vehicles. If 4.0 technology in an industrial environment is able to supply and collect data coming from any business sector, a full-service approach arises. Full-service offerings are considerably more complex than individual purchases. Maintenance is the best business sector where full-service fits. Since ten years ago, maintenance has been characterized by significant fragmentation, no cost control, quality lack ness, and unavailability; in fact, a considerable number of kinds of contract were developed (spare parts, repairs, logistic support) for just one customer ( Figure 3). The supply chain took up one year. is a method to plan and schedule maintenance activities. The continuous monitoring of the TPM can help to optimize the tack-time, defining a rhythm based on the maintenance requirements of each machine [16]. The researchers used both a qualitative and quantitative approach to validate how TPM maintenance performs. They determined KPIs (Key Performance Indicators) and OEE (Overall Equipment Effectiveness), with subsequent spread of the obtained results [17]. However, with continuous improvement in the Industry 4.0 environment, choosing a maintenance approach depends on the complexity of systems in terms of machines and human resources [18].

Full Service and Maintenance
The term "service" includes all the necessary activities in order to guarantee the request Customer Mission Profile. Increasingly, companies are extending their product/service offerings, providing customers with full-service contracts [19]. The trend is pervading almost all industries, is customer demand-driven, and perceived by corporations as sharpening their competitive edges. Modern corporations are increasingly offering fuller market packages or "bundles" of customerfocused combinations of goods, services, support, self-service, and knowledge [20]. Large companies tend to transfer maintenance management to external companies mainly to optimize the core business availability levels. This particular policy covers any business sector; thanks to big data analytics (BDA), operational and customer level intelligence are provided in Internet of Things (IoT) systems [21]. The IoT field provides full-service warranty support for all those components for which it does not have the know-how. Structured algorithms have been defined in the smart mobility too: [22] performed analyses and made estimates regarding how cities can be catalysts for better health and wellness and what governments should do to incentivize investment in smart technologies; [23] collected statistical data and performed analyses and made estimates regarding the biggest obstacle to the growth of autonomous vehicles. If 4.0 technology in an industrial environment is able to supply and collect data coming from any business sector, a full-service approach arises. Full-service offerings are considerably more complex than individual purchases. Maintenance is the best business sector where full-service fits. Since ten years ago, maintenance has been characterized by significant fragmentation, no cost control, quality lack ness, and unavailability; in fact, a considerable number of kinds of contract were developed (spare parts, repairs, logistic support) for just one customer ( Figure 3). The supply chain took up one year. The logistic work-flow is Industry 4.0 Technologies-oriented, able to identify the suppliers' KPIs and implement them in the supply-chain process. Today, one customer draws up one contract in which cost control, quality, and availability are included, as shown in Figure 4. The material supply takes place from approximately 5 to 45 days by means of the full-service approach. The logistic work-flow is Industry 4.0 Technologies-oriented, able to identify the suppliers' KPIs and implement them in the supply-chain process. Today, one customer draws up one contract in which cost control, quality, and availability are included, as shown in Figure 4. The material supply takes place from approximately 5 to 45 days by means of the full-service approach.  The purpose of using a single contract for the complete management of the entire supply chain is to reduce the materials' supply times, tending to maximize the fleet availability, which is the ultimate objective coinciding with the service company. The first phase is to have a stable on the list of suppliers who must comply with the technical specifications imposed by the company. Once the supplier has been decided, and the contract established, the inventory management policies will be defined. In particular, contractual agreements will be established regarding the issuance of an order, the methods of sending material for repair, and all possible warranty management agreements. In this way, the supply chain becomes lean, trying to eliminate all delays coming from the customer and suppliers. The warehouse system design and the inventory operations design are a hierarchical decision-making process, based on a stochastic approach. The changes in technology and global competition have new influences on facility location [24]. According to [25], there were 18 articles (6.57%) that contained the "automation, artificial intelligence, robotic" keywords in the logistic environment. However, the interesting publications for the analysis are from 2015 to 2017, which show a positive trend. All the authors analyzed in the literature review presented a very sectorial study approach, as they defined models and algorithms to develop just a single topic. Inventory policy is highly affected by demand, and location influences most parts of demand [26]. A critical decision that impacts the performance of a company in the long term is the strategic design of its supply chain. Facilities are a key driver of supply chain performance in terms of responsiveness and efficiency [27]. Reference used an unusual approach for the optimization of warehouse management in an Italian company that operates in the railway sector [28]. The authors defined a methodological path to analyze the interactions between humans and machines. The strategic safety stock placement has been widely studied in the last 20 years. In addition to Industry 4.0, the Logistic 4.0 topic is nowadays spreading. It represents existing solutions already adopted in traditional logistics and introduces new enabling technologies, such as the Cyber-Physical Systems (CPSs), which allow us to realize the networking and automation [29]. Reference formulated the safety stock placement problem without internal delays and showed that the optimal policy depends on the structure of the multistage system and the service measure used. In the literature, two different approaches are often used in the optimization of inventory policies for multi-echelon inventory systems: the stochasticservice approach (SSA) and the guaranteed service approach (GSA) [30]. The two approaches differ in their demand treatment and service time characterization. The service time is stochastic if clients may suffer delays when the supplier does not have enough items available for delivery. In contrast, the model is guaranteed-service if any delay form by suppliers leads to a penalty because clients define a specific availability level to be respected. The guaranteed service model, optimal order point in multi-echelon inventory, was analyzed in [31]. A Poisson-distributed stochastic demand is an optimal policy in terms of both inventory cost and recourse cost, in the function of time horizon. They assumed the expected service times in the simulation are always equal to the service time computed in the model. The simulation reported the actual (linear) inventory costs [32]. Reference presented an integrated hybrid-service approach to determine the overall cost-optimal approach. They assumed the service time of a stage is the amount of time that elapses between the placement of an order by a downstream stage and the orders fulfillment by the upstream stage. The guaranteed-service requires The purpose of using a single contract for the complete management of the entire supply chain is to reduce the materials' supply times, tending to maximize the fleet availability, which is the ultimate objective coinciding with the service company. The first phase is to have a stable on the list of suppliers who must comply with the technical specifications imposed by the company. Once the supplier has been decided, and the contract established, the inventory management policies will be defined. In particular, contractual agreements will be established regarding the issuance of an order, the methods of sending material for repair, and all possible warranty management agreements. In this way, the supply chain becomes lean, trying to eliminate all delays coming from the customer and suppliers. The warehouse system design and the inventory operations design are a hierarchical decision-making process, based on a stochastic approach. The changes in technology and global competition have new influences on facility location [24]. According to [25], there were 18 articles (6.57%) that contained the "automation, artificial intelligence, robotic" keywords in the logistic environment. However, the interesting publications for the analysis are from 2015 to 2017, which show a positive trend. All the authors analyzed in the literature review presented a very sectorial study approach, as they defined models and algorithms to develop just a single topic. Inventory policy is highly affected by demand, and location influences most parts of demand [26]. A critical decision that impacts the performance of a company in the long term is the strategic design of its supply chain. Facilities are a key driver of supply chain performance in terms of responsiveness and efficiency [27]. Reference used an unusual approach for the optimization of warehouse management in an Italian company that operates in the railway sector [28]. The authors defined a methodological path to analyze the interactions between humans and machines. The strategic safety stock placement has been widely studied in the last 20 years. In addition to Industry 4.0, the Logistic 4.0 topic is nowadays spreading. It represents existing solutions already adopted in traditional logistics and introduces new enabling technologies, such as the Cyber-Physical Systems (CPSs), which allow us to realize the networking and automation [29]. Reference formulated the safety stock placement problem without internal delays and showed that the optimal policy depends on the structure of the multistage system and the service measure used. In the literature, two different approaches are often used in the optimization of inventory policies for multi-echelon inventory systems: the stochastic-service approach (SSA) and the guaranteed service approach (GSA) [30]. The two approaches differ in their demand treatment and service time characterization. The service time is stochastic if clients may suffer delays when the supplier does not have enough items available for delivery. In contrast, the model is guaranteed-service if any delay form by suppliers leads to a penalty because clients define a specific availability level to be respected. The guaranteed service model, optimal order point in multi-echelon inventory, was analyzed in [31]. A Poisson-distributed stochastic demand is an optimal policy in terms of both inventory cost and recourse cost, in the function of time horizon. They assumed the expected service times in the simulation are always equal to the service time computed in the model. The simulation reported the actual (linear) inventory costs [32]. Reference presented an integrated hybrid-service approach to determine the overall cost-optimal approach. They assumed the service time of a stage is the amount of Sustainability 2020, 12, 4075 6 of 25 time that elapses between the placement of an order by a downstream stage and the orders fulfillment by the upstream stage. The guaranteed-service requires an additional input parameter, namely the specification of the maximum demand level for safety stock coverage, using a certain level of flexibility. The hybrid approach not only mitigates the risk of choosing the wrong purer model, but even improves the pre-solution in settings with the high final-stage service level. Reference [33] considered safety stock over a logistic network that was represented by a generic bill of materials. The data related to the cumulative cost, standard deviation, and the maximum replenishment time per stage were computed with a parametric algorithm. The output was the guaranteed-service level index needed to minimize the safety stock costs. The authors concluded that most of the stages do not hold inventory. Reference [34] used the guaranteed-service approach to optimize the (R, Q) inventory policy for a serial supply chain with Poisson demand and fixed order costs. The major assumption of GSA is that if customer demand exceeds a pre-specific upper bound, the excessive part of the demand superior to the bound will be fulfilled by flexibility measures. They formalized the service level α of the system as: The probability of having demand in the range time (t − β, t) at the most equal to the lead time β demand must be at least equal to the service level. The service level should be determined, such as its total cost is minimized. They used an inventory policy with a Poisson demand rate fixed. Thanks to the deterministic mathematical programming model, the approach can solve the optimization problem efficiently. Reference [35] proposed a model for multi-echelon inventory management that was enhanced with explicit demand propagation. Given the guaranteed service time, each successor stock point can predict the latest point in time when its order arrives at its inventory, given that the (transportation) delay between the stock points is deterministic (or bounded). The idea of a guaranteed service model is to impose that the whole system delivers to all end customers in time. The paper concludes that the stochastic guaranteed model can improve strategy inventory decisions. Reference [36] developed a typology for multi-echelon inventory management. They proposed documentation of the process that shows how the classification can be kept up to the defined date. The model wants to explicitly state all important assumptions dimension, guiding practitioners towards characterizing the supply chain structures. Multi-echelon inventory models have been the main tool used in order to understand how delays and uncertainty in demand-supply chain performance. Reference used the guaranteed-service approach to model the safety stock placement decision [37]. They defined a set of decision variables to describe the various costs in the model. The more impact cost is the safety stock one at the retailers, computed by multiplying the holding cost at retail with the normal standard device, depending on the safety stock placement and the delivery strategies. The model shows that risk pooling has two combined effects: lead time pooling and demand variability pooling. The authors concluded that safety stock placement management helps to mitigate the cost impact of items demand. The common analyzed paper's achievement determines the reorder level optimal value and the safety stock. However, the interesting publications for the analysis are from 2015 to 2017, which show a positive trend. All the authors analyzed in the literature review present a very sectorial study approach, as they defined models and algorithms to develop just a single topic. Mathematically, it is a question of finding the total annual minimum cost of safety stock, the sum of the holding cost, and the expected one. Reference selected a fuzzy approach to calculating life cycle costs [38]. They demonstrated the validity of the fuzzy logic approach rather than a probabilistic one by complex mathematical models. Reference [39] evaluated a model to identify the risks that arise within the framework of Industry 4.0, considering not only the benefit but also the risk assessment in a new Industry 4.0 environment. The key element is the improvement of environmental sustainability. Service level-based approaches are adopted when reliable stock-out evaluations are not available, or a service level is set with the customer, and consequently, the guaranteed safety stock levels are determined. Therefore, the service level represents the probability of delivering customer service in time. Increasing the service level means exponentially increasing the costs associated with managing Sustainability 2020, 12, 4075 7 of 25 the security stock. On the other hand, a too low service level makes it impossible to work with the customers. The articles that have correlated the optimal stock with the deterioration of the items in stock are of greater interest. However, the relationship between the component's wear rate and the stock value has not yet been studied. The motivation lies mainly in the absence of diagnostic systems that allow real-time item condition detection during its useful life-cycle. The present paper is based on a systemic approach because it wants to correlate all the literature developments on the focused topic synergistically. The objective is to develop a model that summarizes the characteristics of mechanical and managerial aspects in a critical component life cycle.

Proposed Methodology
The methodology is structured in a technology-based and software-guided system where the Logistic 4.0 approach can spread the material flow efficiency. It is supported by today's horizontal and vertical integration of information technology, as the continuous knowledge of the material flow in a factory. The Failure mode, effects, and criticality analysis (FMECA) conducted analysis revealed the most critical components with the most significant impact on the process criticality, to which maintenance, replacement, and reorganization plans must pay more attention. It should be remembered that the ultimate goal of this study is to define a stochastic optimization model in the reorder point analysis. Among the various parameters influencing the Economic Order Quantity (abbreviation used in the paper: EOQ) policy, it will discuss the reordering time and the quantity. Concerning the first parameter, the starting point is represented by the data acquisition that defines the component life-status. In particular, it is described by a signal acquisition which represents the functioning quality on a suitable scale during the mission time. The monitoring of wear status of components is so defined in a smart factory environment, underlining the link between the crucial characteristics of this emerging maintenance concept with the usual manufacturing practices. In this context, the smart factory represents a real-time, context-sensitive manufacturing environment that can handle information and communication structures for optimum management of production processes. The trend represents a random variable; it is a function that corresponds to each real number an acquisition in the probability space. In order to conduct a signal distribution mathematical analysis, the curve fitting method is used. The aim is to approximate the points distribution through an analytical function. It needs the definition of an approximating function (whose trend is similar to the distribution of the given points) as curve fitting modeling input. The wear mechanism is generally defined by reliability and unreliability functions. Their values are defined in 0-1 interval 0-1 sigmoid behavior, according to the operation hours. The sigmoid function is a mathematical function that produces a sigmoid curve, which is a curve with an "S" trend. Generally, it is a continuous and derivable function, with a non-negative first derivative and has a minimum and a local maximum.
The trend justification of reliability curves finds reason in the experimental cases present in the literature. Any mechanical or electrical component initially presents an almost constant value at the maximum reliability value; this value tends to decrease up to 0 with a speed that depends on the components' intrinsic technical characteristics. The determination coefficient is used to assess how well the regression equation approximates the variations in the dependent variable; it represents the formal measure of the points adaptation, since the closer the regression function is to the points, the better the model fits the data. The total square error between the single points and the function is given by: It is defined as the following index in order to determine the total variation of y from the average value: Sustainability 2020, 12, 4075 8 of 25 The following ratio defines how the regression line describes the variation of y, and it is called the determination coefficient: This value is between 0 and 1 and defines the strength and direction measure of a linear and non-linear relationship between two quantitative variables. If the value of SE curve is very small, it means that the error between the points and the line is equally small, so the curve defines a good fit, and the r 2 value is close to unity. Conversely, if SE curve is huge, the deviation between the approximating function and the data points is alike, so that the determination coefficient will assume values very close to zero. However, the data correlation of the data can also occur in negative; that is, r 2 will be between −1 and 0, indicating a negative correlation. The algorithm was coded in MATLAB 2016b and was run on a personal computer with an Intel ® Core™ i7 processor and 4GB RAM, in order to evaluate the proposed algorithm performances. The code's objective is to generate a theoretical model applicable in any case. In this regard, a parametric algorithm was developed. The input is a vector consisting of the operation hours, the acquired signals, and the relative size. The purpose is to define the minimum value of a given points estimate in which the Y variable is of a random nature (signal response), and the X variable is of a non-random nature that assumes a set of predetermined values. The optimizer used requires a starting point, since the objective function, the trend, is not known a priori. An initial points vector will be defined, and the function parameters are calculated, then the coefficient of determination is evaluated. Finally, the fitting function parameters that maximize the determination coefficient will be returned. Therefore, the proposed algorithm output is the function that best approximates the points distribution. It represents a useful component of life during the mission time. It is necessary to define the failure rate function, because it wants to evaluate and optimize the reorganization policies. It is possibly defined as an analytical failure rate trend if the reliability (or unreliability) and the fault's probability density function are known. The final result will be a numerical vector that represents the failure rate as a function of the operation hours. The parameters obtained will serve as input to the stochastic model object of this study; therefore, the components worn is a fundamental discriminant for the reorder policy management. The wear mechanism will be known for the same component in different railway vehicles; in this regard, to consider the wear-out rate different trends, it will model any degradation mechanism for the same item in the various trainsets. As illustrated, the curve fitting will be defined for each trend. Let m be the function number chosen for the fitting, n the study components, and p the cases in which the diagnostic system is present; the determination coefficient is defined as follows: i = 1, 2, . . . , n; j = 1, 2, . . . , p; k = 1, 2, . . . , m.

Assumption and Notations
The mathematical model elaboration generally requires the data analysis to highlight the significant variables and proceed with the parameter identification in the studied system. If the hypotheses on the phenomenon and the experimental data analysis lead to establishing the existence of evident relationships between the quantities that are essential for its description, then it is possible to identify the independent and dependent variables that intervene in the phenomenon and hypothesize a possible functional link. In this section, an innovative mathematical formulation is presented. This model figures out the proposed context by unbending constraints. This leads to the hypothesis introduced. The study hypotheses and all the variables involved are also identified. The proposed model foresees that the following hypotheses are respected: • the only variability is due to the failure rate; • the items' wear-out rate represents demand; • each item has the maximum reliability value at the initial time; • demand is a random variable; • the supply is in equal lots; • constant lead time.
On the basis of the hypotheses carried out, the controllable variables will be defined. Their behavior is known and, therefore, quantifiable and represents the input values. The output is represented by not expected trend variables, and they affect the possible outcomes.
• input • timing operation detection, the time interval in which the item wear-out is recorded; • signal operation detection, the item wear-out signal value; • lead time; • safety stock stochastic gain.
The model is described by means of variables subjected to appropriate constraints, both mathematical (expressed by signs of equality or inequality) and technical (imposed by the process): • maximum inventory level, maximum stock can be stored, bound by stock availability: • minimum inventory level, since it is a model in the absence of backorders, the stock value must never fall below a limit value, in this regard, the demand trend will be an end to a value equal to 5% of residual life: • must never be less than 99.5%, thus constraining the percentile standard normal distribution value: Q(t) defines the stock temporal trend; Q o , maximum inventory level; S(t) is the safety stock temporal rate; S(Q), the safety stock as Q function rate; S 0 , stochastic safety stock value; LT the lead time, ∆T w represents the threshold wear-out time, and α is the service level.

Reliability Rate Modeling as Stock Demand
With the knowledge acquired on the phenomenon trend, functions or equations can be obtained in order to correlate the various variables. The stock trend is thus directly related to reliability R and unreliability F; this is thus defined: Q(t) assumes a null value at the initial instant and Q 0 at the maximum value of the wear-out rate. The items' failure mechanism coincides with the progressive reduction of stock levels in the warehouse. In this treatment, the component in stock degradation is neglected, as it involves mechanical and electrical components, whose withdrawals in the warehouse have a frequency much greater than the aging in stock. The Logistic 4.0 in a smart factory environment is seen in a perspective of collaboration between different industrial and nonindustrial partners, where the smartness derives from the use of new technologies. The proposed model wants to analyze the change in stock as a wear rate function, but besides this, the variation related to the safety stock will also be considered, simulating a trend related to both of the time and of the stock itself. In a finite time interval, the proposed stock finite variation is defined as follows: The failure rate is indicated with λ and with Λ, its primitive function. The boundary conditions justify the formulation: • When the failure rate reaches the maximum tolerated value, the warehouse must have stock available to replace the worn components, plus an additional safety stock value that compensates for the demand variability. The proposed formulation makes it possible to obtain an analytical safety stock trend, evaluated as follows: Performing the integrals, it follows: It is considered that at the initial instant, the safety stock assumes a constant value according to the warehouse availability; furthermore, to make the parametric model, the object of study will be the normalizing safety stock at its initial value, whose value is company confidential. The safety stock function appears: From the numerical modeling, it is expected that the safety stock is a monotonous function decreasing with time and increasing with the stock value. This consideration is reflected in the warehouse optimization, minimizing the safety stock value in real-time.

Stochastic Safety Stock Gain
The stochastic safety stock (S 0 ) component does not depend on time; therefore, it is considered as the initial value of safety stock and will be calculated using the well-known formula below, which considers the variable demand and the constant lead time: In the formula, σ* represents the demand standard deviation and will be calculated considering the material withdrawals historical series, normalized to the maximum value, and z is the standard normal percentile distribution so that probability coincides with the service level.

Wear-Out Related Safety Stock Gain
The proposed model is based on an iterative calculation of the safety stock. Starting from the stock temporal trend, entering with the LT value, it would not return the optimal stock value since the initial time is zero and the failure rate too. For optimal sizing, the input value is equal to the reordering time plus the lead time. In this way, the wear level of the component is considered when the order is issued. The model is iterative because it is necessary to know the safety stock to evaluate the reorder point. Initially, the first safety stock value is calculated at the inventory level at the time given by the time in which the stock assumes the minimum bound value (T min ) minus the lead time in Q(t) function: Subsequently, the safety stock percentage change is calculated in the time interval that goes from the previously calculated reorder point to the inbound (Tr + LT): If the safety stock is greater than the decrease in the inventory level at the reorder point, the value determined with the safety stock trend will represent the actual value of the safety stock.
If the safety stock is greater than the decrease in the inventory level at the reorder point, the value determined with the safety stock trend will represent the optimal value of the safety stock (SS*).
In conclusion, it can be affirmed that the proposed model foresees to calculate the optimal safety stock as a wear-out contribution (innovative) plus a stochastic one (literature): Based on the wear mechanism and the lead time, the dynamic model calculates the safety stock through the self-tuning procedure. Therefore, the techniques used for sizing can be used for self-tuning, too; the automatic adjustment procedure for the regulator parameter based on the process operating conditions. This implementation is justified by the safety stock performance with respect to time and the stock value, characterized as a dynamic quantity.

EOQ Dynamic Model Implementation
The dynamic EOQ model fits into Logistics 4.0 through real-time information flow. The reason for choosing the EOQ approach lies in the optimization of safety stock, overcoming the well-known concept of Make-to-Stock (MTS) and Make-to-Order (MTO), by having a pull approach and foreseeing the required stock. The warehouse provides an information technology system able to be continuously updated on the items' life-cycle detecting. The sensor system placed on the critical components has an update frequency of two times an hour. This allows the planning system to know the demand and provide just in time for a necessary stock. The strengths of this approach are the Logistic 4.0 flexibility approach, because it is possible to detect the real-time demand increasing the OTD (On Time Delivery) of Company. On the other hand, the 4.0 dynamic proposed model is so recognized as customer-oriented because it focuses on the KPIs imposed in full-service. The stock trend will be sized so that during the lead time, the stock does not reach zero, but there is a safety gain due to the stochastic nature of the demand. In the proposed model, no assumption regarding costs is made. The stock optimization implies the supply chain costs minimization. The analyzed model will be coded in the SIMULINK ® environment by block diagram simulation. The model provides as input the i × j reliability curves and it will first verify the boundary respect for each quantity to determine the optimal reorder point for the ith item. The reorder point, and consequently, the inbound will be defined as the minimum value of the quantities, to guarantee a conservative approach. The lower reliability rate component stock and, consequently, all the others will be insured. The output variables that satisfy the proposed model will be defined as follows: The flow chart in Figure 5 defines all the steps necessary for the proposed methodology evaluation. The proposed methodology will have to implement periodic updating, because the suppliers and the critical items could change over time. In addition, the items' wear-out mechanisms may vary due to technical improvements offered by suppliers.
Sustainability 2020, 12, x 12 of 25 the inbound will be defined as the minimum value of the quantities, to guarantee a conservative approach. The lower reliability rate component stock and, consequently, all the others will be insured. The output variables that satisfy the proposed model will be defined as follows: The flow chart in Figure 5 defines all the steps necessary for the proposed methodology evaluation. The proposed methodology will have to implement periodic updating, because the suppliers and the critical items could change over time. In addition, the items' wear-out mechanisms may vary due to technical improvements offered by suppliers.

Case Study
This section proceeds with analyses and simulations designed to verify the validity of the innovative solutions proposed. The simulation model provides a valuable solution to a complex system, useful to develop a set of results comparable with the as-is model. This represents a strategic

Case Study
This section proceeds with analyses and simulations designed to verify the validity of the innovative solutions proposed. The simulation model provides a valuable solution to a complex system, useful to develop a set of results comparable with the as-is model. This represents a strategic key to underline the defined optimization 4.0 model.

Wear-Out Rate Evaluation
The objective was to monitor the main components in order to provide a clear overview of each item's actual status subjected to measurement tests. The diagnostic algorithm was executed every time the system was powered up. Note that the threshold limit used for each operating parameter allowed preventive maintenance before the actual failure occurred, preventing the system from operating with some components in a failed state. Therefore, each component had a maximum consumption, including a maximum tolerance value which, in case of achievement, determined the item to be bad-working. Before reaching this maximum tolerance value, the diagnostic system sent a warning signal to verify the component concerned. The status of each component was defined according to Table 1. The elements were defined by the criticality level outcome by the sensoristic set.  The component has an initial degradation. The behavior must be closely monitored.

2
A deviation more significant than the nominal operating state was detected ten times The component has an initial degradation. The revision must be planned.

3
A deviation more significant than the nominal operating state was detected 15 times The component has a degradation. The revision must be planned.

4
A deviation more significant than the nominal operating state was detected 20 times The component is a failure risk. The replacement must be planned.
After any intervention that may have involved a change in component wear, both average operating values were restored via a dedicated maintenance and monitoring software. The advantages offered by the monitoring are the suggestion regarding any deviation or anomaly in the performance of the tested components; they can be summarized in the following points: • the advance of maintenance requirements before the actual fault occurrence; • system reliability improvement through preventive maintenance; • improvement in problem resolution times; • improving the supply chain due to the status component clear definition.
The monitoring system determined the appliance status and allowed intervention only when maintenance was actually required. The three analyzed components were identified as ITEM 1, ITEM 2, and ITEM 3 on two fleet trains, maned as CASE A and CASE B. As described, the main components were subjected to testing and control the system, thus minimizing the need to perform unplanned corrective maintenance activities that could compromise the fleet availability. The items were not affected by a seasonal trend because they were continuously at work. For confidential company reasons, no more can be added about the studied components. For all the mentioned components, the measurement representation of component useful life status during operation hours is shown in Figure 6.

1
A deviation more significant than the nominal operating state was detected five times The component has an initial degradation. The behavior must be closely monitored.

2
A deviation more significant than the nominal operating state was detected ten times The component has an initial degradation. The revision must be planned.

3
A deviation more significant than the nominal operating state was detected 15 times The component has a degradation. The revision must be planned.

4
A deviation more significant than the nominal operating state was detected 20 times The component is a failure risk. The replacement must be planned.
After any intervention that may have involved a change in component wear, both average operating values were restored via a dedicated maintenance and monitoring software. The advantages offered by the monitoring are the suggestion regarding any deviation or anomaly in the performance of the tested components; they can be summarized in the following points: • the advance of maintenance requirements before the actual fault occurrence; • system reliability improvement through preventive maintenance; • improvement in problem resolution times; • improving the supply chain due to the status component clear definition.
The monitoring system determined the appliance status and allowed intervention only when maintenance was actually required. The three analyzed components were identified as ITEM 1, ITEM 2, and ITEM 3 on two fleet trains, maned as CASE A and CASE B. As described, the main components were subjected to testing and control the system, thus minimizing the need to perform unplanned corrective maintenance activities that could compromise the fleet availability. The items were not affected by a seasonal trend because they were continuously at work. For confidential company reasons, no more can be added about the studied components. For all the mentioned components, the measurement representation of component useful life status during operation hours is shown in Figure 6. The wear mechanism was modeled using an analytical function in order to define the procurement policy accurately. It wanted to contextualize the exposed curve fitting technique. By implementing the Matlab code (Appendix A, Table 2 represents the numerical results, where the best fitting function values and the relative analytical expressions are highlighted in Table 3.   Figure 7 shows reliability, unreliability for each component, and for each j-th case. The wear mechanism was modeled using an analytical function in order to define the procurement policy accurately. It wanted to contextualize the exposed curve fitting technique. By implementing the Matlab code (Appendix A, Table 2 represents the numerical results, where the best fitting function values and the relative analytical expressions are highlighted in Table 3.

Supply Chain Input Value
The input values relating to the supply chain were defined for determining the optimal safety stock value. In terms of material management, each component was defined as lead time, which characterized its procurement. Therefore, the value of extra lead time was defined to represent the average time used for a request to purchase material to be processed. The total lead time took into account the values carrying out from diagnostic systems, which configured the new Logistic 4.0 environment. The proposed modeling was justified by the deterministic nature of the material movements in the warehouse in six months. The stochastic events that determined the taking of materials were the minority. Table 4 quantifies the supply chain input value and the type of movements within the warehouse.

Safety Stock Contributions
The model parametricity can be noted in the proposed graphs. The maximum stock value is indicated with Q0, and all subsequent evaluations were normalized with respect to this value. It is also wished to highlight the safety stock trend as a function of time and the demand too. It is necessary to dimension the constant S0. Since the constraint imposes a service level higher than 99.5%, the constant was determined for each as the alpha value and relative percentile on the normalized Gaussian increase. For conservative modeling, the highest service level was considered for the calculation of S0, as shown in Table 5.

Supply Chain Input Value
The input values relating to the supply chain were defined for determining the optimal safety stock value. In terms of material management, each component was defined as lead time, which characterized its procurement. Therefore, the value of extra lead time was defined to represent the average time used for a request to purchase material to be processed. The total lead time took into account the values carrying out from diagnostic systems, which configured the new Logistic 4.0 environment. The proposed modeling was justified by the deterministic nature of the material movements in the warehouse in six months. The stochastic events that determined the taking of materials were the minority. Table 4 quantifies the supply chain input value and the type of movements within the warehouse.

Safety Stock Contributions
The model parametricity can be noted in the proposed graphs. The maximum stock value is indicated with Q0, and all subsequent evaluations were normalized with respect to this value. It is also wished to highlight the safety stock trend as a function of time and the demand too. It is necessary to dimension the constant S0. Since the constraint imposes a service level higher than 99.5%, the constant was determined for each as the alpha value and relative percentile on the normalized Gaussian increase. For conservative modeling, the highest service level was considered for the calculation of S0, as shown in Table 5. Regarding the safety stock function, S(t) is an increasing monotonic function, because the stock is a decreasing function, therefore less stock available means more significant stock to make up the demand. In compliance with the imposed constraints, it was verified that this value is less than 30% of the maximum stock. The safety stock components trends are illustrated in Figure 8. Regarding the safety stock function, S(t) is an increasing monotonic function, because the stock is a decreasing function, therefore less stock available means more significant stock to make up the demand. In compliance with the imposed constraints, it was verified that this value is less than 30% of the maximum stock. The safety stock components trends are illustrated in Figure 8.  Table 6 shows that the values just found, described in percentage to the maximum stock value. The component with the higher defined value is highlighted for each component and for each case, in accordance with the Equation (24). It should be noted that the results comply with the relative constraint imposed. The reorder point was calculated in the optimal safety stock value. Adding the lead and the extra time, it was defined as the stock inbound. The not-exploited component reliability percentage at an inbound time is also shown in Table 6. In correspondence with the inbound, the component was replaced, removed from the train, and sent for repair. The reorder point and the inbound for the i-th component will be defined as the minimum value between the two cases.

Result Analysis
The results analysis represents a useful part of analyzing and synthesizing all the results obtained after the proposed methodology numerical evaluation. When a component breaks down unexpectedly, the "blue-collar" worker must be ready for the replacement or repairing, and the  Table 6 shows that the values just found, described in percentage to the maximum stock value. The component with the higher defined value is highlighted for each component and for each case, in accordance with the Equation (24). It should be noted that the results comply with the relative constraint imposed. The reorder point was calculated in the optimal safety stock value. Adding the lead and the extra time, it was defined as the stock inbound. The not-exploited component reliability percentage at an inbound time is also shown in Table 6. In correspondence with the inbound, the component was replaced, removed from the train, and sent for repair. The reorder point and the inbound for the i-th component will be defined as the minimum value between the two cases.

Result Analysis
The results analysis represents a useful part of analyzing and synthesizing all the results obtained after the proposed methodology numerical evaluation. When a component breaks down unexpectedly, the "blue-collar" worker must be ready for the replacement or repairing, and the company must be available for stock availability. Often this does not happen, and the stock-out phenomenon arises. Table 7 shows stock-out events in the time period analyzed. A punctual function for each inbound and outbound movement considered is presented in Figure 9, where the as-is EOQ model is represented.  A punctual function for each inbound and outbound movement considered is presented in Figure 9, where the as-is EOQ model is represented. Obviously, the main fallout is an extra-cost that falls on the company's effectiveness. In this regard, they wanted to develop an experimental model that aims to attribute a quantitative trend to forecast the demand. Once the lead time is known, the safety stock is sized, and the reordering time is identified, it is possible to collect the data obtained by presenting the proposed EOQ model. The main advantage of numerical modeling is having defined a parametric model that lends itself well to the reorder point modeling of a reorder point for any component whose wear mechanism is known. Modeling also presents the safety stock sizing. The implemented mathematical model defines the Obviously, the main fallout is an extra-cost that falls on the company's effectiveness. In this regard, they wanted to develop an experimental model that aims to attribute a quantitative trend to forecast the demand. Once the lead time is known, the safety stock is sized, and the reordering time is identified, it is possible to collect the data obtained by presenting the proposed EOQ model. The main advantage of numerical modeling is having defined a parametric model that lends itself well to the reorder point modeling of a reorder point for any component whose wear mechanism is known. Modeling also presents the safety stock sizing. The implemented mathematical model defines the first safety stock value. Through an auto-tuning process, an automatic adjustment procedure regulator of the parameters is started according to the process operating conditions. If the imposed boundaries are not obtained, a new iteration will be independently carried out, generating a result and verifying constraints compliance through an optimization procedure. Figure 10 shows the proposed graphic model representation. However, the proposed model has several weaknesses. The lead time was established as constant, but procurement policies provide for a continuous relationship updating with suppliers, gaining continuous improvements. The supply dynamics vary according to seasonality rather than to internal agreements; this entails a different stochastic contribution evaluation related to the safety stock, as the lead time variability must be adequately considered. Since it is dealing with experimental analysis, there are few data to model, and it is therefore not possible to carry out statistical surveys However, the proposed model has several weaknesses. The lead time was established as constant, but procurement policies provide for a continuous relationship updating with suppliers, gaining continuous improvements. The supply dynamics vary according to seasonality rather than to internal agreements; this entails a different stochastic contribution evaluation related to the safety stock, as the lead time variability must be adequately considered. Since it is dealing with experimental analysis, there are few data to model, and it is therefore not possible to carry out statistical surveys to develop a forecasting model. Therefore, the proposed methodology lays the foundations for being able to redefine and rearrange the procurement procedure for high criticality components. It is emphasized again that the criticality is both in terms of safety and availability fleet.

Conclusions
The proposed methodology aims to redefine and reorganize the supply chain stock management of stocks from a Logistic 4.0 perspective. The paper aimed to guarantee high levels of customer availability and reliability in and Industry 4.0 smart environment. The model is experimental; therefore, the available data are not enough to lead a forecast statistical algorithm. The definition of variables and boundaries is a necessary condition for a mathematical model implementation. The used approach is parametric and it deals with general modeling whose input is given by supply chain characteristic parameters together with wear-out rate detections. In this paper, the smart factory was conceived as a flexible system able to provide an adaptive full-service process that will continuously improve the studied dynamic system performances. In particular, the results are a safety stock sizing in a time horizon in which a full constraints control is obtained. The model in question was then contextualized to the case study and a numerical modeling was developed. The simulation results are able to redefine and organize the procurement, supported by a quantitative justification. The optimization safety stock sizing leads to overall cost minimization for the company. The proposed paper sets the stage for developing a synergistic material management system, so that the various service organizations could interface with each other to be able to share and process the signals coming from each department, optimizing the flow of operations. Material management is the greatest visibility department because it interfaces with the suppliers. This instead is only the last link in a complex system in which the necessary bodies are inserted to satisfy a request for material or technical specification. Possible future developments are inevitably outlined. In the first instance, the algorithm presented is punctual in nature, parameterized to the re-ordering lot. The procurement policy should be contextualized considering the number of exact components that are reordered, guaranteeing a dynamic measurement defining the main supply cost and then sizing the optimal lot order. The ultimate goal of all future developments is to combine all spare parts with a sensor system capable of transmitting information about the individual component's life-status, making the reorganization policy totally computerized, based on reliability signals. The smart factory helps to implement the sustainable production mode to cope with the global challenges. Although the implementation of smart factory is still facing some technical challenges, some application demonstrations have already been built with the existing technologies. The relationship between the digital smart factory with the existing diagnostic systems is under investigation to develop in the future. Therefore, the smart factory and the Industry 4.0 in general can be implemented in a progressive way, along with the unstopped technical advancements. In conclusion, the paper developed was intended to be a stimulus to ensure that any information regarding the material history may be analyzed, summarized, and finally shared with each entity that will deal with a synergistic work to maximize service levels. Respecting the constraints and limits of each institution, the flow can actually have lean approach features. A more detailed forecasting model is under investigation, and will be provided in further studies.