# An Improved Whale Optimization Algorithm for Web Service Composition

^{1}

^{2}

## Abstract

**:**

## 1. Introduction

^{n}possible solutions (WSs combination), where the WSC is proven to be NP-hard [3]. A representative model of the WSC problem is described in Figure 1. The four QoS constraints adopted in this work are Response Time (RT), Cost (C), Reliability (R), and Throughput (T). These QoS constraints can be aggregated based on the formulas illustrated in Table 1. In the table, i represents the ith task, j represents the jth web service in the same task, and n is the number of tasks.

## 2. Related Work

## 3. Whale Optimization Algorithm (WOA)

## 4. Improved Whale Optimization Algorithm (IWOA)

#### 4.1. Sine Mapping for Initialization

_{n}represents the current solution and cannot be 0.

#### 4.2. Lévy Flight Mechanism

#### 4.3. Neighborhood Search Strategy

## 5. Experiments and Comparative Analysis

#### 5.1. Experimental Settings

#### 5.2. Experimental Results and Analysis

#### 5.2.1. Local Exploitation Validation Experiments

#### 5.2.2. Global Search Validation Experiments

#### 5.2.3. Wilcoxon’s Rank-Sum Test Analysis

## 6. Conclusions and Future Research

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Mirjalili, S.; Lewis, A. The whale optimization algorithm. Adv. Eng. Softw.
**2016**, 95, 51–67. [Google Scholar] [CrossRef] - Podili, P.; Pattanaik, K.K.; Rana, P.S. BAT and hybrid BAT meta-heuristic for quality of service-based web service selection. J. Intell. Syst.
**2017**, 26, 123–137. [Google Scholar] [CrossRef] - Canfora, G.; di Penta, M.; Esposito, R.; Villani, M.L. A lightweight approach for QoS-aware service composition. In Proceedings of the 2nd International Conference on Service Oriented Computing (ICSOC 04), New York, NY, USA, 15–19 November 2004; pp. 1–2. [Google Scholar]
- Akyol, S.; Alatas, B. Plant intelligence based metaheuristic optimization algorithms. Artif. Intell. Rev.
**2017**, 47, 417–462. [Google Scholar] [CrossRef] - Ju, C.; Ding, H.; Hu, B. A Hybrid Strategy Improved Whale Optimization Algorithm for Web Service Composition. Comput. J.
**2021**, bxab187. [Google Scholar] [CrossRef] - Jin, H.; Lv, S.; Yang, Z.; Liu, Y. Eagle strategy using uniform mutation and modified whale optimization algorithm for QoS-aware cloud service composition. Appl. Soft Comput.
**2022**, 114, 108053. [Google Scholar] [CrossRef] - Teng, X.; Luo, Y.; Zheng, T.; Zhang, X. An improved whale optimization algorithm based on aggregation potential energy for qos-driven web service composition. Wirel. Commun. Mob. Comput.
**2022**, 2022, 9741278. [Google Scholar] [CrossRef] - Ye, Y.; Chen, S.; Cheng, K.; Zhang, H. A Web Service composition Method Based on Improved Whale Optimization Algorithm. In Proceedings of the 2022 IEEE 12th International Conference on Electronics Information and Emergency Communication (ICEIEC), Beijing, China, 15–17 July 2022; pp. 85–88. [Google Scholar]
- Seghir, F. FDMOABC: Fuzzy discrete multi-objective artificial bee colony approach for solving the non-deterministic QoS-driven web service composition problem. Expert Syst. Appl.
**2021**, 167, 114413. [Google Scholar] [CrossRef] - Zhang, S.; Shao, Y.; Zhou, L. Optimized artificial bee colony algorithm for web service composition problem. Int. J. Mach. Learn. Comput.
**2021**, 11, 327–332. [Google Scholar] [CrossRef] - Dahan, F.; El Hindi, K.; Ghoneim, A. Enhanced artificial bee colony algorithm for QoS-aware web service selection problem. Computing
**2017**, 99, 507–517. [Google Scholar] [CrossRef] - Dahan, F.; Mathkour, H.; Arafah, M. Two-step artificial bee colony algorithm enhancement for QoS-aware Web service selection problem. IEEE Access
**2019**, 7, 21787–21794. [Google Scholar] [CrossRef] - Seghir, F.; Khababa, A.; Semchedine, F. An interval-based multi-objective artificial bee colony algorithm for solving the web service composition under uncertain QoS. J. Supercomput.
**2019**, 75, 5622–5666. [Google Scholar] [CrossRef] - Arunachalam, N.; Amuthan, A. Integrated probability multi-search and solution acceptance rule-based artificial bee colony optimization scheme for web service composition. Nat. Comput.
**2021**, 20, 23–38. [Google Scholar] [CrossRef] - Chandra, M.; Niyogi, R. Web service selection using modified artificial bee colony algorithm. IEEE Access
**2019**, 7, 88673–88684. [Google Scholar] [CrossRef] - Li, T.; Yin, Y.; Yang, B.; Hou, J.; Zhou, K. A self-learning bee colony and genetic algorithm hybrid for cloud manufacturing services. Computing
**2022**, 104, 1977–2003. [Google Scholar] [CrossRef] - Karthikeyan, P.; Preethi, G. Artificial bee colony and genetic algorithms in selecting and combining web services for enhancing QoS. Des. Eng.
**2021**, 2021, 6009–6021. [Google Scholar] - Dahan, F.; Alwabel, A. Artificial bee colony with cuckoo search for solving service composition. Intell. Autom. Soft Comput.
**2023**, 35, 3385–3402. [Google Scholar] [CrossRef] - Dahan, F. Neighborhood search based improved bat algorithm for web service composition. Comput. Syst. Sci. Eng.
**2023**, 45, 1343–1356. [Google Scholar] [CrossRef] - Kouicem, A.; Khanouche, M.E.; Tari, A. Novel bat algorithm for QoS-aware services composition in large scale internet of things. Clust. Comput.
**2022**, 25, 3683–3697. [Google Scholar] [CrossRef] - El Allali, N.; Fariss, M.; Asaidi, H.; Bellouki, M. A web service composition framework in a heterogeneous environment. J. Ambient. Intell. Humaniz. Comput.
**2022**, 13, 1–25. [Google Scholar] [CrossRef] - Wang, Z. Optimization of resource service composition in cloud manufacture based on improved genetic and ant colony algorithm. Smart Innov. Syst. Technol.
**2022**, 268, 183–198. [Google Scholar] - Dahan, F.; El Hindi, K.; Ghoneim, A.; Alsalman, H. An enhanced ant colony optimization based algorithm to solve QoS-aware web service composition. IEEE Access
**2021**, 9, 34098–34111. [Google Scholar] [CrossRef] - Dahan, F. An effective multi-agent ant colony optimization algorithm for QoS-aware cloud service composition. IEEE Access
**2021**, 9, 17196–17207. [Google Scholar] [CrossRef] - Wang, H.; Ding, Y.; Xu, H. Particle swarm optimization service composition algorithm based on prior knowledge. J. Intell. Manuf.
**2022**, 1–19. [Google Scholar] [CrossRef] - Shirvani, M.H. Bi-objective web service composition problem in multi-cloud environment: A bi-objective time-varying particle swarm optimisation algorithm. J. Exp. Theor. Artif. Intell.
**2021**, 33, 179–202. [Google Scholar] [CrossRef] - Dogani, J.; Khunjush, F. Cloud service composition using genetic algorithm and particle swarm optimization. In Proceedings of the 2021 11th International Conference on Computer Engineering and Knowledge (ICCKE), Mashhad, Iran, 28–29 October 2021; pp. 98–104. [Google Scholar]
- Subbulakshmi, S.; Ramar, K.; Saji, A.E.; Chandran, G. Optimized web service composition using evolutionary computation techniques. In Proceedings of the Intelligent Data Communication Technologies and Internet of Things: Proceedings of ICICI 2020, Coimbatore, India, 27–28 August 2020; Springer: Berlin/Heidelberg, Germany, 2021; pp. 457–470. [Google Scholar]
- Ghobaei-Arani, M.; Rahmanian, A.A.; Aslanpour, M.S.; Dashti, S.E. CSA-WSC: Cuckoo search algorithm for web service composition in cloud environments. Soft Comput.
**2018**, 22, 8353–8378. [Google Scholar] [CrossRef] - Kouchi, S.; Nacer, H. Service selection in cloud computing environment by using cuckoo search. In Proceedings of the International Conference on Information, Communication & Cybersecurity, Khourigba, Morocco, 10–11 November 2021; Springer: Cham, Switzerland, 2021; pp. 219–228. [Google Scholar]
- Wolpert, D.H.; Macready, W.G. No free lunch theorems for optimization. IEEE Trans. Evol. Comput.
**1997**, 1, 67–82. [Google Scholar] [CrossRef] [Green Version] - Yang, W.; Xia, K.; Fan, S.; Wang, L.; Li, T.; Zhang, J.; Feng, Y. A multi-strategy Whale optimization algorithm and its application. Eng. Appl. Artif. Intell.
**2022**, 108, 104558. [Google Scholar] [CrossRef] - Liu, L.; Zhang, R. Multistrategy Improved Whale Optimization Algorithm and Its Application. Comput. Intell. Neurosci.
**2022**, 2022. [Google Scholar] [CrossRef] - Altay, E.V.; Alatas, B. Bird swarm algorithms with chaotic mapping. Artif. Intell. Rev.
**2020**, 53, 1373–1414. [Google Scholar] [CrossRef] - Kaur, A.; Kumar, Y. Neighborhood search based improved bat algorithm for data clustering. Appl. Intell.
**2022**, 52, 10541–10575. [Google Scholar] [CrossRef] - Al-Masri, E.; Mahmoud, Q.H. Discovering the best web service. In Proceedings of the 16th International Conference on World Wide Web, Banff, AB, Canada, 8–12 May 2007; pp. 1257–1258. [Google Scholar]
- Wang, X.; Wang, Z.; Xu, X. An improved artificial bee colony approach to QoS-aware service selection. In Proceedings of the IEEE 20th International Conference on Web Services ICWS, Santa Clara, CA, USA, 28 June–3 July 2013; pp. 395–402. [Google Scholar]
- Li, J.; Ren, H.; Li, C.; Chen, H. A novel and efficient salp swarm algorithm for large-scale QoS-aware service composition selection. Computing
**2022**, 104, 2031–2051. [Google Scholar] [CrossRef]

**Figure 2.**Boxplots for the average fitness value obtained using the compared algorithms for the small-sized datasets.

**Figure 3.**Boxplots for the average fitness value obtained using the compared algorithms for the medium size dataset.

**Figure 4.**Boxplots for the average fitness value obtained using the compared algorithms for the large size dataset.

QoS Criteria | Aggregation Formula |
---|---|

Cost (C) | $\sum _{i=1}^{n}}C(w{s}_{ij})$ |

Response Time (RT) | $\sum _{i=1}^{n}}RT(w{s}_{ij})$ |

Throughput (A) | $\prod _{i=1}^{n}}T(w{s}_{ij})$ |

Reliability (R) | $\prod _{i=1}^{n}}R(w{s}_{ij})$ |

Dataset | Size | No. Tasks | No. WSs/Task |
---|---|---|---|

DS1 | Small | 10 | 100 |

DS2 | 10 | 400 | |

DS3 | 10 | 800 | |

DS4 | 10 | 1000 | |

DS5 | Medium | 30 | 100 |

DS6 | 40 | 100 | |

DS7 | 50 | 100 | |

DS8 | 60 | 100 | |

DS9 | Large | 70 | 100 |

DS10 | 80 | 100 | |

DS11 | 90 | 100 | |

DS12 | 100 | 100 |

**Table 3.**Best fitness values (BFV), standard deviation (STD), and average execution time (AET) values for IWOA compared to other algorithms.

Size | Dataset | Evaluation | WOA | OABC | SABC | MWOA | LEWOA | ABC_CS | IWOA |
---|---|---|---|---|---|---|---|---|---|

Small | DS1 | BFV | 14,034.44 | 14,034.44 | 14,034.44 | 14,034.44 | 14,034.44 | 14,034.44 | 14,034.44 |

STD | 187.97 | 65.18 | 18.93 | 65.18 | 34.49 | 54.90 | 0.00 | ||

AET | 70 | 95 | 94 | 172 | 154 | 87 | 92 | ||

DS2 | BFV | 13,881.90 | 14,528.76 | 14,683.33 | 14,598.99 | 14,822.91 | 14,844.86 | 14,844.86 | |

STD | 195.56 | 194.24 | 137.85 | 218.07 | 114.44 | 151.31 | 54.04 | ||

AET | 100 | 416 | 129 | 380 | 237 | 120 | 129 | ||

DS3 | BFV | 15,102.50 | 15,327.59 | 15,427.52 | 15,225.15 | 15,306.70 | 15,771.44 | 15,769.43 | |

STD | 248.21 | 189.18 | 221.66 | 182.52 | 168.31 | 124.38 | 100.69 | ||

AET | 115 | 721 | 141 | 1380 | 211 | 138 | 145 | ||

DS4 | BFV | 15,015.99 | 15,546.62 | 15,843.82 | 15,714.46 | 16,167.67 | 16,359.07 | 16,652.91 | |

STD | 305.47 | 253.32 | 254.81 | 282.40 | 239.66 | 257.85 | 182.23 | ||

AET | 133 | 857 | 155 | 632 | 225 | 144 | 161 | ||

Medium | DS5 | BFV | 39,549.11 | 40,925.86 | 41,480.35 | 41,579.97 | 41,580.27 | 41,303.38 | 42,244.81 |

STD | 466.95 | 387.99 | 304.97 | 415.87 | 380.29 | 499.45 | 189.24 | ||

AET | 130 | 211 | 295 | 383 | 320 | 163 | 159 | ||

DS6 | BFV | 49,504.53 | 53,542.62 | 53,978.77 | 52,359.56 | 53,629.34 | 53,339.69 | 54,863.24 | |

STD | 567.70 | 769.34 | 499.94 | 600.86 | 323.96 | 703.61 | 247.38 | ||

AET | 175 | 268 | 430 | 484 | 450 | 224 | 220 | ||

DS7 | BFV | 59,404.74 | 62,868.06 | 64,666.89 | 63,090.82 | 64,332.29 | 64,557.35 | 66,334.41 | |

STD | 758.02 | 683.73 | 569.30 | 802.93 | 531.55 | 1218.42 | 460.52 | ||

AET | 293 | 344 | 508 | 652 | 520 | 366 | 352 | ||

DS8 | BFV | 71,031.27 | 75,333.25 | 76,726.71 | 74,787.07 | 77,232.77 | 76,847.28 | 79,246.31 | |

STD | 905.19 | 830.80 | 612.59 | 757.43 | 592.98 | 985.48 | 496.85 | ||

AET | 362 | 371 | 589 | 694 | 602 | 442 | 411 | ||

Large | DS9 | BFV | 82,385.25 | 87,238.51 | 88,628.78 | 86,483.38 | 88,552.77 | 90,320.09 | 91,230.12 |

STD | 1086.45 | 1076.90 | 732.32 | 832.21 | 728.38 | 1198.45 | 545.88 | ||

AET | 442 | 466 | 787 | 808 | 764 | 552 | 508 | ||

DS10 | BFV | 95,166.52 | 100,921.44 | 102,985.17 | 100,920.84 | 103,414.77 | 104,215.63 | 106,334.80 | |

STD | 1200.26 | 977.53 | 921.33 | 1020.61 | 982.57 | 1490.25 | 563.01 | ||

AET | 494 | 560 | 954 | 867 | 798 | 659 | 560 | ||

DS11 | BFV | 103,702.74 | 111,073.19 | 112,471.75 | 110,045.35 | 111,488.06 | 115,029.29 | 115,887.13 | |

STD | 1256.80 | 1156.91 | 996.85 | 1421.54 | 687.06 | 1791.95 | 649.83 | ||

AET | 582 | 632 | 890 | 834 | 1647 | 798 | 678 | ||

DS12 | BFV | 116,861.69 | 122,028.88 | 125,650.03 | 124,063.88 | 126,162.04 | 127,963.65 | 129,768.36 | |

STD | 1744.84 | 1181.03 | 1141.18 | 1846.44 | 1228.71 | 1952.69 | 715.02 | ||

AET | 610 | 641 | 1141 | 921 | 895 | 930 | 790 |

WOA | OABC | SABC | MWOA | LEWOA | ABC_CS | ||
---|---|---|---|---|---|---|---|

Small datasets | − | 4 | 4 | 3 | 4 | 3 | 2 |

+ | 0 | 0 | 0 | 0 | 0 | 1 | |

= | 0 | 0 | 1 | 0 | 1 | 1 | |

Medium datasets | − | 4 | 4 | 4 | 4 | 4 | 4 |

+ | 0 | 0 | 0 | 0 | 0 | 0 | |

= | 0 | 0 | 0 | 0 | 0 | 0 | |

Large datasets | − | 4 | 4 | 4 | 4 | 4 | 4 |

+ | 0 | 0 | 0 | 0 | 0 | 0 | |

= | 0 | 0 | 0 | 0 | 0 | 0 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Dahan, F.
An Improved Whale Optimization Algorithm for Web Service Composition. *Axioms* **2022**, *11*, 725.
https://doi.org/10.3390/axioms11120725

**AMA Style**

Dahan F.
An Improved Whale Optimization Algorithm for Web Service Composition. *Axioms*. 2022; 11(12):725.
https://doi.org/10.3390/axioms11120725

**Chicago/Turabian Style**

Dahan, Fadl.
2022. "An Improved Whale Optimization Algorithm for Web Service Composition" *Axioms* 11, no. 12: 725.
https://doi.org/10.3390/axioms11120725