## 5 The Reconfiguration-Dependency Consistent Algorithm Based on Simulated Annealing (RDC-SA)  
In order to reduce the time complexity of judging the feasibility of the solution, we develop a new algorithm in this section. Different from the RDNC-SA, the insertion location is related to the data dependency in DAG. Therefore, we call it the reconfiguration-dependency consistent algorithm. The RDC-SA does not have to make a feasible judgement, thus reducing the computation cost. In the following, we introduce this algorithm in detail.  
During generating the neighborhood set, RDC-SA follows the data dependency of the DAG while constructing the location where task \(n_{d}\) is going to be inserted. The candidate location set is comprised of a series of well-ordered ROVs, whose left value is the maximum ROV of the set of parents of \(n_{d}\), and the right value is the minimum ROV of the set of children of \(n_{d}\), which guarantees \(\mathbf{O}\) to be a positive order and avoids the occurrence of infeasible solutions.  
RDC-SA can ensure the reconfiguration phase of \(\mathbf{PN_{d}}\) can be carried out before \(n_{d}\) itself, and \(\mathbf{CN_{d}}\) reconfiguration phase can be performed after \(n_{d}\). Hence, in the phase of execution, all tasks can obtain data from the parent tasks before execution. Then, it still needs to judge the resource conflicting condition and decide whether we need to calculate the SL. After disturbing all insertion regions for each insertion location, the next step is module merging which method is the same as before. The new reconfiguration node will be inserted into each insertion region. And we also have to judge the resource constraint to determine whether to calculate the SL. Algorithm pseudo code is presented in Algorithm 3.  
```
1:for each insertLocation do
2:for each insertRegion do
3: Disturb(\(n_{d}\),insertLocation, insertRegion, \(\mathbf{O}\), \(\mathbf{PR}\)).
4:resFeasibility = JudgeResFeasibility(\(n_{d}\), \(\mathbf{O}\), \(\mathbf{PR}\)).
5:ifresFeasibility == True then
6: Calculate scheduling Length.
7: Preserve insertLocation and insertRegion.
8:endif
9:endfor
10: ModuleMerge(\(n_{d}\), \(\mathbf{O}\), \(\mathbf{PR}\))
11:for each insertRegion do
12: Disturb(\(n_{d}\),insertLocation, insertRegion, \(\mathbf{O}\), \(\mathbf{PR}\)).
13:resFeasibility = JudgeResFeasibility(\(n_{d}\), \(\mathbf{O}\), \(\mathbf{PR}\)).
14:ifresFeasibility == True then
15: Calculate scheduling Length.
16: Preserve insertLocation and insertRegion.
17:endif
18:endfor
19:endfor
```  
**Algorithm 3** Reconfiguration-dependency consistent algorithm based on simulated annealing (RDC-SA)  
Compared with RDNC-SA, the key advantage of RDC-SA exists in solving time. The RDC-SA algorithm is advantageous over RDNC-SA due to its respect to the data dependency while constructing the reconfiguration order. All individuals of the RDC-SA solution space are execution-feasible solution. However, RDNC-SA encounters lots of infeasible solutions about execution when searching the solution space. Hence, RDNC-SA has a larger solution space to search. Therefore, RDNC-SA has to judge the feasibility of all found solutions at the cost of solving time.