## 3 Optimization Algorithm for FJSP-SH
### Population Initialization
#### 3.3.1 The Machine with the Earliest Idle Time for the Job That Arrives First  
This rule means that the job that is finished in the previous operation earlier will have the priority to be processed in the next operation, and this job will be processed by the machine with the earliest idle time at present. Firstly, for the first operation, randomly initialize the job sequence, and randomly arrange machines for processing corresponding jobs. After processing, the completion processing time of the first operation of all jobs and the completion processing time will all machines will be obtained, and two sequences of the completion processing time will be obtained by sorting in ascending order. Next, for the second operation, according to the two sequences of the completion processing time obtained in the first operation, select the job with the earliest completion processing time in the first operation. Among the optional machines in the second operation of this job, select the machine with the earliest completion processing time for processing. After the processing is completed, update the completion processing time of the machine. Then, select the job with the second earliest completion processing time in the first operation in turn, and select the machine for processing according to the same rules as above. After all jobs are processed, the completion processing time of the second operation for all jobs will be obtained, and the completion processing time sequence of the second operation will be obtained by sorting in ascending order. Afterwards, the remaining operations 3, 4,..., \(w\) are sorted according to the same rules as the operation 2. Figure 3: An example of a coding method. 3.3.2. The Machine with the Shortest Processing Time for the Job That Arrives First  
This rule means that the job that is finished in the previous operation earlier will have the priority to be processed in the next operation, and the job will be processed by the machine with the shortest processing time. Firstly, for the first operation, randomly initialize the job sequence. For the jobs in sequence, select the machine with the shortest processing time for the operations in turn. After the processing is completed, the completion processing time of the first operation of all jobs will be obtained, and the completion processing time sequence of the first operation will be obtained and sorted in ascending order. Next, for the second operation, according to the completion processing time sequence of the jobs obtained in the first operation, the jobs are selected in turn, and each job is processed by a machine with the shortest processing time. After the processing is completed, the completion processing time of the second operation of all jobs will be obtained, and the completion processing time sequence of the second operation will be obtained and sorted in ascending order. Afterwards, the remaining operations 3, 4,..., \(w\) are sorted according to the same rules as the operation 2. 3.3.3. Simple Randomly Generated Solution  
This rule refers to the method of randomly generating an operation sequence and randomly selecting the corresponding machines to generate a machine sequence. The random generation method is to enhance the diversity of the population and avoid the obvious local characteristics of the initial population, which would cause the algorithm to be trapped into the local optimum. the solution space, each solution gets its acceleration from the attraction of other solutions, and the solution with a greater mass (higher fitness) provides greater acceleration, thus making the poor solution move towards the optimal solution. The gravitational formula used to determine the value of \(\delta\) is shown in Equation (19).