## 4 Proposed Methodology
### Initial Solution  
This research proposes a two-phase procedure to generate initial solutions. The first is task sequencing and the second is task allocation. In the task sequencing phase, based on the precedence relationships between pairs of tasks, all tasks are sequenced. This means sequence numbers are assigned to tasks. The procedure is as follows:  
Step 0: Set \(j=1\), \(C\) = set of tasks without any immediate precedence task. Step 1: Select a task \(i\) form \(C\) at random and let \(X_{ij}=1\). Step 2: If \(j=J\), then stop. Otherwise, delete task \(i\) from \(C\) and add tasks whose immediate precedence task is \(i\) into \(C\). Step 3: Let \(j=j+1\) and go to step 1. In Figure 4, for example, the matrix shows that there are eight tasks and nine precedence relationships. Each \"1\" indicates one precedence relationship. The \"1\" in the first row and second column indicates that Task 2 can be started only if Task 1 is completed. The numbers under the matrix are the numbers of immediate precedence tasks of each task. Only Task 1 has no immediate precedence task. Therefore, in the beginning \(C=\{1\}\). After sequence number 1 is assigned to Task 1, Tasks 2 and 3 will be added to \(C\) and Task 1 will be deleted from \(C\). Therefore, \(C=\{2,3\}\) and Task 2 and Task 3 can be randomly selected. Then, sequence number 2 will be assigned to the selected task. The procedure finally stops  
Figure 3: Examples for Equations (15)–(21). when all tasks are selected and sequence numbers are assigned. All tasks can be sequenced by the sequence numbers that are assigned to them. Figure 5 shows an example result. Based on the task sequence generated in the first phase, the second phase allocates tasks to workstations based on the sequence number assigned to them. The tasks whose locations are closer to the entrance or exit of the U-shaped conveyor assembly line are more likely to be allocated to the far left workstations. The task with sequence numbers 1 and (the last task in the sequence) has the highest priority to be assigned to the first workstation. Assume that \(D\) is the set of two sequence numbers that can be assigned to a workstation, the procedure of the second phase is designed as follows:  
Step 0: Calculate average cycle time \(AC=\frac{\sum_{i=1}^{l}T_{i}}{W_{max}}\), and let \(CT_{W_{max}}=AC\). Step 1: Set \(w=1\), \(D=\{\vec{j},\vec{j}\}=[1,J]\)and all \(Y_{jw}=0\). Step 2: Randomly select a sequence number from \(D\), and Let \(Y_{jw}=1\). Step 3: If sequence number \(\vec{j}\) was selected then \(\vec{j}=\vec{j}+1\), otherwise \(\vec{j}=\vec{j}-1\). Step 4: If \(\vec{j}=j\), let \(Y_{jW_{max}}=1\) and go to step 7. Otherwise, go to step 5. Step 5: If \(\sum_{i=1}^{l}\sum_{j=1}^{l}T_{i}\times X_{ij}\times Y_{jw}\geq AC\), let \(w=w+1\). Otherwise, go to step 2. Step 6: If \(w=W_{max}\), let \(Y_{jW_{max}}=1\) for \(j=\vec{j}\),..., \(\vec{j}\) and go to step 7. Otherwise, go to step 2. Step 7: If \(\sum_{i=1}^{l}\sum_{j=1}^{l}T_{i}\times X_{ij}\times Y_{jW_{max}}\geq CT_{W_{ max}}\), then stop. Otherwise go to step 8. Step 8: \(AC=AC*\gamma\) and go to step 1. In Figure 4, for example, the number beside each cycle is the assembly time. If \(W_{max}=3\), then the average total assembly time (\(AC\)) and \(CT_{W_{max}}\) is 10. First, \(D=\{1,8\}\). If the task with sequence number 1 is assigned to Workstation 1, then tasks with sequence numbers 2 and 8 will be the candidate sequence numbers to be selected to be assigned to Workstation 1, as 7 < 10. If the task with Sequence number 8 is selected, then \(D=\{2,7\}\) will be the candidate sequence numbers for Workstation 2, as 7 + 6 > 10. The procedure finally stops when \(\vec{j}=\vec{j}\) and the sequence number is assigned to the last workstation. Figure 6a shows an example initial result. In Step 5, one task can be assigned to the next workstation only when the total assembly time is more than the average total assembly time. Therefore, when the procedure assigns tasks to the last few workstations, it is possible that no task can be assigned.