# A Novel Genetic Algorithm for the Synthetical Sensor-Weapon-Target Assignment Problem
## 3 Description of the Proposed Method
### Repair Operations
#### 3.4.2 R-WTA Operation  
In the S-WTA problem, if the targets are detected and tracked by sensors, the weapons can be launched to attack the target. Therefore, after the R-STA operation has been performed, the R-WTA operation should be implemented to ensure that the weapons are appropriately assigned. The flow chart of the proposed R-WTA operation is shown in Figure 10.  
In order to further illustrate the implementation process of the algorithm, the pseudocode of R-WTA operation is given in Algorithm 3. In this algorithm, most of the procedures are similar to the R-STA operation. However, as the sensors are assigned first, the effect of STA should be fully considered in R-WTA operation. According to the actual situation of S-WTA problem, only the target that has been detected and tracked by sensors can be attacked by weapons. Therefore, in the R-WTA operation, the weapons must be assigned to a target with sensor cost greater than zero. In step 3, in addition to determining whether the current WTA scheme satisfies the last constraint in model (6), it is also necessary to determine whether the target of the assigned weapons has been allocated any sensors. In step 4, the available target means that the weapon cost of this target is no more than the maximum weapon cost and this target has been assigned any sensors. Similarly, in step 5, the weapons assigned to the unavailable targets are selected to be repaired. Step 7 to step 19 have a similar structure to step 6 to step 18 in R-STA operation. With these steps, the optimal weapon-target pair is determined. It should be noted that in the R-WTA operation, the prior knowledge in Rule 2 is used to enhance the efficiency of the repair operation.  
```
0: The chromosome in which the R-STA operation has been performed is \(\{c^{\prime}_{1},\cdots,c^{\prime}_{M},c_{M+1},\cdots,\)\(c_{M+W}\}\). The matrix of the probability of destroying the targets by the weapons is \(P=(p_{jk})_{W\times N}\). The maximum weapon cost for target \(\{t_{1},\cdots,t_{k},\cdots,t_{N}\}\) are \(\{m^{\prime}_{1},\cdots,m^{\prime}_{k},\cdots,m^{\prime}_{N}\}\). The threat value of each target is \(\{v_{1},\cdots,v_{k},\cdots,v_{N}\}\).
0: The repaired chromosome \(\{c^{\prime}_{1},\cdots,c^{\prime}_{M},c^{\prime}_{M+1},\cdots,c^{\prime}_{M+ W}\}\).
1: Calculate the weapon cost for target \(T=\{t_{1},\cdots,t_{k},\cdots,t_{N}\}\) as \(\{m_{1},\cdots,m_{k},\cdots,m_{N}\}\).
2: Calculate the sensor cost for target \(T=\{t_{1},\cdots,t_{k},\cdots,t_{N}\}\) as \(\{n_{1},\cdots,n_{k},\cdots,n_{N}\}\).
3:while (\(\exists m_{i}>m^{\prime}_{i}\)) or (\(\exists m_{i}>0\) and \(n_{i}=0\)) do
4: Find the available targets as \(T_{a}=\{t_{a}|m^{\prime}_{a}-m_{a}>0\) and \(n_{a}>0,t_{a}\in T\}\).
5: Find the weapons which need to be repaired as \(W_{a}=\{w_{a}|(m^{\prime}_{a}-m_{a}<0)\) or \((n_{a}=0\) and \(m_{a}>0)\}\).
6: Randomly select a sensor in \(W_{a}\) as \(w_{r}\).
7:if\(T_{a}\
eq\emptyset\)then
8:for each \(t_{a}\) in \(T_{a}\)do
9:for each weapon \(w\) which is assigned to \(t_{a}\)do
10:\(v_{a}=v_{a}\cdot(1-(p_{wt_{a}}+\sigma_{t_{a}}))\)
11:endfor
12:\(v_{ar}=v_{a}\cdot(1-(p_{wt_{a}}+\sigma_{t_{a}}))\)
13:\(e_{a}=v_{a}-v_{ar}\)
14:endfor
15: Find the target \(t_{b}\) in \(T_{a}\) for which the corresponding \(e_{b}\) is the largest.
16:\(c^{\prime}_{w_{r}}=t_{b}\)
17:else
18:\(c^{\prime}_{w_{r}}=0\)
19:endif
20:end
21:end
```  
**Algorithm 3** R-WTA operation  
Figure 10: The flow chart of the R-WTA operation.