#### Abstract

The cutting and sewing process is a traditional flow shop scheduling problem in the real world. This two-stage flexible flow shop is often commonly associated with manufacturing in the fashion and textiles industry. Many investigations have demonstrated that the ant colony optimization (ACO) algorithm is effective and efficient for solving scheduling problems. This work applies a novel effective ant colony optimization (EACO) algorithm to solve two-stage flexible flow shop scheduling problems and thereby minimize earliness, tardiness, and makespan. Computational results reveal that for both small and large problems, EACO is more effective and robust than both the particle swarm optimization (PSO) algorithm and the ACO algorithm. Importantly, this work demonstrates that EACO can solve complex scheduling problems in an acceptable period of time.

#### 1. Introduction

Garment producers must continuously adjust their production systems, including product design, production, and distribution, to remain competitive in the market. They also use new production techniques and equipment, increase outsourcing, and increase the number of strategic alliances with logistic coordinators to shorten processing times and ensure quick responses (QR) (Uruk et al. [1] and Xiong et al. [2]). However, managers focus less on how an effective sequence of tasks can reduce costs by decreasing wasted time and even wait time during the manufacturing process. A good scheduling technique can efficiently reduce wait time, support the just-in-time shipping of garments, and maximize the marginal value for customer requirements (Huang et al. [3] and Liou et al. [4]).

In garment manufacturing, material must be cut before it is sewn. Waiting for predetermined patterns in the cutting process consumes time (Wong et al. [5]). This work considers cutting and sewing as critical processes in the garment production system. Currently, most producers rely on manual scheduling to collect clothes, causing excessive makespan and overhead costs. The cutting process with due windows before the sewing process can be regarded as a two-stage flow shop problem. Garments must complete the cutting process neither earlier nor later than the completion of the sewing process to ensure economic efficiency. This work considers flexible management using an increased number of identical machines to help enterprises increase profits and lower overhead costs by applying a novel algorithm to solve scheduling problems. Operations scheduling is widely conducted to optimize resource use, increasing production efficiency and customer satisfaction. Production management commonly integrates production-related activities to reduce earliness, tardiness, machine idle costs, inventory costs, and other operating costs. Numerous schemes have been developed to solve scheduling problems, each of which has had mixed success (Huang et al. [3] and Cheng et al. [6]). Of the scheduling problems considered herein, the two-stage flexible flow shop scheduling problem (FFSP) is the most common in the real world. The yield rates of spreading, cutting, and sewing processes are critical to the yield rate of the entire production process. In a highly competitive environment, enterprises expend much considerable effort to minimize earliness and tardiness by production scheduling to reduce operating costs, ensure a short time to market, and generate a long-term profit. The apparel manufacturing process is a notable example. Each piece of cloth is processed using a cutting machine for the sewing process. Processes that allow jobs to be performed on identical machines to fill various purchase orders are called flexible production processes. Owing to the cost associated with the wait time for sewing, just-in-time capacity represents a bottleneck in the manufacturing process. Therefore, the fabrication of clothing requires an efficient scheduling multiprocessor to ensure timely market delivery. Figure 1 summarizes the limitation.

Wong et al. [5] developed a novel two-tier hierarchical model of the garment manufacturing scheduling system to solve flow shop scheduling problems. Their method had an excellent capacity for solving the flow shop scheduling problem with minimized earliness and tardiness penalties and minimized completion time in the cutting and sewing department. Test results indicated that the proposed scheduling model performed well for the apparel industry. Cheng et al. [6] developed an approximation algorithm with a worst-case ratio of four to solve a job shop scheduling problem using two batch-processing machines by minimizing makespan. Computational results demonstrate that their algorithm can efficiently solve this problem. Flexible flow shop scheduling problems have been extensively studied (Demir and Leyen [7] and Xiong et al. [2]). The related literature enriches this field (Pan et al. [8], Costantini et al. [9], Chiu et al. [10], Huang et al. [11], Choi [12], Hu et al. [13], Shen et al. [14], and Tan et al. [15]). Extending previous investigations, this work develops a novel algorithm for solving such production problems, and incorporates a feasible flexible design concept that uses multimachines to relax the limitations in the two-stage flow shop scheduling problem.

Wang and Liu [16] developed a heuristic method for solving flexible flow shop scheduling problems. It is based on a branch and bound (B&B) algorithm and uses four constructed heuristics to obtain initial upper bounds. Three dominance properties were used to enhance the performance of the proposed heuristic approach in solving the two-stage hybrid flow shop scheduling problem with critical and dedicated machines, thereby minimizing makespan. Computational results demonstrated that their method was effective. Uruk et al. [1] considered a two-machine flow shop scheduling problem with identical jobs. Each job involved three operations, of which the third operation (the flexible operation) was performed on either machine but could not be preempted. Solving the problem involved resolving the assignment of flexible operations to machines and determining processing times for each operation to minimize total manufacturing cost and makespan. Test results revealed that their proposed method using the * ε*-

*constraint*approach reformulated the mathematical programming problem into a mixed integer programming problem and optimally solved either small or large versions of the problem in a reasonable time. Cheng et al. [17] solved a two-machine flow shop scheduling problem using a truncated learning function, in which the actual processing time of the job is a function of the job’s position in a schedule and the learning truncation parameter. They developed a novel B&B and three crossover-based genetic algorithms (GAs) to find the optimal and approximate solutions that minimize makespan. Computational test results confirmed the performance of all proposed algorithms under various experimental conditions, demonstrating that the GAs can solve the problem efficiently. The literature enhances related study (Liu et al. [18], Dubois-Lacoste et al. [19], Choi et al. [20], Pan et al. [21], Yeung et al. [22], Pan et al. [8, 21], Mirabi [23], Yeung et al. [24], and Yao and Liu [25]). The two-stage flow shop problem clearly warrants further study, as revealed by the popularity of two-stage flexible flow shop scheduling problems in the literature.

For solving scheduling problems with time windows, this work develops an effective method that prevents unexpected delays and associated large losses during production. Based on customer responses, Solomon and Desrosiers [26] suggested that time windows can be classified as either hard or soft. The nanopattern sapphire substrate is an example of a hard time window. Waiting time before production at early arrival causes significant costs; additionally, etching should be performed during the hard time window. A soft time window is more flexible than a hard window. Therefore, early transfers are permitted outside the time window when the costs are paid in reduced customer satisfaction and related penalties. By using a simple algorithm that was based on the unique characteristics of earliness and tardiness, Huang et al. [3] solved the problem of a parallel machine production system with a common time window. Their algorithm provided the best solution. Liou et al. [4] utilized an encoding scheme-based hybrid algorithm (HA) to solve the two-machine flow shop group scheduling problem (GSP) with sequence-dependent setup and removal times, including job transportation times between machines. The objective was to minimize total completion time. Their algorithm solved the problem more efficiently than did a PSO algorithm or a GA algorithm. In practice, due windows are an important issue in real-time production. Accordingly, by imposing the due windows constraint, this work attempts to minimize weighted earliness and tardiness costs using the just-in-time concept. An effective ant colony optimization (EACO) algorithm is also developed to solve flexible two-stage flexible flow shop scheduling problems to minimize earliness and tardiness. Ant colony optimization and PSO are also compared to obtain better solutions to the above problems and to help enterprises increase profit and reduce overhead costs.

The remainder of this paper is organized as follows. Section 2 formulates the two FFSPs. Section 3 presents the proposed EACO for solving the FFSP as well as the basic PSO. The effect of parameter settings is investigated using the experiment that is designed in Section 4; computation and comparison results are also provided. Finally, Section 5 draws conclusions.

#### 2. Problem Definition

The designated two-stage flexible flow shop scheduling problem of this study is and represents a two-stage flexible flow shop environment involving machines; is the due window; represents different setup times on each machine; indicates that the objective is to minimize the sum of weighted earliness, lateness, and makespan.

##### 2.1. Notation

Consider the following. Total number of jobs Total number of machines Job of number Theth operation of Machine of number is processed on Number of operations to finish Starting time of Sequence dependent setup time of on Processing time of Lower due window of Upper due window of Completion time of Completion time of Earliness time of Tardiness time of Cost coefficient of earliness Cost coefficient of lateness Cost coefficient of makespan.

##### 2.2. Mathematical Model

(1) Objective function: Equation (1): this model minimizes the sum of weighted earliness, tardiness, and makespan. Subject to:(2) Earliness: Equation (2): earliness is the largest of and 0, which calculates the earliness of job , and calculated as the due date minus completion time of job .(3) Tardiness: Equation (3): lateness is the largest of and 0, which calculates the tardiness of job , and calculated as completion time of job minus the due date.(4) Maximum completion time and sequence constraints: Equation (4): completion time of is the maximum completion time on each machine: Equation (5): completion time of is the sum of its starting time, setup time, and processing time: Equation (6): as for job , the starting time of the th operation exceeds the completion time of the th operation: Equation (7): when , is processed before , and thus the starting time of is larger than the completion time of ; meanwhile, when , is processed before , and the starting time of exceeds 0: Equation (8): when , is processed before , and thus the starting time of is larger than 0; meanwhile, when is processed before , and thus the starting time of is larger than the completion time of .(5) Makespan: Equation (9): makespan is the maximum completion time of .

#### 3. Algorithm

##### 3.1. EACO Algorithm Process

The proposed EACO algorithm modifies the state transition rule to find operations with the shortest time window and conducts it to be weighted to a definite local pheromone parameter (). Therefore, the ants find the next node quickly and this ant system can be used to solve problems. This adaptation can schedule the proper operation in each scheduling sequence. Artificial ants can identify the fitness of the subsequently feasible nodes while deciding the shortest routes. Therefore, in the search process, the weight of a node increases when it is chosen by many ants that are searching for routes. Following ants have a much higher probability of choosing this feasible node.

The EACO algorithm utilizes similar state transition rule into original ACO (Dorigo et al. [27]) to update global pheromone. Equations (10) and (11) present state transition rule of EACO:

In (10) and (11), represents strongest trail of pheromone and and represent visibility and the shortest time window weight coefficient, that is, , respectively. Among them, visibility is the reciprocal of processing time. In state transition rule, first we set a value and then a randomly generated number . If , an ant at node will apply exploitation rule, and choose its next node based on (10). is the set of all feasible nodes while ant is at node . If , an ant will choose exploration rule and move to a feasible node according to probability distribution of every node.

Except when required by state transition rule, the shortest time window function also utilizes the global pheromone update rule to update pheromones on each node according to the following: is global pheromone evaporation coefficient, and is the best solution in each iteration.

Updating the global pheromone values after each iteration reinforces the visibility of the best route, increasing the probability that a node is properly chosen to pursue the optimal solution, and the solutions converge as the amount of pheromones on the nodes on the best route increases.

Although the state transition rule and global pheromone update rule are used, the EACO computation is just the same as the ACO computation. The algorithm firstly releases a specified number of ants in one iteration, searches for the best route, and memorizes which nodes are on the best route using the global pheromone update rule. The algorithm terminates when it satisfies a stop criterion, such as a certain number of iterations or convergence.

##### 3.2. PSO Algorithm Process

The PSO algorithm is based on the way in which birds find food. Individual birds do not know the location of food in a particular search space. However, they move in a direction for a distance that is determined by their experiences and those of the other birds that they are following. The PSO algorithm treats each bird as a particle in which the leader is the nearest particle to food, representing the optimal solution.

Kennedy and Eberhart [28] developed a novel PSO algorithm that combines local and global search. Their algorithm has been successfully applied to numerous engineering problems (Liou et al. [4]).

Kennedy and Eberhart [29] developed a binary PSO (BPSO) algorithm by constructing a discrete space to improve upon PSO’s former research limitation in a continuous space. Binary particle swarm optimization using binary notation yields various discretized solutions and solves 0-1-style problems. Particle swarm optimization can increase the feasibility of solving the scheduling problems in every field.

Traditional PSO is based on iterated solutions that are found by randomly generated particles. The solution procedure consists of the following three steps: initialization, searching for and updating the optimal solution, and search termination.

*Step 1 (perform initialization). *In a multidimensional space, particle coordinates and velocity parameters are randomly generated. Fitness values are calculated to optimize the position for the initial coordinate of the population. Every particle then inherits the best coordinates.

*Step 2 (search for and update the optimal solution). *The position of every particle is modified based on the following equations:
If , then ; if , then .

In (14), represents inertial weight, is former round velocity, and are individual and population reference weight, and are uniform distributions between , denotes former local coordinates of individual particle, indicates former best coordinates of all particles, and denotes former local coordinates of population particles. In (15), the result of former coordinates and new velocity () can generate best new coordinates (). According to Newton’s law of motion, the acceleration of a body is parallel and directly proportional to the net force, while being inversely proportional to the mass. PSO transforms into three products (14). First, the product of inertial weight and former round velocity represents the inertial affection. The gap deducted from the individual and population best coordinate multiplies acceleration learning constant and then forms two velocities. Finally, all particles obtain a new velocity and modify their position by using vector addition to summarize all affections.

After the positions of all particles are modified positions using (15), the fitness value is recalculated. If the optimal coordinates of individual or population particles are found, the algorithm updates; otherwise, computations of the former coordinates continue.

*Step 3 (stop searching). *The algorithm repeats Step 2 to obtain better fitness value until the stop criterion is satisfied. Following completion of the computations, the best solution for the objective function is obtained.

#### 4. Data Test and Analysis

This study considers the two-stage flexible flow shop problem. All assumptions regarding job numbers and machines used in the simulation refer to the categories for solving the overlapping shop problem proposed by Huang and Yang [30]. In small scale data testing, the number of machines is set to by solving problems involving 3 to 8 jobs, respectively. In the large scale data test, the number of jobs is 50, 100, 150, and 200 and the number of machines is . All job processing times are randomly generated by .

As for the issue of due window, this study adopts the formula derived by Zheng et al. [31], which uses tardy factor (TF) and due date range (DR) to set the due window range between and where the following types are used for simulation test. represents processing time and means number of machines. TF and DR factors generate various due windows for comparison. Table 1 lists the parameters.

In the weighting of parameters for measuring solutions whether they meet stop criterion, this work incorporates decision processes that are used by enterprises to increase the weight of the cost of inventory to reduce stock pressure or increase the cost of tardiness for important orders and simultaneously to minimize makespan. This study thus adopts all possible conditions not just using unique weight cost but divides weighted costs into three categories , , ; , , ; and , , for simulation testing.

The settings of the parameters in the algorithm significantly influence the execution results. This work optimizes the parameter settings following a literature review and a pretest adjustment: , , , ,, and . IP is coded in Lingo 12 and all heuristics are coded in C++ programming language. All experiments are conducted on a PC with an Intel Core i5 CPU 760, 2.81 GHz, and 3.46 GB RAM. Computational results are analyzed and discussed.

##### 4.1. Effectiveness Testing

To test the efficiency of the EACO algorithm, the EACO algorithm is used to solve a distinct problem to verify its effectiveness and compare it with the effectiveness of other methods. The formulae for measuring effectiveness in small problems are as follows.

Improvement ratio of effectiveness:

To demonstrate how the EACO algorithm outperforms PSO and ACO algorithms for small problems, 30 test datasets were calculated 30 times to compare computational times, mean solutions, and percentage difference among IP and the EACO, PSO, and ACO algorithms. With respect to the solving of the large problem, preliminary test results demonstrated that IP computational time increased exponentially with the number of jobs and stages (Huang et al. [3]). Hence, this work tests only jobs and machines with (0.25, 0.50, 0.25) in a large problem without IP. Table 2 lists computational results.

This study also tests the weight cost conditions of (0.50, 0.25, 0.25) and (0.25, 0.25, 0.50). Table 3 summarizes all of the results.

The EACO algorithm is better than the PSO and ACO algorithms in finding the mean solutions to 30 problems. Under distinct conditions of due window and cost weighting, the total improvements in contrast to PSO and ACO over mean solutions are calculated to be 25.26% and 30.94%, respectively. Accordingly, the improvements in contrast to PSO and ACO over mean solutions that are achieved by the EACO algorithm in solving small problems exceed those obtained using the PSO and ACO algorithms.

##### 4.2. Robustness Testing

To examine further whether the EACO algorithm is more robust than the PCO and ACO algorithms, this work determines the improvement in robustness for small and large problems.

Improvement ratio of robustness:

A randomly generated problem is tested 30 times using the EACO, PSO, and ACO algorithms under three cost conditions. The IP is presented once to compare the deviation of solutions with that of the PSO and ACO algorithms. This work calculates the worst solution, best solution, mean solution, standard deviations, and CPU time (in seconds) for each scenario. Table 4 summarizes those results.

This study also tests the weight cost conditions of (0.50, 0.25, 0.25) and (0.25, 0.25, 0.50). Table 5 summarizes those results.

The test results demonstrate that improvement ratios of robustness are excellent and outstanding in each test set within 2.3 s. The total improvements from using the EACO algorithm in the robustness ratios in contrast to the PSO and ACO algorithms are 26.93% and 28.75%, respectively. These ratios demonstrate that the EACO algorithm is more robust than the PSO and ACO algorithms in solving small two-stage flexible flow shop scheduling problems.

##### 4.3. Large Problems

In real scheduling problems, the complexity of amount of jobs is multiplied by various orders. Therefore, following the small problem testing, large problems are tested. Pretesting demonstrates that the CPU time that is required to solve IPs increases exponentially with the total number of jobs. The CPU time for IP is significantly large, so the optimal solution is unidentified preventing the optimal solution from being found. Thus, the IP solution is omitted in tests that involve large problems. This work also compares the solving capacity of the EACO algorithm with those of the PSO and ACO algorithms when they are applied to large problems. Table 6 lists the weight condition of (0.25, 0.50, 0.25).

This study also tests the weight cost conditions of (0.50, 0.25, 0.25) and (0.25, 0.25, 0.50). Table 7 summarizes those results.

For large problems, test results for all test problems indicate that the EACO algorithm is more robust than the PSO or ACO algorithm. The total improvements in robustness are 27.31% and 39.54%, respectively. Thus, the EACO algorithm is more robust than the PSO or ACO algorithm for large two-stage flexible flow shop scheduling problems and it exhibits excellent stability.

##### 4.4. Discussion

Table 8 indicates that the EACO algorithm is 25.26% and 30.94% more effective than the PSO and ACO algorithms, respectively, for small problems. The EACO algorithm is, on average, 26.93% and 28.75% more robust than the PSO and ACO algorithms, respectively, for small problems, demonstrating that the EACO algorithm is excellent at solving such scheduling problems.

Owing to the limitations of IP testing, this work cannot compare the effectiveness of IP with that of other algorithms. The EACO algorithm provides mean improvements in robustness of 27.31% and 39.54% over the PSO and ACO algorithms in solving large problems, respectively, verifying that the EACO algorithm has an excellent capacity to solve such scheduling problems.

#### 5. Summary

A good fashion and textiles operational control systems management can efficiently reduce the manufacturing duration, support the just-in-time shipping of garments, and strengthen competitiveness of enterprises. This study is to propose a novel algorithm to solve the cutting and sewing processes in a traditional flow shop scheduling problem that comprises just-in-time and costs to minimize earliness, tardiness, and makespan. Since the problem is NP hard, exact-solution methods cannot satisfy the agile requirements for solving the complex problems.

Numerous investigations demonstrate that the ACO and PSO are effective for solving scheduling problems. Hence, this study aims at the characteristic of cutting and sewing processes constructing an EACO algorithm to significantly solve the FFSP in the fashion and textiles industry. These heuristics cannot ensure getting the optimal solution; however, the proposed method must test both effectiveness and robust performance to solve the attempted problems. The results of data testing show that the proposed EACO algorithm is superior to the basic ACO and PSO algorithms. By using the EACO algorithm, this study obtains excellent results and provides the production managers and scheduling operators with an alternative way to deal with the attempted problems.

#### 6. Conclusions

In the manufacturing of garments, the garments must be cut before they are sewn, and the cutting process consuming time requires that time be taken in waiting for patterns. Producers depend only on manual scheduling when planning production activities, likely causing excessive makespan and overhead costs. This work applies the EACO algorithm to solve this scheduling problem efficiently.

Following careful testing, this work solves the two-stage flexible flow shop scheduling problem with due window constraints. The objective function minimizes total weighted earliness, tardiness, and makespan. Previous studies have demonstrated that PSO and ACO algorithms can solve scheduling problems, but that they have limited effectiveness and robustness. This work demonstrates that the two-stage flexible flow shop scheduling problem with due window constraints is an NP-hard problem.

In this work, a novel EACO algorithm, based on the ACO algorithm, is utilized to solve the two-stage flexible flow shop scheduling problem. The EACO algorithm is 25.26% and 30.94% more effective for solving small problems than the PSO and ACO algorithms, respectively. EACO is much more effective, on average, than the other two algorithms in solving large problems. Furthermore, average improvements in robustness in solving small problems are 26.93% and 28.75%, respectively, confirming that the EACO algorithm significantly outperforms the PSO and ACO algorithms in both effectiveness and efficiency. Enterprises can exploit the advantages of the proposed algorithm to generate profits and reduce overhead manufacturing costs.

This work offers IP solutions for the best solutions within a satisfactory time and the EACO algorithms provide solutions for quick response to market within a short time. Computational results prove that the EACO algorithm has a higher solving capacity than the common ACO and PSO algorithms. The proposed method reduces waiting and tardiness costs, helping enterprises simultaneously shorten makespan, increase profits, and lower overhead costs.

#### Acknowledgments

The authors thank the Editor and anonymous reviewers for their valuable comments and suggestions for the improvement of this paper. They would like to thank the National Science Council, Taiwan, for supporting this research under Contract no. NSC 100-2221-E-030-005.