## 5 Control Network Algorithm  
Typical task-scheduling algorithms are divided into the following broad categories. 1. First-come-first-served (FCFS) scheduling algorithm: The characteristic of this method is that each scheduling selects one of the ready tokens that are the first to enter the \(p_{1}\) or \(p_{47}\) and assigns the processor to put it into operation. 2. Short-job (process)-first (SJ(P)F) scheduling algorithm: This selects a token with the shortest scheduling time for priority scheduling. 3. Highest-priority-first (HPF) scheduling algorithm: This algorithm selects the token with the highest priority. Additionally, it can be divided into preemptive or non-preemptive. Figure 7: Definition of the working group. 4. Round-robin (RR) scheduling algorithm. In this method, all ready tokens are queued according to the principle of FCFS, and each token from the head of the queue to the end of the queue can be allocated a time slice of execution time in turn. For a small factory, there are no more than 100 tokens to be processed at the same time. In addition, the task-scheduling algorithm takes milliseconds and the manufacturing or testing of a product is seconds, so the time-consumption of the algorithm is almost ignored. In the above algorithms, SJ(P)F, FFF and RR are proposed for the time-consuming cost of the algorithms and are not suitable for the working conditions of decision-making of small production processes. Additionally, in practice, simple, stable and reliable are the first requirements of the system, so FCFS is chosen to design the algorithm. In actual work, each operator has his own machine for which he/she is responsible. Since the salary system does not mean more work equals more pay, the principle is equal distribution. Products have their own quality standards, which are qualified if the index is met. According to this principle, the following two algorithms are given. Algorithm 1 gives the method of task allocation. First, different workstations have their own product pressure test projects. Therefore, it is necessary to carry out type-matching first, and the stations that meet the requirements enter the selected set in line 2 of Algorithm 1. Then, we judge whether the machines of each working group are ready and whether the operators are in place. According to the result, we remove those that do not meet the requirements in the selected set in line 7 of Algorithm 1. Last, according to the working hours of operators in the working group to which \(t_{i}\) belongs, \(t_{i}\) is sorted from small to large, and the \(t_{i}\) output with the smallest working hours is selected in line 12 of Algorithm 1. ```
0:\(\forall d\odot p\in P_{cfl}\)
0:\(d\)
0:\(t\in p^{\star}\)
1:functionTaskScheduling(\(d\))
2:for each \(t_{i}\) in \(p^{\star}\)do
3:if\(d.type\in t_{i}.type\)then
4:\(T_{o}.add(t_{i})\)\(\triangleright\)\(T_{o}\) is the selected set
5:endif
6:endfor each
7:for each \(t_{i}\) in \(T_{o}\)do
8:if\(M(Group(t_{i}).Machine)<1\lor M(Group(t_{i}).Operator)<1\)then
9:\(T_{o}.remove(t_{i})\)
10:endif
11:endfor each
12:sort(\(T_{o}.T_{o}.Operator.totalTime\))\(\triangleright\) sort is an ordering method
13:if\(T_{o}\
eq\Phi\)then
14:return\(T_{o}[0]\)
15:else
16:TaskScheduling(\(d\))
17:endif
18:endfunction
```  
**Algorithm 1** Load-balancing method of distribution according to work. Algorithm 2 gives a simple quality-decision algorithm. When several items required of the workpiece tested are qualified, the workpiece is qualified. As a result, when the workpiece is qualified, it returns to transition \(t_{ok}\), while it returns to transition \(t_{no}\) when unqualified. Among them, \(t_{ok}\) is the branch trend that has been proven to be qualified in the actual process, while \(t_{no}\) is unqualified.