## 4 Multi-Objective Hybrid Resource Consolidation Algorithm
### Hybrid Flower Pollination Resource Consolidation Algorithm
#### 4.2.5 Implementation of Hybrid Resource Consolidation Algorithm  
The proposed MOH-FPRC algorithm for the Cloud data center resource consolidation is presented as Algorithm 3 with the flowchart of the algorithm shown in Figure 4. The shapes represented with a white background indicate the existing algorithm, while the colors and dark gray indicate the improved part of the algorithm which enhances it. The MOH-FPRC algorithm used the DC and migration strategies to improve the resource management of the Cloud data center, satisfying conflicting objectives that are simultaneously optimized. The DC strategy creates clusters that map VM requests based on their application requirement. The multi-objective FPA optimizes the number of active PMs by finding a migration plan with a fewer number of VMs and initializing the best global migration plan at the global search space. The solution iterates to generate a new solution of flowers and switches to the local search using the switching probability. Each flower pollen at the local search chooses a solution appropriate to the cluster. If the solutions cannot be handled by the cluster, then the impact of the migration is computed based on SLA constraint. This step ensures that only high-quality solutions remain. The MOH-FPRC iterates until the stopping criterion is met and returns the best consolidation plan with lower migration and SLA violation. ```
0: Set of population of \(n\) flowers/pollen gametes with random solutions
0: Find the best solution \(g*\) in the initial population
0: Define a switch probability \(P=0.6-1.0\)\(X\)\(\frac{(Max_{\text{initial}}-t)}{Max_{\text{initial}}}\)
1: Initialize: use Algorithm 1 // Resource are clustered into CPU, memory, storage
2: Each Cluster is a single resource demand
3: VMs are classified based on requirement
4: Input: PM list, VM, set of parameters
5: Migration Strategy: use Algorithm 2 // Resource and SLA violation constraint
6: Output: Consolidation
7: Objective Min \(\left(R^{c}=\Phi\Big{(}1-\text{conflict}_{B}\Big{)}+\Omega\text{EU}(\text{t}) _{\text{Bj}}+\Psi\)\(SVM_{Bj}\right)\)//Equation (5)
8: Initialize: a population of \(n\) flowers/pollen gametes with random solutions
9: Find the best solution \(g*\) in the initial population
10: Define a switch probability \(P\)
11: While (\(t<MaxGeneration\))
12: For\(i=1:n\) (all \(n\) flowers in the population)
13: If\(rand<p\),
14: Draw a (\(d-dimentional\)) step vector \(L\) which obeys a Levy distribution
15: Global pollination via \(X_{i}^{t}=X_{i}^{t}+L\)\(\left(g*-X_{i}^{t}\right)\)
16: Else
17: Draw \(\in\) from a uniform distribution in \([0,\,1]\)
18: Randomly choose \(j\) and \(k\) among all the solutions
19: Do local pollination via \(X_{i+1,G}=\\ X_{i,G}+\varnothing\)\(\left(X_{n-best,G}\right)+\)\(\theta\)\(\left(X_{p,G}-\)\(X_{q,G}\right)\) where \(\varnothing=\theta=\in\);
20:endif Evaluate new solutions
21: If new solutions are better, update them in the population
22:endfor
23: Find the current best solution \(g*\)
24: End while
25: Termination criteria: If the stopping criterion is satisfied, then output the content of archive as the optimal solutions otherwise Move to line 8. ## 5 Performance Evaluation

Extensive simulation experiments were carried out in MultiRecCloudSim with the IntelliJ IDEA release version 3.4 to evaluate the performance of the MOH-FPRC algorithm. The general description of the simulation setup is presented in Table 1. The use of the DC and _VM_ migration strategies in the proposed algorithm provide global optimum solutions for allocating VMs to PMs, minimizing the data center energy consumption. The proposed algorithm is different from other existing approaches in the way that it selects and migrates VMs by considering not only CPU as a metric but also the considered storage and memory. Therefore, the strategy used in the proposed algorithm of selecting the destination PM based on DC with a minimum number of _VM_ migrations in this research is more energy-efficient than the existing approaches.