Skip to main content
. 2023 Jan 26;23(3):1384. doi: 10.3390/s23031384
Algorithm 1: Trust-Aware Task Scheduling Algorithm (TAFFA) in Cloud Computing Using Firefly Optimization Algorithm.
Input: set of mt=m1,m2,m3,….mt tasks, set of VMs nv=n1,n2,n3,…nv, set of hosts hoq=ho1,ho2,ho3…hoq set of datacenters dp=d1,d2,d3,…dp.
Output: generates schedules using TAFFA while minimizing makespan, improving AV(n_v), SR(n_v), TE(n_v).
Start.
Initialize random firefly population.
Calculate priorities of incoming tasks using Equation (6).
Calculate priorities of VMs using Equation (7).
Evaluate fitness function in Equation (17).
for every firefly do
calculate intensity using Equations (19) and (20).
Calculate distance and movement of fireflies using Equation (21) and Equation (22).
If a firefly has more brightness then
calculate mamt, AVnv, SRnv, TEnv using Equations (8)–(10) and (15),
respectively.
Return best solutions
else
repeat the same procedure until best solution arrived for all iterations.
End if
Stop.