Optimal Production in Vacuum Food Packaging Thermo-forming with Linear Programming

. This article presents an optimization model to determine the ideal production distribution in the thermoforming lines of a sausage factory. A linear programming model subject to the simplex method is used to find the production coefficient, determining the ideal workload for three machines involved in the packaging process. The methodology considers common characteristics of the sausage industry, where production programming, thermoforming machines, and their capacities are the ones that directly influence the execution of the experiment. Using the model allows for analyzing the variations of the actual production plan and its effectiveness against the optimized production re-sults. The experiments compared and evaluated the fulfillment of the optimization objective. The modeling was executed with the free software language programming R. A mathematical model was generated that allows evaluating and programming the optimal production in the thermoforming lines to maximize packaging and optimize resources, considering the restrictions of the process. The purpose is to avoid overproduction and misuse of available resources. The results show that the model makes it possible to optimize daily production in the thermoforming lines by 11% for October and 8% for March, equivalent to 5,500 and 3,500 units per day, respectively.


Introduction
In the production process of the food industry, several factors can be optimized to avoid waste.Industrial overproduction is one of the most latent and common factors because, with more production, it is necessary to have more inventory, and its inherent need for storage space, add costs generated by the transport of products, increase in delivery times waiting in production, more risks of defects, etc. [1].
In the food industry, packaging is one of the fundamental and most important processes because it intervenes directly in the conservation and protection of these in the presence of external contamination agents, whether physical, chemical, or biological [2].The packaging preserves the shape and texture of the food, prevents it from losing flavor and aroma, prolongs the storage time, and regulates the water or humidity content [3].
Packaging systems can be classified into four groups: primary, secondary, distribution or tertiary packaging, and unit load packaging [4].The primary comes into direct contact with the product; its primary function is to contain and preserve.These packages must be nontoxic, compatible with food, and not cause any change in their attributes [5].
Different types of raw materials are used for packaging depending on the kind of food contained, conservation characteristics, shelf life, transport distance, external factors, and logistical requirements.The packaging is endorsed by regulatory entities, such as the Codex Alimentarius, the World Health Organization (WHO), and in Ecuador, the National Agency for Regulation, Control and Sanitary Surveillance (ARCSA) [5] [6].The primary packaging materials are glass, tinplate, cardboard, and plastic substrates.The latter is the most common today and is used for packaging various foods [4].
Plastics are materials that thermal processes can mold, at low temperatures and pressures, compared to metals and glass [7] [8].Plastic packages are characterized by organic substances whose structure is macro-molecular polymeric.They have a low cost in the market, low density, permeability, and impermeability, are thermal insulators, and resist corrosion because they have high flexibility [6].
Generically, plastics can be classified as thermoplastic and thermosetting [9].The former comprises linear polymers that soften when heated and can be modified.At the same time, the thermosets are three-dimensional polymers, which, once rigidity has been acquired at a specific temperature, cannot be worked again [10].There are hundreds of species of synthetic polymers, but in practice, only a few are used for food packaging due to their low cost and good mechanical properties [9].The most common are usually polyethylene (PE), polypropylene (PP), polyethylene terephthalate (PET), polystyrene (PS), and polyvinyl chloride (PVC) [11] [12].In addition, these polymers can be modified depending on the required properties, such as stiffness, elasticity, color, and degradability, and can be recycled or incinerated [12] [9].Vacuum packaging is a prevalent preservation method in the food industry.It attempts to generate a vacuum field around the food and keep it inside the packaging [13].Its effect is due to creating an environment with a lack of oxygen that causes a severe or total inhibition of potential spoilage organisms so that a prolonged helpful life is obtained by being able to preserve the organoleptic characteristics [14].
Thermoforming is a thermal process that involves creating or stretching a preheated sheet of polymer on the surface of a mold that produces its specific shape.This process uses the opposing pressure force of the vacuum to pull the polymer and generate the vacuum thermoforming [15].It is considered one of the oldest processing methods of plastic material processing [16].
In food packaging, through thermoforming, the leading causes that generate waste correspond to failures in the planning and execution process, excess freedom to produce, erroneous internal performance metrics, more prolonged production cycles that do not consider adequate speed operation, extra supplies, and excess or deficiency of capacity in the production lines [17].These factors determine an overproduction that does not consider the customer's demand and creates a bottleneck in the process line.
On the other hand, operations research is a mathematical sub-discipline that supports decision-making in allocating resources through mathematical optimization models, which establish strategies and guidelines to improve the competitiveness and performance of organizations [18] [19].Within the analytical models of operations research, linear programming is one of the mathematical programming tools used to generate models and solve problems in various productive areas, such as production planning and control, design and implementation of industrial processes, reengineering, plant administration, maintenance, manufacturing, inventory, and supply chain management, among others [20] [21] [22].Linear programming seeks to maximize or minimize a linear function, considering primary variables, to generate an objective function.Variables are subject to constraints [23] [24].
The agro-industrial and livestock production field uses these mathematical algorithms to improve its results at a productive level.An investigation by [25] uses linear programming to generate a model that allows the selection of the optimal crop plan and the allocation of diet feeds to minimize the feeding costs of the entire dairy farm.The result of the implementation of the model improved the income over the feeding costs of the herd per kilogram of milk produced due to greater food self-sufficiency and higher revenue from commercial crops.
Angizeh et al. [26][27] propose to minimize the total manufacturing cost by cooptimizing the production lines' operation schedule of the production lines.The research uses Mixed Integer Linear Programming (MILP) for optimal operation in food manufactur-ing plants.The results showed that the proposed model allows manufacturers to improve production efficiency and save on operating costs by co-optimizing the production line operation schedule.
It is widespread to find waste from the Lean system through overproduction within the industrial field.This problem occurs mainly in the food industry due to demand variability.In addition, food packaging is not a trivial task since it guarantees conservation and prolongs food's useful life, from storage to dispatch.This problem directly influences the production flow because, at a certain point, an attempt is made to maintain a higher rate than what the different machines can provide, which creates bottlenecks in the production chain.

Production Process Description
The case study where the production process monitoring was carried out corresponds to the packaging area of a sausage factory in Cuenca -Ecuador.This factory has approximately 800 employees and corresponds to a large company in southern Ecuador.The daily output ranges from 35 to 50 tons, which depends on customer demand.In addition, the company has a BPM certification endorsed by the Agency for Regulation, Control and Sanitary Surveillance of Ecuador (ARCSA), i.e., its processes guarantee safety and ensure the quality of the final product.The production area is divided into three sections: the meat area, where the carcass is deboned; the sausage production area, where the manufacture of meat derivatives takes place; and the packaging area, where the finished product is packed.The latter is where the study of the optimization model will be carried out.The packaging area has different processing lines whose purpose is to enhance the appearance of the product through the presentation of the packaging and guarantee the conservation and durability of the other products.The thermoforming process is carried out in three process lines with their respective thermoforming machines.In each machine, it is known the mold type, units per cycle, cycle times per mold, and packing capacity depend on the food and presentation.Table 1 details the technical and capacity specifications of the thermoformed machines.In the sausage industry, there are specific critical processes for the continuous control of production that directly influence the result of the product.Quality inspectors are responsible for keeping track of these processes to guarantee compliance with the established conditions before the release of the products to the next procedure.Because raw meat material and its derivatives are highly perishable, cooling is one of the main control points.The storage and packaging temperatures of the product must be between 4 and 8 ºC.

Methodology and Information Treatment
For this scientific article, the data of the production orders of the thermoforming lines were analyzed, which have the purpose of planning the production process at the execution level and containing all the necessary information to execute the production.The types of molds and established process times were mainly analyzed.The data collected was obtained from the portfolios of the packaging area for the years 2021 and 2022.The execution of the analysis began with identifying the restrictions of the process, in particular cases, to determine the assumptions and conditions of the subject of study.The proposed methodology incorporates several common characteristics in the food industry and requires special conditions.Thus, sequence limitations, which allow knowing the product's availability instantly, are usually one of the restrictions to consider within the modeling process.Sequence constraints impose a specific production order that is not always right since the transition between products requires more time and generates higher costs.For the case study, the demand for products that detail the production orders was grouped by molds, regardless of the product type, to reduce the size of the objective function.Fig. 1 shows the methodological scheme of the sequence of processes to be carried out.For the analysis of the data, the information was organized considering the following aspects: days corresponding to the month of study, type of machine and type of mold used in each machine, as well as the total units programmed per machine, the total units per mold corresponding to each machine and the total number of units programmed per mold regardless of the machine.For October 2021, 26 workdays were analyzed, and 15 data were collected daily, i.e., 390 for this month.On the other hand, in March 2022, 27 days were worked, and 15 data per day were analyzed similarly, with a total of 405 records.

Formulation of the Mathematical Model
In the linear programming model proposed in this research, five decision variables are taken as input, an objective function to be maximized, and a set of restrictions expressed as linear inequalities.These elements of the mathematical model are derived from the production processes and requirements of the company, taken as a case study: 1. Selection of thermoforming machines and types of molds used in packaging.
2. Calculation of the capacities of the thermoforming process with their respective cycle times.
3. Temporal definition of the months to be evaluated based on the historical behavior of production.
4. Data extraction from production orders in the defined months.To simplify the nomenclature of the linear programming model, the mold type variable has been codified.Where: MR = X1: Round mold M4 = X2: Four-cavity mold M6 = X3: Six-cavity mold M8 = X4: Eight-cavity mold ML = X5: Long mold The mathematical model was based on the number of packages planned per mold, regardless of the thermoforming machine.Historical quantities are in the following reposi-tory: https://github.com/dievalhu/vacuum_packed.The objective function was maximized, which allows evaluation and programming of the optimal production in thermoforming lines for food packaging.This allows packaging resource optimization, considering the process's capacity restrictions.The mathematical model was evaluated using the object-oriented pro-gramming language R and the framework RStudio.The evaluation of the model is analyzed daily; that is, the scheduled production data is entered, and with the help of the software, the production coefficient is obtained as a result.The variables in obtaining this coefficient correspond to the total planned by type of mold regardless of the machine, the capacity of each machine by type of mold, and the total number of packages planned by the machine.The solution of the model is replaced in the objective function and in the capacity constraints to know the optimized production and the ideal daily schedule per machine.
Objective Function: The objective function, represented in Eq. 1, generates the maximum daily production in the packaging process, considering production times.
That is: Where: The developed model focuses on finding the optimal programming for each thermoforming line, so it is subject to the following restrictions: Constraint 1: Production Capacity of Machine 1 (VC P-420).The expression represented in Equation 3 defines the number of units to be packed per day once the capacity for each mold is used in the VC P-420 thermoforming machine.
Where: Aj: Production capacity in the mold n Xj: Mold type D j: Production coefficient E1: Total production on the machine n = 1, ..., 5 Constraint 2: Production Capacity of Machine 2 (VC RS-420).Equation 4determines the number of units to pack per day, considering the capacity per mold used in the VC RS-420 thermoforming machine. Where:

Experiments and Results
The mathematical model to maximize the packaging and find the ideal production in each thermoforming line will allow us to determine the optimal number of packages per day in each machine.Then, it is possible to compare the result of the model against the data that the Where company's planning department determined and find the relative error, εr, between the model and the planned value.The experiments in data production for October 2021 and March 2022 validated the model.These months are not atypical, i.e., the production is carried out under normal work conditions.The experiment results were grouped by weeks to compare the planning and optimized results.

First Experiment
Table 3 shows the first week of October 2021 results.This week has only two days of production, and on the first day, a maximized objective function is obtained that exceeds 36,200 units, with a 1% error in favor of what was planned.The total programming by machines obtained varies between 1% and 2%, corresponding to the first two thermoformers.The third capacity restriction corresponding to the ULMA thermoformer proposes a schedule higher than planned, with 2% in favor of the model.The second week corresponds to a whole week of six days of production from Monday to Saturday.The results show that there are variations between the optimal and planned values that are summarized in Table 4. On day four, the total programming per machine proposed by the model is lower than the planning data, with a relative error of 14% in favor of the planner.For this day, the model shows that the VC RS-420 thermoformed should not be used, so the error is 100% concerning planning.On the other hand, the VC P-420 and ULMA thermoformers present an error that does not exceed 2%.Thus, the model proposes packing 61 more units for the first machine and optimizes the production of machine three to 10,800.For day five, the ULMA and VC RS-420 thermoforming machines are the ones that generate the most significant divergence between the optimal and planned values.On day six, the model's total programming per machine proposed is the one with the minor error throughout the week.
In addition, Table 4 summarizes the results for weeks three through five.Thus, on the 11th day, the planning suggests a low production of 28,415 units to be packed, and the variation between machine one and machine three ranges from 8% to 14% concerning what was planned, i.e., close to 7,000 optimized units.The model calls for machine two to be inac-tive on this day.For days 12, 13, and 14, the total production of the machines proposed by the model is optimized by 11%, 16%, and 0.1%, respectively.Day 15 presents a particularity since the model's response offers a higher production than planned by planning, close to 2000 units, with the VC P-420 thermoforming machine and ULMA having the highest productivity.Finally, as relevant data, for day 16, the model suggests that machine two should not work and that machines one and three should supply the total packaging production.
On the first day of the fourth week, a production of 28335 units is scheduled, which is relatively low, and the mathematical model proposes a production of 29040.The total relative error of output for this day is barely 2%.It is necessary to mention that this percentage of divergence between the planning and the optimal value is maintained with a similar error for days 19, 20, 21, and 22. Finally, on days 25, 26, and 30, there should be a higher production than planned by the organization.The production proposals must be increased by 8%, 3%, and 7%, respectively, for these three days.On the 25th day, the model suggests the production of 2,126 more units, compared to the planned total, the most significant quantity compared to the rest days.Another relevant data that the model proposes for this week is the total production of days 25 and 30, in which an increase of 3002 additional units is advocated the actual planning data, so it is understood that the model considers it viable increasing production due to the availability of resources that probably occurred these days.Finally, on day 30, it is observed that the second machine remains inactive, and the model corroborates this.

Second Experiment
Unlike the October, the March results interpretation is presented globally in Table 5.To comment and discuss in a general way the variability that the data presented in this month's analysis, the minimum, maximum values, and the weekly average are shown to identify the divergences of the optimization results concerning the planning data.In addition, each day's absolute and relative errors are detailed.
The month begins with a weekly production that oscillates between approximately 8 and 15 working hours and contains five days of production.High variation values between planning and optimization are evident on days three and four, with errors of 18% and 24%, respectively.For the first week, the total relative errors are distributed from 9% to 24%.The first week generates the highest error of the entire production month against historical data.Day five is the day with the lowest production of the whole first week and generates an error of 9% compared to the planning data.In contrast, week two presents a minimal variation in the programming.The result of the model generates an average error of 4%, reaching an average optimization that does not exceed 1,500 units.As relevant data for this week, days 9, 10, and 12 stand out, where a difference is observed that exceeds the planning data, i.e., the model proposes a production in surplus, making the most of the capacity of the machines.In the analysis of week three, the most extensive range of variation of the month is observed, with a minimum value of 2% and a maximum value of 25%.It is the week with the most  optimized units in the month.Finally, it is necessary to observe that for the 14th day of week three, the model proposes a production in surplus compared to the planning data.In week four, there is a relatively low average variation of 6% and a range that oscillates between 1% and 11%, corresponding to the minimum and maximum values.Days 23 and 24 generate the most significant difference between the optimized proposal and the planning, exceeding 5,000 units.The last week of the month presents a low production that does not exceed nine hours of work and four days of production-error variations in programming range between 5% and 13%, with an average µ = 8%.The diagram in Fig. 2 summarizes the weekly average of the variations generated by the programming model for the two months analyzed and their distribution within the five weeks of operation.In general, the diagram shows that the model tends to optimize results with the production of less packaging than what the company's planning department suggests.The range of minimum and maximum values oscillates between 23520 and 45979 units.The minimum corresponds to an optimal production value, and the maximum to a planned value.The increase in production is evident between October and March of 2022.Finally, in October 2021, the production planning and the optimization proposal were close to or below the global mean.The latter presumes a gap in the use of capacity in the thermoforming lines, calling into question the current production planning methodology of the company.
Fig. 3 analyzes in percentage terms the absolute means of the relative errors corresponding to the five weeks of both months of study and considers their respective standard deviations.In general terms, October 2021 has the highest percentage of error, unlike the year 2022, with week four being the one with around 18% errors.Unlike this month, March generates a maximum variate error percentage, which does not exceed 15%, with a deviation of plus or minus 7% corresponding to the first week of the month.The variations for the rest of the weeks in March are minimal since they range from 1% and 8%.However, the deviations for October have a greater range, ranging between 5% and 40%, generating more significant uncertainty.On the other hand, the error percentage for week three is 11% in both months, with a deviation of 8%.In terms of efficiency, week 2 is the one that stands out in both cases, presenting an error of 8% and 4% respectively, with a minimum deviation between 1% and 5%, with the lowest values of relative error, so that the relationship between the methodological proposal and the actual planning for that week had a certain degree of similarity and correlation in both months.The scripts with which the linear programming models were generated in this research are hosted in the Github code repository: https://github.com/dievalhu/vacuum_packed.

Conclusions and Limitations
This research proposed a mathematical optimization model aimed at food packaging by thermoforming to achieve its maximization and adequate production distribution for the different lines involved in the process.The model was evaluated in two other months corresponding to 2021 and 2022, where production was maintained under normal working conditions, to obtain data that serve as a basis for an annual projection analysis.In addition, the existing variations between the model proposal and the actual planning were identified, which evidenced two scenarios of over and under-production, considering the real value planned by the organization as the basis.With the execution of the historical data analysis, optimizations with high percentages were evidenced, with 25% being the maximum value obtained in one workday, fully considering the capacity restrictions.For October, an average optimization proposal of 11% is obtained; however, for March, an average optimization of 8% is reached, so that, in the first instance, a level of variation equivalent to 5500 and 3500 optimized units, so obviously, the model is effective in both cases.On the other hand, a methodological proposal is an appropriate tool to effectively balance the workload in the thermoforming lines and achieve maximum productivity by using fewer hours of work.If the model had been applied in the study months, 12.7 fewer hours of work would have been used in October and 15.5 in March, representing a positive impact by generating economic savings for the organization.
The modeling results allow us to optimize the production in the thermoforming lines and effectively reduce the production load through the ideal distribution of work, considering the capacity of the lines as a basis.It is essential to mention that new restrictions can be added to the proposed model that was not considered in this proposal but may adjust the results in the objective function.This model can be applied in organizations with operating characteristics like those described in the methodology, involving process engineering in their business model.
Linear objective function Di: Production coefficient Xi: Total packages programmed by type of mold n = 1, ..., 5

)Bk: 4 Constraint 3 :
Production capacity in the mold m Xk: Mold type Dk: Production coefficient E2: Total production on the machine k = 1, 2, Production Capacity of Machine 3 (ULMA).The ideal production for the ULMA thermoforming machine is represented in Equation 5, considering the capacity per mold used in this machine.Production capacity in the mold p

Figure 2 .
Figure 2. Average comparison of production variations for October 2021 and March 2022 according to the model proposal and the actual planning

Table 1 .
Technical specifications of thermoforming lines

Table 3 .
Model Vs.Planning Results: October Week 1

Table 4 .
Model Vs.Planning Results: October Week 2 to 5

Table 5 .
Model Vs.Planning Results: October Week 2 to 5