Production sequencing in a flow shop system using optimization and heuristic algorithms

: The purpose of the research was to determine the sequencing of the production of n jobs in m operations in a small footwear company in an environment of flow shop machine characteristics, which optimizes the total time of completion of the job in the production system (Makespan). We used heuristic algorithms that were applied through Lekin and WinQSB softwares, and for the optimization algorithm we designed a mathematical model that was solved by Juliabox software. Results show that the integer linear programming and local search minimize the makespan with 3807 minutes, and different production sequences for each algorithm, which consider permutation, which improves the traditional way of programming the production in 97 minutes, however, the optimization presents better results in the performance measures of average waiting time, average time of flow, and average job in process. Application of heuristic algorithms proves to be simple and fast, but the mathematical model of optimization designed and encoded in the software is a flexible and valuable tool for decision making in production programming, which could be applied in other footwear companies, and in other productive sectors whose companies have the same characteristics of the case study, reducing costs and improving delivery times.


Introduction
The programming of operations focuses on finding the best way to use the existing capacity, considering production technical constraints; it is a type of programming (scheduling) where jobs are assigned to the machines during specific periods while satisfying one or more targets (Krajewski et al., 2008;Habib et al., 2015). Pinedo (2010) mentions that a sequence usually corresponds to a permutation of n jobs which must be processed in a given machine. For Méndez (2011) these jobs are usually placed in Gantt diagrams.
According to the flow of products or processes, production systems are classified as continuous and intermittent. Among the intermittent are the flow shop systems or online production and the job shop or task shop (Gómez et al., 2008). Flow shop is characterized because there are n jobs waiting to be processed in m machines, where all jobs have the same route or process sequence. A feasible solution consists of programming job on each machine without violating its capabilities (Chang, 2003). Gupta & Stafford (2006) added that to minimize a defined measure of production cost the jobs do not have to be processed in all the machines, that is, a job can skip some operations according to their technological requirement. For Buzzo & Moccellin (2000), the solution of the flow shop problem seeks to optimize a measure of programming performance usually associated with time. Reza Hejazi & Saghafian (2005) mention that there are usually (n!) m different alternatives for sequencing jobs in machines, however, if the permutation of jobs is not assumed for each machine, the search space is reduced to (n!), which is considered a classic problem of the flow shop.
The application of optimization models has a broad contribution in reducing costs and saving resources in all types of organizations, which gives it more relevance among the international scientific community (Colina, 2011). Many researchers recognize that scheduling problems can be solved optimally using mathematical programming techniques (Jain & Meeran, 1998). The Integer Linear Programming is widely used to solve real organizational problems, in areas such as production scheduling and material requirements, allowing decision making for effective business management (Fernández, 2011). From the beginning, scheduling literature has relied on mathematical models for allocation and sequencing decisions. Although, this also includes a variety of methodologies. Scheduling has become a focal point for the development, application and evaluation of combinatorial procedures, simulation techniques and heuristic solution approaches (Baker & Trietsch, 2009). Mathematical optimizations consist of the implementation of a mathematical model that is then optimized through computational algorithms. For its part, the heuristics solutions consist of algorithms that do not ensure an optimal solution to the problem, however, its advantage is in its ease of application, the proximity to the real system and the reduced time and cost it takes to find a "good" solution (Sepúlveda & Berroeta, 2012).
It is necessary for companies to begin the path of continuous improvement by implementing a correct production programming system; "Unfortunately, many producers have ineffective production programming systems" (Herrmann, 2007). One of the constant challenges of the production planning and control department is the determination of an effective production program. In small factories there is greater difficulty, due to the absence of a computational tools that facilitates rapid and effective evaluations of the different scenarios for production scheduling (Ferreira et al., 2008). One of the biggest problems that arise in the management of operations of a manufacturing or services company is the sequential programming of activities of the different jobs required by the clients (Ballesteros et al., 2013).
Many companies, due to lack of knowledge, can not improve their job performance, which results in non-compliance with delivery times and product quality (Habib et al., 2015). In the companies of the industrial sector, production planning and control play a fundamental role in the competitiveness, with immediate results in the cost and the client attention (Landmann & Erdmann, 2011). The planning and programming of activities in a company has a direct implication in the efficiency of any manufacturing or service system (Rojas, 2012). Programming is one of the most important decisions in production control systems (Costa et al., 2014), which is characterized by being one of the most complicated activities in the management of production systems, since it handles different types of resources and tasks simultaneously (Morais & Moccellin, 2010). Studies on scheduling are plausible, since the operational phase may be the most unprotected and untreated at the academic level (Méndez, 2011). Scheduling is one of the main tools to improve performance in a manufacturing or services industry (Cherkos, 2011).
Among the objectives of the programming of the work center are: meet the deadlines, minimize the time of delay and the preparation times, and inventory in process, as well as maximize the use of machines and manpower (Chase et al., 2009). Production programming techniques can result in significant improvements in utilization, idle times and Makespan reduction and lateness in the workplace (Habib et al., 2015). Techniques such as genetic algorithms, linear programming, heuristics, sequencing rules among others, consider the relevant restrictions for the generation of programs that maximize business objectives (Landmann & Erdmann, 2011).
The footwear industry contributes largely to the manufacturing activities of a country, due to its share in exports, production volume and capacity to generate jobs (Godinho et al., 2009). The Colombian footwear industry has shown growth in recent years. Its share in the gross domestic product (GDP) has been 0.27% of the national GDP and 2.17% in the manufacturing GDP, and the generation of approximately 100,000 jobs, which is valuable for the country's economy (López et al., 2016). For the Colombian Industrial Association of Footwear, Leather and its Manufactures (ACICAM) footwear production is expected to grow around 6% for 2017, marked by an exchange rate, greater orders by the official sector and for the effect of rigorous customs control on imports. ACICAM (2017) considers that Colombia will be able to increase external sales of footwear and leather goods in places such as Chile, Peru, Ecuador, Mexico and Costa Rica. To face this new scenario, more efficient production processes must be implemented, and the internal processes of the footwear companies optimized, so that they become more productive and they reduce the orders delivery time. Habib et al. (2015) developed studies related to the sequencing of production. They applied scheduling techniques such as different dispatch rules and Johnson and Cambell algorithms, in a factory of leather products taken as a model, attached to the Leather Industry Development Institute in Ethiopia, with the purpose of improving its performance, and to increase the satisfaction and the level of confidence of the clients. The results show that under a flow shop environment the flow time, makespan and the machinery use were improved. Restrepo et al. (2012), and Restrepo (2010Restrepo ( , 2011 applied the CDS (Cambell, Dudek & Smith) heuristics and Gupta and Palmer heuristics, respectively, to solve a scheduling problem of n tasks through m machines, determining the sequence of 10 jobs on 5 machines with the smallest makespan. Ramírez et al. (2012) developed a proposal for concentrate feeds factories, which integrates the material requirements plan and the programming of operations that was executed through a mixed integer linear programming model, which coordinates the operations of filling dosing hoppers and it has as a performance measure the minimization of preparation costs and maintenance of inventory. Restrepo et al. (2008) applied the integer linear programming in the solution of a problem of programming a set of operations necessary for the realization of two jobs in a single machine, obtaining the start dates of each one of the operations, in such a way that generate the lowest total penalty for late job. Luche & Morabito (2005) applied a mixed integer linear programming model for the programming of the production in an industry of electromolten grains, with the aim of increasing productivity and improving customer service with compliance of delivery times. Zhao & Kong (2016) addressed the problem of flow shop programming using a heuristic methodology based on genetic algorithm, applying improvements to it, with the aim of minimizing the total duration of the program and solving the problem of local minimization in the search process. The experimental results show an improved cyclic search of the genetic algorithm. Landmann & Erdmann (2011) developed and applied a methodology for programming production in a foundry industry that presents processes with characteristics of a flow shop problem. A heuristic approach was used for a solution, with the use of fuzzy logic, to sequence the production orders in the modeling process and at the same time generate a program integrated with the fusion process, in a short term, which recognizes the periods of greater and less electrical energy availability in the foundry industry. Reza Hejazi & Saghafian (2005) carried out a review of the literature regarding the flow shop programming problem, showing that most of the research considers the setup times of the machines as non-significant, and these do not influence the times of task processing, in addition, that the main criterion or objective is the makespan, which coincides with Baker & Trietsch (2009) and, they examine some exact methods (for small problems), constructive heuristics and developed improved metaheuristic and evolutionary approaches, as well as some wellknown properties and rules for this problem.
Investigations of flow shop systems present very little practical application of programming techniques, so future research should be inspired by real-life problems rather than problems found in mathematical abstractions or theoretical aspects (Gupta & Stafford, 2006;Reza Hejazi & Saghafian, 2005). In the reviewed literature, there is no evidence of application of heuristic and optimization algorithms for the problem of sequencing production in the footwear production sector in Colombia. Within the function of production programming in the small company studied, it was evidenced that its traditional practice is done considering first the jobs of less processing time. However, it is not determined in detail when employees should work, as well as assigning jobs to machines or employees, which causes problems in performance measures, mainly in delivery times.
The purpose of the research was to determine the best sequence of job in operations performed manually or by machines, in a small footwear company under a flow shop production environment, by comparing the results obtained by heuristic and optimization algorithms, with the purpose of optimizing the total time of jobs completion in the productive system (Makespan).

Heuristic and optimization methods
The production programming problem corresponds to Fm // Cmax, where the machine environment corresponds to flow shop (Fm), and the objective is to minimize completion times of jobs in the system (makespan -Cmax). The selection of an appropriate method for the scheduling problem depends mainly on the nature of the model and the choice of the objective function. In some cases, it makes sense to consider alternative techniques. For this reason, it is important to study the different methodologies such as mathematical programming models (Baker & Trietsch, 2009). To solve the problem in the case study, the following heuristic algorithms were used: the rules of dispatch of the shortest processing time (shortest processing time -SPT), which is the traditional way as the small footwear company sequence its production and, the longest processing time (LPT); CDS, Gupta, General shifting bottleneck SB routine and local search, and as an optimization algorithm the integer linear programming (ILP). Pinedo (2010) considers that rules of dispatch have been an active field of research for several decades and many different rules have been studied in the literature. These rules are useful when trying to find a reasonably good program with respect to a single objective such as the makespan, the total termination time or the maximum delay. The SPT dispatch rule, orders and processes tasks according to their production time, from least to greatest, first processing the task with the shortest duration and so on, while the LPT rule, first elaborates the job that consumes the most time (Méndez, 2011). Sipper & Bulfin (1998) mentions that a direct heuristic algorithm forces the problem to be one of two machines and use Johnson's algorithm. This sequence becomes a permutation program for the original problem. The different approaches to convert the problem of m machines into a problem of two machines produce different programs, then it is possible to choose the best of them. In 1970, Cambell, Dudek and Smith proposed a conversion approach, the CDS heuristic. Let i1 P′ and i2 P′ be the processing times for the problem of two machines. Then, for a problem of m machines, we have (Expressions 1-2):

Heuristic algorithms
Where the subscript i denotes the jobs and the subscripts j, k, l, m, denote the machines. It starts with k=1 and l=m, and a program is generated with Johnson's algorithm. Then make k=2 and l=m-1 and repeat, continuing until k=m-1 and l=2. The best of the m-1 generated programs is used. The Johnson algorithm consists of the following steps: 1) The operation time of each job is recorded in both machines; 2) The shortest time is chosen; 3) If the short time is for the first machine, the first job is done; if the short time is for the second machine, the job is done at last. In case of a tie, job is done on the first machine; 4) Repeat steps 2 and 3 with the remaining jobs until completing the programming (Chase et al., 2009). There are other ways to generate processing times for pseudo-machines. In 1972, Gupta proposed another heuristic algorithm. Let (Expressions 3 to 5): and define: min , Sipper & Bulfin, 1998). The General SB (shifting bottleneck) routine is completely generic and is designed for different machine environments and objective functions. This heuristic procedure sequences the machines one by one, successively, taking each time the machine identified as a bottleneck among machines not yet sequenced (Pinedo, 2010). Each time a new machine is sequenced, all previously established sequences are reoptimized locally (Costa et al., 2014). The neighborhood search routine is applicable to the flow shop and job shop machines environment, with any objective the makespan or the total weighted delay. Local search is a procedure that does not guarantee an optimal solution, usually trying to find a program that is better than the current one in the neighborhood. Two programs are neighbors, if one can be obtained through the well-defined modification of the other. In each iteration, the local search procedure performs a search within the neighborhood and evaluates several neighboring solutions. The procedure accepts or rejects a candidate solution as the next program, based on an acceptance or rejection criterion (Pinedo, 2010).

Operations research and ILP
The main phases of the implementation of operations research include: 1) the definition of the problem; 2) the construction of the model; 3) the solution of the model; 4) validation of the model and implementation of the solution. In the opinion of the author, the most important technique of operations research is linear programming. All the operations research models, including linear programming, consist of three basic components: 1) the decision variables that are to be determined; 2) the objective (the 7/21 goal) that needs to be optimized (maximize or minimize), and 3) the constraints that the solution must satisfy (Taha, 2012).
To solve the mathematical model of ILP, the JuliaBox software version 0.6 was used (Bezanson et al., 2012), while for the CDS and Gupta algorithms WinQSB software version 2.0 (Chang, 2003) was used. For the dispatch rules of office, the general SB Routine and the Local Search, Lekin software version 2.4 (Feldman & Pinedo, 2001) was used, which was also used to develop the Gantt charts.

Production process
The study unit was a small footwear company located in the city of Cúcuta, Colombia, whose manufacture is making to order, and is divided into two lines, the line of casual footwear and the line of "llaneras" boots. The production process of a small footwear company is composed of the following stages: for the design of the product, market trends are consulted in specialized magazines, designs launched by the competitor firms in footwear fairs around the world, and by direct observation of its target market; the cutting process is carried out manually, where the tracing of the midspanner is first performed, then the pieces are cut, the reinforcement and embossing lines are demarcated, and then they are classified by size and color; in the roughing one diminishes the caliber of the leather to facilitate the ensemble and sewing of the shoe, and in the embossed one it is printed in the leather the logo of footwear of the company; lining draws the seams over the pieces previously cut according to the model; in the weaving operation, a luxury seam is manually made on the shoe; in the assembled set for the template, it is covered and the assembly of the cut is carried out on it, manually; Sole fitting joins the sole to the shoe manually, with the help of an oven and a press for the vulcanizing process; then the product is cleaned and its conformity is reviewed, otherwise it is returned to the previous process; finally, shoes are packed in transparent plastic bags, and then in cardboard boxes. Figure 1 shows the productive flow of the small footwear company.

Description of the case study
Sequential models have applications mainly in a task shop where a set of machines, of general purpose, execute a series of operations on job orders or production tasks. The tasks are often unique and ordered by a specific client (Restrepo, 2011). In this investigation it was considered to determine the best sequence of production to manufacture six references of footwear through the application of heuristic and optimization algorithms. Those six references correspond to footwear for men within a line of production conformed by seven operations, and these references represent 80% of the production of the casual line. In Table 1, required process times (minutes / lot) are presented for each job in each process or operation.

Assumptions of job sequencing problem jobs in the production system
In this case of study, the following assumptions were considered: 1) there is a finite set of n jobs to process in m sequential machines (operations), which are available to start their process at time zero; 2) the completion time of the jobs include preparation and processing times, and these are considered as deterministic quantities; 3) once the job has started on a machine (operation), it can not be interrupted; 4) machines or workers are going to be available continuously, and 5) each of the machines or work stations develops a single process or operation.

Solution of the case study
Results of the production sequencing are presented below, for each one of the considered algorithms.

Traditional method of the footwear company
According to what was evidenced, it can be affirmed that the company considers as a criterion to sequence the production, to send the jobs of shorter processing time first, which indicates that the rule of SPT is implemented. The results show that the makespan correspond to 3904 minutes (65.07 hours), whose sequence of jobs is, 5-4-2-6-3-1. Figure 2 represents the start and finish times for each job in each operation. Rows correspond to sequential operation and columns correspond to required time for each job.

CDS Algorithm
This algorithm presents the same results of the traditional method used by the company (SPT), whose best job sequence for the (m-1) programs analyzed by the algorithm, is 5-4-2-6-3-1.

Gupta algorithm
The makespan for this algorithm corresponds to 3938 minutes (65.63 hours). This correspond to the sequence 5-4-2-6-1-3. Figure 3 represents the start and finish times for each job in each operation.

LPT dispatch rule
The results for the longer processing time dispatch rule, show that the makespan corresponds to 4215 minutes (70.15 hours), whose sequence of jobs is 1-3-6-2-4-5. Figure 4 represents the start and finish times for each job in each operation.

SB routine general algorithm
This algorithm presented a makespan corresponding to 3963 minutes (65.05 hours), whose sequence of jobs varies for each machine, which is presented in Table 2. Figure 5 represents the times of start and finish for each job in each operation.

Algorithm Local search
For the Local Search algorithm, the makespan corresponds to 3807 minutes (63.45 hours), whose sequence of job varies from one operation to another, which is presented in Table 3. Figure 6 represents the start and finish times for each job in each operation.

Solution for ILP optimization algorithm
Considering the phases of operations research, its application for the sequencing of the production in the small footwear company is shown below.
Problem definition. The problem was to determine the sequencing of the production for a small footwear company, specifying the time of completion for six jobs that represent six footwear references, in seven operations, to optimize the total completion time of jobs (Makespan).
ILP Mathematical model. According to the basic components of linear programming, the results of its application in the case study are presented below.
Definition of ILP decision variables. The decision variables whose values were determined by means of the solution of the mathematical model are: Xij

Minimum Cmax Restrictions.
They are used to find the minimum value of the maximum time of completion of the jobs in the last operation, which is denoted as m (Equation 7).
Overlapping restrictions. This disjunctive constraint prevents two jobs from being scheduled at the same time in the same operation, that is, since there is only one resource, it can only attend one job at a time. Expression 8 indicates that the job i is performed after the job k, and Expression 9 indicates that the job k is done after job i.
.., , ,..., i 1 n j 1 m ∀ ∈ ∈ Restrictions for time of completion of jobs i in the operation 1. This restriction establishes that the completion times of the jobs i in operation 1, must be at least equal to the processing time of each job i in that operation (Expression 11).
Restriction of non-negativity. Expression 12 impose that all model decision variables must be a non-negative integer.
Expressions 6 to 14 the ILP mathematical model is presented, which determines the sequence and the completion time of each job, in each operation and minimizes the makespan.
Mathematical model solution. Model code was implemented in JuliaBox software (ver.0.6). Results show that the makespan corresponds to 3807 minutes (63.45 hours), and the sequence of jobs varies for each operation, which is presented in the Table 4.  Table 5 shows the completion times of each job processed in each operation, (Xij), and Figure 7 shows their respective job completion times.  According to the production sequences obtained by heuristic and optimization methods, General SB routine, Local Search and ILP algorithms consider the permutation of jobs for each operation. In addition, since the size of the problem is not large enough, the goal achieved by Local Search can be considered a global optimum, hence the similarity with results obtained by the ILP optimization algorithm, however, its production sequences are different, which means that the problem presents alternative optimal solutions. This have some implication in the performance of other performance measures that are described below.

Traditional, heuristics and optimization methods comparison
Although the objective was to minimize the makespan, it is intended to make a comparison with the results of the performance measures or objectives obtained by each of the methods used in the investigation, which are presented in Table 6.

Processing sequence
Varies for each operation (Table 4) Varies for each operation (Table 3) 5-4-2-6-3-1 5-4-2-6-3-1 5-4-2-6-1-3 Varies for each operation (Table 2) 1-3-6-2-4-5 The description of each of the performance measures is as follows: Cmax, minimum time of completion of the jobs; Wmax, maximum waiting time; MW, average wait time; MF, average flow time; WIP, average job in process; MU, average utilization of the machinery. Figures 8 to 13 show the comparison of each one of the performance measures.  Figure 8 shows that ILP algorithm together with Local Search presented the best Cmax results with 3807 minutes, representing a 97 minutes improvement with respect to the traditional method of production sequencing (SPT), so either of the two options can be considered for the sequencing of the production in the company, providing a better service to the clients through fast delivery of the jobs. It is emphasized that the application of Local Search algorithm within the Lekin software was simple, while the design and solution of the optimization algorithm required more time, but with the advantage that once designed and programmed in the JuliaBox software, it is flexible to sequence n jobs in m machines, seven operations in this case, and always guarantees an optimal solution for this problem. In turn, the best result of the average use of the machinery is achieved with 36.23%, as shown in Figure 9, which indicates that the sequences have a positive impact on the most efficient use of the production system, compared to 35.33% of the traditional method and the CDS algorithm. In Figure 10, the MF obtained by the optimization algorithm had a better performance than local search, with a value of 2605.67 minutes, and a difference of 97.66 minutes. The traditional method along with the CDS, present the minimum average flow time of 2024.83 minutes. The above indicates that jobs 5 and 6 must wait less time to be served by the operations, therefore, they had a shorter completion time than those obtained by ILP, the other jobs ended first by the ILP algorithm as shown in the Table 7.   Figure 11 shows that the ILP and Local Search have a Wmax of 3168 minutes, which means that a job waits that time in the production system to be attended by the operations of the footwear production process. Regarding to MW measure ( Figure 12) ILP is better than Local Search, with a value of 996.33 minutes and a difference of 97.67 minutes for the average waiting time of the jobs. The traditional method and the CDS presented better results with 415.5 minutes. Therefore, it is represented in a greater inventory of products in process or permanence of jobs in the system waiting to be attended by the operations, as reflected in the WIP of 4.11 jobs by the ILP algorithm and 4.26 by Local Search, compared with 3.11 jobs for the traditional method and the CDS (Figure 13).   Finally, the production sequence obtained by the ILP is defined as the one that obtained the best performance with respect to Local Search, which constitutes it as a valuable tool for the studied company to optimally program its production. These results could also be applied to the companies associated to ACICAM, and to other productive sectors whose companies have the same characteristics, impacting on the improvement of its productivity and competitiveness. In a similar case studied by Habib et al. (2015) concludes that improvement in the factory of leather products taken as a model, is good news for the leather products manufacturing companies that are consulted by the leather industry development institute in Ethiopia, who suffer from problems of low productive performance.

Conclusions
The best sequence to produce n jobs in m operations was found, for a case of study in a small footwear company whose productive environment is the flow shop. Optimal sequence derives from the solution and comparison of results obtained by the heuristic algorithms SPT, LPT, Gupta, CDS, General SB routine and local search, and ILP optimization. The latter optimizes the time of completion of the jobs (makespan) with a value of 3807 minutes, improving the solution obtained by the traditional method used by the company by 97 minutes. The optimal sequence of the production was different for each operation (Table 4).
ILP and Local Search algorithms presented the same results of the makespan, average utilization of the machinery and maximum job waiting time, but with different production sequences, which indicates that the problem presents alternative optimal solutions. This is valuable for the person in charge of the operational function of production by providing more options when deciding a sequence of production, with the guarantee that he will always obtain an ideal solution to this problem. However, it is recommended to use the ILP solution, since it presented better results with respect to the performance measures MF, MW and WIP.
The fact that the application of the heuristic algorithms by Lekin software was simple and fast is highlighted, which is considered an advantage with respect to the optimization algorithm, however, the ILP algorithm, once built and encoded in the JuliaBox software, becomes a flexible and valuable tool to decisions making in production sequencing, which results in a better management of the productive system, strengthening competitive business strategies of speed in delivery and cost reduction.
The ILP designed to determine the optimal production sequence for the case study, can be applied in any company in the productive sector of footwear under a productive flow shop environment, and in other productive sectors that present the same operating characteristics of the studied company.
As future studies it could be considered to solve this problem for flexible flow shop production environments, which considers several machines in parallel for each stage of the production process. The setup time of the machinery could also be handled separately from the processing time or consider another objective function as the tardiness.