1. Introduction
In the context of increasing globalization and competition, industries are under constant pressure to maximize productivity, satisfy customer demand, and improve operational efficiency. Achieving these objectives relies heavily on the optimization of production scheduling, which plays a critical role in minimizing delays, reducing costs, and enhancing throughput. Depending on the type of production system, whether continuous or discontinuous, various scheduling models can be applied and have been studied in multiple papers. In our case, we focus on manufacturing processes involving machines organized in series, whose production order stays unchanged, which defines the PFSP [
1]. The resolution of this matter requires taking into account all relevant constraints, regardless of the industry type, including machine preparation and the removal of jobs waiting between machines during their processing. Machine preparation refers to the time spent during the setup or adjustment of the machine for processing each new manufacturing batch job. The setup time may vary depending on the job’s position in the sequence. This constraint is referred to as SDST and has been addressed in previous studies [
2]. Conversely, when the setup time is independent of the job sequence, this is called Sequence-Independent Setup Time (SIST) [
3]. The removal of jobs waiting between machines during their processing requires eliminating the buffer waiting time that occurs when a job is transferred from one machine to the next. This requirement is typically implemented to avoid job quality degradation; it is commonly used in the plastics industry, in metal manufacturing, etc. By assembling previous constraints, a no-wait permutation flow shop problem under sequence-dependent setup times (NWPFSP-SDST) is designated. Since the PFSP cannot be fixed optimally within polynomial time for more than two machines, it is considered an NP-Hard problem. Therefore, it is crucial to develop approximate methods to solve it that include aspects such as heuristics and meta-heuristics [
4]. These methods are appropriate for solving optimization scheduling problems such NWPFSP-SDST, on which we will focus in this study, aiming to minimize the TWFT and economic cost criteria in scheduling in the production industry under dynamic electricity pricing.
Many studies have been conducted that applied the same constraints to achieve multiple objectives, i.e., minimizing both the makespan and maximum tardiness [
5]. Some worked on minimizing the TWFT [
6], and others took into account the same constraints but had the objective of minimizing the makespan criterion [
7]. The objective of our contribution is to ameliorate the GRASP approach and to implement a novel strategy using hybrid algorithms. These solution strategies aim to resolve an NWPFSP-SDST optimization scheduling problem.
The flow shop problem describes a kind of production system in which jobs move through a group of m machines in a fixed order, where each machine can process one job at a time and requires significant storage. As illustrated in
Figure 1, all
jobs were readily available before the problem’s starting time, with each job being processed across all
machines, starting at machine
and finishing at machine
. The sequence could be modified to satisfy the customer’s or the producer’s priorities relative to each job. The best way to integrate this option was to modify the first objective function term related to the total flow time (TFT) by assigning a weighting coefficient to each term. According to our research, this objective function has not been addressed in the previous studies on the NWPFSP-SDST problem, especially the second objective function term, whose value is relative to energy cost minimization. Regarding the no-wait constraint, this has been leveraged in previous studies to achieve different goals, such as makespan minimization, using several algorithms. Indeed, Fire Hawk Optimization (FHO) and Beluga Whale Optimization (BWO) were investigated and their results compared to those for the Campbell Dudek Smith (CDS) algorithm [
8]. Likewise, in [
9], the objective was also makespan minimization, this time by using a new dispatching rule: Principal Component Analysis (PCA-AS). The latter outperformed the first-in-first-out (FIFO) rules in terms of achieving the shortest processing time (SPT). Concerning the SDST constraint, this has already been integrated in various PFSP studies.
In [
10], the authors focused on minimizing the makespan for the PFSP under SDST. They demonstrated that the proposed novel biogeography-based optimization (NBBO) algorithm effectively solved this problem by maintaining a balance between exploration and exploitation neighborhoods. This performance was achieved through modified insertion methods for both products and jobs, and a local search method based on SDST. This constraint was also incorporated [
11] in a Green Hybrid Flow Shop Scheduling Problem. In that optimization problem, transport time was considered to simultaneously minimize both the maximum completion time and the total energy consumption through an improved memetic algorithm. Several studies have incorporated both constraints, i.e., the no-wait and SDST, to enhance the accuracy and applicability of scheduling models. In particular, in [
12], the authors investigated the no-wait flow shop group scheduling problems with SDST constraint to minimize setup and waiting times in advanced production systems. The study demonstrated that the proposed revised multi-start simulated annealing (RMSA) algorithm consistently outperformed several Particle Swarm Optimization (PSO) and Variable Neighborhood Search (VNS) algorithms, particularly when addressing large-scale flow shop scheduling problems.
The authors of [
13] applied these constraints to solve the NWPFSP-SDST and demonstrated that the population-based iterated greedy algorithm enhanced by the NEH procedure (PIG-NEH) outperformed seven population-based metaheuristic algorithms. Motivated by industrial needs to optimize both the TWFT criterion and energy cost, we have explored a variety of approaches to solve the NWPFSP-SDST problem, especially under Dynamic Electricity Pricing, in order to address this complex scheduling optimization problem. Our contribution involves the development of heuristics and combining them with mathematical formulation methods to enhance solution quality. These methods are widely used in scheduling optimization. In [
14], the authors compared GRASP with the NEH heuristic for makespan minimization in permutation flow shop scheduling and demonstrated its superior performance.
This paper is structured as follows:
Section 2 reviews relevant literature on the research problem.
Section 3 introduces the mathematical formulation and modeling of our problem.
Section 4 describes the proposed solution approaches.
Section 5 presents and analyzes the numerical simulation results, and
Section 6 summarizes the key contributions and outlines future research directions.
2. Literature Review
Scheduling problems, especially within complex industrial and computational ecosystems, are frequently classified as NP-complete. These problems highlight the computational challenges inherent in finding optimal solutions, particularly when the problem scale increases [
15]. Within this domain, the NWPFSP-SDST emerges as a significant challenge which requires advanced algorithmic approaches and comprehensive study [
16]. In Ref. [
17], the authors addressed the flow shop scheduling problem under no-wait constraint by developing two genetic algorithms (GA) for makespan optimization. In ref. [
7], the authors demonstrated that integrating flexible preventive maintenance (PM) scheduling with no-wait and SDST constraints yielded better makespan optimization than traditional approaches. Their study revealed that both the Li, Wang, and Wu heuristic (LWW) [
18], which uses the Traveling Salesman Problem (TSP)-inspired Cheapest Insertion strategy, and the Fast Composite Heuristic (FCH) [
19], which combines NEH-based construction, local search (RZ method), and backward swap improvement, outperformed MILP solutions, particularly for large problem instances. Furthermore, in [
20], the authors modeled the NWPFSP-SDST with job release dates as an Asymmetric Traveling Salesman Problem with Ready Times (ATSP-RT), proving through comparative analysis that their Best Insertion Heuristic (BIH) was more effective than the Best Adding Heuristic (BAH) for makespan minimization.
The minimization of energy costs in Flow Shop and Flexible Flow Shop production scheduling has become increasingly critical in modern manufacturing. This objective now represents a key strategic priority for industrial enterprises, driven by both economic and ecological considerations. In such production systems, task scheduling directly impacts energy consumption in manufacturing workshops, particularly due to machine idle times during stoppages or setup periods [
21]. Consequently, the challenge of producing more with less energy consumption makes machine scheduling significantly more complex [
22]. This complexity arises from various factors including variable or constant operating speeds and peak energy demands. Energy optimization not only reduces operational costs but also enhances environmental sustainability [
23], which is a crucial consideration for industries facing stringent regulations or seeking to improve their social responsibility. Practical implementations demonstrate that strategic production sequencing, such as avoiding concurrent startups of energy-intensive equipment, can yield substantial electricity cost savings.
In modern production workshops, manufacturing systems employ heterogeneous machine resources where tasks can be processed across multiple alternative machines, leading to more pronounced energy impacts. This increased flexibility [
22] enables the selection of less energy-intensive machines or those better suited to specific workloads but requires sophisticated scheduling algorithms [
24] to simultaneously achieve energy efficiency and meet production deadlines. The scheduling complexity is further compounded by specific job constraints such as no-wait requirements, which significantly challenge effective energy management in machine operations. Manufacturing systems often feature variable-speed machines, where selecting optimal production speeds becomes crucial, as inappropriate speed choices may lead to substantial energy waste [
25]. Recent research demonstrated that advanced approaches like variable-speed scheduling (speed scaling) and strategic utilization of off-peak energy periods (green energy time slots) can yield considerable energy savings. Consequently, incorporating energy consumption as an optimization criterion has emerged as a strategic competitive advantage, as evidenced by practical implementations in energy-intensive industries such as automotive and aerospace manufacturing [
24].
This work proposes a novel bi-objective optimization approach to simultaneously minimize TWFT and energy costs in NWPFSP_SDST. Ref. [
13] addressed the same NWPFSP-SDST constraints under a mono-objective framework targeting TWFT minimization through the use of a hybrid differential evolution algorithm and developed eight population-based meta-heuristics: Population-based iterated greedy algorithm enhanced by the NEH procedure (PIG-NEH), population-based iterated greedy algorithm enhanced by the GRASP procedure (PIG-GRASP), population-based iterative local search algorithm enhanced by the NEH procedure (PILS-NEH), population-based iterative local search algorithm enhanced by the GRASP procedure (PILS-GRASP), migratory bird optimization enhanced by the NEH procedure (MBO-NEH), migratory bird optimization enhanced by the GRASP procedure (MBO-GRASP), artificial bee colony enhanced by the NEH procedure (ABC-NEH), and artificial bee colony enhanced by the GRASP procedure (ABC-GRASP). Our study extends this foundation by introducing a bi-objective perspective which optimizes both TWFT and energy cost, thus bridging production efficiency with sustainability goals, by employing MILP, GRASP, and an HGRASP which outperforms other methods. To our knowledge, this represents the first study to address this specific problem combination, thereby contributing new insights to the field. The bi-objective optimization problem has become increasingly critical as industries strive to balance production efficiency with environmental sustainability [
26]. This dual-criteria optimization combines production-related performance metrics with energy consumption considerations [
27] and creates complex trade-offs that require careful analysis. Previous research has demonstrated the inherent conflict between these objectives: Reducing flow time often requires increased machine speeds, which elevates energy consumption, while energy-saving strategies may extend processing times [
28]. To address this trade-off, metaheuristic approaches such as the non-dominated sorting genetic algorithm II (NSGA-II) and multiobjective evolutionary algorithm based on decomposition (MOEA/D) have been employed to generate optimal Pareto fronts [
29]. For instance, in [
30], the authors implemented variable-speed machine (VSM) models to dynamically adjust energy usage while maintaining schedule feasibility. In recent studies, those authors further highlighted how practical constraints, including maintenance requirements and no-wait conditions, significantly impact optimization outcomes, particularly in energy-intensive industries like automotive manufacturing [
31].
3. Formulation and Mathematical Representation of the Problem
3.1. Problem Statement
This problem consists of a set of machines in series:
. A batch of jobs
} is processed in a process starting with
and ending its production cycle with
. Each job
has an operating time
in a machine
. In this industrial context, jobs are constrained by a sequence-dependent setup time called
. If the job is first in its machine, the setup time is called
. Our problem consists of finding a sequence
whose aim is to minimize the TWFT in the first scenario and to minimize both TWFT and economic cost in the second scenario, under the constraint of no waiting.
Table 1 presents the notation of all parameters and variables used in this study.
The present study focuses on the resolution of the NWPFSP-SDST scheduling problem with the aim of minimizing the TWFT criterion and the energy cost, using the notation represented in
Table 1, which is employed to express TWFT as follows:
The TWFT is expressed as a weighted sum that incorporates the prioritization of urgent or critical jobs
within the scheduling process, thereby enhancing the responsiveness of the system to high-priority tasks. The total energy cost is formulated as follows:
Energy_Cost is expressed as a weighted summation that accounts for each job’s position in the processing sequence, its energy consumption, and the electricity cost per unit. This formulation reflects the temporal dimension of energy pricing by penalizing jobs placed later in the schedule, especially when electricity costs vary over time.
In order to simultaneously account for both scheduling efficiency and energy consumption, a composite objective function is constructed by integrating the TWFT and the total energy cost into a single expression:
The constraints considered in the problem are presented as follows:
Constraints (4) and (5) control the sequencing by ensuring that every job, except the first in the sequence, has precisely one direct predecessor and one direct successor, and conversely for immediate successors. Constraint (6) limits the total number of jobs that can act as a single successor to one, except for the last job in the sequence. On the other hand, Constraint (7) represents the disjunctive scheduling rule that controls the assignment rule of two tasks sharing the same machine. Constraint (8) enforces the no-wait condition between successive machines, which is a fundamental requirement in the NWPFSP_SDST. Equations (9) and (10) impose the non-negativity of limits for the completion times of the jobs and the binary nature of the assignment decision variables, respectively. Finally, Equation (11) enforces the constraint , with both weights bounded between 0 and 1, to ensure a normalized and controlled balance between the two optimization objectives.
In the context of the no-wait flow shop scheduling problem, we considered a set comprising n jobs that had to undergo processing across series-configured set of m machines. Each job required a predetermined and deterministic treatment duration on each machine of the set , denoted by . The key feature of this problem class was the continuity constraint, i.e., once a job started processing on the first machine , it had to proceed through all subsequent machines without interruption or waiting time. Since the problem is a PFSP, all jobs had to be processed in the same machine order. According to the setup time, this depended on the sequence; in other words, it depended on the two adjacent jobs. For example, if two successive jobs, indexed and , were processed on machine , the setup occurred after completing job and before starting the job ; this is denoted as . A setup could also take place immediately before processing the first job in order to prepare the machine. For instance, if the sequence started with the job on machine , the setup time was denoted . Furthermore, the completion time of job on machine was formally denoted as
To optimize the NWPFSP-SDST, we integrated the following equation, which was used to calculate the time difference,
, between two adjacent jobs in a sequence
β, as in [
13], where
. This process is defined as follows:
where:
Equation (15) calculates the completion time of the first job in the last machine.
The completion times of the remaining jobs on the last machine m were determined based on their dependency to the first job. Specifically, the completion time of the second job on machine m exceeded the with the completion time of the first job on the last machine m, and similarly for subsequent jobs. The equation is given as follows:
As previously noted, this paper aims to minimize two criteria: TWFT and the energy cost. The TWFT is expressed as follows:
The TWFT criterion was based on a weighted sum that incorporates the priority coefficients and the completion times of jobs on the last machine . These priority coefficients were critical, as they aligned with customer requirements, contributed to the optimization of jobs sequence across machines, and consequently enhanced operational efficiency. The minimization of the energy cost has also become a critical objective, particularly in modern industrial environments that implement dynamic electricity pricing applied by the electricity providers, which is based on differentiating energy costs during the day. They distinguish between off-peak hours, during which electricity is cheaper, and peak hours, when demand and thus cost is significantly higher. A program was implemented to account for this dynamic electricity cost, as defined in Equation (18):
This equation assumes that the cost increases linearly with the job’s position in the sequence. Consequently, jobs scheduled later were more likely to incur higher electricity costs, particularly under dynamic energy pricing schemes, where rates increase during peak hours. The product of unit cost and energy consumption captured each job’s intrinsic economic impact. Hence, scheduling high-cost and high-consumption jobs later in the sequence disproportionately increased the total energy cost. This formulation assumed that would increase linearly with the job’s position in the sequence, reflecting the tendency for later time slots to coincide with higher tariffs under dynamic pricing schemes. Consequently, it encouraged scheduling energy-intensive jobs earlier, when electricity rates were generally lower.
To ensure effective scheduling while maintaining energy efficiency, we propose a unified objective function combining TWFT and total energy cost:
This Formulation (19) allowed for flexibility in decision-making by capturing the trade-off between timely production and sustainable energy use, making the model adaptable to a wide range of industrial settings. The weights and are non-negative and represent the relative importance assigned to each criterion. These weights could be adjusted according to operational needs or strategic priorities. To illustrate the problem, an example is provided where the weighting coefficients are set to and , reflecting a 60% emphasis on scheduling performance and a 40% emphasis on energy cost. This choice reflects the common industrial priority of timely job completion to accommodate demand fluctuations, justifying a higher weight for TWFT. The values of weights can be modified to represent different relative priorities. While energy cost was also considered, it was secondary to ensuring smooth production flows.
3.2. Numerical Example of the NWPFSP-SDST with Four Jobs and Three Machines
In this subsection, we provide a detailed illustration of the considered NWPFSP-SDST through a simplified scheduling example involving four jobs processed on three machines across three factories. The processing times, denoted by
, the sequence-dependent setup times,
, and the energy costs represented by the matrices for all jobs transitions, are presented below.
The weights of the jobs used in this example are
To provide a more concrete representation of the problem, a GANTT diagram was constructed by using MATLAB R2025a, as shown in
Figure 2, to clearly illustrate the No-Wait constraint and visualize the SDST in the sequence:
. Consequently, the TWFT was calculated as follows:
4. The Proposed Methods to Solve the Problem
Employing heuristic methods to solve optimization problems in scheduling is widely recognized as a computationally efficient approach for obtaining high-quality solutions within a reasonable time limits. Numerous studies have demonstrated the effectiveness of such methods, particularly the NEH and GRASP heuristics. Motivated by these results, we implemented an enhanced GRASP method and a HGRASP approach that combined GRASP with NEH. This hybridization significantly improved the efficiency and robustness of scheduling solutions, making it particularly suitable for complex flow shop environments. Specifically, the NEH heuristic provided a strong initial solution by constructing a sequence based on job processing times and applying insertion-based refinements, while GRASP introduced randomization and adaptive local search to enhance solution diversity and mitigate the risk of being trapped in local optima.
Numerous studies have proposed enhancements to the NEH heuristic for solving flow shop problems, such as [
32], which introduced a variant of the NEH heuristic that integrated the PMS (Processing time with Setup) measure, the ABS (Absolute-based) sorting indicator, and the D criterion (a specific tie-breaking or selection rule), NEHV({PMS,ABS,D}). This approach outperformed both the classical NEH algorithm and other NEH-based variants, making it one of the most effective heuristics for the PFSP.
Addressing the NWPFSP-SDST requires the implementation of both exact and approximate solution methods. For the exact approach, we adopted a MILP-based-formulation, while for the approximate approaches, we relied on heuristic methods and their hybridization in order to achieve high-quality solutions efficiently.
In this study, we investigate two heuristic algorithms developed within a constructive framework, specifically tailored to address the distributed permutation flow shop problem (DPFSP). Among them the GRASP method has proven to be a particularly effective heuristic approach for tackling complex combinatorial optimization problems, especially in flow shop scheduling contexts. Its efficiency has been widely demonstrated in several studies, such as [
33]. Motivated by these results, we employed GRASP to determine the optimal jobs sequence under two different scenarios. In the first scenario, the implementation focused solely on minimizing the TWFT by applying Algorithm 1. In the second scenario, the approach was extended to a multi-objective context, aiming to simultaneously minimize both TWFT and energy cost through the application of Algorithm 2.
In most cases, particularly in PFSP, solution methodologies relied on priority-based rules to generate an initial job sequence. Among these approaches, one of the most widely adopted heuristics is the NEH algorithm, originally proposed by Nawaz, Enscore, and Ham. This heuristic is well known for its ability to construct high-quality schedules, particularly with the objective of minimizing the makespan. The classical NEH procedure operates by first ranking jobs in decreasing order of their total processing times and then progressively inserting each job into the position within the partial sequence that produces the best improvement in the objective function.
In this study, the NEH heuristic was adapted to our problem context in order to generate the initial solution by modifying both the priority rule and the optimization objective. Specifically, we computed a weighted total processing time of job j. The jobs were then sorted in descending order according to this measure, and each job was sequentially inserted into the position that minimized the TWFT instead of the makespan criterion.
Another widely adopted approach is GRASP, a multi-start metaheuristic composed of two main phases: A construction phase and a local search phase. In its general form, GRASP iteratively generates solutions by applying randomized greedy selection criteria within a Restricted Candidate List (RCL), followed by a neighborhood-based local search that refines each solution to enhance the objective value.
In our implementation, GRASP was further tailored to the specifics of the NWPFSP-SDST. The construction phase began with the sequence generated by the weighted NEH heuristic, and new candidate sequences were iteratively built by inserting remaining jobs based on TWFT or a composite cost function. At each step, an RCL was formed using threshold values derived from the range of evaluated candidates. During the local search phase, a pairwise exchange strategy was employed to explore neighboring solutions and refine the objective function. Furthermore, an adaptive mechanism was integrated to dynamically adjust the alpha parameter in cases of stagnation, thereby enhancing both solution quality and convergence stability.
These two methods, although different in nature, are complementary. The NEH heuristic provided a strong and consistent initial solution by constructing a sequence through job sorting and partial insertion, thereby acting as an intensification mechanism that rapidly converged toward promising regions of the solution space. In contrast, GRASP introduced diversification by generating multiple randomized solutions and refining them through local search. The hybridization leverages the strengths of both: NEH mitigated the randomness of GRASP by guiding the initial construction phase, while GRASP compensated for the deterministic nature of NEH by exploring alternative high-quality regions of the solution space. This synergy enabled the proposed HGRASP method to produce more robust and effective solutions, particularly in complex scheduling environments such as the no-wait PFSP with SDST.
Building on this, and in line with the first-case algorithm, we adopted the GRASP framework by repeatedly generating randomized sequences and refining them through local search. As an initialization step, a priority rule was applied which sorted the jobs in descending order of their weighted total processing time across all machines. This measure, denoted by the index
, is defined as:
The enhanced GRASP procedure is presented in Algorithm 1. It began by fixing the first job according to the Longest Processing Time Weighted (LPTW) rule. This baseline was further refined by integrating a global search mechanism, embedded within the main loop. For each GRASP iteration (up to a defined maximum, maxit = 50), the algorithm constructed partial sequences by iteratively adding jobs. For every partial sequence, all possible job insertions were evaluated based on their TWFT, ensuring a broad exploration of the solution space. The candidate sequences were filtered through the RCL, which retained a subset of promising solutions. The RCL was determined dynamically using a threshold-based mechanism, controlled by the parameter
, which took values in the range of [0, 1]. In this study, we set alpha = 0.6. This iterative construction process enhanced the robustness of the search, reducing the likelihood of premature convergence and enhancing solution quality. The TWFT was evaluated at each iteration and compared to its previous value to retain the minimum. To illustrate this adaptation, we considered a flow shop scheduling problem involving six jobs and three machines.
Table 2 summarizes the job data, including processing times, weights, and the computed
for each job. The corresponding setup times are provided in
Table 3,
Table 4 and
Table 5. The job priority index
was first computed as reported in
Table 2.
Algorithm 1: GRASP method for minimizing TWFT |
input: 1. pr: A matrix [m × n], representing the processing times of n jobs on m machines. |
2. ST: A 3D array [n × n × m], representing the SDST |
3. weights: A vector [1 × n], containing the job weights. 4. alpha: A parameter controlling the Restricted Candidate List (RCL), 0 ≤ α ≤ 1. 5. maxit: The maximum number of GRASP iterations. 6. Compute the initial sequence τ based on classifying jobs in descendant order by this rule: |
|
7. //Constructing the GRASP solution iteratively 8. for t = 1:maxit |
9. |
10. Generate the set of all possible sub- sequences by adding each remaining job to the first job of the predefined
sequence τ and determining their TWFT to build the RCL and select a random sequence from the RCL, where:
|
11. end Calculate the TWFT of the actual iteration’s sequence and compare it to its previous value to select the optimal one |
12. end Output: |
13. grasp_solution: The best sequence found |
14. twft_best: The optimal TWFT value associated with grasp_solution |
Based on the obtained values, the descending priority list was derived as:
. This ordered list defined the base sequence
τ, which served as the starting point for the GRASP construction phase. The iterative solution-building process for the first GRASP iteration is illustrated in
Figure 3.
Starting with the first job , all possible insertions of the remaining jobs were evaluated to compute the corresponding TWFT for each partial sequence. For instance, inserting after yielded the sequence with , while resulted in , in , in and in . The RCL was then constructed. The lower bound was set to the minimum TWFT value, i.e., 95, and the threshold was determined as: . Therefore, the . A subsequence was then randomly selected from the RCL. Assuming was chosen, the procedure was repeated by successively inserting each of the remaining jobs . The RCL was reconstructed at each step until all six jobs had been sequenced, resulting in the sequence: , with a total . This construction procedure was repeated for a predefined number of iterations (). In each iteration, the generated sequence and its corresponding TWFT were recorded. After completing all iterations, the best solution, i.e., the sequence with the lowest TWFT, was retained as the final output of the GRASP algorithm.
Algorithm 2 focused on minimizing a bi-objective function that simultaneously reduced both TWFT and energy cost. To achieve this, an enhanced GRASP-based approach was implemented, following the general procedure of the first scenario. Initially, jobs were sorted in descending order according to the priority rule defined in Equation (20). The method combined global and local searches, employing an iterative looping mechanism that expanded the solution space by dynamically updating the RCL across multiple iterations. Each potential job sequence was systematically evaluated, with the first job in each sequence being selected according to the predefined priority rule to compute the corresponding TWFT. Subsequent jobs were added by iteratively updating the RCL, as detailed in Algorithm 2. Each global exploration introduced variability through the random selection of candidates, while a local search process embedded within the Restricted Candidate List (RCL) mechanism further refined the solutions. Additionally, the greediness parameter alpha was set to 0.6, achieving a balance between exploitation and diversification. This strategic approach enabled the construction of improved scheduling solutions that effectively optimize both objectives while maintaining computational efficiency.
Algorithm 2: GRASP method for minimizing TWFT and energy cost |
input: 1. processing_times: A matrix [m × n], representing the processing times of n jobs on m machines. |
2. setup_times: A 3D array [n × n × m], representing the sequence-dependent setup times. |
3. weights: A vector [1 × n], containing the job weights. 4. cost_per_unit_time: Cost incurred per unit time for processing. 5. energy_usage: Energy consumption associated with job processing. 6. w1,w2: Weighting coefficients for TWFT and economic cost in the objective function 7. alpha: A parameter controlling the Restricted Candidate List (RCL), 0 ≤ α ≤ 1. 8. maxit: The maximum number of GRASP iterations. 9. Compute the initial sequence τ based on classifying jobs in descendant order by this rule: |
|
10. // Iterative GRASP Solution Construction (For each iterationmaxit) 11. for t = 1:maxit |
12. for i = 1:(n − 1) Generate the set of all possible sub-sequences by adding each remaining job to the first job of the predefined sequence τ and calculating their TWFT and economic_cost to build the RCL and select a random sequence from the RCL, where:
13. end 14. Calculate the TWFT of the actual iteration’s sequence and compare it to its previous value to select the optimal one 15. end Output: 16. grasp_solution: The best sequence found 17. twft_best: The optimal TWFT value associated with grasp_solution 18. best_economic_cost: The best economic cost |
To enhance solution quality and achieve a more effective minimization of the Weighted sum of TFT and energy cost, this study adopted a hybrid NEH-GRASP approach, whose main steps are presented in Algorithm 3.
Algorithm 3: HGRASP for minimizing TWFT and energy cost |
input: 1. processing_times: A matrix [m × n], representing the processing times of n jobs on m machines. |
2. setup_times: A 3D array [n × n × m], representing the sequence-dependent setup times. |
3. weights: A vector [1 × n], containing the job weights. 4. cost_per_unit_time: Cost incurred per unit time for processing. 5. energy_usage: Energy consumption associated with job processing. 6. w1,w2: Weighting coefficients for TWFT and economic cost in the objective function 7. alpha: A parameter controlling the Restricted Candidate List (RCL), 0 ≤ α ≤ 1. 8. maxit: The maximum number of GRASP iterations. 9. Generate an initial sequence τ using the NEH heuristic |
10. // Iterative GRASP Solution Construction (For each iteration maxit) 11. for t = 1:maxit |
12. for i = 1:(n − 1) 13. Generate the set of all possible sub-sequences by adding each remaining job to the first job of the predefined sequence τ and calculating their objective function: ; To build the RCL and select a random sequence from the RCL, where: 14. end 15. Apply pairwise exchange movement to improve the sequence, where we swap two jobs in the sequence and compute the new objective function, if improved, we accept the move 16. if t > 1 &
17. end 18. end 19. if the newly found sequence has a better total objective function, we update the best solution Output: 20. best_objective_value: Minimum TWFT and cost achieved 21. hgrasp_solution: The best sequence found |
In this hybridization, the NEH heuristic was first applied to construct an initial high-quality solution by leveraging its efficient sequencing strategy and computing the combined objective value (TWFT and cost). To generate this initial solution, a weighted variant of the NEH heuristic was employed. Specifically, the total processing time of each job was multiplied by its corresponding weight, and jobs were then sorted in decreasing order of their weighted total processing times. To illustrate this, we provide an example based on the input data presented in
Table 2,
Table 3,
Table 4 and
Table 5, which detail the processing times, the sequence-dependent setup times for each machine, and the job weights.
As illustrated in
Figure 4, the construction process began with the highest-priority job
. Job
was then considered and inserted in all possible positions, resulting in two sequences:
with
, and
with
. Since the latter yielded a lower TWFT, the updated sub-sequence became
. The same insertion mechanism was then applied to job
, which was tested in all possible positions:
with
,
with
and
with
. Since the last sequence provided the minimum, it was selected as the best sequence in this stage, yielding
. This insertion procedure was repeated iteratively for each remaining job in the priority list, where, at every step, the position that minimized TWFT was selected. The final constructed sequence was
.
Subsequently, the GRASP method was applied to further explore and refine the solution space. This phase began with a global search implemented through the main loop, which generated a wide range of random sequences to be considered in the GRASP phase. Within this loop, each remaining job was sequentially combined with the current partial solution, forming subsequences of the type [current_solution, remaining_jobs], whose objective function values, denoted as ‘candidate_obj’, were computed. These subsequences constituted the RCL used in the local search, from which a job was randomly selected to be added to the current solution. To systematically explore the solution space and enhance optimization, an iterative search strategy was adopted. The local search was further reinforced by a pairwise exchange mechanism, where two jobs in the sequence were swapped. If the resulting sequence yielded an improved objective function, the move was accepted. To strengthen the search capability and avoid premature convergence, a perturbation function was integrated. This function was triggered when stagnation was detected, defined as an absolute change in the objective function smaller than a predefined threshold (stagnation_threshold= 1 × 10−3) between two successive iterations. In such cases, the value of the greediness parameter alpha was decreased, making the method more exploitative and thereby refining the best solutions. Overall, this hybrid methodology substantially improved solution quality, providing more effective minimization of both TWFT and energy cost in the flow shop scheduling problem.
5. Experimental Results
In this section, we present and analyze the computational results used to assess the performance of the proposed approaches. The comparison involves the exact method, represented by the MILP model, and two heuristic-based strategies developed for solving the PFSP. The first heuristic relied on a GRASP framework, where the NEH heuristic was employed to generate the initial solution. The second was a hybrid approach that integrated NEH with GRASP, further reinforced by a combination of global and local search procedures, as well as a perturbation mechanism, to enhance global exploration and improve solution quality.
For each of these methods, two problem formulations were examined. The first corresponded to a single-objective optimization problem, where the objective was to minimize the TWFT. The second formulation was bi-objective, simultaneously minimizing TWFT and energy consumption costs, thereby aligning with sustainable production considerations. Both formulations were tested across different problem sizes.
The problem instances were generated by using uniformly distributed random numbers for job processing times, setup times, weights, costs per unit time and energy usage, taking into account the interdependent relationships among these parameters and the substantial size of the considered instances. Processing times were drawn from a normal distribution within the range [3, 20], setup times in [1, 7], weights in [1, 5], costs per unit time in [1, 5], and energy usage in [5, 20]. The problem instances analyzed spanned a machine m count ranging from 2 to 6 and a job
j count ranging from 4 to 16 for small sizes, as presented in
Table 6 and
Table 7, with and without cost scenario. For medium sizes, as presented in
Table 8 and
Table 9, the job number was chosen from 10 to 90 and machine
m counting from 5 to 20, and we chose large size instances, as presented in
Table 10 and
Table 11, i.e.,
j ∈ [100, 300], and
m ∈ [10, 20], using Python 3.13.3 and calling CPLEX. This process was carried out on a MacBook Air 10.1, M1, 2020, 8Go (Apple Inc., Cupertino, CA, USA).
We began by comparing the results of each method for the single objective minimization in small sized instances, as shown in
Table 6. For these small instances, the MILP model served as the reference benchmark to assess the quality of the heuristic and metaheuristic solutions, with the execution time limited to 8000 s.
The results highlighted the robustness and effectiveness of the proposed hybrid method in solving the single-objective optimization problem. This robustness was confirmed by the strong consistency of its outcomes with those of the MILP approach, which was used as a benchmark for optimality. In contrast, the solutions obtained by the GRASP-based NEH method deviated significantly, underscoring its limitations in identifying optimal solutions.
To further evaluate the statistical significance of the performance differences between our proposed HGRASP method and the benchmark methods (GRASP and MILP), we applied the Wilcoxon signed-rank test. This test was performed on the small-sized instances, as reported in
Table 12. Since MILP provides optimal values for small instances, it served as a reliable reference for comparison.
Table 12 presents the results of the Friedman test applied to the 14 benchmark instances, showing the mean ranks of the compared methods and the associated statistical measures used to assess the significance of their performance differences.
The p-value was well below 0.05, indicating that the differences among the three methods were statistically significant. Although MILP was theoretically the most accurate approach due to its exact nature, its average rank was slightly lower than that of HGRASP. This discrepancy was mainly attributable to the 8000-s time limit imposed on MILP executions to prevent excessive computational time. For some medium-sized instances, MILP was unable to reach the optimal solution within this limit, which reduced its relative performance compared to HGRASP, which consistently produced high-quality solutions in significantly shorter times.
To provide a more tangible comparison between the methods, we selected the 10 × 4 instance as a representative case to visualize the scheduling outcomes of MILP, GRASP, and HGRASP using Gantt charts. This instance was specifically chosen because it belongs to the small-size category, for which the MILP model remains computationally feasible. As such, it served as a valuable reference for assessing the accuracy and reliability of the proposed heuristic and hybrid methods.
To illustrate the differences in schedules produced by the three methods and provide visual confirmation of the numerical results, particularly under the no-wait and SDST constraints, we used the data reported in
Table 13,
Table 14,
Table 15,
Table 16 and
Table 17. Each job was characterized by a specific weight, cost per unit time, and energy consumption, as follows:
,
and
.
The Gantt charts presented in
Figure 5,
Figure 6,
Figure 7,
Figure 8,
Figure 9 and
Figure 10 clearly illustrate the differences in schedules produced by the three methods and provide a visual confirmation of the numerical results, particularly under the no-wait and SDST constraints. The job sequences obtained by each method were as follows: MILP-No-Cost: [
], HGRASP-No-Cost:
, GRASP-No-Cost: [
], and MILP-With-Cost: [
], HGRASP-With-Cost: [
, and GRASP-With-Cost: [
].
The corresponding TWFT and combined objective values (TWFT + energy cost) may be summarized as follows:
MILP: TWFT = 1889, Combined objective = 1674.8
HGRASP: TWFT = 1890, Combined objective = 1674.8
GRASP: TWFT = 2599, Combined objective = 2200
The results illustrated by these Gantt charts further demonstrate the effectiveness of the HGRASP method, which produced schedules that matched or closely approximated the objective function values obtained by the MILP model, which is a method widely recognized for its accuracy on small-sized instances. This visual alignment highlights the high quality of the solutions delivered by HGRASP in terms of schedule structure, TWFT and overall objective function value, while achieving these results in a significantly shorter computational time compared to MILP.
This improvement can be attributed to several key enhancements integrated into the HGRASP_with_cost algorithm. Unlike the standard GRASP, which initializes the search using a priority rule based on weighted processing times, HGRASP_with_cost employs the NEH heuristic to construct the initial sequence, a strategy well-known for generating near-optimal permutations in flow shop environments. Consequently, HGRASP starts each GRASP iteration from a higher quality solution, which accelerates convergence and reduces the risk of becoming trapped in low-quality regions of the solution space. Additionally, HGRASP incorporates a pairwise exchange local search after selecting a random sequence from the RCL, refining the solution through job swaps that improve the overall objective. Finally, to enhance search diversification, HGRASP dynamically adjusts the greediness parameter (alpha) based on a stagnation threshold, which is absent in the standard GRASP. This feature enables HGRASP to escape local optima and explore new regions of the solution space when progress stalls.
To support and visualize the results obtained for different instances obtained using the MILP, GRASP, and HGRASP approaches in both the with and without cost scenario, boxplots were employed, as illustrated in
Figure 11 and
Figure 12, to depict the distribution of objective function values across multiple executions. These visualizations offer comparative insights into the performance of the three approaches in both mono-objective and bi-objective contexts. The data used to construct these boxplots correspond to the experimental results summarized in
Table 2,
Table 3,
Table 4 and
Table 5, ensuring a consistent and integrated analysis. In the mono-objective case, the boxplots indicate that HGRASP consistently outperformed the standard GRASP method and aligned closely with the MILP results.
Similarly, in the bi-objective scenario, the hybrid approach consistently attained optimal objective values, as evidenced by a lower median and a narrower interquartile range. These observations underscore the effectiveness of incorporating the NEH heuristic to guide the initial solution construction, alongside the integrated local and global search mechanisms and the perturbation strategy to enhance exploration. Consequently, the boxplots not only confirm the superiority of the hybrid method but also highlight the benefits of combining intensification and diversification strategies within the GRASP framework for addressing complex flow shop scheduling problems.
For the two heuristic methods, as specified in their respective algorithms, multiple executions were carried out for each instance. This repetition was intended to explore a broad range of possible job sequences and to enhance the robustness of the solution process. For each run, a convergence curve was plotted based on the best solution obtained, enabling a detailed examination of the evolution of the objective function throughout the algorithm’s progression. This approach provides deeper insight into the performance dynamics of the method and ensures that the final solution is not only optimal within a single run but consistently effective across multiple iterations, thereby reinforcing the reliability of the results.