Energy-Aware Flexible Job Shop Scheduling Using Mixed Integer Programming and Constraint Programming

Compromising productivity in exchange for energy saving does not appeal to highly capitalized manufacturing industries. However, we might be able to maintain the same productivity while signiﬁcantly reducing energy consumption. This paper addresses a ﬂexible job shop scheduling problem with a shutdown (on/oﬀ) strategy aiming to minimize makespan and total energy consumption. First, an alternative mixed integer linear programming model is proposed. Second, a novel constraint programming is proposed. Third, practical operational scenarios are compared. Finally, we provide benchmarking instances, CPLEX codes, and genetic algorithm codes, in order to promote related research, thus expediting the adoption of energy-eﬃcient scheduling in manufacturing facilities. The computational study demonstrates that (1) the proposed models signiﬁcantly outperform other benchmark models and (2) we can maintain maximum productivity while signiﬁcantly reducing energy consumption by 14.85% (w/o shutdown) and 15.23% (w/shutdown) on average.


Introduction
Energy consumption is a very important issue for our society in terms of both environment and economy. U.S. Energy Information Administration [1] recently reported international energy outlook 2019 with projections to 2050. In the report, the world energy consumption is expected to increase by approximately 50%, accounting for more than half of the non-OECD Asian countries, including China and India. Industrial sectors, such as manufacturing, agriculture, and construction, are the largest consumer among end users, and their energy consumption will increase by more than 30% from 2018 to 2050. e share of energy consumed by energyintensive manufacturing holds steady at 50% from 2018 to 2050. ese predictions and phenomena were analyzed in several studies [2][3][4].
Manufacturing has enormous potential for energy saving because 80% of the energy consumed by machines occurs in the idle state [5]. For this reason, several methods to increase energy efficiency in manufacturing have been attempted. e common method is to optimize a production schedule by considering green metrics along with traditional performance indicators.
is approach called energy-aware scheduling or energy-efficient scheduling has the advantage of achieving significant performance at no extra cost [6].
In this paper, we deal with energy-efficient scheduling in the flexible job shop scheduling problem (FJSP). Mouzon et al. [5] observed that if an idle period is long enough, the energy could be saved by using shutdown (on/off) strategy to turn the machine off and on. Che et al. [7] first developed a mixed integer linear programming (MILP) model for a single machine scheduling with a shutdown strategy, and the model was effectively validated with CPLEX solver. Subsequently, the shutdown strategy was applied to various production systems, and the first MILP model for FJSP with a shutdown strategy was proposed by Zhang et al. [8]. However, the proposed model was complex and computationally inefficient, so Meng et al. [9] improved it. However, both studies used only one type of MILP formulations for FJSP. is paper proposes the most efficient MILP formulation. e contributions of this paper are threefold. First, we propose an alternative MILP model for FJSP with a shutdown strategy. Second, we devise a constraint programming (CP). ird, the experimental study demonstrates that we can reduce energy consumption by 14.85% (w/o shutdown) and 15.23% (w/shutdown) on average, while not compromising productivity. In addition, we provide benchmarking instances, CPLEX MIP and CP source codes, and GA code, in order to promote related-research, thus expediting the adoption of energy-efficient scheduling in manufacturing facilities. e remainder of the paper is organized as follows: Section 2 shows the literature review of FJSP, energy-efficient scheduling, and constraint programming. In Section 3, the problem description and solution methods are described. In Section 4, we compare the performance of proposed models and existing model through computational experiments. Finally, the conclusion and some directions for future research are given in Section 5.

Flexible Job Shop Scheduling Problem.
e FJSP has been extensively studied over the past 30 years. A variety of techniques from exact methods to heuristics have been used in this research. Exact methods include branch-and-bound algorithm, MILP, and Lagrangian relaxation method among others, while heuristics include ant colony optimization, artificial bee colony, artificial immune system, evolutionary algorithms, greedy randomized adaptive search procedure, neighborhood search, particle swarm optimization, simulated annealing, Tabu search, hybrid techniques, and so on. See Chaudhry and Khan [10] for the survey about FJSP. We focus on the MILP method.
MILP models for FJSP are classified into four different types by the main binary decision variable. e first is the machine-position formulation (MPF) that determines the position of the machine, where each operation is processed [8,9,11,12]. e second is the general precedence formulation (GPF) that determines whether one operation precedes the other operation on the same machine [13,14]. Note that one operation is not necessarily positioned immediately before the other operation. e third is the immediate precedence formulation (IPF) that determines whether one operation immediately precedes the other operation on the same machine [15]. e fourth is the time indexed formulation (TIF) that determines the time of the machine when each operation is started [16]. Demir and Kürşat Isleyen [17] classified mathematical models by this criterion and compared the computational results of MILP models.

Energy-Efficient Scheduling.
e studies for energy-efficient scheduling are classified into four groups based on saving methods. e first is to reduce unnecessary idle time.
is is a model that extends the existing model to save energy by reducing unnecessary idle time. e second is to shut down the idle machines. Turning off machines during the idle can save energy when idle time is long enough. e decision when to shut down a machine is added into the traditional scheduling model. e third is to slow down a machine speed. Energy consumption depends on a speed of a machine. We can save energy by adjusting a speed of a machine without impacting the makespan. e fourth is offpeak production. In the peak time, electricity costs are high. erefore, a production at nonpeak time can save a significant amount of electricity costs. Table 1 categorizes studies on energy-efficient scheduling by this criterion. See Gahm et al. [37] and Gao et al. [38] for reviews of energyefficient scheduling.
Our study belongs to the energy-efficient FJSP using the shutdown option. Among the studies, Dai et al. [25] and Wu and Sun [26] developed a genetic simulated annealing algorithm. Zhang et al. [8] developed MILP model and discovered energy-efficient rules that could be implemented in real practice. Meng et al. [9,27] proposed several effective MILP models and evaluated the performance of these models. Zhang et al. [8] and Meng et al. [9,27] used MPF, while our paper uses IPF. Moreover, we develop constraint programming and genetic algorithm models. [39] noted that no presentation of the basic ideas of MILP is complete these days without introducing CP--that is promising to greatly expand our ability to formulate and solve various scheduling problems. CP has been applied to various scheduling problems, demonstrating a rapid computational speed. e search within IBM CPLEX CP Optimizer is equipped with the presolve functionality, some constraint propagation algorithms, temporal linear relaxation used to guide the search, and two search space exploration strategies that are used concurrently: the large neighborhood search for producing good quality solutions and failure-directed search for proving infeasibility or optimality [40].

Problem Description and Solutions
Consider a flexible job shop environment that consists of a set of heterogeneous machines (k ∈ K) and a set of jobs (i ∈ I). Each job i consists of a set of operations (J i � 1, . . . , n i ). Each operation needs to be processed in a specific order (known as precedence constraints) for a given job. A machine can perform at most one operation at a time. Each operation must be processed by one of qualified machines. In addition to the standard FJSP problem, an amount of energy consumption is considered in this energyaware scheduling approach. e energy is consumed during production, idle, and shutdown. e production requires the highest amount of energy, while the idle does the medium and the shutdown requires the lowest. In particular, the shutdown can be enforced when a continuous idle period of a machine is expected to be long enough to compensate the shutdown penalty. When idle times are inevitable, the key is to adjust small-size idle intervals and locate them in a single large-size interval to turn on a long-size shutdown.

Mixed Integer Linear Programing Models.
Meng et al. [9] presented six MILP models for our problem and showed that the second model outperforms all the other models through the numerical experiments. We term this efficient model MILP-2. Despite the superiority of MILP-2, we found that it can be further improved during the implementation by employing tuples instead of arrays, thus dramatically reducing the number of binary decision variables. For instance, the MILP-2 uses a binary variable Y i,j,k,t that represents whether the j-th operation of job i is processed at the t-th position of machine k. is variable is a sparse array, in which most of the elements are zero. Moreover, Meng et al. [9] set the maximum number of the positions of machine k (denoted by m k ) to the total number of operations ( i∈I n i ), which is excessively large. We set m k to the number of operations that machine k can process in the instance. By taking those measures, we were able to reduce the number of binary variables by 50-60% in the same instances. We term this efficient model MILP-2A.
MILP-2 is an extension of MPF for FJSP so that energy consumption can be considered. However, Demir and Kürşat Isleyen [17] showed that MPF is the slowest model among alternative models. Choi and Choi [15] proposed a new immediate precedence formulation (IPF) that decides whether one operation immediately precedes the other as shown in Figure 1. Now, we will propose a new model that improves IPF and extends it to account for energy consumption. We mostly use the same notations as Meng et al. [9]. e details are as follows. Parameters: I: set of jobs. p o,k : processing time of o ∈ O by machine k ∈ K o . D k : the unit energy consumed at the idle time for machine k when the shutdown strategy is not used P 0 : the unit energy consumed by a facility for lighting, heating, and cooling during the makespan. E o,k : the energy consumed when operation o is processed by machine k. N k : the maximum times of shutdown strategy for machine k. G k : the energy consumption of machine k when the shutdown strategy is used. TB k : the breakeven period of machine k in which the same amount of energy is consumed during the idle time whether the shutdown strategy is used or not. Hence, O q : the set of operations which can be processed by the same machine with operation q ∈ O. PO: the set of precedence operation pairs in the same job operations, that is, Decision variables:

MILP-3 for Energy-Aware Flexible Job Shop Scheduling.
Objective (1) is to minimize the total energy, which is consumed for production, idle (including shutdown), and common. Constraint (2) ensures that each operation is processed by exactly one machine. Constraint (3) links the completion time of an operation with its starting time. Constraint (4) enforces that each operation starts after its precedent operation is finished. Constraint (5) indicates the makespan. Constraint (6) imposes that each machine has at most one last job. Constraint (7) imposes that each operation has at most one immediate precedence operation. Constraint (8) imposes that each operation has an immediate next operation or it is the last operation on some machine. Constraints (9)-(12) encode that if o immediately precedes q, then they should be processed by the same machine. Constraint (13) imposes that o can be the last job of machine k only when machine k processes o. Constraint (14) enforces that operation q starts after the completion of operation o if it is processed immediately after operation o on the same machine. Constraint (15) imposes that idle time of the last job is zero. Constraints

Constraint Programming.
All time durations, such as makespan, shutdowns, and productions, are explicitly modeled as the interval variables as shown in Figure 2.
As Ham [41] pointed out, there is no standard in CP formulation, unlike a similar MILP formulation. erefore, this paper formulates the model using generic keywords and syntaxes as we refer to the CP formulations by Laborie et al. [40] and IBM ILOG CP Optimizer [42]. e proposed CP model is built upon the following decision variables: : collection of variables assigned to machine k eS: total energy consumption during shutdowns eP: total energy consumption during productions eI: total energy consumption during idles eC: total common energy consumption

CP-1.
Min eP + eS + eI + eC, noOverlap Seq k , ∀k ∈ K, span C k , X o,k: o∈O,k∈K , ∀k ∈ K, endOf Z k,s < endOf C k , ∀k ∈ K, s ≤ N k , sizeOf Z k,s ≥ TB k , ∀k ∈ K, s ≤ N k , Objective (24) is to minimize the total energy consumption, which is comprised of production, shutdown, idle, and common. Constraint (25) ensures that each operation is processed by exactly one machine. Constraint (26) enforces each operation starts after its precedent operation is finished. Constraint (27) prevents intervals in a sequence from overlapping. Constraint (28) determines the makespan of each machine. Constraints (29)-(30) ensure that a shutdown can occur during a makespan. Constraint (31) ensures the minimum length of each shutdown. Constraints (32)-(35) compute the total energy consumption for production, shutdown, idle, and common, respectively. We term this model CP-1.
During the preliminary study, the CP-1 could not outperform the MILP-2A model. Here, we explored an alternative CP model. In the CP-1, the idle time was computed Mathematical Problems in Engineering based on other interval variables in Constraint (34). We here present an alternative CP model, which explicitly captures the idle intervals.
I k,t : interval representing t-th idle on machine k ∈ K.
Constraint (36) replaces Constraint (34). en, Constraint (37) is introduced to ensure that a makespan of the machine must be packed by productions, shutdowns, and idles. All other constraints stay in place. We term this revised model CP-2. Figure 3 represents an optimal schedule for a small benchmark instance (mfjs07). Figure 3(a) shows the detailed production schedule per machine with an objective of makespan minimization, and Figure 3(b) depicts the schedule with an objective of energy minimization, while maintaining the same productivity. e proposed model merges the small-size idles enough to turn on shutdown strategy. For instance, the two idles that occurred in machine 4 are replaced by a single shutdown in the same machine. e energy-aware scheduling saved the energy consumption by 1.35% without hurting productivity in the mfjs07 instance.

Computational Experiments
In this section, the effectiveness of the proposed models is examined. e MILP, CP, and flow control models are all coded in IBM OPL 12.8.0 on a personal computer with an Intel ® Core i7-4770 CPU with 16 GB of RAM. All the test instances, MILP codes, CP codes in IBM OPL, and GA code can be found online at https://github.com/hamcruise/FJSP-Shutdown.

Problem Instances.
Meng et al. [9] proposed a set of test instances derived from the known benchmark instances SFJS01-10 and MFJS01-10 [12] by considering energy consumption. We adopted the same test instances. SFJS01-10 are small-sized, and MFJS01-10 are medium-sized. We also adopted another FJSP benchmark test instance suggested by Behnke and Geiger [43]. Among their extensive 60 instances, we adopted the first 10 instances and added energy parameters in the same way Meng et al. [9] did. Finally, we also used another FJSP benchmark test instance suggested by Kacem et al. [44], which has been adopted by Singh and Mahapatra [45]. e detailed size of the instance (a/b/c) is recorded in Table 2, where index a denotes the number of jobs, b denotes the maximum number of operations for a job, and c denotes the number of machines.
For all instances, the common power (P 0 ) and maximum times of shutdown (N k ) are set to be 5 and 3, respectively. e processing powers are drawn from the uniform distribution [3,5]. e idle power (D k ) is randomly generated from the set {1, 2, 3}, and the energy consumption during shutdown (G k ) is generated from the set {10, 30, 60}. Figure 4 shows the ratio of the number of binary variables of MILP models to MILP-2. As the size of MILP-2 increases, the binary variables of MILP-2A and MILP-3 decrease. In particular, it is observed that the reduction ratio of the binary variable of MILP-3 sharply decreases as the size increases.

Experimental Results.
In this subsection, we implemented a genetic algorithm to compare the performance between proposed methods and metaheuristic. Genetic algorithm (GA) is known as an effective metaheuristic to solve flexible job shop scheduling problems [46][47][48][49]. e overall GA framework in Zhang et al. [50] was adopted. We had conducted a preliminary test for tuning hyperparameters with respect to the quadruple (popSize, numGen, crRate, mutRate), where popSize is the population size (popSize ∈ {100, 200, 400}), numGen is the maximum number of generations (numGen ∈ {50, 100, 200}), crRate is the crossover rate (crRate ∈ {0.6, 0.7, 0.8, 0.9, 1.0}), and mutRate is the mutation rate (mutRate ∈ {0.0, 0.1, 0.2, 0.3}). e best GA hyperparameters that were obtained from the preliminary test were as follows: popSize � 100, numGen � 50, crRate � 0.7, and mutRate � 0.1. e increasing population size and number of generations did not ensure obtaining better solutions. e value of the fitness function converged fast in practice. Tables 3 and 4 compare the proposed MILP and GA with CP models in terms of the objective function value (total energy consumption) and computation times within 600 seconds for Fattahi and Behnke's instances, respectively. Column 1 identifies the name of the instance, columns 2-7 include the total energy consumption, and columns 8-13 report the computation times. e bold font indicates the optimality. Table 3 reports the results based on Fattahi's instances. For small-sized instances (SFJS01-10), all approaches found the optimal solutions, except GA. In computation times, all approaches, except CP-1, terminated in one second. For medium-sized instances (MFJS01-10), CP-2 yielded the best results on average. In computation times, GA significantly outperforms all other approaches seconds. However, MILP-2, MILP-2A, and MILP-3 terminated at a similar time. Table 4 reports the results based on Behnke's instances. e proposed MILP-2A performed the best in average. GA is significantly faster than the MILP and CP approaches. However, the total energy consumption is increased up to 8.1% on average.
In order to determine if the means of two sets of data are significantly different from each other, we conducted the ttest: Paired Two-Sample for Means at an alpha level of 0.05. Table 5 indicates that, for medium-sized Fattahi's instances, there is a statistically significant difference between CP-2 vs. e previous tables compared the performance of models with a fixed computation time. It is necessary to check how the performance changes according to different computation times. Table 6 summarizes the total energy consumption in terms of computational run time for the Kacem's instances. Both CP and MILP models proved the optimality of Kacem1 instance within 60 s. CP managed to prove the optimality of Kacem2 instance within 60 s, while MILP spent 150 s. In the Kacem3 instance, the CP-2 found an optimal solution within 60 s, while MILP-2A could not find an optimal solution within 600 s. In addition, the CP-2 found a much better solution, in just 10 seconds, than the one MILP-2A found in 600 seconds.
is experiment demonstrates that CP is quick to generate efficient (or optimal) solutions. e energy saving does not appeal to highly capitalized manufacturing industries, such as automobiles and   semiconductors, because the total energy cost is not even comparable to the revenue the manufacturers yield, so their sole goal is to maximize productivity. However, if we can maintain the same productivity, while significantly reducing energy consumption, the energy-aware production scheduling will be embraced by the industries. is type of    Mathematical Problems in Engineering mathematical approach is known as epsilon-constraint method, where one of the objectives is taken as a single objective function and the others are included into a model as constraint [51]. Tables 7 and 8 attempt to meet this demand by comparing the traditional scheduling and energy-aware scheduling. e traditional scheduling minimizes the makespan (cycle time reduction), whereas the energy-aware scheduling minimizes the total energy consumption as it maintains the same makespan. Column 1 identifies the name of the instance. Column 2 reports the total energy consumption when the model solves each test instance with the makespan minimization. Columns 3-4 report the total energy consumption when the model runs with the energy consumption minimization with the same makespan. is experimentation identifies potential energy-saving without compromising productivity. For Fattahi's instances, Table 7 shows 1.57% and 1.69% saving without and with shutdown   Mathematical Problems in Engineering 9 strategy, respectively. e mild saving can be explained by the test instance itself. Table 8 reports the results of Behnke's instances. is experimentation identified the potential energy-saving without compromising productivity by 14.85% (w/o shutdown) and 15.23% (w/shutdown). e increased savings compared with the ones with Fattahi's instance are due to the size of this Behnke's instance, allowing the solver the flexibility to find better solutions. In order to determine if the means of two sets of data are significantly different from each other, we conducted the t-test: Paired Two-Sample for Means at an alpha level of 0.05. e test indicates that there is a statistically significant difference between traditional and energy-aware methods with t (19) � 3.5 and p < 0.01 in Fattahi's instance and t (9) � 5.53 and p < 0.001 in Behnke's instance. Table 9 records the amount of energy saving by applying the proposed energy-aware method according to different multipliers on E o,k .
is experimentation identified the potential energy-saving without compromising productivity by 6-8%. e improvement was slightly decreased as the multiplier was increased.

Conclusion
We have investigated the energy-efficient FJSP with a shutdown (on/off) strategy to save idle energy consumption. e shutdown can be enforced when a continuous idle period of a machine is expected to be long enough to compensate for the shutdown penalty. An alternative MILP model is proposed. en, a novel constraint programming is proposed. Finally, practical operational scenarios are examined. e computational study demonstrated that (1) the proposed models significantly outperform the best benchmark model (MILP-2) and (2) we can maintain the maximum productivity while significantly reducing the energyconsumption by 14.85% (w/o shutdown) and 15.23% (w/ shutdown) on average, thus promoting energy-aware production scheduling to highly capitalized manufacturing industries. We offer benchmarking instances, CPLEX MIP, CP, and GA source codes, which have been used in this research, in order to promote related research, thus expediting the adoption of energy-efficient scheduling in manufacturing facilities.
In future research, we will extend the proposed models to consider time-of-use (TOU) electricity and peak power load since the energy cost can be further saved. Utility companies across the U.S. are offering TOU-based electricity demand response programs. e key is to shift productions to offpeak periods.

Data Availability
e data used to support the findings of this study have been deposited in the GitHub repository (https://github.com/ hamcruise/FJSP-Shutdown)

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this article.