A DISCRETE STOCHASTIC MODEL TO DETERMINE FOOD QUALITY BY USING SIMULATION: A STRAWBERRY CASE STUDY

The agri-food supply chain (AFSC) sets a series of challenges in the production, storage, distribution, and transportation processes, as the market's requirements for fresh food combine food quality and safety attributes. This research suggests a discrete event modeling to study the behavior of food quality in all supply chains (SCs) in terms of temperature and time variables in a stochastic manner. The ProModel software was used to simulate strawberry quality in the SC, considering a distribution route to export the fruit from Mexico to the United States. The suggested model together with a computer simulation analyzes the fruit quality from two perspectives: with and without a cold chain (CC). The obtained results revealed that in the case of CC usage, when consumed the strawberry's average quality was 85%. In the approach without CC, the results revealed that when the strawberry arrives and remains in the distribution


Agri-Food Supply Chain and Food Quality
The growing development of electronic trade of fresh food with population changes and the evolution of food security standards dictates a growing demand for food of high quality. In that context, the supply and demand for food are among the most dynamic areas of international agricultural commerce. Therefore, the technological and administrative advances in production at an orchard level in the post-harvest management, storage, processing, and distribution have played a facilitating role in agri-food supply chain (AFSC) (Miranda et al., 2014;Xue et al., 2014).
Nearly one-third of the food produced for human consumption is lost or wasted along the supply chain, equaling a total of 1.3 billion tons of food per year (Schanes et al., 2018). Due to diverse weather conditions, global food demand, and instability in prices of commodities, the supply of agricultural products is volatile (Tsolakis et al., 2014). In such a way that it is essential to pay attention to optimization models, technologies, and tools that allow the minimization of food waste, maximizes quality, and in all SC.
Food quality can be measured by color, presence or absence of certain flavor compounds, presence or absence of specific microorganisms, texture, vitamins, protein composition, among others (Aung & Chang 2014;Van Boekel, 2008). Göransson et al. (2018) mention that a large part of food waste is related to poor temperature conditions in storage and distribution processes. Therefore, temperature is an influential factor affecting the quality of food and poor control of temperature in the supply chain can cause up to 35% loss of products, as well as financial losses, higher operating costs, and bad relationships among those involved. Therefore, the market requirements for food are a group of quality and food safety attributes that a specific client or a niche market demand. In this sense, prices are established depending on the national and international standards that regulate the control, harmlessness, the trade Engenharia Agrícola, Jaboticabal, v.40, n.6, p.747-758, nov./dec. 2020 of food. For example, the United States, with its Food Safety Modernization Act establishes standards to adopt modern prevention practices of food safety for those who cultivate, process, transport, and store food (Adalja & Lichtenberg, 2018;Shinbaum et al., 2016). This is performed in a way that quality has a direct relationship with the price of the product.
In this sense, this study proposed a model to evaluate the quality of food (sensory approach) in a discrete and stochastic manner using kinetic and the Arrhenius equation, which allows for the evaluation of the quality of food in terms of variations in temperature that occurs in different stages of the supply chain.

Kinetic Equation
Considering that foods are a complex biological system where several chemical, microbial, biochemical, and physical reactions occur, they are therefore unstable in a thermodynamic sense. Thermodynamics indicates the direction of the change, but not the speed at which it happens. Thus, the impact of kinetics must be assessed, according to the change (speed) with which the quality of the food varies, depending on time. The kinetic model describes the degradation of one or several food compounds, such as the formation of undesired properties and physical changes (as seen in color). Therefore, kinetic data are used to evaluate how the deterioration process behaves, considering a rate constant at a constant temperature. Additionally, in the mathematical model, other sensory characteristics such as odor, scents, flavor, volume, and weight can be evaluated as described in [eq. (1)] (Van Boekel, 2008;Zhang et al., 2016). Where: Q is the quality attribute to be measured; t is the time; k is the rate constant of the chemical reaction (constant rate of quality loss), and n is the level of reaction.
The biochemical/physicochemical reactions that occur in foods during their storage, distribution, and processing sometimes end in a quality loss and must be minimized, while as time goes on others cause the formation of a desired flavor or odor and must be optimized to obtain the best quality of the product (Besik & Gurney, 2017).
In this context, chemical kinetics studies the speed or rate at which chemical reactions are produced according to time (Doona et al., 2016;Saavedra et al., 2013). In the case of fresh foods, the kinetic equation evaluates changes in their properties according to time; that is, it evaluates the rate at which the food quality changes according to intrinsic and extrinsic factors. Marangoni (2017) states that to evaluate the reaction rate, changes are measured in the concentrations of reagents or products per unit of time: the reagent's concentration decreased while the product's concentration increased. The general reaction → , which measures the initial concentration of the reagent A1 in t1, after the initiation of the reaction, the final concentration of the reagent A2 in t2 is remeasured. The change in the concentration divided by a change in time is a measure of the reaction rate (Equation 2): This mechanism can be modeled through the differential equation (Equation 3): It is modeled in a way that a change in the concentration of reagent A is similar to the change in the concentration of a quality factor Q, which is going to be evaluated. For our research, we analyzed the most general case by considering the quality variable Q, as a time function, which is the corresponding kinetic equation as indicated in [eq. (1)]. Ling et al. (2015); Peleg et al. (2014); and Weiss et al. (2018) stated that the kinetic equation in foods, follows a zero-, first-, and second-order reactions, which is according to the intrinsic characteristics of foods to be evaluated. The authors mentioned in this paper also referred to such equation, which classified the order of the kinetic equation (n = 0, 1, 2) in terms of the superscript of the variable Q n . However, mathematically the differential equation is always a first-order equation, and the order changes when the variable of quality Q has the superscript 0, 1, or 2; this allows the modeling of three cases regarding the rate of food degradation.
The kinetic equation solutions for the orders mentioned are shown below, n = 0, 1, 2, in Table 1. They are presented in a way that the quality standard for each of the three orders of reaction has the following behavior: for n = 0, the degradation of the food quality has a linear adjustment. When n = 1, there is an adjustment to an exponential behavior, and for n = 2, the adjustment is hyperbolic, which is consistent with the solutions to the differential equations (Table 1). Such behaviors are shown in Figure 1. Quality Q depends on a continuous variable-time t and the constant reaction rate k. For the model to be more adequate in determining the behavior of quality deterioration in the SC of food, it becomes convenient to resume the study by Harcourt & Esson (1867), which focused on making k dependent in terms of temperature; such dependence is included in the mathematical model expressed in the so called the Arrhenius equation.

Arrhenius Equation
Another variable that influences the rate of food degradation is temperature. A wrong measurement or inefficient temperature control in all SC processes can seriously alter the properties of food; therefore, temperature is considered the variable that affects food quality and shelf life (Mercier et al., 2017a). Ling et al. (2015) and Xue et al. (2014) stated that the Arrhenius model is the method used to relate the rate of chemical reaction to changes in temperature T over a constant reaction rate k, which is shown in [eq. (4)]. Where: k is the constant chemical reaction rate; kA is the pre-exponential factor or constant rate; EA is the activation energy (J/mol); Rgas is the ideal constant of gases (8.314 J/mol·K), and T is the absolute temperature in Kelvin (K) scale.
In this context, the relationship between kinetic and the Arrhenius equations, and the latter with the Van't Hoff and Gibbs-Helmholtz equations will be analyzed. Besides, this study proposed a discrete-event model to study the behavior of food quality and particularly simulate the quality of strawberries in all SC in terms of temperature and time variables in a stochastic manner, in an environment where a cold chain (CC) is used and in another where it is not used, as it frequently happens in developing countries.

Mathematical Analysis of the Arrhenius Equation
The influence of temperature on the chemical reaction rate is mathematically described by the Arrhenius law or equation (k) (Barsa et al., 2012). In this context, Laidler (1984) stated that the Arrhenius equation was initiated mostly using the Van't Hoff treaty published in 1884, where the equilibrium constant K of a reaction appears, related to temperature T and heat of reaction ∆H, through the relation known as the Van't Hoff equation (Equation 5): Where: Keq is the equilibrium constant; ∆H is the activation enthalpy of the reagents to a transition state; T is temperature, and R is the universal constant of gases.
Alternatively, Roósz et al. (2016) stated that the starting point of the Van't Hoff equation is the Gibbs-Helmholtz equation where the dependence of temperature in relation to ∆ / at constant pressure is expressed, i.e., it calculates the changes in Gibbs energy, ∆G, in relation to temperature (Equation 6): Under these considerations, Garvín et al. (2017) stated that when a thermodynamic equilibrium is studied, the Van't Hoff equation, which is related to the free energy of Gibbs , enthalpy , and entropy with the equilibrium constant, is given by (Equations 7 and 8): By replacing eqs (7) and (8) in the [eq. (6)] yields (Equation 10): By integrating in the interval [ 0 , ], and considering that = ( 0 ) and = ( ) yields (Equation 11): Obtaining the so called Arrhenius equation (Equation 12): Considering the explanation of the origin of the Arrhenius equation, we can rewrite eqs (1) and (4), in the context where the quality variable depends on temperature , and the latter depends on time (Equations 13 and 14): That way, the solutions to [eq. (13)] are given by eqs (15), (16), and (17), for n = 0, 1, and 2; respectively, which are generalizations of the solutions to [eq. (1)]: The previous results make it possible to analyze the quality from a discrete approach, which leads to a more robust mathematical model because it allows the evaluation of food quality in terms of temperature variations that occur in the different stages of the SC with the objective of maximizing quality and making decisions regarding the CC.

Modeling of Fruit Quality of Strawberry: A Case Study
To analyze a specific case of the quality behavior of a fruit at different temperatures, the strawberry was considered. It is highly perishable as it gets rotten, it loses firmness, it turns brown and its flavor changes few hours after being harvested. For that case, the research conducted by Do Nascimento (2008)  Engenharia Agrícola, Jaboticabal, v.40, n.6, p.747-758, nov./dec. 2020 Based on the work presented by Nascimento et al. (2014) and Nunes et al. (2003), where they considered a visual rating scale from 1-5 to assess strawberry quality. In this study, the same approach was considered, but a percentage scale was used to determine strawberry quality based on its appearance (color) (Figure 2). A percentage rating of 100% was considered the highest, while 0 was considered unsuitable for consumption ( Table 2). The authors stated that the shelf life of strawberries can be as short as 5-7 days, even when stored at 0 °C. Besides, they explained that when the strawberry is exposed to fluctuating temperatures, it develops a darker color and presents an evident dryness of the skin, thereby becoming unsuitable for marketing and consumption after approximately 3 days. Alternatively, considering the data reported in Nascimento (2008), it can be considered from a sensorial approach (color) that the strawberry's percentage quality must attain a value of 70% for it to be consumable. To establish to what order of kinetic reaction (n = 0, 1, or 2) the behavior of strawberry quality was adjusted, the data fitting method was applied to the linear regression model for = 0 and a model of exponential regression for = 1, using the values presented in Table 2, the coefficient of determination 2 was obtained. This statistic is a measure that relates the order between the dependent variable (quality) and the independent variables (time and temperature). A value close to 0 indicates that there is no relationship between the dependent and independent variables, while a value close to 1 indicates a perfect adjustment of the model with the experimental data. This procedure is simple and can be conducted in any statistical software. The results of 2 obtained using linear regression for the data of the five temperatures were 0 °= 1, 5 °= 0.9288, 10 °= 0.9529, 15 °= 0.9049, and 20 °= 0.7809. Alternatively, the results of 2 using an exponential regression model for the five temperatures were 0 °= 0.9998, 5 °= 0.8807, 10 °= 0.9712, 15 °= 0.9325, and 20 °= 0.9674. As seen in the previous values of 2 , the quality behavior adjusted to the order of reaction = 1.
Once the reaction order was determined, the values of the Arrhenius equation must be obtained; in equation (12). Considering the Arrhenius equation logarithmically = − / * 1/ and the changes in the variable = 1/ and = , using the linear regression method, with = + , where = and = − / , a solution = 52.874 − 16446 is obtained, whose graph is shown in Figure 3.

Discrete and Stochastic Model to Evaluate the Quality of a Food
Since throughout a distribution route, the temperature varies all along, having or not having the infrastructure of a CC, it is convenient to tackle the solutions of the kinetic and Arrhenius equations from a discrete and stochastic approach. To make an even more robust model, discrete and stochastic modeling has been used because it turns to be more adequate, as the temperature varies randomly and according to time.
The solution to Equations 15 and 16 were modeled in a discrete way in terms of the values of temperature ( ) given, therefore the Equations 20 and 21 were obtained: Where: is the elapsed time to conduct a process in the SC and ( ) is the probability distribution for time and temperature. Therefore, ( ) ( ) is the temperature in Kelvin scale that takes values according to the probability distribution and that will depend on the temperatures at which the process is being developed when evaluating food quality. Meanwhile, ( ) is the elapsed time to perform a process that depends on a probability distribution.

Simulation of strawberry quality in the supply chain
The discrete-event simulation technique has the advantage of modeling dynamic and stochastic aspects that mathematical programming does not consider. Since time and temperature cannot be considered constants in all processes of harvesting, packaging, storage, distribution, and selling to the final client, this simulation technique accommodates the modeling time and temperature stochastically (González-Hernández et al., 2019).
De Keizer et al. (2015) stated that besides the typical stochastic aspects of a SC, discrete-event simulation is a powerful tool to analyze risks, make strategic decisions, and model unstable environments, such as supply chains characterized by a high level of interdependence in all its links.
To model the supply chain, some stages, processes, and temperatures presented by Besik & Gurney (2017), Nunes et al. (2003), and Mercier et al. (2017b), were taken into consideration (Figure 4). Engenharia Agrícola, Jaboticabal, v.40, n.6, p.747-758, nov./dec. 2020Rodríguez-Gutiérrez et al. (2018 stated that the United States is the major strawberry producer with 12.2% of world production, followed by Mexico, Turkey, and Spain. To simulate the behavior of strawberry quality', the market between Mexico and the United States is going to be considered because Suha et al. (2017) mentioned that Mexico is the main supplier of strawberries in the U.S. market. The strawberries imported from Mexico, accounts for approximately 95% of the total imported strawberries in the U.S. market.
In this study, the strawberry exportation route that was considered goes from the production site in Michoacán, Mexico, through the Otay Mesa border between Tijuana and San Diego, to be distributed and consumed in several cities of California, USA.
The transportation times were considered for the simulation based on data presented by Google maps and Truck Router according to the locations of the facilities and the transportation load. Table 3 shows the processes, locations, temperatures, and times that were considered in the simulation of strawberry quality.

Stages of the process Location Temperature (°C) Time (h)
Harvesting and loading the product in transport Tangancícuaro The objective of this simulation model is to evaluate the quality of food considering the discrete and stochastic aspects of Table 3. The simulation was modeled using the ProModel software. Figure 5 shows the model that evaluates product quality within the simulation model. Strawberry distribution starts with the farmer. Then the product is stored in the farmer's warehouse for "time," at the end of the storage, the strawberry's quality is evaluated using Equation (21), considering that, the quality is a function of time and temperature . After the product is sent to the distribution center where it requires time to get to the location, the product is stored for time. When Engenharia Agrícola, Jaboticabal, v.40, n.6, p.747-758, nov./dec. 2020 the product arrives and leaves the distribution center, the strawberry's quality is evaluated. Finally, the product is sent to the market where it requires time to reach the location, and strawberry quality is evaluated. Time and temperature are probability distribution functions in the simulation model.

RESULTS AND DISCUSSION
To exemplify the proposal of [eq. (21)], which simulated the behavior of strawberry quality from two approaches: considering the CC and the non-refrigeration of the fruit. The simulation was conducted using 15 replicas for each approach. Additionally, [eq. (21)] must take specific values of the strawberry's behavior; in this case, data from [eq. (19)] were used to obtain [eq. (22)] as a result, which was considered in every location and different processes of the chain. The advantage of this simulation is that the food quality can be evaluated at any stage and time of the chain.
Ramirez-Nafarrate & Muñoz (2016) stated that the results of the variables being studied in the replicas used independent random numbers with the same starting rule, this implies that the random numbers of the executions are independent and identically distributed. As a result, statistical methods must be used to analyze the result of the simulation, where the study variable of the simulation's performance is measured in terms of a parameter ( ), the objective will be to create an estimator ( ') of (θ), making it possible to calculate the interval at which it is expected to find the real value of (θ) with a specific confidence interval.
In this study, a confidence interval of (CI) 95% was considered. In the case of the CC, data presented in Table  3 were taken into account. In Figure 6a, the quality behavior of the 15 replicas is observed. Figure 6b shows the quality average of strawberry through time in the SC. The results generated by the simulation revealed that the quality of the fruit after 6 days remained in good condition and was suitable to be consumed. The quality in the packing company remains at an average of 96.56%, while in the distribution center it decreased to approximately 92%, in the warehouse of the retailer it was 90.54%, and 85.25% in the store of the retailer (Figure 7). Finally, the consumer gets to eat strawberry with an average quality of 85%, as observed (Figure 6b).
(b) Average quality of the strawberry at 95% CI.  To simulate strawberry quality, without considering the temperature data in Table 3, the temperature according to the normal distribution was considered, with a mean of 10 °C and a standard deviation of 4 °C. The months of exportation of strawberry to the United States were taken into account for the aforementioned. Figure 8a shows the behavioral quality of the 15 replicas. Here, it was also considered a confidence interval of 95%. Figure 8b shows how the strawberry's quality decreased more than 30% after 60 h and when it reached 120 h, the fruit was no longer suitable for consumption. Figure 9 shows that if the fruit is distributed and stored in non-refrigerated conditions, it loses more than 40% of its quality before it gets to the distribution center.
b) Average quality without refrigeration.  The results previously described show that the exponential deterioration of strawberry decreases in conditions where there is no refrigeration since they are highly perishable, in approximately 120 h after harvest, they become unsuitable for consumption. In contrast, when there is a cold infrastructure, at the moment of consumption the fruit preserves 85% of its quality.
Notably, that the CC in developing countries is limited in infrastructure and technology due to the high costs of storage equipment and transport facilities, in addition to the operation costs and maintenance of the cold infrastructure. Here, the producers, distributors, and traders who are under these conditions must have strategies that allow them to deliver quality fresh foods.
Engenharia Agrícola, Jaboticabal, v.40, n.6, p.747-758, nov./dec. 2020 Considering Mexico's case, 47% of strawberry production is left for internal consumption. In that case, this study allows producers and traders to pay attention to the processes in the supply chain, as well as designing shorter distribution routes, besides reducing the number of intermediaries, aiming at maximizing the profits of everyone since the fruit quality has a direct relationship with the price of the product.
The advantage of using kinetic and the Arrhenius equations in a discrete and stochastic manner (Equations 20 and 21) with the discrete-event simulation as an applicable tool to determine the quality of fresh food allows the modeling of dynamic and stochastic parameters specific to the AFSC. This proposal has the flexibility to be applied to any fruit (apples, bananas, oranges, among others), vegetables (carrots, spinach, celery, among others), or different types of meats. Besides, it permits the analysis of the impact that the temperature variation has on food quality when a CC is used and when there is no refrigeration in the SC. Compared to a classic model, the Arrhenius equation is always evaluated at a constant temperature, but in real life the distribution of a food in the SC is always exposed to different environmental and refrigeration temperatures.
Besides, it also serves as a basis to create other models that allow the supply chains (SCs) of different foods to be more robust, highlighting the solution to some important challenges like (i) minimizing food wastes, (ii) guaranteeing quality and harmlessness of foods, (iii) minimizing energy consumption in the CC, (iv) making the stock levels more efficient in each stage of the chain, (v) improving the distribution networks (routes), (vi) minimizing the operational and logistical costs, and (vii) maximizing the profits of everyone.
Future applications of this model also focuses on (i) Stock policies and control to determine better stock levels in each stage of the chain and minimize food wastes, (ii) Design of distribution routes to guarantee the food's quality at the moment of its delivery, minimizing the energy consumption in the CC and minimizing the operational and logistical costs, and (iii) Price policy to maximize the profits of everyone.

CONCLUSIONS
Food distribution along the entire supply chain is under different stochastic factors, which affect food quality, mainly due to temperature and time variables. In this study, the use of a discrete and stochastic approach to model post-harvest food quality using the Arrhenius and kinetic equation was proposed. The results of this approach are models (20) and (21), which allows temperature and time variables as stochastic variables to be considered. Besides, they also allowed the evaluation of food quality at any stage of the supply chain. The advantage of the proposed models is that they have the flexibility to be applied to any fruit, vegetable or meat, and can be used in mathematical programming or simulation models where the CC is considered or in cases where there is no refrigeration equipment in the chain.