# A Metaheuristic Framework with Experience Reuse for Dynamic Multi-Objective Big Data Optimization
## 3 The Proposed Framework
### Experience Reuse and Parallel Computing
```
1:last problem's features and nearly optimal PS \(\mathbf{f}_{last}\), \(p\), external archive Archive
2:Updated archive \(A\)
3:if\(Archive=\emptyset\)then
4:Add\(((\mathbf{f}_{last},\,p,\,iteration=0,\,trial=0))\)
5:else
6:forall\((\mathbf{f}_{i},\,p_{i})\in\,Archive\)do
7:\(s_{i}=DTW(\mathbf{f}_{i},\,\mathbf{f}_{last})\)
8:endfor
9:if all\(s_{i}\geq MinimumSimilarity\)then
10:if\(Archive.size()<fixedSize\)then
11:Add\(((\mathbf{f}_{last},p,iteration=0,trial=0))\)
12:else
13:\(RS=\emptyset\)
14:forall\((\mathbf{f}_{i},\,p_{i},\,iteration_{i},\,trial_{i})\in\,Archive\)do
15:if\(iteration_{i}>PreDefinedNumber\)then
16:if\(trial_{i}<MinimumTrialNumber\)then
17:\(RS=RS\cup(\mathbf{f}_{i},\,p_{i},\,iteration_{i},\,trial_{i})\)
18:endif
19:endif
20:endif
21:if\(RS=\emptyset\)then
22: Do not update the archive
23:else
24: Select the quaternion with the smallest trial value from \(RS\), and mark its index as \(m\)
25:\(\mathbf{Remove}((\mathbf{f}_{in},p_{in},iteration_{m},\,trial_{m}))\)
26:Add\(((\mathbf{f}_{last},p,\,iteration=0,trial=0))\)
27:endif
28:endif
29:else
30: Mark the index of minimal \(s_{i}\) value as \(idx\)
31:if\(HV(p)>HV(p_{idx})\)then
32:\(\mathbf{Remove}((\mathbf{f}_{idx},\,p_{idx},\,iteration_{idx},\,trial_{ idx}))\)
33:\(\mathbf{Add}((\mathbf{f}_{last},p,\,iteration=0,trial=0))\)
34:endif
35:endif
36:endif
37:\(A=Archive\)
38:return\(A\)
```  
**Algorithm 1** UpdateArchive: update the external archive  
The experience reuse method mainly helps to reconstruct the initial population after an algorithm restart. As shown in Algorithm 2, the time series data features of the current problem, the features of the previous problem, and the approximate optimal PS of the previous problem are input. The archive is first updated with information on the previous problem. The DTW algorithm is used to calculate the similarity between features of the current problem and all features in the archive, and then the _iteration_ attribute of all the archived records involved in the similarity calculation is increased by one. Then, the record with the smallest similarity is selected from the archive, and if the similarity is less than the threshold \(MinimumSimilarity\), the new problem is considered to be the same problem as the selected one, and \(\zeta\%\) of the individuals in the selected PS will be replaced with randomly generated individuals. The purpose of incorporating this strategy in the experience reuse method is to ensure the diversity of the population after initializing the population using historical PS for the same problem, avoiding getting trapped in local optima, and trying to obtain better solutions while improving the computational speed. If there are no records in the archive with a problem similarity less than the threshold \(MinimumSimilarity\), there is no problem identical to the new problem in the archive, so the PS of the problem most similar to the new one is used directly as the initial population. Since the selected problem is the most similar to the new problem but the two are not the same problem, directly using the selected PS as the initial population can serve the same purpose of maintaining population diversity as the random replacement of individuals strategy.