# Energy-Efficient Hybrid Flow-Shop Scheduling under Time-of-Use and Ladder Electricity Tariffs
## 3 The Scheduling Approach
### Select, Crossover, and Mutation  
Initially, a random parent population \(P_{0}\) is obtained through initialization and the individual's fitness in \(P_{0}\) is calculated through the program. First, the binary tournament selection, crossover, and mutation operators are used to create an offspring population \(Q_{0}\) of size \(N\). The gene strategy is adopted after the initial generation. The next-generation population is derived by assigning non-dominated grades and crowding distances based on comparing the current population with the best non-dominated solution. The \(t\)th generation of the proposed algorithm is described, as shown in Section 3.5. The non-dominated Sorted is shown in Algorithm 1.  
The crossover operation uses the two-point crossover method. Two offspring chromosomes are generated by randomly selecting two points on the two-parent chromosomes and exchanging the gene fragments between these two positions. The mutation operation adopts the single-point mutation method, in which the value of a certain gene of the chromosome is changed to transform it into a similar solution for selection.  
By dynamically adjusting the update range of population individuals as the evolutionary generation increases, the convergence of the population and the accuracy of the search direction are increased. The adaptive adjustment of the genetic parameters allows the adaptive genetic algorithm to achieve convergence while maintaining the diversity of the population.  
```
0: A complete schedule decoded from a job sequence.
0: A modified schedule with less electric power cost.
1:for\(i=1,2,\ldots,m\)do
2: Arrange the jobs in non-increasing order of their completion time at stage \(i\)
3:for\(j=1,2,\ldots,J\)do
4: Set \(t_{min}=S_{i,j,k}\), where \(S_{i,j,k}\) the start time of job \(j\) at stage \(i\). Set \(t_{max}=Min(S_{i,j+1},\)\(S_{i+1,j,k})\)--\(P_{i,j,k}\), where \(S_{i+1,k}\) is the start time of job \(j+1\) at stage \(i\), the schedule \(S_{i+1,j}\) the start time of job \(j\) at stage \(i+1\).
5: By comparing the time of \(S_{i,j,k}\), \(S_{i+1,j}\) and \(S_{i,j+1,k}\), find out whether there was a space for right shift. By comparing the electricity price of \(S_{i,j,k}\), \(S_{i+1,j}\) and \(S_{i,j+1,k}\), find out whether it was worth to right shift.
6: Arrange the start time between [\(t_{min},t_{max}\)], calculate the objective function values Makespan and TEC, determine the start time relying on domination relationship.
7:endfor
8:endfor
```  
**Algorithm 1** Right-shift procedure.  
To study the impact of the parameter in genetic algorithms, [PERSON] et al. (2019) developed some new deterministic methods of controlling crossover rates and the mutation rate, which dynamically increase or decrease the crossover and mutation rates relying on the evolutionary generations. It provides a guideline for our research.  
Considering the adaptability of the multi-objective problem and the complexity of HFSP, the adaptive DHM/ILC method is adopted. The crossover rate is changed linearly according to the generations. To calculate mutation rates in DHM/ILC, the following equation is used:  
\[P_{c}=\frac{g}{G} \tag{12}\]  
\[C=P_{c}\times\textit{popsize} \tag{13}\]  
\(P_{c}\) as the crossover probability, \(g\) is the current genetic generation number, \(G\) is the total genetic generation number, \(C\) is the size of chromosomes which are selected to crossover. At the same time, Equations (14) and (15) change the mutation rate linearly according tothe number of the current generation and the total number of generations. The following equation can be used to calculate mutation rates in ILM/DHC:  
\[P_{m}=1-\left(\frac{g}{G}\right) \tag{14}\]  
\[M=P_{m}\times popsize \tag{15}\]  
\(P_{m}\) as the crossover probability, \(g\) is the current genetic generation number, \(G\) is the total genetic generation number, \(M\) is the number of chromosomes that need to be used for the crossover process.