A heuristic approach to optimize the production scheduling of fruit-based beverages

27(4), e4869. https://doi.org/10.1590/0104-530X4869-20 Abstract: In this paper, the fruit-based beverage production scheduling problem is studied. The aim is to determine the lot sizing and scheduling production, optimizing inventory costs, backorders and cleanings. Fruit-based beverage production processes typically consist of two production stages, beverage preparation and pasteurization/filling/beverage packaging, including the following characteristics: an intermediate inventory in the second stage, temporal cleanings in both stages and the need for synchrony between the two stages. An effective heuristic based on a two-phase mathematical model is proposed to solve the problem in situations where item changeovers in the tanks (Stage 1) and in the lines (Stage 2) are sequence-dependent on the production. In the first stage, the heuristic searches for feasible solutions, while the second is an improvement stage. Computational tests were run using data based on real instances of a beverage company in two variants of the heuristic and both are promising because they are able to find good solutions to the problem in computational times


Introduction
Fruit-based beverages are non-alcoholic, non-carbonated beverages, characterized by having some amount of fruit in their composition. According to Euromonitor (2015), this beverage industry is expected to move US$ 11 million by 2020. The high consumption of this type of beverage is explained by a worldwide trend of food consumption and health-promoting ingredients, so-called functional foods. Considering the growth of the sector, new fruit-based beverage factories have emerged, making this market increasingly competitive. Amidst more options and increased competition among these companies, it is essential that they make assertive decisions, both strategically and operationally. One of the challenges for the beverage industry is to use efficient production programs, taking into account the demand in each period, the preparation times of the machines and the changeover times between the various items, capacity and limited production time (Ferreira et al., 2012).
There are various studies in the scientific literature addressing the real problems of production scheduling with lot sizing and scheduling mathematical models (Jans & Degraeve, 2008). Copil et al. (2017) present a vast literature review on these problems highlighting the classic models and how the literature has evolved from these models. They point out a research trend concerning problems applied to real situations, such as in the following industries: animal nutrition (Toso et al., 2009), paper and pulp (Santos & Almada-Lobo, 2012), food (Tempelmeier & Copil, 2016), semiconductor manufacturing (Xiao et al., 2013), tile manufacturing (Ramezanian et al., 2017) among others. In these studies, the specific characteristics of the production processes are taken into account when developing production scheduling. In an article by Stefansdottir et al. (2017), the authors present a general classification for setups and cleanings and propose a general model to consider the stops for these two purposes in a flowshop production system, aiming to minimize the makespan. These characteristics can make these problems even more difficult to model and solve, resulting in many studies that apply heuristic solution methods to real problems, such as in Furlan et al. (2015), who applied the metaheuristic genetic algorithm to a problem in the paper and pulp industry; Mateus et al. (2010) and Menezes et al. (2016) who used hierarchical decomposition heuristics for the lot sizing and scheduling problem; the latter was used in a bulk cargo problem; and Xiao et al. (2013) who solved a problem in a semiconductor company using matheuristics.
There are various studies in the literature that deal especially with beverage production planning and scheduling. Studies carried out by Guimarães et al. (2012), Christou et al. (2007) and Gunther (2008) address long-term production planning in the soft drink and/or beer industries. Sel & Bilgen (2014) studied production planning from a stochastic approach. Inspired by a real case, Ferreira et al. (2009Ferreira et al. ( , 2010Ferreira et al. ( , 2012 present mixed integer programming (MIP) models to solve the lot sizing and scheduling problem found in soft drink production, besides proposing heuristics for solving real instances. Toledo et al. (2015) also present a model soft drink production, but for a more general production process. The model proves difficult to be solved even for small instances. Baldo et al. (2014) present a Mixed Integer Problem (MIP) for the lot sizing and scheduling problem in brewing industries and propose MIP heuristics to solve it.
Unlike other beverages, research on fruit-based beverage scheduling is more recent and there are few papers in the literature. In addition to the characteristics found in beverage production that influence production scheduling which were pointed out above, in fruit-based beverage production, there are specificities that differentiate this production process from those of other beverages. They are the following: buffer tanks between the beverage preparation and filling stages (which have a direct impact on the synchrony between these two stages); and the need for temporary cleanings that must be done after a certain period of time without any cleaning (Toscano et al., 2019). Further details of this production process are presented in Section 2. Some examples of studies on fruit-based beverage production scheduling appear in Pagliarussi et al. (2017), but only consider the second stage of production in modeling. To solve the problem, the authors propose models based on the Capacitated Lot Sizing Problem (CLSP) (Drexl & Kimms, 1997) and the General Lot Sizing Scheduling Problem (GLSP) (Fleischmann & Meyr, 1997) that consider discretized time. As only one production stage is considered, temporal cleanings are controlled by establishing maximum lots. Another example appears in Toscano et al. (2019), who addresses the problem of fruit-based beverage production scheduling considering the two stages of production. The authors studied a case where the changeovers are sequence-independent and propose problem decomposition heuristics by stages. This paper addresses the problem considering the two production stages, but unlike Toscano et al. (2019), considers that the production lot changeovers in the first and second stages are sequence-dependent which occurs in the production processes of some companies in the sector. A two-stage heuristic is proposed to solve the problem. In the first phase, initially a mathematical model is solved to generate the lot sizing and their production scheduling in each one of the stages, but without considering the synchrony of production between the two stages. Then, the heuristic attempts to synchronize the production of the two stages of the model solution. In the second stage, the heuristic involves a phase and improvement, which seeks to obtain a good feasible solution for the problem from the solution of the first phase. In a study conducted by Toscano et al. (2019), the proposed heuristic only searches for a feasible solution, not taking into account the improvement of that solution. In addition, the model proposed and used in the heuristic of this work considers information from the two production stages, whereas in Toscano et al. (2019), the authors solved each stage separately by one model for each. Another difference of these studies is that the changeover times and costs in Toscano et al. (2019) were considered independent of the production scheduling, whereas in the present study they are sequence dependent. Notice that if the changeover costs and times are independent of the production sequence, the heuristics proposed here are also applicable.
While developing this research, five companies of the sector were visited to understand the production process better, as well as the difficulties in carrying out production scheduling. Data were collected from one of these companies, and based on these data, instances were created to run computational tests to validate the proposed solution approach. This paper is organized as follows: Section 2 presents a description of the problem addressed. The proposed heuristic is described in Section 3. In Section 4, the results of the computational tests are presented and analyzed. Finally, the conclusions and perspectives for future research from this work are discussed in Section 5.

Fruit-based beverage production process
As mentioned, fruit-based beverage production basically consists of two main production stages: the Preparatory Tank, responsible for beverage preparation and the Line, where the beverage is pasteurized, filled and packaged. The Line is composed of buffer tanks, pasteurizers and filling machines.
In the first stage, the ingredients are mixed with water in the preparatory tanks and, due to reasons of homogeneity, there is a minimum quantity that must be produced (minimum lot), up to a maximum quantity defined by the size of the preparatory tanks (maximum lot). Once ready, the beverages from the preparatory tanks are transferred to a buffer tank inside the line, releasing the preparatory tanks to prepare a new lot of beverages. Each preparatory tank is allocated to a production line. From the buffer tank, the beverage goes through a pasteurizer and goes to the filling machines, in the second stage. The final items are then packaged and sent to the stock. The preparation time of a lot in the preparatory tanks is fixed and the filling time of a lot varies according to the speed of the filling machines. The flavor and cost changeover times in both the preparatory tank and the line are dependent on the production scheduling and respect the triangle inequality.
Different from other types of beverage manufacturing, after a time limit without any cleaning, "temporal cleaning" (Toscano et al., 2019) is required and mandatory. The maximum time for temporary cleaning is max TP hours without any cleaning in the preparatory tanks and max TL without any cleaning on the lines. In practice, they are For flavor changeovers, the changeover times and costs are dependent on the flavor sequence in both the preparatory tanks and the lines. In order to be able to find a feasible production schedule for this problem, the synchrony between the two stages should be considered as it affects the capacity of the period (Ferreira et al., 2009).
To illustrate all the specificities that should be considered in fruit-based beverage production scheduling, a feasible production schedule for an exemplary illustration with only one period is presented in Figure 1. There are two items "a" and "b", a preparatory tank and a Line. The dotted lines in Figure 1 show the instant the lot is being transferred from the preparatory tank to the Line.
The transfer time is considered with the preparation time of the beverage. Due to this, in Figure 1 the transfer is instantaneous between the stages. Some variables presented in this figure are used later in Section 3. It can be observed that at the beginning of the period, the first cleaning is done and that the time spent on this cleaning is different for the two stages. The time is shorter for cleaning the first stage. Note in the figure that temporal cleanings take place at different times at each stage and that the time elapsed between two cleaning times until max TP (or max TL ) to be reached consists of production and waiting times. The times required for temporal cleanings are also different for the two stages. The first cleaning of the period takes the same time as the temporary cleanings. Changeover times between items are less than the temporal cleaning times. It can also be observed that the waiting times are variable and depend on the production time and the temporal cleaning times at each stage. As shown in Figure 1, waiting times may occur in the preparatory tank when the line is not available to receive the prepared beverage lot, either because a line is being cleaned or because the line has not yet finished filling the previous lot. The waiting times in the figure are called (A), (B), (C), (D) and (E), more details about theses waiting can be see in Toscano et al. (2019). For example, the preparatory tank has finished producing lot a1, while the first cleaning of the period in the line is still being performed; that is why there is a waiting time (A) after the representation of lot a1 in the preparatory tank. The waiting times in the line through the preparatory filling tank occur when the line has finished filling the lot and the preparatory tank has not yet finished preparing the next lot. For example (D), the line has finished filling lot a3, but the preparatory tank has not yet finished producing lot a4. Therefore, the two production stages are capacity constrained resources and can become bottlenecks if not scheduled correctly.
Therefore, considering all the specificities described above that influence production scheduling, the problem addressed in this work is to determine the production scheduling in fruit-based beverage companies in which the following specific characteristics must be taken into account: complete transfer of the lot from the preparatory tank to the line; the need for temporal cleanings; time and costs of flavor changeovers depending on the production schedule; and synchrony between the production stages.

Proposed heuristic
The heuristic proposed in this paper to solve the fruit-based beverage production scheduling problem is based on two phases. In the first phase, a mathematical model is initially solved, called Relaxed Model (RM), presented in Section 3.1. The RM is said to be relaxed because, although it contains information and considers constraints of the two production stages, the synchrony between these stages is not taken into account in this model. Therefore, a feasible solution for the RM may correspond to the one that is infeasible to the problem due to the lack of symmetry in the two-stage production scheduling problem. This is then verified by the heuristic, which performs post-processing in the model solution to find a feasible solution to the problem. In the second phase, the heuristic seeks to improve the feasible solution obtained in the first phase. Thus, the heuristic is called "Feasibility and Improvement Heuristic of the Relaxed Model Solution" (FIHRMS). In the feasibility stage, the FIHRMS searches for a feasible solution to the problem, from the solution of the RM model, initially without evaluating the quality of the solution found. Then, in the improvement phase, the objective is to improve the feasible solution obtained from the first stage, maintaining the feasibility thereof. In the following section, the RM and then the complete description of the FIHRMS are presented in Section 3.2.

Mathematical model
In this section, the RM is presented, a mixed integer linear optimization model, which is a relaxation for the problem of scheduling fruit-based beverage production in two stages. As mentioned, the model is considered as a relaxation for the problem, as it disregards the synchrony between the two production stages. Temporary cleanings are not explicitly included in the constraints. It is assumed that temporal cleaning in one of the stages necessarily generates a waiting time in the other stage. There are continuous decision variables that indicate the start and end of the processing of each production lot, but there is no decision variable that indicates the start or end of the cleaning. Thus, if temporal cleaning is performed at any of the stages, the model is not able to predict whether this event will generate a waiting time in the other stage, i.e., the model does not establish the dependence between the two stages explicitly. Based on the RM solution, it is necessary to carry out post-processing to know if this solution is feasible, that is, if it respects the production capacity limits of the period. This post-processing for synchrony of the two stages is performed by the algorithm presented in Toscano et al. (2019), adapted for this study. The lots obtained in the model solution are inserted, one by one, into the production schedule, together with the waiting times and the temporal cleanings, ensuring synchrony between the two stages. At the end, it is observed if the solution obtained is feasible, i.e. if after including all the temporal cleanings and waiting times, the production capacities, in time, are still respected.
To construct the RM, time was considered continuously (Almeder et al., 2015). Scheduling is done via flow restrictions and subtour elimination (Ferreira et al., 2012), and each lot is considered a batch, that is, filling a tank with the quantity determined by the lot size (Camargo et al., 2012). The RM is presented below. The sets, parameters and decision variables are described next.
Sets: J is the set of items (flavors) (i and j ∈ J); M is the set of preparatory tanks/lines (m ∈ M); T is the set of periods (t ∈ T); mt O is the set of lots that can be produced by j LB is the minimum quantity of production, in liters, of item j in the preparatory tank (minimum lot); j UB is the maximum quantity of production, in liters, of item j in a preparatory tank (maximum lot); ρ is the quantity of beverages in liters to produce a unit of any item; Tp is the preparation time of a lot, regardless of the flavor and quantity; I LT is the time it takes to carry out temporal cleaning in the preparatory tank; II LT is the time it takes to carry out temporal cleaning in the line; Clt is the cost of temporal cleaning in the preparatory tank and the line; I ij TC is the cleaning time in the preparatory tank for item i to change over to item j; II ij TC is the cleaning time in the line for item i to change over to item j; mt Cap total capacity available in time for preparatory tank/line m in period t; m S is the speed of filling line m in liters per hour; max TP is the maximum time permitted without cleaning since the end of the cleaning in the preparatory tank, during the production of the same item; max TL is the maximum time permitted without cleaning since the last cleaning in the line, during the production of the same item; Mgde is a large enough number; ij C is the changeover cost of item i to item j. α is the capacity reduction rate on the total time of the temporal cleanings of the preparatory tank and the line. is the quantity estimated from temporal cleanings in preparatory tank m during the production of item j in period t. II mjt W is the quantity estimated of temporal cleanings in line m during the production of item j in period t.
The RM is presented next by Equations (1) to (27).
, , , , , , , , , , Objective function (1) minimizes the total inventory, backorder, changeover and temporal cleaning costs. Constraint (2) performs the inventory and demand balance. Restriction (3) imposes the existence of the minimum production lot, and (4) imposes the maximum production lot, determined either by the maximum production limit (tank capacity) or by the maximum available time before temporary cleaning. Restriction (5) imposes that only the production in lot o will occur if there was production in the previous lot ( ) − o 1 . The production starts and ends in a fictitious item 0 i , called a ghost item. From this item, the production schedule is determined. The changeover time and cost of the ghost item to any other item are considered as the time and cost of cleaning from the beginning of the period, respectively. The changeover time and cost of any item to the ghost item are null. Constraint (6) requires the ghost item to be made only once at the beginning of each period in each preparatory tank/line. Constraint (7) performs the flow conservation for the item changeover, while (8) ensures that there will only be an item changeover i to item k if the ghost item 0 i has already been produced. In order for there to be no more than one changeover for the same flavor in the same period, constraint (9) is used, and for the disjointed subtour elimination in the item changeovers to constraint (10). Constraint (11) ensures that there will be only production of item j if there is a changeover for this item. Constraint (12) imposes that the production of the first lot ( = o 1) of item j starts after the end of the first cleaning performed at the beginning of the period, see Figure 1 in which the production of the first lot of item a is after cleaning (  (16) and (17) impose that the lot processing is initiated only after completing the previous lot processing, the preparatory tank and the line, respectively. Constraint (18) determines that if there is a changeover from item i to item j in stage I, the starting time of the first lot of item j must be after the end of the last lot mt O of item i plus the changeover time. Similarly, constraint (19) works for stage II. Constraint (20) imposes that the beginning of filling a lot must be after the end of the production of that lot in the preparatory tank, and this constraint ensures the waiting time occurs in the line. See, for example, in Figure 1 that the waiting time (D) that happens before lot a4 in the line is ensured because . Constraint (21) ensures that a lot will be prepared only if the preparatory tank is empty and is active when there is production in lot o . In Figure 1,  Constraints (22) and (23) determine in an estimated way, for the preparatory tank and line, respectively, the amount of necessary temporal cleanings in each period. In the preparatory tank, this number is calculated in constraint (22) ( II II   mjt LT W ), divided by the maximum time allowed without cleaning ( max TP ). This constraint is active only when there is lot production o , that is, when = mjto Y 1. For example, if the total time from the start of production of the first lot = o 1 of item j in the preparatory tank until the last lot of that item was sent to the line was 5500 minutes and the maximum time allowed between the cleanings is 1000 minutes, then it is estimated that 5 cleanings are required. Constraints (24) and (25) of the model refer to the production capacity limit for the two stages for each preparatory tank line m in each period t. In constraint (24) of the capacity for the preparatory tank, it is subtracted from the total capacity (  (25), similarly to constraint (24). The capacity discounts of one stage referring to the cleaning of the other stage come from the premise adopted by the RM that the existence of periodical cleaning in one stage implies waiting for the other productive stage, as discussed in the sections above. Parameter α, found in constraints (24) and (25), can be varied as an attempt to estimate a percentage of temporal cleanings that generate waiting times. When

Description of FIHRMS
The FIHRMS heuristic is based on the resolution of the RM (1)-(27) considering parameter α adjustments. A flowchart showing FIHRMS can be observed in Figure 2. The first step of the FIHRMS is to obtain a feasible solution. The RM (1)- (27) is solved with a value of α defined initially. The obtained solution is synchronized between the stages through the algorithm proposed by Toscano et al. (2019) and adapted to the problem addressed in this paper. If the solution obtained is feasible, the algorithm moves on to the improvement phase of the solution. Otherwise, the value of α is increased at a rate p , defined a priori, and the RM is solved again. These steps are repeated until a feasible solution is obtained, or until the heuristic execution time limit is reached.
Since the first phase of the heuristic is intended to provide initial feasible solutions without ensuring high quality, the production capacity can be greatly reduced, forcing the model to generate many backorders, thus providing a feasible but low-quality solution. Thus, the second heuristic improvement stage is proposed to try to balance the trade-off between feasibility and solution quality. By changing the value of α and resolving the RM, the feasibility of the obtained solutions can be modified. Suppose, for example, α , 10% of the total time spent on temporal cleanings is added, in terms of providing leeway to perform the synchrony between the stages. Thus, greater values of α generate more feasibility safety after synchrony, because by restricting the productive capacity more, the chances are reduced of the model presenting a solution that is infeasible after synchrony, that is, more time is left for including temporal cleaning and waiting time for synchronization. On the other hand, increasing the value of α can generate lower quality solutions, as this increase implies in capacity reduction, which can lead to increased levels of backorders, for example. Thus, in general, in order to find a feasible solution after synchrony, there must be a balance in the choice of parameter α , so that the capacity is not too limited, to generate solutions with too many backorders, and not with too much leeway, to the point where the solution presented by the model becomes infeasible after synchrony. From a feasible incumbent solution, * S , the strategy is to disturb the value of α , to find a solution better than * S , which is still feasible. The applied disturbance is actually a decrease in the value of α at an a priori defined rate. The reduction of α can be determined in several ways. In this paper, we propose two variants for this disturbance of α in the improvement phase. The first variant is called " Step", resulting in the FIHRMS-S heuristic. At each iteration the value of α is reduced by half the rate p , that is, The second variant used to reduce α is called "Random", resulting in the heuristic FIHRMS-R. Let inf α be the last update of α in the feasibility phase, before finding the feasible solution, and feas α the value of α after the increments of size p , for which the feasible solution was found. This means that for = inf ← S S , and the improvement process is repeated. Parameter α is updated, the RM is solved again and the solution is synchronized. This process is repeated as long as time is available and solution * S is being improved. Otherwise, if ′ S is infeasible or has an objective function value worse than * S , the best feasible solution obtained so far ( * S ) is given as the final solution and the algorithm is finalized.

Computational tests
To evaluate the performance of the FIHRMS heuristic, computational tests were run using instances based on real data from a company in the sector. The FIHRMS-S and FIHRMS-R heuristic variants were implemented in the AMPL modeling language and the solver used was the CPLEX 12.6.1. The computer used for testing was an Intel core i7 processor with 3.7GHz and 16GB memory. The objective was to compare the performance of the two variations of the proposed heuristic, FIHRMS-S and FIHRMS-R in various scenarios.
The runtime limit of the FIHRMS heuristic was 3600 seconds. While the FIHRMS heuristic was running, the RM was solved at each iteration. Thus, it is defined that the stop criterion in the RM resolution in each iteration of the FIHRMS is the optimality or the time limit of 300 seconds.
The value of α at the beginning of the FIHRMS heuristic was defined as 1.2 after various initial tests. In the feasibility test, the value of α is increased to a rate p = 0.1. In other words, if the model is infeasible, = + p α α . This value was also defined empirically based on preliminary tests.

Instances
The computational tests were carried out with 14 sets of instances based on three instances containing real data (I1, I2 and I3). Instances I1 and I3 consist of 4 periods and I2 of 5 periods, totaling 42 instances. These data were collected in a typical fruit-based beverage factory located in the interior of São Paulo State, Brazil and is part of a worldwide network of beverage factories. The actual data for these instances are the demand for each product, the temporal cleaning times and changeover between products and the production capacities of the tanks and the filling machines. Each period of these instances corresponds to one week of production.
In the company we visited there are two production lines/preparatory tanks, therefore = M 2 . In this company, 5 flavors (items) of beverages are produced, thus = J 5. The average preparation time of the beverage lots is 100 minutes for each batch (tank). The time spent on temporary cleaning in the preparatory tank was 50 minutes and on the line 5 hours. The parameter values max TP and max TP are 24 and 48 hours, respectively, i.e. up to 24 (48) hours after the last cleaning in the preparatory tank (line) was completed, a new cleaning was required, whether temporal or by changeover item. Each preparatory and buffer tank has a capacity of 12,000 liters. The fruit-based beverages are produced in 200ml cartons and, for the company, an item is a bundle with 12 units of these, that is, one item uses 2.4 liters of beverages. Inventory, backorder, changeover and cleaning costs were not made available by the company. These costs (or penalties) were then established to reflect the company's priorities of meeting the consumer demand without backorders, with little inventory and greater capacity utilization. Therefore, the cost incurred by backorders was defined as 100 per unit, the inventory cost as 10, the changeover in the interval between [1,10] and temporal cleanings as 1. In order to test the performance of the FIHRMS heuristics for different production scenarios, modifications of instances I1, I2 and I3 are presented in Table 1 that totalize the 14 sets used. For example, the instances belonging to set 1 are three instances (I1-01, I2-0, I3-01) with original data based on the company's data, whereas in set 2, the filling speeds of the instances in set 1 doubled. This was similar for the other rows in the table.

Results
Table 2 presents the mean values of the objective and time function obtained by the FIHRMS-S and FIHRMS-R heuristics for each set of instances. The high objective function values presented in this table are due to the high costs (penalties) of backorders and inventory, which, as mentioned above, were set at 100 and 10, respectively.
The CPLEX takes time to prove the optimality of the solutions obtained by it for the RM. Thus, for each iteration of the FIHRMS-S and FIHRMS-R heuristics, the time limit for the RM resolution is only 300 seconds, therefore it can be observed that the heuristics can present solutions, for most instances, before reaching the time limit.
In Table 2, the shortest mean time between the two proposed strategies is highlighted in bold. Except for the instances of set 13, where the FIHRMS-S was faster than the FIHRMS-R, and for the sets the instances of sets 02, 03 and 14, in which the heuristics practically tied, the random strategy proved to be faster than the step strategy.
Table 2 also shows that for the sets of instances 02, 03 and 14, the mean value of the objective function was the same for both strategies. As already mentioned, these instances are easy to resolve because they have a leeway capacity, since in instances 02 and 03, filling rates are doubled and tripled, and in instance 04 a super tank is considered, with double capacity of the available tanks and the filling speed is twice as fast as the current fastest line speed. The set of instance 14 was created to verify the possibility of this change of machinery in the factory we visited. This was a question raised by the decision maker, and heuristics show us that for the current demand of the company, it seems to be a good decision since for the three instances (I1-14, I2-14 and I3-14) it was possible to meet demand without backorders and without inventories, as can be seen later in Table 3. The sets of instances 02 and 03 also show that investing in faster filling machines may be a good option to avoid inventories and backorders in the production of this company with the current demand. Table 2. Average values of objective function and runtime of proposed heuristics for each set of instances. The FIHRMS-S heuristic obtains better solutions than the FIHRMS-R heuristic for the following sets of instances: 01, 04, 06, 07, 08, 10, 11 and 12, that is, for 8 of the 14 sets. Figure 3 shows the percentage of improvement of the objective function of the FIHRMS-S heuristic when compared to the FIHRMS-R heuristic. This improvement is calculated based on the means of each set presented in Table 2 are the values of the objective function of the FIHRMS-S and FIHRMS-R heuristics, respectively. Note that for the sets of instances 05, 09 and 13, the FIHRMS-R presents 4.73%, 28.86% and 47.37% better solutions than the FHIRMS-S, respectively.

Set of Instances
The explanation for these differences is that in the improvement phase, where α is chosen deterministically, the solution improvement occurs slowly at each iteration. However, it may fail to explore values of α that are obtained randomly, and that greatly improve the solution, such as the case of the instances in set 13. However, the random choice of α can find solutions that are not feasible more quickly, causing the algorithm to be briefly interrupted and not allowing other α searches to be performed to improve the solution. In fact, while the FIHRMS-S does on average 2 improvement iterations for each instance, the FIHRMS-R does only 0.5 iterations on average. In fact, while the FIHRMS-S does on average 2 improvement iterations for each instance, the FIHRMS-R does only 0.5 iterations on average. This also explains the fact that the heuristic that selects the value of the parameter α in a deterministic way, FHIRMS-S, presents better solutions than that determined by a randomly FIHRMS-R, and the latter in turn is faster.  Table 3 shows some details of the solutions obtained for the 14 sets of instances. The columns called %Back and %Inv are the average percentages of backorder demand and are stored, respectively, for the instances of each set of solutions presented by each of the three solution strategies. The %TC and %Cap columns are the average percentages of the capacity available in each instance for the temporal cleanings and for the whole production process (production, changeover and temporal cleanings), respectively. According to Table 3, the temporary cleanings consume on average 3% of the available capacity. For the instances of set 01, although the solutions show capacity utilization around 82%, on average, the backorders are around 0.6% of the demand. This behavior is due to instance I3-01, which has a much higher demand when compared to I1-01 and I2-01. With the decrease of the capacities in the instances of sets 05, 06 and 07, an increase in the capacity utilization can be observed, using almost 100% for the solutions obtained with the heuristics. For the instances in sets 06 and 07, in particular, the heuristics present, on average, 8.47% of the backorder demand. The same backorder increase can be seen for the instances in sets 08, 09, 10 and 11, which also restrict the capacity. %Back: average percentages of backorder demand. %Inv: average percentages of backorder stored. %TC: average percentages of the capacity available used in each instance for the temporal cleanings. %Cap columns are the average percentages of the capacity available used in each instance for the whole production process (production, changeover and temporal cleanings). Source: The authors.
When the physical capacity of the preparatory tanks is reduced by 25% for the instances in set 12, there is practically no effect on the solution, which considers the tank completely. As the model scales the lots taking into account the two stages, this shows a bottleneck tendency for the filling machines in the data collected in the company. The same observation is valid for when the size of the tanks is doubled for the instances in set 13.
Both heuristics always find feasible solutions for the tested instances in a time less than the available 3,600 seconds, the FIHRMS-S presents solutions in 2,021.91 seconds on average and the FIHRMS-R in 1,256.66 seconds on average. In practice, the decision maker takes more than 3 hours to manually obtain a feasible solution. Thus, these heuristics show promising strategies for solving the fruit-based beverage production scheduling problem.

Conclusions
In this paper, the fruit-based beverage production scheduling problem was studied and a heuristic approach was presented to deal with it. Fruit-based beverage production scheduling involves a number of constraints that make it a complex task to be performed manually and efficiently, such as limiting the capacity of the preparatory tanks and filling lines, scheduling items to be produced, synchrony between the stages and also the consideration of temporal cleaning. In this study, it was considered that the changeover times at the two production stages may be sequence dependent, unlike previous studies in the literature. In order to test the proposed solution methods, data from a typical company in the industry were collected and several scenarios were created based on the data collected. Considering the obtained results, it can be concluded that the proposed heuristics are potentially good for systematization and support decision making in fruit-based beverage production scheduling. The heuristics are able to present good solutions in almost half the time that the decision-maker takes to obtain a feasible solution. As shown in the computational tests, this allows the decision maker to test various scenarios and situations.
As a proposal for future research in the FIHRMS heuristics, other methods of modifying the α parameter could be explored, even when an infeasible solution was found. Other heuristic approaches that did not use a mathematical model could also be researched with the aim of trying to reduce the times used to obtain solutions by FHIRMS. A constructive heuristic could be developed to obtain an initial solution and the improvement of that solution through metaheuristics, for example.
In addition, it would be interesting to create a friendly interface for the heuristic proposed in this paper, so that the decision makers of such factories could use and analyze the proposed heuristics in practice. Having the application of the heuristic in practice, a more detailed and in-depth case study of the application of this solution proposal could be carried out.