Next Article in Journal
Chemical Characterization, Antioxidant Capacity, and Antimicrobial Activity of a New Fresh Cheese Added with Guabiroba Pulp
Previous Article in Journal
Deep Reinforcement Learning-Based Autonomous Docking with Multi-Sensor Perception in Sim-to-Real Transfer
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prediction of Losses in an Agave Liquor Production and Packaging System Using a Neural Network and Fuzzy Logic

by
Alejandro Lozano Luna
,
Albino Martínez Sibaja
*,
Angélica M. Bello Ramírez
,
José P. Rodríguez Jarquin
,
Miguel J. Heredia Roldán
and
Alejandro Alvarado Lassman
Tecnológico Nacional de México, Instituto Tecnológico de Orizaba, Veracruz 94320, Mexico
*
Author to whom correspondence should be addressed.
Processes 2025, 13(9), 2843; https://doi.org/10.3390/pr13092843
Submission received: 7 July 2025 / Revised: 18 August 2025 / Accepted: 22 August 2025 / Published: 5 September 2025

Abstract

This study presents the development of a predictive system based on artificial neural networks (ANNs) and fuzzy logic to estimate losses in an agave liquor production and packaging plant. Currently, these losses are discharged into wastewater, generating not only finished product waste, but also greater environmental pollution and higher treatment costs. To address this, agave liquor waste is converted into methane biogas through anaerobic digestion and subsequently transformed into electrical energy. The system begins by collecting historical data from the production process, including production plans and shrinkage rates at each stage of the packaging line. These data are analyzed to identify behavioral patterns and correlations between process variables and losses, allowing a deeper understanding of the packaging process. Critical control points were identified throughout the production stages, and an ANN model was trained with historical data to predict losses. Outstanding results were achieved in the packaging and capping stage, where a significant impact on bottle loss was observed, with a 29% impact in the morning shift and a 35% impact in the afternoon shift. Fuzzy logic was used to manage the uncertainty and subjectivity associated with identifying the stages most susceptible to waste, translating qualitative assessments into quantitative metrics. Estimates allow for approximately 8% to 12% reductions by streamlining the process with this analysis obtained through the use of artificial intelligence tools. This integrated approach aims to optimize operational efficiency, reduce losses, minimize environmental impact, and promote sustainable practices within the agave liquor industry.

1. Introduction

The production of agave-based liquor holds substantial economic significance both domestically and internationally. In 2020, Mexico exported approximately 308.6 million litres of tequila, indicating that eight out of every ten litres produced were consumed abroad. The United States was the primary export destination, importing 277.8 million litres—accounting for 90% of total exports. According to official data [1], the export value reached USD 2.355 billion, positioning agave liquor as Mexico’s second most important agro-industrial product, surpassed only by beer.
The agave production sector involves approximately 9000 producers and generates around 29,000 direct and indirect jobs. The Tequila Regulatory Council [2] reported that in January 2010, 97,200 tonnes of agave were processed for tequila production. There are currently 625 registered distilleries and 80 bottling plants, with a continued increase in legally registered brands [3]. In 2020, national agave production reached 1.519 million tonnes, generating a market value of MXN 31.339 billion [4].
Production losses, or shrinkage, are a common and multifaceted phenomenon in manufacturing enterprises. These losses adversely affect operational efficiency, increase costs, and undermine the sustainability of operations. As noted by Moreno [5], shrinkage encompasses losses incurred during manufacturing processes, including raw material waste, defective products, and inefficiencies within the supply chain.
According to [6], production shrinkage typically refers to the loss of raw materials, products, or components during production, storage, transportation, and distribution. These losses significantly impact various operational aspects, particularly by increasing production costs due to the need for additional materials to meet production targets [7].
Human error is a critical contributor to production losses, often resulting from incorrect actions or decisions made by personnel. As highlighted by Torres Medina [8], such errors can severely affect operational efficiency and product quality. These errors may occur at various stages of the production process, including operational mistakes due to improper machine configuration. In the context of agave liquor production, this may involve poor calibration, leading to underfilling or inconsistent machine speeds [9].
Mechanical failures also contribute to production inefficiencies. These failures, as described by [10], include mechanical and technological malfunctions that disrupt production and reduce performance and efficiency, and may even cause complete production stoppages. Common causes include wear and tear from continuous use and component breakage due to overload or material fatigue.
In a related study, Cortés Mora [11] demonstrated the application of artificial neural networks (ANNs) and artificial intelligence (AI) for identifying bottled beverages using digital image recognition [12]. The implementation of these tools is within the principles of sustainable production. This approach, which involves training models to detect patterns, could be adapted to monitor each stage of the bottling process—such as conveyors, fillers, cappers, and labelers—thereby enhancing system control and quality assurance in agave liquor production.

2. Problem Statement

The alcoholic beverage industry is characterized by a complex production process encompassing multiple stages, from fermentation and distillation to bottling and distribution [13]. At each stage, production losses or shrinkage represent a significant challenge, affecting both the operational efficiency and economic sustainability of organizations and making the process sustainable. Food and beverage manufacturers are forced to control product quality. The release of defective products onto the market can lead to complaints or product returns [14]. In the case of the company, fines of up to MXN 18,000 pesos per defective product can be imposed.
Additional losses can occur during storage and transportation due to improper handling or poor storage conditions [15]. Reducing these losses is essential to improving a company’s profitability. A well-designed strategy can lead to resource optimization, improving the efficient use of raw materials and operating inputs.
Quality improvement is also a key objective. Controlled and efficient processes ensure that production time is not wasted and that resource management is optimized throughout the operation [16].
This study presents data collected from a company engaged in the production and bottling of alcoholic beverages. The objective is to predict the amount of material that will be wasted throughout the production process. The analysis considers potential machinery failures—specifically, conveyors, fillers, cappers, labelers, and tax label applicators—as well as human error resulting from inadequate supervision or improper handling by operators.
The amount of wasted material is calculated by quality control specialists assigned to each production line, with oversight and validation by line supervisors.

3. Methodology

The development of the predictive system began with the collection of historical data related to the agave liquor production process. This dataset included information from production plans and records of material losses (shrinkage) at each stage of the bottling process. Once compiled, the data were analyzed to identify behavioral patterns and correlations between process variables and observed losses. This analysis enabled a comprehensive understanding of the operational characteristics of the packaging system.
A detailed description of each stage in the production process was conducted, and critical control points—locations where defects most frequently occur—were documented. An artificial neural network (ANN) model was then implemented to predict losses, using the historical data for training purposes. The ANN was designed to learn from the operational conditions and performance metrics of the production lines.
To address the inherent uncertainty and subjectivity in determining which stages are most susceptible to waste, fuzzy logic was integrated into the system. This approach allows for the translation of qualitative assessments (e.g., “high,” “medium,” “low” efficiency) into quantitative values, thereby enhancing the precision of the model. The combined use of ANNs and fuzzy logic facilitates the optimization of operational efficiency, reduction of material losses, and promotion of sustainable practices within the agave liquor industry.

4. Process Description

The production process of the alcoholic beverage manufacturing and bottling company (Figure 1) commences upon receipt of a formal request from the corporate headquarters to produce a specified quantity of product cases. These cases encompass a variety of consumer beverages, including, but not limited to, agave liquor, whisky, and vodka, each corresponding to distinct production lines. The total production volume must be fulfilled by the predetermined deadline to ensure compliance with contractual obligations. Failure to meet these production targets may result in substantial financial penalties, as the clientele primarily comprises large multinational corporations that procure these products under strict delivery agreements.
The supply chain process is initiated by requesting the appropriate quantity of raw materials required for production. These materials include bottles, caps, labels (front, top, and back), tax stamps issued by the Mexican Tax Administration Service (SAT), and packaging boxes. Upon arrival at the facility, the Quality Control Department conducts a thorough inspection of the materials, employing sampling techniques to ensure that all items meet the necessary standards for operational use. Should any discrepancies or deficiencies be identified, a formal report is issued detailing the observed non-conformities and the specific characteristics of the materials received. This documentation is managed within the receiving area of the warehouse department.
Once the liquor production is complete, the process advances to the bottling stage along the designated production lines. This begins with the transfer of the required raw materials from the warehouse to the corresponding production line, where they will be utilized in the manufacturing process. Once the materials are positioned and ready at the production line, operations commence.
The production phase initiates with the conveyor system, which facilitates the collection and movement of individual bottles along each production line. Each line operates at a specific speed, determined by the capacity and configuration of the machinery in use. The process continues to the filling station, where bottles are filled with the beverage according to the production plan established by the Plant Manager, Deputy Manager, and Department Heads, ensuring alignment with client specifications and delivery schedules.
Following the filling stage, the capping unit secures each bottle with the appropriate closure, which varies depending on the bottle design, beverage type, and product presentation. Once capped and verified for quality, the bottles proceed to the labeling station, where front, top, and back labels are applied, contingent on the product’s presentation requirements.
The final and most legally sensitive stage is the application of the tax stamp label, known as the “marbete.” This step is critical, as any failure in its execution constitutes a violation of the Mexican Federal Fiscal Code, specifically Article 82, Section XVIII. Such non-compliance may result in significant financial penalties for each improperly labeled product offered for sale through commercial distributors. The responsibility for these penalties lies with the manufacturing company.
Upon successful inspection by the Quality Control team for finished goods, the packaging process begins. This involves grouping the finished bottles into cases of twelve for efficient handling, transport, and storage. These cases are then palletized and secured by the warehouse department in preparation for shipment to the Distribution Centre (CEDIS), which is responsible for dispatching the products to their respective clients.

5. Development of the ANN-Based System

Neural Tools can be employed to predict uncertain parameters within a system. Specifically, it enables the estimation and interpretation of a target variable based on the input of numerical variables that have been previously trained and validated, thereby generating predictive outputs. A dataset comprising 3125 records was compiled from three production lines operating across two shifts, Monday through Saturday, with only one shift on Saturdays. This dataset spans from Week 1 to Week 21 of the year 2024.
Additionally, a consolidated dataset of 4577 records was obtained, capturing data related to production losses (merma) across various stages of the bottling process, including the conveyor, filler, capper, labeler, and tax stamp labeler.
The core objective of this study is to predict the quantity of production loss per shift, based on the operational conditions of the machinery during each shift. This is achieved through the analysis of historical data to evaluate how loss values are influenced at each stage of the bottling process. Table 1 presents the production plan alongside the actual production outcomes.
Table 2 presents the historical data on the percentage of production loss (merma) recorded at each stage of the bottling process. It is important to note that the organization has established a critical threshold, stipulating that losses must not exceed 1% at any stage of the bottling operation. As illustrated in the accompanying table, the recorded values surpass this predefined limit, indicating deviations from the operational efficiency targets.
For data collection and preprocessing, the dataset was partitioned into three subsets: 70% for training the model, 20% for validation to fine-tune the parameters, and 10% for testing to evaluate final model performance. The data was divided into training sets in a strictly chronological order, ensuring that there was no information leakage and that the model evaluation reflected the actual behavior of production dynamics. These data were organized as illustrated in Figure 2 (worker A) and Figure 3 (worker B), which represents the training process for Production Line One. This figure also displays the relative impact of each variable involved in the production process, following the removal of outliers attributed to uncontrollable operational factors.
Prior to training, the data were subjected to a min–max scaled normalization process, allowing comparability between the input variables to be maintained and preventing magnitude differences from disproportionately affecting the model. To facilitate the interpretation and evaluation of results, standard error metrics were included, allowing the performance of the artificial neural network to be compared against a baseline and clearly quantifying the improvement achieved, the result is shown in Table 3.
Subsequently, we can observe the training and testing datasets were employed to generate predictive outputs using the Scaled Conjugate Gradient (SCG) method in Table 4, which has been widely recognized in the literature as one of the most efficient and suitable algorithms when implemented with the relevant statistical formulas that allow us to obtain predictive data used in the productive management of the organization.
To define the model’s design and architecture, a structure was established comprising six input variables: shift, conveyor, filler, capper, labeler, and tax stamp labeler. Based on this configuration, a single output neuron was defined to predict the volume of production loss (in litres) for both shifts.

6. Packaging Line Analysis and Loss Prediction

As shown in Table 5, following the corresponding analyses conducted using Neural Tools, the following projections can be made: For the upcoming semester, an estimated total output of 4,856,868 bottles is anticipated. Of this total, approximately 813,815 units are expected to be lost as waste. Specifically, Shift 1 is projected to account for 47.62% of the total loss, equivalent to 387,517 defective units, while Shift 2 is expected to contribute the remaining 52.38%, corresponding to 426,299 units.
These results highlight the capper and filler as the most critical points of loss in both shifts, suggesting that targeted interventions in these stages could yield substantial improvements in efficiency and waste reduction.
These results highlight the capping and filling machines as the most critical loss points in both shifts. However, it should be noted that the conveyor and labeling machines are in second and third place, respectively, suggesting that specific interventions in these stages could produce substantial improvements in efficiency and waste reduction, since they are final stages, and, therefore, more raw material would be wasted than expected.
The distillery operates an anaerobic EGSB biodigester with a working volume of 3.5 m3, which is used to produce methane biogas. This biogas is then utilized to generate electricity via an electric generator. The electricity produced is used to power lighting systems across various areas of the facility. However, a key limitation of this electricity generation system is the inability to store the generated electricity, as doing so would incur prohibitively high costs—such as those associated with lithium battery banks.
To address this issue, the present project developed an artificial intelligence-based system for a liquor company, aimed at minimizing the discrepancy between the electricity demand of the facility’s lighting systems and the electricity generated from methane biogas derived from the distillery’s own waste. To store the biogas, a cushion-based storage system was designed and implemented, capable of holding up to 400 L of biogas, as shown in Figure 4.
To measure biogas production from the EGSB reactor, a Cole–Parmer mass flow meter was installed. Additional work was carried out to manage the biogas produced by the reactor, including the modification of a conventional 500 L stationary LP gas tank for use with biogas at a pressure of 120 psi. This adaptation enabled the storage of up to 13,000 L of biogas, which is used to power a 12 kVA electric generator, providing approximately 3.8 h of operation per tank. The system includes a check valve at the biogas inlet, a pressure gauge at the outlet, a pressure regulator with a gauge, and a pressure switch to control the biogas compressor motor. A MOPESA-brand moisture filter and a liquid trap were also installed to ensure that the compressed biogas stored in the 500 L tank could be used directly by the 12 kVA generator, which outputs a 120 V, 60 Hz signal.
The electricity generated by the 12 kVA generator is fed into a central distribution bus that supplies power to the lighting systems throughout the facility. In this configuration, the generator acts as the agent. There is no feedback loop between the generator, the distribution bus, or the lighting systems. The only information available to the agent is the electricity demand requested by the distribution bus. The agent’s objective is to determine the optimal electricity production order size to minimize the total inventory level of generated electricity within the facility’s supply chain. Electricity demand data for the facility’s lighting systems exhibit two distinct behavioral patterns, depending on the time of day—daytime versus nighttime—as well as weather conditions (sunny versus cloudy). The parameters for the normal distribution are N(5,1), while those for the uniform distribution are U(0,10). The agent’s action space ranges from 0 to 10 units. Experiments were conducted using both distributions to evaluate the model’s robustness.
All experiments in this study employed the same hyperparameter settings to ensure valid comparisons (Table 1). The neural network architecture consists of three layers with 128, 64, and 32 neurons, respectively. Each method was trained over 40,000 episodes. An ε-greedy strategy was used to balance exploration and exploitation. This strategy allows the agent to explore the environment before committing to an exploitation strategy. Through this iterative process, the agent refines its environmental model and gradually converges toward an optimal value function. The maximum epsilon value, εmax = 1, decreases linearly to its minimum value, εmin = 0.1, over the first 10,000 training episodes. The initial hyperparameter values (Table 4) were proposed in [17,18]. Initially, the learning rate was set at 0.00025 and the discount factor at 0.99. However, these settings did not allow the algorithm to converge. A discount factor of 0.99 prioritizes future rewards, which is not appropriate for an infinite-horizon problem such as this. Moreover, when there is a delay between action and environmental response, a high learning rate can disrupt the learning process. The initial neural network configuration included a single hidden layer with 10 neurons as shown in the Table 6.
The results of the Deep Q-Network (DQN) method with experience replay are illustrated in Figure 2 In this figure, the outcomes under the normal distribution are represented by a blue line, while those under the uniform distribution are depicted in red. The average cost is notably higher under the uniform distribution compared to the normal distribution. Nevertheless, the agent’s actions (i.e., the electricity generator’s decisions) were consistent across both demand distribution types. It is important to highlight that, due to the inherent variability of the uniform distribution, electricity storage costs increase due to the variability in the lighting system’s electricity demand across the facility, resulting in a negative average inventory level. The behavior of the state variables throughout the training process is depicted in Figure 5a–d.
Under the uniform distribution, the electricity-generating agent learned a policy of maintaining zero inventory to minimize total cost, preferring to avoid electricity storage due to the high uncertainty in demand. Conversely, under the normal distribution, the agent adopted a policy of maintaining a minimal inventory level to reduce storage costs, as the demand pattern is more predictable. In the normal distribution scenario, total cost is primarily driven by storage costs, whereas in the uniform distribution scenario, the main cost arises from electricity shortages, necessitating purchases from the Federal Electricity Commission (CFE).

7. Development of the Fuzzy Logic System

To develop the fuzzy logic system, both the operational experience and the organizational need to maintain strict control over elevated waste percentages were taken into account. Based on practical knowledge, minimizing material waste is essential and depends on several stages within the production process. Accordingly, the following variables were defined:
  • Conveyor stage
  • Filler stage
  • Capper stage
  • Labeler stage
  • Tax stamp labeler (MBT) stage
Organizational waste parameters were established to monitor and control losses at each stage, across all production lines and shifts. These were categorized as follows:
(a)
Excellent: Waste range from 0.00% to 1.00%
(b)
Acceptable: Waste range from 1.1% to 3.00%
(c)
Poor: Waste range from 3.1% to 6.00%
These classifications apply uniformly across all stages of the production process, forming a single categorization framework. That is, the percentage of waste is assessed independently at each stage, with the optimal performance level defined as a waste rate between 0% and 1%.
The following section presents the fuzzy sets corresponding to each of the variables considered in this analysis. All variables are interrelated due to their sequential role in the production process.
As illustrated in Figure 6, the company operates with minimal tolerance regarding raw material waste. The organizational objective is to maintain waste levels below 1.00% at each stage of the bottling process. Should waste exceed 1.1%, the performance is classified as either regular or poor, depending on the extent of the deviation by production line and shift. In cases where waste surpasses 3.00%—whether due to mechanical failure, raw material defects, or human error—it becomes mandatory to halt the production line to prevent further escalation and to determine the appropriate corrective action.
For the cumulative results of the first semester, a potential scenario was modeled using fuzzy logic. The input variables correspond to the waste percentages recorded at each stage of the production process. The system exhibits a trapezoidal behavior, with the output variable representing the total accumulated waste.
If any of the stages—conveyor, filler, capper, labeler, or tax stamp labeler—maintain a waste level within the range of 0% to 3%, the production process continues uninterrupted. However, if any of these stages exceed the 3% waste threshold, the process must be halted immediately.
The decision rules were established based on expert knowledge and were implemented within the model illustrated in Figure 7 Only a subset of the constraints used in the fuzzy logic system is shown; inference calculations are then performed mathematically.
As the inference rules demonstrate, at any point in the production process, if a stage reaches a “Poor” rating (quantitatively defined as a scrap level greater than 3%), the system must be shut down. At that point, a diagnostic analysis must be performed to identify the root cause of the failure, whether a mechanical malfunction, an inconsistency in the raw material, or human error. The development of this system has significantly reduced the subjectivity previously associated with the variable behaviors observed in different production processes. The Mamdani fuzzy system selection process for system modeling is shown below. For defuzzification, the centroid method was used thanks to the established data and parameters that are not controllable in some operational situations.

8. Results

Through the application of artificial neural networks, it was possible to generate forecasts regarding the expected volume of production loss for the second half of the operational year as shown in Table 7. This predictive modeling was based on the following parameters:
Input variables: shift, conveyor, filler, capper, labeler, and tax stamp labeler.
Output variable: total quantity of production loss.
Using fuzzy logic, the primary input variables influencing production loss in the bottling process were identified. Based on the recommendations generated by the fuzzy system, adjustments to machine calibration—particularly for the labeling and filling machines—were proposed.
The objective is to reduce production loss by approximately 8% to 12%, thereby enhancing process efficiency and lowering operational costs. The estimated failure rates for Shift 1 (Table 8) and Shift 2 (Table 9) are presented below according to the areas of the production process.
The estimated failure rates for Shift 1 are as follows:
The estimated failure rates for Shift 2 are as follows:
This artificial intelligence tool enabled more accurate prediction—and, where applicable, reduction—of losses in the agave liquor bottling system compared to traditional methods. The analysis further suggests that the root cause of the issue may lie in the raw materials used, specifically the type of bottle employed in the process.

9. Discussion

In the context of minimizing production losses in the liquor industry, various strategies have been proposed, including modifications to packaging materials and adjustments to filling parameters. As supported by studies [19,20], production losses may occur at multiple stages of the process, adversely affecting operational efficiency and increasing costs. However, the present study identified that the stages most strongly associated with waste generation are those involving the handling of bottles.
As noted by [21], human error does not necessarily imply operator incompetence, but may instead result from improper machine calibration. Citing [22], preventive maintenance significantly reduces product losses, with machinery efficiency being a key factor in minimizing waste—unlike corrective maintenance, which is the prevailing approach in the organization under study.
In [23], a hybrid system combining artificial neural networks (ANNs) and fuzzy logic was implemented to monitor and adjust solvent concentrations during beer fermentation, thereby improving the quality of the liquid product. The present project complements that research by applying the same artificial intelligence tools during the second stage of the production process—bottling.
The optimization of industrial control systems through the integration of fuzzy logic and genetic algorithms, as demonstrated in [24], has proven effective in enhancing process efficiency and stability. However, that study did not address the critical role of the bottling process. Given the operational demands and the importance of this stage, it is essential to define performance thresholds to optimize production. This aligns with the findings of [25], which emphasize the importance of machine-level analysis using neural networks. Such an approach provides a foundational framework for the agave liquor bottling process, which involves five machines. Once the process is stabilized, it becomes possible to establish control values and performance ranges.
Quality control inspections are fundamental to minimizing losses and waste resulting from defective raw materials. As expressed in [26,27], improving the raw material intake process significantly enhances the ability to control waste during handling and processing, thereby contributing to overall production efficiency.

10. Conclusions

This article provides valuable insight into how each stage of the bottling process contributes to product loss. In comparison with previous studies, it is evident that while historical data analysis is beneficial, the integration of advanced techniques—such as machine learning, preventive maintenance, and quality control—can significantly enhance the accuracy of predictions and the overall efficiency of the process.
The present study demonstrated the effectiveness of employing artificial neural networks and fuzzy logic for the analysis and prediction of production losses in an agave liquor bottling system. Through the collection and processing of operational data, it was possible to model loss behavior within the process, identifying key patterns—particularly the increase in waste associated with bottle handling and labeling operations.
The results indicate that the combination of these two artificial intelligence techniques enables accurate forecasting and supports a proactive approach to optimizing the bottling system. Implementing these models will contribute to waste reduction by identifying the most critical stages of the process, thereby allowing for the establishment of preventive measures. Reusable components such as caps, bottles, and liquid can be recovered, enhancing operational efficiency, and promoting greater sustainability in production.
Future research may focus on the integration of additional machine learning techniques, as well as the real-time optimization of bottling parameters, to further minimize losses and improve process profitability, thereby improving the quality of the liquid product. The present project complements that research by applying the same artificial intelligence tools during the second stage of the production process—bottling.
However, that study did not address the critical role of the bottling process. Given the operational demands and the importance of this stage, it is essential to define performance thresholds to optimize production. This aligns with the findings of [22], which emphasize the importance of machine-level analysis using neural networks. Such an approach provides a foundational framework for the agave liquor bottling process, which involves five machines. Once the process is stabilized, it becomes possible to establish control values and performance ranges.
Quality control inspections are fundamental to minimizing losses and waste resulting from defective raw materials. The study’s limitations lay in the way it collected information, as the company lacks real-time monitoring sensors. This is being discussed with the organization as future work to establish raw material counts, monitor production plan progress, and meet daily goals.

Author Contributions

Conceptualization, A.M.S.; writing—investigation—methodology, A.L.L., A.M.S. and J.P.R.J.; validation, M.J.H.R. and A.A.L.; formal analysis, A.L.L. and A.M.S.; investigation, J.P.R.J., M.J.H.R. and A.M.B.R.; resources, A.L.L., A.M.S. and A.A.L.; writing—original draft preparation; writing—review and editing, A.L.L., A.M.S. and J.P.R.J.; supervision, A.M.B.R., M.J.H.R. and A.A.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in this article. For more information, please contact the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Herrera-Pérez, L.; Valtierra-Pacheco, E.; Ocampo-Fletes, I.; Tornero-Campante, M.A.; Hernández-Plascencia, J.A.; Rodríguez-Macías, R. Esquemas de contratos agrícolas para la producción de Agave tequilana Weber en la región de tequila, Jalisco. Agric. Soc. Y Desarro. 2018, 15, 619–637. [Google Scholar] [CrossRef]
  2. Valencia Sandoval, K.; Rojas Rojas, M.M.; Alvarado Lagunas, E.; Duana Avila, D. Innovación agroindustrial del agave (Agave tequilana Weber var. azul): Valoración financiera para la obtención de inulina. Agro Productividad. 2020, 13, 1–6. [Google Scholar] [CrossRef]
  3. Valencia Sandoval, K.; Rojas Rojas, M.M.; Godínez Montoya, L. Innovación en Negocios Tradicionales: El Caso del Agave, Más Allá del Tequila. Innovaciones De Neg. 2023, 1, 18–31. [Google Scholar] [CrossRef]
  4. Ceja, R.; González, D.R.; Ruiz, J.A.; Rendón, L.A.; Flores, J.G. Detección de restricciones en la producción de agave azul (Agave tequilana Weber var. azul) mediante percepción remota. Terra Latinoam. 2017, 35, 259–268. [Google Scholar] [CrossRef]
  5. Moreno-Hernández, A.; Estrella-Chulim, N.; Escobedo-Garrido, S.; Bustamante-González, A.; Gerritsen, P.W. Prácticas de manejo agronómico para la sustentabilidad: Características y medición en agave tequilana weber en la Región Sierra de Amula, Jalisco. Trop. Subtrop. Agroecosyst. 2011, 14, 159–169. [Google Scholar]
  6. Pérez-Hernández, E.; Chávez-Parga, M.C.; González-Hernández, J.C. Revisión del agave y el mezcal. Rev. Colomb. De Biotecnol. 2016, XVIII, 148–164. [Google Scholar]
  7. Song, N.; Xie, Y.; Ching, W.; Siu, T. A real option approach for investment opportunity valuation. J. Ind. Manag. Optim. 2017, 13, 1213–1235. [Google Scholar] [CrossRef]
  8. Torres-Medina, Y. The analysis of human error in manufacturing: A key to improve production quality. Rev. UIS. Ing. 2020, 19, 53–62. [Google Scholar] [CrossRef]
  9. Carrillo-Gutiérrez, T.; Reyes-Martínez, R.M.; Arredondo-Soto, K.C.; Solis-Quinteros, M.M. Análisis del error humano y la calidad del producto en la industria de manufactura de dispositivos médicos. Estudio de caso. 3C Tecnología. Glosas De Innovación Apl. A La Pyme 2021, 10, 73–91. [Google Scholar] [CrossRef]
  10. Kolus, A.; Wells, R.; Neumann, P. Production quality and human factors engineering: A systematic review and theoretical framework. Appl. Ergon. 2018, 73, 55–89. [Google Scholar] [CrossRef]
  11. Cortés Mora, A.A. Uso de Redes Neuronales e Inteligencia Artificial en el Procesamiento y Análisis de Fotografías Digitales Para Identificar Bebidas Embotelladas en Neveras y/o Góndolas. 2018. Available online: https://revistas.poligran.edu.co/index.php/wpmis/article/view/1075 (accessed on 1 February 2025).
  12. Julián, M.; Daniel, K.; Voigt, K. What drives the implementation of Industry 4.0? The role of opportunities and challenges in the context of sustainability. Sustainability 2018, 10, 247. [Google Scholar] [CrossRef]
  13. Thorvald, P.; Lindblom, J.; Andreasson, R. On the development of a method for cognitive load assessment in manufacturing. Robot. Comput.-Integr. Manuf. 2019, 59, 252–266. [Google Scholar] [CrossRef]
  14. Krones. Investigación Colaborativa Entre Industry Week Custom Research y Kronos Incorporated: El Futuro de la Fabricación: 2020 y Más Allá; Informe técnico; Krones: Baviera, Alemania, 2016. [Google Scholar]
  15. AR Racking. Merma en el Almacenaje Industrial: Concepto, Causas y Soluciones. AR Racking. 2025. Available online: https://www.ar-racking.com/mx/blog/merma-en-el-almacenaje-industrial-concepto-causas-y-soluciones/ (accessed on 1 January 2025).
  16. International Organization for Standardization. Quality Management Systems—Requirements. 2015. Available online: https://www.iso.org/obp/ui/#iso:std:iso:9001:ed-5:v1:es (accessed on 1 February 2025).
  17. Gijsbrechts, J.; Boute, R.N.; Van Mieghem, J.A.; Zhang, D.J. Can deep reinforcement learning improve inventorymanagement. Performance on dual sourcing, lost sales and multi-echelon problems. Manuf. Serv. Oper. Manag. 2022, 24, 1349–1368. [Google Scholar] [CrossRef]
  18. Oroojlooyjadid, A.; Nazari, M.; Snyder, L.V.; Takac, M. A deep q-network for the beer game: Deep reinforcement learning for inventory optimization. Manuf. Serv. Oper. Manag. 2022, 24, 285–304. [Google Scholar] [CrossRef]
  19. Fan, G.; Li, A.; Zhao, Y.; Moroni, G.; Xu, L. Human factors complexity measurement of human-based station of assembly line. Hum. Factors Ergon. Manuf. Serv. Ind. 2018, 28, 342–351. [Google Scholar] [CrossRef]
  20. Santos López, F.M.; Santos de la Cruz, E. Aplicación de un modelo para la implementación de logística inversa en la etapa productiva. Ind. Data 2010, 13, 32–39. [Google Scholar] [CrossRef]
  21. Salas-Arias, K.M.; Madriz-Quirós, C.E.; Sánchez-Brenes, O.S.; Sánchez-Brenes, M.; Hernández-Granados, J.B. Factores que influyen en errores humanos en procesos de manufactura moderna. Rev. Tecnol. En Marcha 2018, 31, 22–34. [Google Scholar] [CrossRef]
  22. Ferrer-Blas, R.I.; Galarcep-Barba, I.; Solano-Gaviño, J.C. Lean Manufacturing en la producción de alimentos: Revisión sistemática, análisis bibliométrico y propuesta de aplicación. Sci. Agropecu. 2024, 15, 569–579. [Google Scholar] [CrossRef]
  23. Bowler, A.; Escrig, J.; Pound, M.; Watson, N. Predicting alcohol concentration during beer fermentation using ultrasonic measurements and machine learning. Fermentation 2021, 7, 34. [Google Scholar] [CrossRef]
  24. Mariajayaprakash, A.; Senthilvelan, T.; Gnanadass, R. Optimization of process parameters through fuzzy logic and genetic algorithm—A case study in a process industry. Appl. Soft Comput. 2015, 1, 94–103. [Google Scholar] [CrossRef]
  25. Averill, A.F. The usefulness and application of fuzzy logic and fuzzy AHP in the materials finishing industry. Trans. Inst. Met. Finish. 2020, 98, 224–233. [Google Scholar] [CrossRef]
  26. Vargas-Hernandez, J.G. Steadiness approach and change approach in perspective of industrial engineer. Ing. Ind. Actual. Y Nuevas Tend. 2016, 17, 153–174. [Google Scholar]
  27. Kayri, M. Predictive abilities of bayesian regularization and Levenberg–Marquardt algorithms in artificial neural networks: A comparative empirical study on social data. Math. Comput. Appl. 2016, 21, 20. [Google Scholar] [CrossRef]
Figure 1. Liquor plant supply chain.
Figure 1. Liquor plant supply chain.
Processes 13 02843 g001
Figure 2. Variable impacts morning shift 1 (worker A).
Figure 2. Variable impacts morning shift 1 (worker A).
Processes 13 02843 g002
Figure 3. Variable impacts evening shift 1 (worker B).
Figure 3. Variable impacts evening shift 1 (worker B).
Processes 13 02843 g003
Figure 4. Biogas storage system.
Figure 4. Biogas storage system.
Processes 13 02843 g004
Figure 5. Evolution of state variables during training.
Figure 5. Evolution of state variables during training.
Processes 13 02843 g005
Figure 6. Diffuse ranges of shrinkage determined by the company.
Figure 6. Diffuse ranges of shrinkage determined by the company.
Processes 13 02843 g006
Figure 7. Fuzzy rules for the model.
Figure 7. Fuzzy rules for the model.
Processes 13 02843 g007
Table 1. Example of production data for the first half of 2024.
Table 1. Example of production data for the first half of 2024.
2024SHIFTLINE MANAGERLINE 1PRODUCTION PLANMACHINE
FAILURES
WEEK 1MONDAYSHIFT 1Worker A171518000
SHIFT 2Worker B175518000
TUESDAYSHIFT 1Worker A181218000
SHIFT 2Worker B176018000
WEDNESDAYSHIFT 1Worker A165318001
SHIFT 2Worker B174718001
THURSDAYSHIFT 1Worker A189018000
SHIFT 2Worker B181618000
FRIDAYSHIFT 1Worker A176318001
SHIFT 2Worker B168218002
SATURDAYSHIFT 1Worker A170818001
SHIFT 2
Table 2. Examples of data on losses first half.
Table 2. Examples of data on losses first half.
WEEKDAYSHIFTLINECAPLABELLIQUIDBOTTLETAGBOX
WEEK 1 MONDAYSHIFT 1LINE 11.461.744.515.222.094.86
SHIFT 2LINE 11.452.024.353.633.803.54
TUESDAYSHIFT 1 LINE 13.604.842.834.933.144.06
SHIFT 2LINE 14.762.105.515.712.353.68
WEDNESDAYSHIFT 1LINE 11.853.484.713.222.984.10
SHIFT 2LINE 14.164.722.924.541.345.46
THURSDAYSHIFT 1LINE 13.611.893.372.601.083.84
SHIFT 2LINE 13.444.825.182.553.282.43
FRIDAYSHIFT 1LINE 12.465.855.651.922.384.99
SHIFT 2LINE 13.015.464.801.481.753.36
SATURDAYSHIFT 1LINE 12.312.043.712.833.354.44
SHIFT 2LINE 1
Table 3. Representative sample of the neural network training data (Shift 1).
Table 3. Representative sample of the neural network training data (Shift 1).
Shift ConveyorFillerCapper LabelerTag LabelerLoss in Liters
13.265.954.155.233.8115.40
25.023.566.164.762.6419.71
15.645.625.472.602.7021.15
25.671.725.405.093.8322.09
14.515.903.314.493.0517.31
24.763.955.663.363.2720.17
14.816.143.724.701.6311.45
24.635.646.063.091.5014.90
14.234.424.315.592.2322.55
22.776.175.472.853.4619.84
15.333.415.252.203.8518.16
25.374.085.913.021.6912.69
13.764.024.623.603.9010.27
25.554.835.931.691.9421.52
13.292.115.995.263.2511.24
25.792.785.172.433.7122.36
15.542.215.454.062.1517.47
25.085.222.163.213.6821.22
14.932.833.604.843.1420.39
24.323.945.841.503.7616.81
13.205.475.303.901.1615.76
23.845.502.644.902.0521.35
11.333.965.365.672.9420.55
24.475.201.434.452.2019.96
12.932.295.515.101.6018.80
22.824.455.813.463.5611.61
Table 4. Representative sample of the neural network training data (Shift 2).
Table 4. Representative sample of the neural network training data (Shift 2).
ShiftConveyorFillerCapperLabelerTag LabelerLoss in Liters
15.343.583.604.361.6215.40
24.082.413.105.842.9219.71
15.214.182.154.541.9521.15
25.322.143.994.792.3922.09
11.925.652.463.192.8517.31
23.975.064.202.141.5720.17
15.484.134.985.181.1811.45
22.992.584.213.262.8014.90
12.864.426.033.071.1122.55
23.153.524.985.092.8519.84
14.882.881.723.883.0118.16
22.164.505.183.611.8412.69
11.883.735.142.383.1510.27
23.663.805.113.772.5221.52
14.643.532.341.973.1011.24
21.725.935.704.042.0522.36
12.273.915.315.742.6814.47
Table 5. Analysis and production of waste obtained with the neural network.
Table 5. Analysis and production of waste obtained with the neural network.
TOTAL LOSS PREDICTION LINE 1
Estimate of Bottles Produced for the Next SemesterTotal Losses Line 1Shift 1Shift 2Percentage of Total Loss
4,856,868813,815387,517426,29916.75
47.62%52.38%
Table 6. Configuration of hyperparameters.
Table 6. Configuration of hyperparameters.
HyperparametersValues
Gamma0.9
Learning rate0.00001
Agent history (m)3
Number of neurons per layer[32, 64, 128]
Activation function[RELU, RELU, RELU, LogSigmoide]
Loss functionMSE
mini batch size64
Optimization algorithmAdam
Table 7. Second half shrinkage predictions using artificial intelligence.
Table 7. Second half shrinkage predictions using artificial intelligence.
Second Half Shrinkage Predictions Using Artificial Intelligence
Finished productWasteShift 1Shift 2
4,856,868
bottles
813,815
products
Estimated loss of 47.62% defective products
(387,517)
Estimated loss of 52.38% defective products (426,299)
Table 8. Failure rates for Shift 1.
Table 8. Failure rates for Shift 1.
LabelerFillerTag LabelerConveyorCapper Reduced
Liquid
35%21%17%12%11%0.9%
Table 9. Failure rates for Shift 2.
Table 9. Failure rates for Shift 2.
FillerCapperLabelerConveyorTag
Labeler
Reduced Liquid
29%25%24%10%8%1%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lozano Luna, A.; Martínez Sibaja, A.; Bello Ramírez, A.M.; Rodríguez Jarquin, J.P.; Heredia Roldán, M.J.; Alvarado Lassman, A. Prediction of Losses in an Agave Liquor Production and Packaging System Using a Neural Network and Fuzzy Logic. Processes 2025, 13, 2843. https://doi.org/10.3390/pr13092843

AMA Style

Lozano Luna A, Martínez Sibaja A, Bello Ramírez AM, Rodríguez Jarquin JP, Heredia Roldán MJ, Alvarado Lassman A. Prediction of Losses in an Agave Liquor Production and Packaging System Using a Neural Network and Fuzzy Logic. Processes. 2025; 13(9):2843. https://doi.org/10.3390/pr13092843

Chicago/Turabian Style

Lozano Luna, Alejandro, Albino Martínez Sibaja, Angélica M. Bello Ramírez, José P. Rodríguez Jarquin, Miguel J. Heredia Roldán, and Alejandro Alvarado Lassman. 2025. "Prediction of Losses in an Agave Liquor Production and Packaging System Using a Neural Network and Fuzzy Logic" Processes 13, no. 9: 2843. https://doi.org/10.3390/pr13092843

APA Style

Lozano Luna, A., Martínez Sibaja, A., Bello Ramírez, A. M., Rodríguez Jarquin, J. P., Heredia Roldán, M. J., & Alvarado Lassman, A. (2025). Prediction of Losses in an Agave Liquor Production and Packaging System Using a Neural Network and Fuzzy Logic. Processes, 13(9), 2843. https://doi.org/10.3390/pr13092843

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop