This paper introduced a new cat swarm optimization for a data IoT cloud job scheduling mechanism. This study applied the cat swarm optimization mechanism to optimize the allocation of submitted IoT cloud jobs to suitable IoT cloud provider resources.
The cat swarm optimization method is a type of swarm intelligence metaheuristic optimization technique that takes inspiration from the behaviour of cats. Cats spend their lives in two modes: resting and hunting. During the resting mode, cats observe their surroundings and move towards the best position they detect. Once the best position is found, they switch to hunting mode, rapidly chasing after prey or any moving object. Thus, the cat swarm optimization metaheuristics method is composed of two modes inspired by the natural behaviour of cats, as mentioned previously. These modes are the seeking mode (SM), which occurs when the cat is at rest and observing its surroundings, and the tracing mode (TM), which happens when the cat is actively chasing its prey by following its velocity [
33,
34]. To integrate these two modes in the CSO algorithm, a mixture ratio (MR) was defined. Each cat in the algorithm is characterized by its position, velocity, and a flag that specifies the mode it is in [
14,
35,
36]. The seeking and tracing modes are further explained in the following subsections.
3.2. Tracing Mode
The tracing mode in cat swarm optimization imitates the cat’s natural behaviour of tracing targets and searching for food. This mode is related to the local search technique used in the optimization process. When a cat enters the tracing mode, it moves based on its local velocity [
37].
In the cat swarm optimization method for I task scheduling, each cat represents a job scheduling solution that allocates the jobs’ openjobs . Each element within the cat’s population vector represents a randomly generated number between 1 and s, where:
s represents the number of resources.
n represents the number of cats.
k represents the number of jobs and serves as the length of each cat in the population.
As depicted in
Figure 2, the suggested cat swarm optimization (CSO) approach for the IoT cloud task scheduling begins with IoT devices generating tasks. These tasks encompass extensive data collected from IoT sensors and actuators. Subsequently, these tasks originating from IoT devices are submitted to the IoT cloud scheduling system. Within this framework, the IoT cloud scheduler employs the proposed CSO mechanism to seek out the most advantageous schedule within the solution search space. Once the optimal solution is derived through the proposed algorithm, it is transmitted to the cloud server to facilitate the efficient scheduling of incoming tasks.
This paper identified data IoT cloud providers’ resources as a vector that stores the speed of each resource . Furthermore, the clients’ jobs are presented as a vector for integer numbers; each number represents the length of the job openjob . The proposed mechanism assigns the initial velocity Vi, equal values for each cat. The next step is the calculation of the fitness values for each cat.
The fitness values are computed by dividing each job length by the speed of the resource it is assigned to, as indicated by the jobs and resources vectors. The algorithm then finds the division values’ summation and obtains the highest fitness representing the best position. As the cats in tracing mode move to these positions, these values are kept in position. The cat with the highest fitness may move randomly or remain in place. The cats in the solution population are divided into two modes: seeking mode () and tracing mode ().
This division process is performed by assigning a random value for each cat, either 0 or 1, as a vector . Distributing cats into seeking mode if a cat has a flag equal to 0 and cats in tracing mode have a flag value equal to 1. In the seeking mode, the proposed mechanism assigns , , , and values. is the number of candidate points. is a Boolean variable to determine whether the position of cat k is within the candidate points; if so, the value of is true; otherwise, it is false. is the number of dimensions, which varies for each candidate’s points. is the value that controls the dimensions change of the candidate points.
The following steps are taken to create j copies of the current position of cat k:
j is equal to SMP, where SMP is the number of copies.
If the value of SPC (a Boolean value indicating whether to consider the current position as a candidate) is true, then j is set to (SMP – 1).
The current position is returned as one of the candidates.
For each copy, the values are randomly increased or decreased by SRD percent (as specified by CDC, the parameter for controlling the degree of randomness), and the old values are replaced.
Then, the algorithm calculates the fitness function F(
) for all candidate points. If all finesses are not precisely equal, the algorithm selects the maximum and minimum fitness and then calculates each solution point’s choosing probability using Equation (1). Then, the algorithm assigns each cat’s determined probabilities as equal to 1.
where
is the maximum fitness.
The next step in the proposed mechanism is to randomly select one of the candidate points and use it to update the position of cat k.
In tracing mode, the velocity of each cat is updated using Equation (2)
where xbest, j represents the position of the cat with the highest fitness value. Xij represents the position of cat n, c1 represents a constant, and r1 is a random value between 0 and 1.
Then, the algorithms check whether the new velocity is beyond the range of the speed limit. If so, the algorithm changes it to equal the velocity limit. Otherwise, the algorithm keeps the new velocity. Finally, the algorithm updates the position using Equation (3):
3.4. The Proposed Modified CSO for IoT Data Cloud Job Scheduling
- i.
Scenario Introduction:
We present the following scenario to illustrate the functionality of the proposed cat swarm optimization (CSO) intelligence in the context of job scheduling within cloud computing.
- ii.
Resource Speed and Job Length Tables:
Assume a scenario with 10 jobs and 5 available resources, with job lengths and resource speeds detailed in
Table 1 and
Table 2, respectively.
- iii.
Allocation of Jobs to Resources:
Table 3 defines the allocation of jobs to available resources in vectors. Each vector represents a valid solution or “cat.” The five vectors constitute the CSO population. The allocation of jobs to resources is described in Equation (4).
- iv.
Fitness Calculation:
Calculate the fitness for each cat in
Table 4, where the fitness values are determined based on the job-to-resource allocations, aiming to minimize the execution time. The fitness of cats is described in Equation (5):
cat5 has the highest fitness value of 0.0387.
Table 4.
The simulation results for ten iterations in the first scenario.
Table 4.
The simulation results for ten iterations in the first scenario.
Iteration | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|
Execution Times | 421 | 294 | 275 | 266 | 255 | 242 | 242 | 234 | 234 | 234 |
- v.
Mode Assignment (Seeking and Tracing):
Divide the cats into two modes, namely the seeking mode (
) and tracing mode (
), by assigning a random flag (0 or 1) to each cat. An example flag assignment:
and
are assigned flag = 1, indicating that they are in tracing mod.
,
, and
are assigned flag = 0, signifying they are in seeking mode. This indicaes the number of candidate points needs to be created from each cat. Generate copies of each cat based on
to introduce candidate points, for instance, create copies of
cat3 as described in Equation (6).
Then, randomly modify the dimensions of the candidate points by setting
(change dimensions count) to 2 and setting
(random value range) set to 2. Randomly select some dimensions to change their values, according to
. Randomly add plus or minus one to
to change the dimensions. The new position of each copy as stated in Equation (7).
The next step is to calculate the fitness for each copy. The fitness of copy1 is 0.0293, and the fitness of copy 2 is 0.0305.
Determine the maximum and minimum fitness among the copies. The maximum fitness is 0.0305 and the minimum fitness is 0.02931.
- vi.
Probability Calculation:
Given the differing fitness values among the copies, calculate the probabilities for each copy. Probabilities are calculated based on fitness disparities, with higher fitness copies receiving higher probabilities. Example:
copy1 has a probability of 1.0, while
copy2 has a probability of 0.0. The maximum probability (1.0) designates
cat3 moving to
copy1, adopting its position. The new position of
cat3 is described in Equation (8).
Similarly, this process continues for each cat in seeking mode.
- vii.
Tracing Mode (TM):
In
, update the velocity and position for each cat. The velocity and position updates are executed according to the CSO algorithm, incorporating constants (c1 and r1) and random values. The new position of
cat1 and
cat2 is described in Equation (9).
The new population of cats is described in Equation (10).
- viii.
Iteration and best solution selection:
The process iterates for a predefined number of iterations or until a specified fitness value is achieved. In each iteration, cats switch between modes, create candidate points, update positions, and strive to optimize fitness. At the end of iterations, the best cat is selected based on the highest fitness, representing the optimized job scheduling solution.
- ix.
Population Update:
The final population consists of the cats generated in the last iteration, reflecting the optimized job scheduling configuration. This process repeats for a specified number of iterations or until a predefined fitness threshold is reached, ultimately selecting the best job scheduling solution based on the CSO algorithm’s principles.