## 4 Methodology
```
1:Domain \(\mathfrak{X}\), objective function \(f\), heuristic collections \(H_{PF},H_{SV}\subset\mathfrak{H}\) (cf. Table 2), initialiser \(h_{i}\), performance \(Q(\vec{h}|\mathfrak{X},f)\), and population size \(N\). Additional parameters: \(\Theta_{0}\), \(\Theta_{\min}\), and \(\delta\). 2:Best heuristic sequence \(\vec{h}_{*}\)
3:\(\vec{h}\leftarrow\textsc{ChooseRandomly}(H_{PF},\,P_{H_{PF}})\)\(\triangleright\)\(P_{H_{PF}}(h)\) is the probability distribution of \(H_{PF}\)
4:for\(r=\{1,\ldots,N_{r}\}\)do\(\triangleright\) Repeat the subsequent evaluations \(N_{r}\) times
5:\(X_{*}\
i\vec{x}_{r,*}\leftarrow\textsc{EvaluateMH}(\vec{h})\)\(\triangleright\) Evaluate and record the candidate sequence
6:endfor
7:\(\mathrm{perf}(\vec{h})\leftarrow\mathcal{Q}(\vec{h}|\mathfrak{X},f)\) via Equation (5)\(\triangleright\) Estimate the performance metric
8:\(\vec{h}_{*}\leftarrow\vec{h}\)\(\triangleright\) Initialise the best heuristic sequence
9:\(s\gets 0\), and \(\Theta\leftarrow\Theta_{0}\)\(\triangleright\) Initialise the step counter and temperature
10:while\((\Theta>\Theta_{\min})\) and \((s\leq s_{\max})\)do
11:\(a\leftarrow\textsc{ChooseAction}(H_{SV},a\,,\sigma)\)\(\triangleright\) Choose an action at random from the action set \(a\in H_{SV}\)
12:\(\vec{h}_{c}\gets a\{\vec{h}\}\)\(\triangleright\) Obtain a neighbour sequence \(\vec{h}_{c}\) by applying \(a\) to \(\vec{h}\)
13:for\(r=\{1,\ldots,N_{r}\}\)do\(\triangleright\) Repeat the subsequent evaluations \(N_{r}\) times
14:\(X_{*}\
i\vec{x}_{r,*}\leftarrow\textsc{EvaluateSequence}(\vec{h}_{c})\)\(\triangleright\) Evaluate and record the candidate sequence
15:endfor
16:\(\mathrm{perf}(\vec{h}_{c})\gets Q(\vec{h}_{c}|\mathfrak{X},f)\) via Equation (5)\(\triangleright\) Estimate the performance metric
17:if\(\mathcal{U}(0,1)\leq\exp(-(\mathrm{perf}(\vec{h}_{c})-\mathrm{perf}(\vec{h}_{c}))/\Theta)\)then\(\triangleright\) Apply Metropolis selection
18:\(\vec{h},\mathrm{perf}(\vec{h})\leftarrow\vec{h}_{c},\mathrm{perf}(\vec{h}_{c})\)
19:endif
20:if\(\mathrm{perf}(\vec{h}_{c})<\mathrm{perf}(\vec{h}_{*})\)then\(\triangleright\) Apply Greedy selection
21:\(\vec{h}_{*},\mathrm{perf}(\vec{h}_{*})\leftarrow\vec{h}_{c},\mathrm{perf}( \vec{h}_{c})\), and \(s\gets 0\)
22:else
23:\(s\gets s+1\)
24:endif
25:\(\Theta\leftarrow\Theta(1-\delta)\)\(\triangleright\) Decrease the temperature
26:endwhile
27:procedureEvaluateSequence(\(\vec{h}\))\(\triangleright\) Apply the composition: \((h_{\varnothing}\circ\cdots\circ h_{1}\circ h_{i})\{\mathfrak{X}\}\)
28:\(t\gets 0\)
29:\(X(t)\
i\vec{x}_{n}(t)\gets h_{i}\{\mathfrak{X}\},\forall\ n\in\{1,\ldots,N\}\)\(\triangleright\) Initialise the population
30:\(F(t)\
i f_{n}(t)\gets f(\vec{x}_{n}(t)),\ \forall\ n\in\{1,\ldots,N\}\)\(\triangleright\) Evaluate the population
31:\(\vec{x}_{*}(t)\leftarrow\vec{x}_{k}(t)\) since \(k=\mathrm{arginf}\{F(t)\}\)\(\triangleright\) Find the best global position by Direct selection
32:for\(t=\{1,\ldots,\varnothing\}\)do\(\triangleright\)\(t_{\max}=\varnothing=\vec{w}\vec{h}\)
33:\(h_{p,t},h_{s,t}\gets h_{t}\in\vec{h}\)\(\triangleright\) Read the perturbator and selector from the \(t\)-th search operator
34:\(X(t),F(t)\gets h_{p,t}\{X(t)\}\)\(\triangleright\) Apply the \(t\)-th perturbator
35:\(\vec{x}_{*}(t)\gets h_{s,t}\{X(t)\}\)\(\triangleright\) Update the best global position using the \(t\)-th selector
36:endfor
37:return\(\vec{x}_{*}(t)\)
38:endprocedure
```  
**Pseudocode 1** Hyper-heuristic based on Simulated Annealing (SAHH)  
```
1:Domain \(\mathfrak{X}\), objective function \(f\), heuristic collections \(H_{PF},H_{SV}\subset\mathfrak{H}\) (cf. Table 2), initialiser \(h_{i}\), performance \(Q(\vec{h}|\mathfrak{X},f)\), and population size \(N\). Additional parameters: \(\Theta_{0}\), \(\Theta_{\min}\), and \(\delta\).