SciELO - Scientific Electronic Library Online

Home Pagealphabetic serial listing  

Services on Demand




Related links


Pesquisa Operacional

Print version ISSN 0101-7438On-line version ISSN 1678-5142

Pesqui. Oper. vol.40  Rio de Janeiro  2020  Epub May 18, 2020 



Carlos Henrique Furtado da Cunha1  *

Fábio de Ávila Rodrigues2

André Gustavo dos Santos3

André Gustavo Sato4

1Universidade Federal de Viçosa, Departamento de Química, Avenida Peter Henry Rolfs s/n, Campus Universitário, Viçosa-MG - E-mail:

2Universidade Federal de Viçosa, Departamento de Química, Avenida Peter Henry Rolfs s/n, Campus Universitário, Viçosa-MG - E-mail:

3Universidade Federal de Viçosa, Departamento de Química, Avenida Peter Henry Rolfs s/n, Campus Universitário, Viçosa-MG - E-mail:

4Universidade Federal de Viçosa, Departamento de Química, Avenida Peter Henry Rolfs s/n, Campus Universitário, Viçosa-MG - E-mail:


Many industries have a complex manufacturing line, which complicates the planning of their productions. One possible solution to this problem is the optimization of the production line. In this work, mixed integer linear programming models are capable of representing the productive organization of the production line of a hair cosmetics factory, characterized by hybrid flow shop problem. The proposed models can be solved using CPLEX® Optimization Studio for real cases of the studied industrial production line. The objective was the minimization of the production makespan and the completion time. The innovation of this work is the application of the mixed integer linear programming method in complex cases, which are often found in industries and are solved by heuristic methods, simulations, or approximations of analytical methods.

Keywords: mixed integer linear programming; Hybrid flow shop; combinatorial optimization


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.


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.


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.

Figure 1 Flowchart of a production line. 


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.

minpdPDiNxbpd,i (1)

pd=1PDxbpd,i1; i=1,..., N (2)

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.

pd=1PDpd · xbpd,ipd=1PDpd · xbpd,i-1; i=2,..., N (3)

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.

r=1Rxri,r=pd=1PDxbpd,i; i=1,..., N (4)

s=1Sxsi,spd=1PDxbpd,i; i=1,..., N (5)

p=1Pxpi,p=pd=1PDxbpd,i; i=1,..., N (6)

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.

xri,rpd=1PDxbpd,i · XIRpd,r · XISpd,s · XRSr,s+M·1-xsi,s; i=1,..., Nr=1,..., Rs=1,..., S (7)

xsi,spd=1PDxbpd,i · XISpd,s · XIPpd,p ·XSPs,p+M·1-xpi,p; i=1,..., Ns=1,..., Sp=1,..., P (8)

xri,rpd=1PDxbpd,i · XIRpd,r · XIPpd,p ·XRPr,p+M·1-xpi,p+M · s=1Sxsi,s; i=1,..., Nr=1,..., Rp=1,..., P (9)

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 xri,r+xbpd,i-xri,r-xbpd,i/2 instead of xri,r · xbpd,i .

i=1Nr=1RMRpd,r · xri,r+xbpd,i-xri,r-xbpd,i2Dpd; pd=1,..., PD (10)

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).

min endr+endp+0,001i=0Npri+tri+ppi+tpi+0,00001i=0Nttri (11)

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

ttriendr ; i=1, ..., N (12)

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

tpi+ppiendp ; i=1, ..., N (13)

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).

ttritsi+psi; i=1, ..., N (14)

ttritpi+ppi · 1-s=1Sxsi,s ; i=1, ..., N (15)

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

xri,rpd=1PDXBpd,i · XIRpd,r · XISpd,s ·XRSr,s+M·1-xsi,s; i=1,..., Nr=1,..., Rs=1,..., S (16)

xsi,spd=1PDXBpd,i · XISpd,s · XIPpd,p ·XSPs,p+M·1-xpi,p; i=1,..., Ns=1,..., Sp=1,..., P (17)

xri,rpd=1PDXBpd,i · XIRpd,r · XIPpd,p ·XRPr,p+M·1-xpi,p+M · s=1S xsi,s; i=1,..., Nr=1,..., Rp=1,..., P (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.

i=1Nr=1RMRpd,r · xri,r+XBpd,i-xri,r-XBpd,i2Dpd; pd=1,..., PD (19)

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

priPRMpd,r · xri,r-M·1-XBpd,i; i=1,..., Npd=1,..., PDr=1,..., R (20)

pri0 ; i=1, ..., N (21)

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

psiMRpd,r · PSMpd,s+20·xsi,s-M·1-XBpd,i-M·1-xri,r; i=1,..., Npd=1,..., PDs=1,..., Sr=1,..., R (22)

psi0 ; i=1, ..., N (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).

ppiMRpd,r · PPMpd,p+80·xpi,p-1,2·oiii=1OIII xoiiii,oiii-M·1-XBpd,i-M·1-xri,r; i=1,..., Npd=1,..., PDp=1,..., Pr=1,..., R (24)

ppi0 ; i=1, ..., N (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).

tri TIRr . xri,r; i=1, ..., Nr=1, ..., R (26)

tsi TISs . xsi,s; i=1, ..., Ns=1, ..., S (27)

tpi TIPp . xpi,p; i=1, ..., Np=1, ..., P (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).

tri+priTFRr . xri,r+M · 1-xri,r; i=1, ..., Nr=1, ..., R (29)

tsi+psiTFSs . xsi,s+M · 1-xsi,s; i=1, ..., Ns=1, ..., S (30)

tpi+ppiTFPp . xpi,p+M · 1-xpi,p; i=1, ..., Np=1, ..., P (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.

tritrj-M · 1-xtri,j; i=1, ..., Nj=1, ..., N (32)

xtri,j+xtrj,i=1; i=1, ..., Nj=1, ..., N; ji (33)

xtri,i=0; i=1, ..., N (34)

tsitsj-M · 1-xtsi,j; i=1, ..., Nj=1, ..., N (35)

xtsi,j+xtsj,i=1; i=1, ..., Nj=1, ..., N; ji (36)

xtsi,i=0; i=1, ..., N (37)

tpitpj-M · 1-xtpi,j; i=1, ..., Nj=1, ..., N (38)

xtpi,j+xtpj,i=1; i=1, ..., Nj=1, ..., N; ji (39)

xtpi,i=0; i=1, ..., N (40)

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).

tritsj+psj+TLRpd,r ·XBpd,j-0,9XBpd,i-M ·3-xtri,j-xri,r-xrj,r; i=1,..., Nj=1,..., Nr=1,..., Rpd=1,..., PD (41)

tritpj+ppj+TLRpd,r ·XBpd,j-0,9XBpd,i-M ·3-xtri,j-xri,r-xrj,r-M · s=1Sxsi,s; i=1,..., Nj=1,..., Nr=1,..., Rpd=1,..., PD (42)

tsitpj+ppj+TLSpd,s ·XBpd,j-0,9XBpd,i-M ·3-xtsi,j-xsi,s-xsj,s; i=1,..., Nj=1,..., Ns=1,..., Spd=1,..., PD (43)

tpitpj+ppj+TLPpd,p ·XBpd,j-0,9XBpd,i-M ·3-xtpi,j-xpi,p-xpj,p; i=1,..., Nj=1,..., Np=1,..., Ppd=1,..., PD (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.

tsitri+pri; i=1, ..., N (45)

tpitsi+psi; i=1, ..., N (46)

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

tritrj+prj-M · 3-xtrij-xoii,oi-xoij,oi; i=1, ..., Nj=1, ..., Noi=1, ..., OI (47)

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

oi=1OIxoii,oi=r=1Rxri,r; i=1, ..., N (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.

i=1Nxoii,oi+1i=1Nxoii,oi+1; oi=1, ..., OI-1 (49)

trixoii,oi · TIOIoi; i=1, ..., Noi=1, ..., OI (50)

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.

tpitpj+ppj-M · 3-xtpi,j-xoiiii,oiii-xoiiij,oiii; i=1, ..., Nj=1, ..., Noiii=1, ..., OIII (51)

oiii=1OIIIxoiiii,oiiip=1PMinOIIIp · xpi,p; i=1, ..., N (52)

oiii=1OIIIxoiiii,oiiip=1PMaxOIIIp · xpi,p; i=1, ..., N (53)

i=1Nxoiiii,oiii+1i=1Nxoiiii,oiii+1; oiii=1, ..., OIII-1 (54)

tpixoiiii,oiii · TIOIIIoiii; i=1, ..., Noiii=1, ..., OIII-1 (55)


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.

Table 1 Items produced by the hair cosmetics factory studied. 

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.

Table 2 Demand of each product on each day. 

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.

Table 3 Processing time in step I (in minutes). 

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

Table 4 Setup time and capacities of the reactors. 

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

Table 5 Compatibility Product-R (1 if compatible, 0 otherwise). 

PRODUCT 1 2 3 4 5 6 7
Class A 1 0 1 1 1 1 1
Class B 0 1 0 0 0 0 0

Table 6 Compatibility R-S (1 if compatible, 0 otherwise). 

REACTOR 1 2 3 4
1 1 0 0 0
2 0 0 0 0
3 0 1 0 0
4 0 1 1 0
5 0 1 1 0
6 0 0 0 1
7 0 0 0 1

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.

Table 7 Compatibility S-P (1 if compatible, 0 otherwise). 

STORAGE TANK 1 2 3 4 5 6
1 1 0 0 0 0 0
2 0 1 1 0 0 0
3 0 0 1 0 0 0
4 0 0 0 1 1 0

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.

Table 8 Processing and setup times in step III. 

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

Table 9 Minimum and maximum number of operators in each packing machine. 

Nº of operators 1 2 3 4 5 6
Minimum 4 3 3 4 4 4
Maximum 5 4 4 5 5 5

Table 10 Compatibility Product-P (1 if compatible, 0 otherwise). 

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

Table 11 Compatibility R-P (1 if compatible, 0 otherwise). 

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.


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).

Figure 2 Result for the production started on the first day. 

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.

Figure 3 Result for the production started on the second day. 

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.

Figure 4 Result for the production started on the third day. 


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.


1 BATALHA MO, ET AL. 2008. Introdução À Engenharia De Produção. 1st ed. Rio de Janeiro: Elsevier Editora Ltda. [ Links ]

2 BELFIORE P & FÁVERO L. 2013. Pesquisa Operacional Para Cursos de Engenharia. 1st ed. Rio de Janeiro: Elsevier Editora Ltda . [ Links ]

3 BOZEJKO W, PEMPERA J & SMUTNICKI C. 2013. Parallel tabu search algorithm for the hybrid flow shop problem. Computers and Industrial Engineering, 65(3): 466-474. [ Links ]

4 CUI Z, & GU X. 2015. An improved discrete artificial bee colony algorithm to minimize the makespan on hybrid flow shop problems. Neurocomputing, 148: 248-259. [ Links ]

5 DIOS M, FERNANDEZ-VIAGAS V & FRAMINAN J M. 2018. Efficient heuristics for the hybrid flow shop scheduling problem with missing operations. Computers and Industrial Engineering, 115(Nov.2017): 88-99. [ Links ]

6 ENGIN O & GÜÇLÜ A. 2018. A new hybrid ant colony optimization algorithm for solving the no-wait flow shop scheduling problems. Applied Soft Computing Journal, 72: 166-176. [ Links ]

7 FANJUL-PEYRO L, PEREA F & RUIZ R. 2017. Models and matheuristics for the unrelated parallel machine scheduling problem with additional resources. European Journal of Operational Research, 260(2): 482-493. [ Links ]

8 FERNANDEZ-VIAGAS V, PEREZ-GONZALEZ P & FRAMINAN J M. 2019. Efficiency of the solution representations for the hybrid flow shop scheduling problem with makespan objective. Computers and Operations Research, 109: 77-88. [ Links ]

9 FIGIELSKA E. 2014. A heuristic for scheduling in a two-stage hybrid flowshop with renewable resources shared among the stages. European Journal of Operational Research, 236(2): 433-444. [ Links ]

10 KIM H J & LEE J H. 2019. Three-machine flow shop scheduling with overlapping waiting time constraints. Computers and Operations Research, 101: 93-102. [ Links ]

11 LALITHA J L, MOHAN N & PILLAI V M. 2017. Lot streaming in [N-1](1)+N(m) hybrid flow shop. Journal of Manufacturing Systems, 44: 12-21. [ Links ]

12 LI G, LI N, SAMBANDAM N, SETHI S P & ZHANG F. 2018. Flow shop scheduling with jobs arriving at different times. International Journal of Production Economics, 206(Oct): 250-260. [ Links ]

13 MIDGLEY G, JOHNSON M P & CHICHIRAU G. 2018. What is Community Operational Research? European Journal of Operational Research, 268(3): 771-783. [ Links ]

14 NABLI Z, KHALFALLAH S & KORBAA O. 2018. A two-stage hybrid flow shop problem with dedicated machine and release date. Procedia Computer Science, 126: 214-223. [ Links ]

15 NEJATI M, MAHDAVI I, HASSANZADEH R, MAHDAVI-AMIRI N & MOJARAD M. 2014. Multi-job lot streaming to minimize the weighted completion time in a hybrid flow shop scheduling problem with work shift constraint. International Journal of Advanced Manufacturing Technology, 70(1-4): 501-514. [ Links ]

16 OLIVEIRA G & TURRIONI J. 2012. O Problema de Flow Shop Híbrido: Revisão e Classificação. In XXXII Encontro Nacional de Engenharia de Produção, p. 1-13. [ Links ]

17 ÖZPEYNIRCI S, GÖKGÜR B & HNICH B. 2016. Parallel machine scheduling with tool loading. Applied Mathematical Modelling, 40(9-10): 5660-5671. [ Links ]

18 PAN Q K, FATIH-TASGETIREN M, SUGANTHAN P N & CHUA T J. 2011. A discrete artificial bee colony algorithm for the lot-streaming flow shop scheduling problem. Information Sciences, 181(12): 2455-2468. [ Links ]

19 PENG K, WEN L, LI R, GAO L & LI X. 2018. An Effective Hybrid Algorithm for Permutation Flow Shop Scheduling Problem with Setup Time. In 51st CIRP Conference on Manufacturing Systems, 72: 1288-1292. [ Links ]

20 PESSOA L S & ANDRADE C E. 2018. Heuristics for a flowshop scheduling problem with stepwise job objective function. European Journal of Operational Research, 266(3): 950-962. [ Links ]

21 RAU E P. 2005. Combat science: the emergence of Operational Research in World War II. Endeavour, 29(4): 156-161. [ Links ]

22 RIBAS I, LEISTEN R & FRAMINÃN J M. 2010. Review and classification of hybrid flow shop scheduling problems from a production system and a solutions procedure perspective. Computers and Operations Research, 37(8): 1439-1454. [ Links ]

23 RUIZ R & VÁZQUEZ-RODRÍGUEZ J A. 2010. The hybrid flow shop scheduling problem. European Journal of Operational Research, 205(1): 1-18. [ Links ]

24 VIELMA J P. 2015. Mixed Integer Linear Programming Formulation Techniques. SIAM Review, 57(1): 3-57. [ Links ]

25 WANG S & LIU M. 2014. Two-stage hybrid flow shop scheduling with preventive maintenance using multi-objective tabu search method. International Journal of Production Research, 52(5): 1495-1508. [ Links ]

26 WANG S, LIU M & CHU C. 2015. A branch-and-bound algorithm for two-stage nowait hybrid flow-shop scheduling. International Journal of Production Research, 53(4): 1143-1167. [ Links ]

27 YU C, SEMERARO Q & MATTA A. 2018. A genetic algorithm for the hybrid flow shop scheduling with unrelated machines and machine eligibility. Computers and Operations Research, 100: 211-229. [ Links ]

Received: January 21, 2019; Accepted: October 04, 2019

*Corresponding author

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License