1 INTRODUCTION

There are several strategies that can be implemented to increase the productivity of a company; for example, the purchase of more equipment, upgrade to more efficient machinery, and the production line optimization. The optimization strategy has the advantage of obtaining the maximum production possible using the equipment and resources already available, making it widely applied in the industrial sector (^{Belfiore & Fávero, 2013}; ^{Rau, 2005}; ^{Ribas, Leisten & Framinãn, 2010}). Used within operational research, mixed integer linear programming is an exact method capable of solving complex optimization problems (^{Vielma, 2015}).

According to ^{Batalha et al. (2008}), with the use of mixed integer linear programming, it is possible to create a mathematical model that represents industrial problems, such examples include the production line of a company, the distribution of products, the ways of providing services, and the control of resources, etc. (^{Midgley, Johnson & Chichirau, 2018}). Using a mathematical model, it is possible to apply solution methods in order to obtain an optimized answer of the proposed problem (^{Vielma, 2015}). A very common problem in many industries is hybrid flow shop scheduling (HFS), where a production line consists of several stages and more than one machine at each stage (^{Ribas, Leisten & Framinãn, 2010}; ^{Ruiz & Vázquez-Rodríguez, 2010}).

In this paper, mixed integer linear programming models were developed to represent and optimize a production line of a hair cosmetics factory, using the CPLEX Optimization software. The goal was to minimize the makespan of daily production and the completion time of equipment for the best production organization.

2 LITERATURE REVIEW

In the industrial environment, there are several optimization problems related to production systems due to the organizational complexity in different sectors. Scheduling on parallel machines is a classic problem that occurs in many industries. In this case, there are *n* jobs that must be processed in *m* parallel machines, each task must be processed on only one machine (^{Özpeynirci, Gökgür & Hnich, 2016}), and the objective is usually to minimize the task completion time, the so-called makespan (^{Fanjul-Peyro, Perea & Ruiz, 2017}).

The flow shop problem is also very common in many industries. In this case, each task must pass through a production line which is composed of a sequence of *m* machines (^{Pessoa & Andrade 2018}). A solution to this problem is given by the best production order, allowing the production demand to be completed in the shortest time.

The flow shop on parallel machines, known as hybrid flow shop is a more complex case that is the combination of the problems mentioned above. It is characterized by the existence of *K* steps, *mk* machines in each step *k,* and *n* products, which must be processed correctly in the order of the production line (^{Bozejko, Pempera & Smutnick, 2013}; ^{Fernandez-Viagas, Perez-Gonzales & Framinan, 2019}). Since the production line of the studied factory has three production stages and several machines in each one, the hybrid flow shop scheduling (HFS) is characterized in the present study. In this problem, the best manufacturing route for the products to supply a given demand must be chosen in order to obtain the shortest production time. Therefore, it is necessary to determine in which equipment (of each step) and when the tasks will be processed (^{Ribas, Leisten & Framinãn, 2010}; ^{Ruiz & Vázquez-Rodríguez 2010}).

In the literature, it is possible to find studies that deal with HFS, more commonly in some industries. ^{Nabli, Khalfallah, & Korbaa (2018}) studied the optimization of a hybrid flow shop model containing two stages of production in order to minimize the makespan in an industrial production line. They used mathematical models and three heuristics to solve the problem, and they obtained promising results. ^{Engin & Güçlü (2018}) also studied a hybrid flow shop problem with the same objective, but the hybrid ant colony method was used. ^{Yu, Semeraro, & Matta (2018}) used a genetic algorithm to minimize the total delay of the tasks and by ^{Nejati et al. (2014}) in order to minimize the completion times. ^{Wang, Liu, & Chu, (2015}) showed that the Branch-andBound is also used to solve the HFS problem. ^{Pan et al. (2011}) and ^{Cui & Gu (2015}) used the bee colony method in their respective studies to solve the same problem, where the objectives were to minimize delays and makespan, respectively.

In several real-world contexts, there are some additional constraints and characteristics that must be included in the basic hybrid flow shop problem, making the resolution of the problem more complex. In their work, ^{Li et al. (2018}) considered that the tasks have different sequence orders in the production line and used heuristic methods to minimize the makespan. ^{Kim & Lee (2019}) also used heuristic methods to optimize a flow shop problem, where tasks had a time limit to be processed in the next steps, making the decisions more difficult. Also using heuristics, ^{Figielska (2014}) studied a production line containing one machine in the first stage and many in the second, aiming to minimize the makespan. To solve this complex problem, ^{Figielska (2014}) divided the problem into two parts, a technique that was also used in the present study.

Some studies have restrictions and methods that are also considered in this work, such as the need to perform the equipment’s setup after processing the tasks. For example, ^{Peng et al. (2018}) used hybrid genetic algorithms to minimize the makespan, and ^{Wang & Liu (2014}) used tabu search to minimize the unavailability of the first stage and the makespan of the second; both studies considered setup-time. In the work of ^{Dios, Fernadez-Viagas, & Framinam (2018}), heuristic methods were used to optimize a hybrid flow shop problem where some stages of production can be ignored, which is also present in this work. Similar to the present study, ^{Lalitha, Mohan, & Pillai (2017}) used the exact method of mixed integer linear programming in their research. The use of this method is not commonly found in the literature for HFS resolution, and most studies are developed using heuristic and computational methods.

Many studies are carried out with the intention of solving the hybrid flow shop problem in a more simplified way. They considered that the capacities and the processing times of the machines of the same stage are the same and that each product is manufactured only once, which may not represent the industrial reality (^{Oliveira & Turrioni 2012}; ^{Ruiz & Vázquez-Rodríguez 2010}). In addition, they mostly used heuristic methods to solve the problem (^{Oliveira and Turrioni 2012}). This fact favors the present work, since the linear model developed is innovative, considering that each equipment has different characteristics and that each product can be manufactured more than once, in addition to other limitations that occur in the real case studied.

3 PROBLEM CHARACTERIZATION

In this work, the production line of a hair cosmetics factory was studied. The production line consists of three stages: stage I, the reactors (R); stage II, the storage tanks (S); and stage III, the packing machines (P). In the reactors, the products are processed and, later, can be stored in tanks. The packing machines are used to put the products in their respective bottles, completing the production line. The production is made by batch processes, which are rechargeable processes.

In stage I, the products are manufactured in batches, performed by operators. The batches are stored in step II if necessary and, then, transferred to the stage III, where the operators of this stage complete the manufacturing process.

Steps I and III are required in every production because they are indispensable in the processing of the desired product. However, step II is only used when intermediate storage is required between stages I and III. Thus, storage tanks are not required, but their use can streamline production since the use releases the reactor to a new production before the packaging stage is completed.

Physical limitations in the production layout were considered, as they restrict the connection between the equipment. These limitations are represented as reactor-storage compatibility (R-S), reactor-packer compatibility (R-P), and storage-packer compatibility (S-P). There is also incompatibility between products and equipment, since some products (divided into classes A and B and subdivided into types 1, 2, and 3) need to be processed in specific equipment.

The batches are processed in the reactors and are transferred to the storage tanks or directly to the packing machines. The equipment can only be released for setup when the whole batch has been transferred and completed in the next step, since during transfer and processing they are connected. The transfer time to a tank is shorter than the packing time, which stresses the importance of storage tanks. Therefore, if a storage tank is used, the reactor can be released for setup prior to packaging.

Figure 1 represents the factory production line described and used in this work, where it is possible to observe the number of equipment used in each stage, the arrangement of the production line, and the product-equipment and equipment-equipment compatibility.

4 MILP FORMULATIONS

The production line studied in this article can be modeled as a problem similar to hybrid flow shop, because there is more than one stage and more than one piece of equipment per stage. However, there was a need to add more complex constraints to better represent the reality of the factory studied. Furthermore, due to complexity, the resulting model was decomposed in two models that are used sequentially. Instead of deciding simultaneosly the assignment of products to batches and the schedule of the batches into the equipments, we first determine the minimum number of batches to satisfy the demand (by a first model) and then we solve the whole model considering only this minimum number of batches. This reduce the complexity of the model, as no useless batch are considered.

4.1 Considerations for models

The production is done by means of batch; therefore, the model was based on determining how many batches are produced, which products are present in each one of them, in which pieces of equipment they are allocated, and when they are processed. The size of a batch depends on the capacity of the reactor used to process it, and the total demand of a product may be divided into multiple batches. Moreover, each batch can contain at most one product and must be allocated in the machinery to complete the demand.

In the reactors, the batch is allocated according to the compatibility between the product and the route that each reactor can be connected. Each reactor can only contain one batch at a time, and the number of operators available must be respected because there is a limit on the number of workers, which generates a limit on the number of reactors that can be used at the same time. The capacity of the reactors is nominal, that is, each one processes the maximum mass of product possible. After the manipulation of each batch and the transfer to a storage tank or the directly packing, a setup must be performed. However, when processing the same item in consecutive batches in the same reactor, the setup is only 10% of the normal setup, due to easier clean up and preparation.

After the manipulation, the batches can be transferred to the storage tanks (step II) or processed directly into the packers (step III). When the transfer occurs, the R-S compatibility must be respected. The reactor and the storage tank are busy during the transfer, and it is necessary to wait for the conclusion of one stage to start the next one. Each tank can contain only one batch at a time, and the processing time is the transfer time required for the product, which is directly proportional to the mass transferred. After filling the tank (step II), step III must be completed before starting the setup, which consists of cleaning the tank. And just like in reactors, if the next product to be allocated to a tank is the same as the previous batch, the setup is only 10% of the normal setup.

In step III, only one batch can be processed at a time. Also, the limit of operators in this sector and the compatibility R-P, S-P, and product-P must be respected. The packing time depends on the mass of product contained in the batch and the number of workers, which has a lower and higher limit. After this step, both the storage tank (or the reactor in the case of direct packaging) and the packaging machine are released to the setup step, which is 10% of normal setup if the next product is the same as the previous one. At the end of this phase, the manufacture of the product in the batch is completed.

From these considerations, two mathematical models of mixed integer linear programming were created, consisting of parameters, variables, objective functions, and constraints. Model I was used to determine the allocation of products into the batches and Model II was used to determine the batch processing route. Thus, the problem was divided into two parts, making it easier to solve.

4.2 Parameters

The data of a production line is represented by the following parameters, which are defined as integer (int), real (real), or binary (bin):

*N* (int) = Estimated number of batches required (equal to 11 for a daily production in the factory studied, because it is the maximum number of batches that can be produced in one day);

*PD* (int) = Number of products;

*R* (int), *S* (int) and *P* (int) = Number of reactors, storage tanks, and packing machines available in the production line;

*OI* (int) and *OIII* (int) = Number of operators in stages I and III;

*Dpd* (real) = Demand of the product *pd*;

*M* (int) = Very large number (big M) (in this work we used M = 10000);

*MinOIIIp* (int) and *MaxOIIIp* (int) = Minimum and maximum numbers of operators required in the packaging machine *p*;

*TIOIoi* (real) and *TIOIIIoiii* (real) = Initial times of the activity of the operator *oi* of step I and operator *oiii* of step III;

*TIRr* (real), *TISs* (real) and *TIPp* (real) = Initial operating times of the reactor *r*, storage tank *s,*

and packing machine *p*;

*TFRr* (real), *TFSs* (real) and *TFPp* (real) = Final operating times of reactor *r*, storage tank *s,* and packing machine *p*;

*TLRpd,r* (real), *TLSpd,s* (real) and *TLPpd,p* (real) = Setup times of the product *pd* in the reactor *r*, in the storage tank *s,* and in the packing machine *p*;

*PRMpd,r* (real) = Processing time of the product *pd* in the reactor *r* (medium value);

*PSMpd,s* (real) and *PPMpd,p* (real) = Processing time of the product *pd* in the storage tank *s* and in the packing machine *p* (medium value per unit mass);

*MRpd,r* (real) = Mass of the product *pd* that can be produced in the reactor *r*;

*XIRpd,r* (bin), *XISpd,s* (bin) and *XIPpd,p* (bin) = Compatibilities between *pd* and *r*, between *pd* and

*s,* and between *pd* and *p*;

*XRSr,s* (bin), *XSPs,p* (bin) and *XRPr,p* (bin) = Compatibilities between *r* and *s*, between *s* and *p,*

and between *r* and *p*;

*XBpd,i* (bin) = Allocation of the product *pd* in the batch *i* (1 if allocated and 0 otherwise) (used only in Model II).

4.3 Variables

The optimal solution is defined according to the values found for the following variables, which are also defined as integer (int), real (real), or binary (bin):

*endr* (real) = Reactors release makespan;

*endp* (real) = Packing machines makespan;

*tri* (real), *tsi* (real) and *tpi* (real) = Initial processing time of the batch *i* in the reactors, storage tanks, and packing machines;

*pri* (real), *psi* (real) and *ppi* (real) = Processing time of the batch *i* in the reactors, storage tanks and, packing machines;

*ttri* (real) = Release of the reactor that produced the batch *i*;

*xbpd,i* (bin) = Allocation of product *pd* in batch *i* (1 if allocated and 0 otherwise) (used only in Model I);

*xri,r* (bin), *xsi,s* (bin) and *xpi,p* (bin) = Allocations of batch *i* in reactor *r*, in storage tank *s,* and in packing machine *p* (1 if allocated and 0 otherwise);

*xoii,oi* (bin) and *xoiiii,oiii* (bin) = Processing of batch *i* by the operator *oi* in step I and by the operator *oiii* in step III (1 if it is processed by the operator and 0 otherwise);

*xtri,j* (bin), *xtsi,j* (bin) and *xtpi,j* (bin) = Precedence rules between batches *i* and *j* in reactors, in storage tanks, and in packing machines (0 if *i* precedes *j*, otherwise 1).

4.4 Model I

The first model assigns products to batches. Usually, several products have a demand that may not be fully obtained by one only batch, due to reactor capacities. The production must then be divided into more than one batch. As reactors have different capacities, batches are of different sizes, and the first decision was to define the minimum number of batches necessary to fulfill the demand of all products. This was decided by Model I, defined as shown below, starting from an estimated upper bound *N* on the number of batches.

The products were organized in the batch according to the constraint (3), where the products of smaller numbers were destined for the batch of larger numbers. This rule exists in order to organize allocations, avoid unnecessary searches due to simmetry, and ensure that only the minimum number of batches is filled.

Constraints (4)-(6) state that if a batch contains a product, it must be allocated in a reactor and in a packing machine, as well as possibly into a storage tank.

A production route must comply with the compatibility rules, which is assured by constraints (7)-(9). For example, (7) states that, if a batch *i* is allocated to a reactor *r* and a storage tank *s*, the product inside the batch must be compatible with both reactor and storage tank, and they must be compatible to each other.

The sum of the mass produced of a product must be at least its demand. The constraint (10) is not linear, but the CPLEX is able to automatically linearize the equation modules. In order to do so, we used the term

4.5 Model II

The second model (Model II) was created to decide a production route for each batch. This model used the solution obtained from Model I in order to consider only batches to which a product is allocated. Thus, the decision variable *xbpd,i* of the first model was transformed into an array of parameters to be used in the second model, which indicates whether *pd* is inserted in *i* (*XBpd,i*). Only constraints regarding production routes were considered in this model. The goal was to minimize the makespan, but in order to speed up the process while avoiding different solutions with the same makespan, the objective function considered also the minimization of the completion time of each batch (multiplied by a very small weight, so the main objective remains the minimization of makespan). Besides that, the minimization of the reactor release time to the following day was also considered, so the production may start as soon as possible (11).

Constraint (12) ensures that the reactor makespan is at least the maximum among the release time of all reactors.

And constraint (13) ensures that the production makespan is the maximum among the completion time of all batches in the packing machine.

The release time of the reactors must be greater than or equal to the completion time of the packer connected to it, or to the completion time of the storage tank if it is used (constraints 14 and 15).

The production route must comply with the compatibility rules, which is assured by constraints (16)-(18).

According to the constraint (19), the demand must be met. In this model, the batches will be allocated to reactors of different capacities, so it is necessary to verify if the demand is being met.

The processing time *pri* of a batch depends on the reactor used and the product (constraints 20 and 21)*.*

The processing time *psi* of a batch on a storage tank depends on the mass produced in the reactor (constraints 22 and 23).

And the processing time *ppi* of a batch on a packing machine depends on the mass produced in the reactor and the number of workers used in the packing machine (constraints 24 and 25).

The start time of each batch must be greater than or equal to the start time of the equipment used, as indicated in constraints (26), (27), and (28).

The completion time of each batch must be less than or equal to the end time of the equipment used, as indicated in constraints (29), (30), and (31).

The order of batch processing in steps I, II, and III are defined by constraints (32) to (40), as well as feasible completion times accorting to the processing order.

The start time of a batch *i* in an equipment must be greater than or equal to the previous batch completion time processed in the same equipment, added to the setup time, which can be 10% of the normal setup if they are the same products (restrictions 41 to 44).

According to constraints (45) and (46), the start time of a batch in an equipment of steps II and III must be greater than or equal to the completion time in the previous steps.

Each step I operator can work on only one process at a time (constraint 47).

Every batch processed in a reactor demands only one operator, as shown in constraint 48.

The constraints (49) and (51) implies that each worker can accumulate at most one task more than the others. Also, constraint (50) ensures that a batch can only be started when its respective worker is released.

Constraints (51) to (55) represent the same workers’ restrictions from step I, (47) to (50), for step III. The only difference is that more than one worker can work at the same time on a packing machine (a greater number of workers results in a shorter packaging time), as long as the maximum and minimum limits are respected.

5 SOLVING A REAL CASE

Real instances were simulated to evaluate the usability and validity of the models presented. The simulation and optimization were performed considering the production line of the hair cosmetics factory studied, characterized by Figure 1, where there are seven reactors, four storage tanks, and six packaging machines. The manufactured products are presented in Table 1.

PRODUCT | CLASS | TYPE |
---|---|---|

Product I A1 | A | 1 |

Product I A2 | A | 2 |

Product I A3 | A | 3 |

Product I B2 | B | 2 |

Product I B3 | B | 3 |

Product II A1 | A | 1 |

Product II A2 | A | 2 |

Product II A3 | A | 3 |

Product II B2 | B | 2 |

Product II B3 | B | 3 |

Product III A1 | A | 1 |

Product III A2 | A | 2 |

Product III A3 | A | 3 |

Product III B2 | B | 2 |

Product III B3 | B | 3 |

The factory operates from 8:00 AM to 5:15 PM, performing intervals from 9:00 AM to 9:20 AM, 11:30 AM to 12:35 PM, and 3:00 PM to 3:20 PM. Thus, based on this work period, simulations were performed for the case of three daily productions in order to comply with the demands presented in Table 2.

DAY | PRODUCT | DEMAND (kg) |
---|---|---|

1 | Product I A1 | 2000 |

Product I A3 | 4000 | |

Product II A1 | 3000 | |

Product II A3 | 1000 | |

Product II B3 | 500 | |

Product III A2 | 4000 | |

Product III A3 | 2000 | |

2 | Product I A1 | 1000 |

Product I A2 | 2000 | |

Product II A2 | 4000 | |

Product II A3 | 2000 | |

Product III A1 | 3000 | |

Product III A2 | 500 | |

Product III B3 | 1000 | |

3 | Product I A2 | 2000 |

Product I B3 | 1000 | |

Product II A1 | 2000 | |

Product II A2 | 500 | |

Product II B2 | 1000 | |

Product III A3 | 4000 |

The processing time of the products in step I varies according to the reactor used and the product manufactured (regardless of product class and type), as shown in Table 3. In addition, setup time and the capacity of each reactor can be observed in Table 4, and the Product-R and R-S compatibilities used in this case are present in Tables 5 and 6, respectively. Observe that Reactor 2 is not compatible with any storage tank. In fact, it is connected only to packing machines, as may be seen in Figure 1.

REACTOR | |||||||
---|---|---|---|---|---|---|---|

PRODUCT | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Product I | 195 | 97 | 136 | 78 | 136 | 136 | 156 |

Product II | 170 | 85 | 119 | 68 | 119 | 119 | 136 |

Product III | 210 | 105 | 147 | 84 | 147 | 147 | 168 |

REACTOR | |||||||
---|---|---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 | 7 | |

Setup (min) | 100 | 60 | 70 | 40 | 70 | 70 | 85 |

Capacity (kg) | 4000 | 1000 | 2000 | 500 | 2000 | 2000 | 3000 |

In step II, the processing time in each storage tank is the same (0.005 minutes per kilogram of product transferred). The setup time is also the same for all tanks (60 minutes). In addition, the Product-S compatibility is equal to 1 for all cases and the S-P compatibility used in the factory can be seen in Table 7.

In stage III, the processing and setup times are independent of the product manufactured, but they depend on the packaging machine used, as seen in Table 8. Each equipment in this step requires a number of operators between the minimum and maximum established, as shown in Table 9. And the product-P and R-P compatibilities used in this case are present in Tables 10 and 11, respectively.

PACKING MACHINE | ||||||
---|---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 | |

Processing (min) | 0.0375 | 0.08 | 0.08 | 0.0375 | 0.0375 | 0.0375 |

Setup (min) | 90 | 60 | 60 | 60 | 60 | 90 |

PACKING MACHINE | ||||||
---|---|---|---|---|---|---|

PRODUCT | 1 | 2 | 3 | 4 | 5 | 6 |

Product I A1 | 1 | 0 | 0 | 0 | 1 | 1 |

Product I A2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product I A3 | 0 | 1 | 1 | 0 | 0 | 0 |

Product I B2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product I B3 | 0 | 1 | 1 | 0 | 0 | 0 |

Product II A1 | 1 | 0 | 0 | 0 | 1 | 1 |

Product II A2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product II A3 | 0 | 1 | 1 | 0 | 0 | 0 |

Product II B2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product II B3 | 0 | 1 | 1 | 0 | 0 | 0 |

Product III A1 | 1 | 0 | 0 | 0 | 1 | 1 |

Product III A2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product III A3 | 0 | 1 | 1 | 0 | 0 | 0 |

Product III B2 | 1 | 0 | 1 | 1 | 0 | 1 |

Product III B3 | 0 | 1 | 1 | 0 | 0 | 0 |

REACTOR | |||||||
---|---|---|---|---|---|---|---|

PACKING MACHINE | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |

2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |

3 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |

4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

5 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |

6 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |

Therefore, three consecutive daily productions were simulated and optimized to demonstrate the operation and viability of the models developed in this work in real case of the studied factory. The simulations were performed using CPLEX Optimization Studio software (student version) on a computer with 8GB RAM and an Intel i7 processor.

6 RESULTS

For the first day demand, the results presented in the Gantt diagram of Figure 2 were obtained. In this diagram, it can be seen that the productions were organized and sequenced in the equipment in order to meet the demand of the day in the shortest time found. The model determined which batches should be stored in the tanks and which could be packed directly. The solution of Model I was obtained in 1.05 seconds with a GAP of 0.00%. Execution of Model II was performed in 1 minute and 31 seconds with a GAP of 0.57% (even with a longer search time, a lower GAP was not found).

Observing the result for the demand of the first day, in Figure 2, it is possible to conclude that it could not be fulfilled in just one day. Therefore, this demand is completed in the next day, generating a delay in the beginning of production of the second day.

The results for the production of second day demand can be observed in Figure 3. It was sequenced in the equipment in order to meet the demand in the shortest time found and respecting the end of the production of the previous day. Model I required 1.12 seconds of processing, obtaining a GAP of 0.00%. The execution of Model II was performed in 1 minute and 45 seconds. The Model II was run for 1h, and finished with gap 12.5%. This gap was obtained after only 1 minute and 45 seconds, then we can state that after this short time the best solution we could get was already found.

Similar to the first day, demand for the second day could only be completed the day after, delaying the start of production on the third day. This fact can be observed in the results obtained for the simulation of the demand of the third day, presented in Figure 4. The execution of Model I was performed in 1.04 seconds, obtaining 0.00% of GAP, and Model II was performed in 1 minute and 42 seconds, reaching a GAP of 0.67%. The best sequencing was obtained, meeting the demand in the shortest time found and determining which production routes would be the best.

7 CONCLUSION

In the present study, two mixed linear programming mathematical models that, by working together, represented the production line of a real case of hybrid flow shop were developed. The first model (Model I) was used to allocate the products in batches and the second model (Model II) to determine the batch processing route in the equipment of sectors I, II, and III. Both models were solved in the CPLEX Optimization Studio solver. Three consecutive daily productions of the hair cosmetics factory were simulated. From the results obtained, it was possible to prove the usefulness and the viability of the models created to obtain optimal solutions for the production of the studied factory. Though the results were achieved in a short time and the models worked well for the factory production scheme, the same functionality cannot be ensured for more complex problems. However, the use of this study by factories can reduce the production time (makespan and completion time), make the production line more organized, and increase the profitability of its productions.