# A Trusted Real-Time Scheduling Model for Wireless Sensor Networks

Authors: Weizhe Zhang; Boyu Song; Enci Bai
Journal: Journal of Sensors
 (2016)

---

## Abstract

Heterogeneous multicore and multiprocessor systems have been widely used for wireless sensor information processing, but system energy consumption has become an increasingly important issue. To ensure the reliable and safe operation of sensor systems, the task scheduling success rate of heterogeneous platforms should be improved, and energy consumption should be reduced. This work establishes a trusted task scheduling model for wireless sensor networks, proposes an energy consumption model, and adopts the ant colony algorithm and bee colony algorithm for the task scheduling of a real-time sensor node. Experimental result shows that the genetic algorithm and ant colony algorithm can efficiently solve the energy consumption problem in the trusted task scheduling of a wireless sensor and that the performance of the bee colony algorithm is slightly inferior to that of the first two methods.


---

## Body

## 1. Introduction

Energy consumption has become a major problem in wireless sensor networks. Sensor nodes are often equipped with small batteries [1]. Therefore, the reduction of energy consumption to prolong the lifetime of networks is a widespread concern. Wireless sensor networks perform mainly real-time tasks. We thus need to focus on reducing energy consumption under the premise of meeting specified task deadlines.The real-time task scheduling of wireless sensor networks involves forming a mapping relationship between the real-time task scheduling and the processors within the acceptable time scope of the system. The real-time tasks are then assigned to the processors according to the mapping relationship. In this way, the tasks can be executed within the deadline. The mapping relationship should effectively meet time and resource constraints.In the process of establishing time scheduling models, the operating environment of the real-time calculation must be considered because calculation resources consist of different heterogeneous hosts, workstations, and even PCs that are distributed in different locations. These resources can be run in a variety of operating systems, such as UNIX, Linux, and Windows, and the storage media may be large storage devices, databases, or other devices. Therefore, a scheduling model and energy consumption model must be built specifically for heterogeneous platforms.Heterogeneity is mainly reflected in the following aspects.(1) Computer hardware heterogeneity: a server processor that executes calculation operations may be heterogeneous. It may cause considerable differences in energy consumption when processing the same tasks in unit time. (2) Operating system heterogeneity: the heterogeneous components of an operating system are assigned to a particular machine, the sequence of tasks to be executed may be disrupted, and the execution time could either increase or decrease. (3) Heterogeneity of communication network: the topological structure of a network may resemble items such as a bus, ring, and tree, and the communication medium may be a cable, optical fiber, microwave, and so on. Such variance results in different transmission rates and different transmission time periods. Heterogeneity degree can be used to evaluate the degree of difference among heterogeneous computing systems. A large heterogeneity degree is associated with obvious system heterogeneity. Hence, heterogeneity degree can serve as an important reference and basis for selecting task scheduling strategies.Research results [2] indicate that the execution power and response time of different computers vary in the implementation of different computing tasks. For example, when a CPU and GPU execute the same image processing task, their execution power and response time, as well as their total energy consumption for completing the task, will vary. Therefore, as a result of different energy consumption factors, a given task may be completed at different periods and with different levels of energy consumption when different scheduling methods and supply voltages are used. Under such circumstances, the energy consumption problem should be considered when carrying out parallel task scheduling in a real-time computing environment.Several studies have established energy consumption models on the basis of resource utilization rates. Li and John [3] proposed a hardware counter-based linear model to estimate the energy consumption of an operating system. Topcuoglu et al. [4] proposed a simple linear regression model based on CPU utilization rate and hard disk utilization, proved that the model is accurate, and used the model to reduce the energy consumption of the server cluster. By establishing an inquiry table for system power and resource utilization rate, the authors [4] established an energy consumption model for a server system and proposed several methods for applying the model to different systems of the same series. Currently, energy consumption optimization management technologies based on distributed parallel computing systems are divided into three categories: off/sleep technology, dynamic voltage scaling (DVS) technology, and virtualization technology. The off/sleep technology is mainly used to reduce idle energy consumption. The other two technologies are mainly used to reduce the execution power consumption. Execution power consumption is defined as the power consumption generated by the operation of computer hardware driven by commands and data when using a computer to complete a task. The power consumption of the operated hardware in this case is referred to as execution power. In the execution of the same task, the execution power may constantly change under different implementation phases and given different task characteristics [5].In 2010, Wang et al. [6] proposed a scheduling algorithm for energy consumption perception and a method for calculating idle time. The proposed scheduling algorithm considers the method for reducing voltage in the communication process. In 2009, Khan and Ahmad [7] studied task allocation for energy consumption perception and assigned tasks to a computing grid with DVS features. The goal of such task assignment is to reduce energy consumption and response time [8]. In China, Zhu et al. [9] considered the situation in which copying a scheduling algorithm can reduce the waiting time and time delay but increase energy consumption and subsequently proposed a heuristic processor reduction optimizing method. Kwok and Ahmad [10] studied network energy consumption models and algorithm networks from a global perspective, established a systematic optimization model of network energy consumption, proposed a building network system for optimizing energy consumption models, and proposed a network packet routing algorithm for optimizing energy consumption. Lee and Zomaya [11] established the HCS model according to DVS technology and developed the ECS algorithm, which is an innovation of the energy consumption model with good usability [12, 13].The privacy-preserving techniques for WSNs are classified into two for protecting two types of private information: data-oriented and context-oriented privacy [14]. KIPDA [15] is a data-oriented privacy-preserving aggregation method, which can hide a wide range of aggregation functions. Ozdemir et al. present a polynomial regression based data aggregation protocol that preserves the privacy of sensor data [16].The rest of the paper is organized as follows. Section2 introduces the system model and formulates the problem of real-time task scheduling in a heterogeneous wireless sensor network. Section 3 introduces the genetic algorithm and ant colony algorithm, which are adopted to obtain the shortest scheduling length and lowest energy consumption. Section 4 presents a new bee colony algorithm. Section 5 provides an analysis of the performance and results of the proposed algorithms. Section 6 concludes the paper with a summary and details of future research directions.


## 2. System Model

### 2.1. Real-Time Task DAG Model

A real-time parallel task model can be abstracted as a DAG diagramDAG=(T,E,W,D), in which T=t1,t2,…,tn represents the collection of tasks; n indicates the number of tasks; E=eij∣ti,tj∈T⊆T×T denotes the collection of directed edges that describe the dependency relationship between tasks; W=w1,w2,…,wn is the computational quantity collection of tasks, with wi∈W representing the number of clock ticks of task ti in the processor; and D is the communication between tasks dij, with dij∈D representing the duration of communication between the two ends of eij.The earliest starting time of each task in the parallel task map is defined asEst(tentry)=0, Est(ti)=maxtp∈pred(ti)⁡Esttp+Mettp+Actpi, where tentry represents the entry subtask without a precursor node, Met(tp) represents the minimum execution time of task tp, and Actpi represents the communication time between task tp and task ti. The earliest completion time of each task Eft(ti) is defined as Eft(ti)=Est(ti)+Met(ti). Lft(ti) is the latest completion time of task ti, Lft(texit)=D, and Lft(ti)=mintc∈Succ(ti)⁡Lft(tc)-Met(ti)-Actic, where texit denotes the exit subtask without a successor node. The deadline of each task is Lft(ti), which is the latest completion time of task ti.In Figure1, ti in the inner circle represents the serial number of the task node, the digit adjacent to the circle represents the computation amount of the task node, and the digit on the arrow line represents the amount of communication between the two tasks. After processing, the DAG diagram of the parallel task is assumed to have only one entry node and one exit node.Figure 1
Example of DAG task map.


### 2.2. Processor Model

The processor is represented by the symbolP. We assume that each processor P only executes one command within one clock tick and that different processors have different operating speeds. A processor has two properties, namely, processing frequency and corresponding voltage. Let si,j denote the clock rate of task Ti in processor Pj, and let ei,j denote the execution time of task Ti in processor Pj. Then, ei,j=ci/si,j, in which ci represents the calculation amount of the corresponding Ti.The platform (heterogeneous multiprocessor platform, HMP) comprisingm heterogeneous processors is expressed as HMP=P1,P2,…,Pm; m processors have different clock rate-voltage pairs.


### 2.3. Scheduling Model

A scheduling model is represented by a scheduling matrixXn×m. In Xn×m, each element xi,j represents the corresponding relation between task Ti and processor Pj, and xi,j can only be set to 0 or 1, with xi,j=1 indicating that task Ti is assigned to processor Pj and with xi,j=0 indicating that task Ti is not assigned to processor Pj.


### 2.4. Constraint Model

The effect matrix of the task scheduling problem in a heterogeneous processor isUn×m. The element ui,j of Un×m is defined as ui,j=ei,j/pi, which represents the consumed computing ability of Pj when performing Ti. The value of ui,j is a real number within the scope of (0,1)∪+∞. If Ti cannot be operated in Pj, then ui,j can be set to +∞.According to the definition of the effect matrixUn×m, the constraints [17] of task scheduling in the heterogeneous processor are given. The constraints are as follows:(a)
∑j=1mxi,j=1, (i=1,2,3,…,n);(b)
∑i=1nxi,j∗ui,j≤U, (j=1,2,3,…,m), U=1, is the maximum computing amount allowed by each processor;(c)
xi,j is set as 0 or 1 (i=1,2,3,…,n; j=1,2,3,…,m).In (a), each task is fully allocated to the processor. In (b), the total calculation amount of the tasks assigned to each processor is not greater than the maximum allowable amount of calculation. In (c), the task is either assigned or not assigned to a processor.Each specific element value of the scheduling matrix is 0 or 1. Under the restriction of the constraint model, the size of each task is 10 5 × 10 scheduling matrixesX5×10, as shown in Table 1.Table 1
Scheduling matrix exampleX5×10.
T
0
T
1
T
2
T
3
T
4
T
5
T
6
T
7
T
8
T
9
P
0
0
0
1
0
0
1
0
0
0
0
P
1
0
0
0
0
1
0
0
0
1
0
P
2
1
0
0
0
0
0
0
1
0
0
P
3
0
0
0
1
0
0
1
0
0
1
P
4
0
1
0
0
0
0
0
0
0
0In the scheduling matrix ofX5×10, xi,j=1 indicates that task Ti is assigned to processor Pj. To apply the matrix to the swarm intelligence algorithm, the compressed scheduling matrix is 2,4,0,3,1,0,3,2,1,3, the compressed scheduling matrix in the programming application becomes an index, and the task serial number is mapped on the corresponding processor according to the order of the compressed scheduling matrix.


### 2.5. Energy Consumption Model

With the development of processor hardware technology, the CMOS integrated circuit has become the digital circuit of widely used processors. The power consumption of the CMOS integrated circuit mainly consists of dynamic power consumption and internal short-circuit power consumption. As the internal short-circuit power consumption of an ordinary processor is less than 10% of the dynamic power consumption, the internal short-circuit power consumption of a processor is not considered when utilizing a DVS technology-based processor as a research platform to study the scheduling problem and reduce energy consumption. The dynamic power consumption equation [11] of the processor that adopts DVS technology is(1)Pd=ACV2f,where A is the circuit flip frequency, C is the load capacitance, V is the supply power voltage, and f is the clock rate. In digital circuits, voltage V and clock rate f are positively correlated; the formula indicates that supply power voltage is a determining factor of power consumption [11]. As for a given processor, A·C is generally considered a constant, and different supply voltages correspond to different levels of power consumption. When the supply voltage of a computing resource is reduced, the calculating speed and power of the computing resource decrease accordingly.In the present study, the execution time of a single task isei,j=wi/fj, and the scheduling length (makespan) in a single processor is(2)mj=∑k=1pek,j+dk,next,where p is the number of tasks assigned to processor Pj, ek,j represents the execution time assigned to processor Pj, and dk,next is the communication time between the current task and the next task. Thus, the total scheduling length of a task graph is (3)M=max⁡m1,m2,…,mj,…,mm.The total execution power consumption of the scheduling system can be expressed with the following formula:(4)E=∑i=1nACVi2f·wi∗=∑i=1nACVj2fj·wifj=∑i=1nVj2wi,where wi is the corresponding computation amount of each task and j is the symbol indicating that task Ti is assigned to processor Pj.Scheduling success rate is the number of successful scheduling tasks completed within the deadline divided by the total number of tasks. This index is used to evaluate the performance of the real-time task scheduling.


## 2.1. Real-Time Task DAG Model

A real-time parallel task model can be abstracted as a DAG diagramDAG=(T,E,W,D), in which T=t1,t2,…,tn represents the collection of tasks; n indicates the number of tasks; E=eij∣ti,tj∈T⊆T×T denotes the collection of directed edges that describe the dependency relationship between tasks; W=w1,w2,…,wn is the computational quantity collection of tasks, with wi∈W representing the number of clock ticks of task ti in the processor; and D is the communication between tasks dij, with dij∈D representing the duration of communication between the two ends of eij.The earliest starting time of each task in the parallel task map is defined asEst(tentry)=0, Est(ti)=maxtp∈pred(ti)⁡Esttp+Mettp+Actpi, where tentry represents the entry subtask without a precursor node, Met(tp) represents the minimum execution time of task tp, and Actpi represents the communication time between task tp and task ti. The earliest completion time of each task Eft(ti) is defined as Eft(ti)=Est(ti)+Met(ti). Lft(ti) is the latest completion time of task ti, Lft(texit)=D, and Lft(ti)=mintc∈Succ(ti)⁡Lft(tc)-Met(ti)-Actic, where texit denotes the exit subtask without a successor node. The deadline of each task is Lft(ti), which is the latest completion time of task ti.In Figure1, ti in the inner circle represents the serial number of the task node, the digit adjacent to the circle represents the computation amount of the task node, and the digit on the arrow line represents the amount of communication between the two tasks. After processing, the DAG diagram of the parallel task is assumed to have only one entry node and one exit node.Figure 1
Example of DAG task map.


## 2.2. Processor Model

The processor is represented by the symbolP. We assume that each processor P only executes one command within one clock tick and that different processors have different operating speeds. A processor has two properties, namely, processing frequency and corresponding voltage. Let si,j denote the clock rate of task Ti in processor Pj, and let ei,j denote the execution time of task Ti in processor Pj. Then, ei,j=ci/si,j, in which ci represents the calculation amount of the corresponding Ti.The platform (heterogeneous multiprocessor platform, HMP) comprisingm heterogeneous processors is expressed as HMP=P1,P2,…,Pm; m processors have different clock rate-voltage pairs.


## 2.3. Scheduling Model

A scheduling model is represented by a scheduling matrixXn×m. In Xn×m, each element xi,j represents the corresponding relation between task Ti and processor Pj, and xi,j can only be set to 0 or 1, with xi,j=1 indicating that task Ti is assigned to processor Pj and with xi,j=0 indicating that task Ti is not assigned to processor Pj.


## 2.4. Constraint Model

The effect matrix of the task scheduling problem in a heterogeneous processor isUn×m. The element ui,j of Un×m is defined as ui,j=ei,j/pi, which represents the consumed computing ability of Pj when performing Ti. The value of ui,j is a real number within the scope of (0,1)∪+∞. If Ti cannot be operated in Pj, then ui,j can be set to +∞.According to the definition of the effect matrixUn×m, the constraints [17] of task scheduling in the heterogeneous processor are given. The constraints are as follows:(a)
∑j=1mxi,j=1, (i=1,2,3,…,n);(b)
∑i=1nxi,j∗ui,j≤U, (j=1,2,3,…,m), U=1, is the maximum computing amount allowed by each processor;(c)
xi,j is set as 0 or 1 (i=1,2,3,…,n; j=1,2,3,…,m).In (a), each task is fully allocated to the processor. In (b), the total calculation amount of the tasks assigned to each processor is not greater than the maximum allowable amount of calculation. In (c), the task is either assigned or not assigned to a processor.Each specific element value of the scheduling matrix is 0 or 1. Under the restriction of the constraint model, the size of each task is 10 5 × 10 scheduling matrixesX5×10, as shown in Table 1.Table 1
Scheduling matrix exampleX5×10.
T
0
T
1
T
2
T
3
T
4
T
5
T
6
T
7
T
8
T
9
P
0
0
0
1
0
0
1
0
0
0
0
P
1
0
0
0
0
1
0
0
0
1
0
P
2
1
0
0
0
0
0
0
1
0
0
P
3
0
0
0
1
0
0
1
0
0
1
P
4
0
1
0
0
0
0
0
0
0
0In the scheduling matrix ofX5×10, xi,j=1 indicates that task Ti is assigned to processor Pj. To apply the matrix to the swarm intelligence algorithm, the compressed scheduling matrix is 2,4,0,3,1,0,3,2,1,3, the compressed scheduling matrix in the programming application becomes an index, and the task serial number is mapped on the corresponding processor according to the order of the compressed scheduling matrix.


## 2.5. Energy Consumption Model

With the development of processor hardware technology, the CMOS integrated circuit has become the digital circuit of widely used processors. The power consumption of the CMOS integrated circuit mainly consists of dynamic power consumption and internal short-circuit power consumption. As the internal short-circuit power consumption of an ordinary processor is less than 10% of the dynamic power consumption, the internal short-circuit power consumption of a processor is not considered when utilizing a DVS technology-based processor as a research platform to study the scheduling problem and reduce energy consumption. The dynamic power consumption equation [11] of the processor that adopts DVS technology is(1)Pd=ACV2f,where A is the circuit flip frequency, C is the load capacitance, V is the supply power voltage, and f is the clock rate. In digital circuits, voltage V and clock rate f are positively correlated; the formula indicates that supply power voltage is a determining factor of power consumption [11]. As for a given processor, A·C is generally considered a constant, and different supply voltages correspond to different levels of power consumption. When the supply voltage of a computing resource is reduced, the calculating speed and power of the computing resource decrease accordingly.In the present study, the execution time of a single task isei,j=wi/fj, and the scheduling length (makespan) in a single processor is(2)mj=∑k=1pek,j+dk,next,where p is the number of tasks assigned to processor Pj, ek,j represents the execution time assigned to processor Pj, and dk,next is the communication time between the current task and the next task. Thus, the total scheduling length of a task graph is (3)M=max⁡m1,m2,…,mj,…,mm.The total execution power consumption of the scheduling system can be expressed with the following formula:(4)E=∑i=1nACVi2f·wi∗=∑i=1nACVj2fj·wifj=∑i=1nVj2wi,where wi is the corresponding computation amount of each task and j is the symbol indicating that task Ti is assigned to processor Pj.Scheduling success rate is the number of successful scheduling tasks completed within the deadline divided by the total number of tasks. This index is used to evaluate the performance of the real-time task scheduling.


## 3. Ant Colony Scheduling Algorithm

The ant colony algorithm is based on the foraging behavior of ants, especially their means of finding the shortest paths between food sources and their nest. While moving food to their nest, ants leave a pheromone trail on the ground. Ants can smell pheromones. When choosing the path to search for food, they tend to choose the path with the highest concentration of pheromones. Pheromones have a positive feedback effect. When a path is taken by an increasing number of ants, the corresponding pheromone concentration increases. This condition entices the other ants to take such path. Ants follow this pheromone trail to find the shortest path between the food source and their nest.On the basis of this observation, Dorigo et al. first presented ant colony algorithms to resolve difficult combinatorial optimization problems. The present work applies this algorithm to the energy consumption optimization problem.In the actual simulation and application process, the algorithm design should consider the definition of ants, pheromone trail representation, design of pheromone deposition and volatilization, and relevant design of pheromone and path selection.Each ant is defined according to the definition in the compressed scheduling matrix and effect matrix, and each scheduling matrix represents a walking path of ants. However, because pheromones are gradually released, the compressed scheduling matrix cannot be randomly generated and should instead be constantly selected and allocated by ants. According to the effectiveness of the path, the status of ants can be divided into three categories: partial solution, feasible solution, and infeasible solution.Several methods can be used to represent a pheromone trail. In the present work, the pheromone trail is represented by the support rateσ(i,j), which indicates the support rate of task Ti assigned to processor Pj in the ant colony. In the scheduling matrix, the ants move from the upper left corner to the lower right corner; xi,j=1 indicates that the ants pass through the path. The movement of the ants follows the constraints.


### 3.1. Design of Ant Pheromone Deposition and Volatilization Rate

The design of a scheduling algorithm should comply with three objectives, the methods for which should be exactly the same as those used for the calculation of the genetic algorithm but are referred to as optimal solutions in separate representations. First, the maximum information concentration of the ant colony algorithm is defined as(5)δmax=fsbestρ,where sbest is the optimal solution of the current calculation, ρ is the volatilization rate of the pheromones, and f(s) is the corresponding evaluation function of each solution, the definition of which corresponds to the three objectives of this research.The minimum information concentration is defined as(6)δmax=δminω·ln⁡θ+1,where ω is a constant that is greater than or equal to 1 and θ is the number of iterations of the ant colony algorithm (starting from 1).After the assignment of taskTi to processor Pj, the pheromone trail is updated according to the relationship between (Ti,Pj) and sbest. The updating formula is(7)σi,j=1-ρ·σi,j+fsbest,Ti,Pj∈sbest,σi,j=1-ρ·σi,j,Ti,Pj∉sbest.Ifσ(i,j)>δmax, then σ(i,j)=δmax; if σ(i,j)<δmin, then σ(i,j)=δmin to maintain the information concentration within a certain range.


### 3.2. Ant Colony Algorithm Design

The purpose of programming a specific ant colony algorithm is to find feasible solutions for the three objectives of this work and to output corresponding targets to find the optimal path for ants. The ant colony algorithm can be terminated under two conditions:(1) a feasible solution is found and (2) the algorithm execution reaches the maximum number of iterations.The specific process flowchart for designing the ant colony algorithm is shown in Figure2.Figure 2
Flowchart for designing the ant colony algorithm.


## 3.1. Design of Ant Pheromone Deposition and Volatilization Rate

The design of a scheduling algorithm should comply with three objectives, the methods for which should be exactly the same as those used for the calculation of the genetic algorithm but are referred to as optimal solutions in separate representations. First, the maximum information concentration of the ant colony algorithm is defined as(5)δmax=fsbestρ,where sbest is the optimal solution of the current calculation, ρ is the volatilization rate of the pheromones, and f(s) is the corresponding evaluation function of each solution, the definition of which corresponds to the three objectives of this research.The minimum information concentration is defined as(6)δmax=δminω·ln⁡θ+1,where ω is a constant that is greater than or equal to 1 and θ is the number of iterations of the ant colony algorithm (starting from 1).After the assignment of taskTi to processor Pj, the pheromone trail is updated according to the relationship between (Ti,Pj) and sbest. The updating formula is(7)σi,j=1-ρ·σi,j+fsbest,Ti,Pj∈sbest,σi,j=1-ρ·σi,j,Ti,Pj∉sbest.Ifσ(i,j)>δmax, then σ(i,j)=δmax; if σ(i,j)<δmin, then σ(i,j)=δmin to maintain the information concentration within a certain range.


## 3.2. Ant Colony Algorithm Design

The purpose of programming a specific ant colony algorithm is to find feasible solutions for the three objectives of this work and to output corresponding targets to find the optimal path for ants. The ant colony algorithm can be terminated under two conditions:(1) a feasible solution is found and (2) the algorithm execution reaches the maximum number of iterations.The specific process flowchart for designing the ant colony algorithm is shown in Figure2.Figure 2
Flowchart for designing the ant colony algorithm.


## 4. Bee Colony Scheduling Algorithm

The bee colony algorithm is an emerging swarm intelligence algorithm that has been widely used in recent years. It explores the optimal value according to the role assignment and comprises conversion and information exchange methods that bee colonies adopt to search for food. The application methods of the bee colony algorithm and ant colony algorithm are almost the same. However, the bee colony algorithm adopts its own unique calculation formula to find the adaptation value and selection probability of food sources. The following section of this paper introduces the role of ants in the bee colony algorithm according to the implementation process of the bee colony algorithm.The algorithmic frameworks of the bee colony algorithm include the initial period, employed bee period, and scout bee period. In the last two periods of a cycle, employed bees become onlooker bees according to the food sources found until they find the optimal solution or the maximum number of cycles. In the bee colony algorithm, the bees are divided into three categories: employed bees, onlooker bees, and scout bees. Employed bees are related to a particular food source, onlooker bees observe the dance information of employed bees to select the food source, and scout bees randomly search for food. In the initial stage, the scout bees find all the food sources. Then, the employed bees and onlooker bees make use of the food sources. The employed bees that deplete the food sources become scout bees.In the scheduling matrix, when a bee is a scout bee, it randomly searches the path from left to right of the matrix and selects one point in each column untilxi,j=1, which indicates that the task has been assigned. The scout bee then becomes an employed bee. When a bee is transformed into an onlooker bee, it selects employed bees to follow its path according to the selection probability. When a bee is transformed into an employed bee, it repeats the path in the previous round (i.e., a compressed scheduling matrix).


### 4.1. Fitness Value and Selection Probability of the Bee Colony Algorithm

The value of the objective function determines the method for calculating the fitness value of the employed bee period. The definition of the bee colony algorithm takes the positive and negative values of the objective function. However, the values of the objective function proposed in this work are positive. Thus, the fitness function is calculated as(8)fitm=11+fm,where m is a bee and f(m) is the target path value of the bee.In the scout bee period, employed bees are chosen to follow the path. The selection probabilityρm of each employed bee is calculated as(9)ρm=fitm∑i=1SNfiti,where SN is the number of employed bees.


### 4.2. Bee Colony Algorithm Design

The bee colony algorithm program has two termination conditions:(1) a feasible solution is found and (2) the maximum cycle index is reached. During the cycle, onlooker bees choose to follow employed bees according to the selection probability value, which is calculated according to the path of the employed bees. The flowchart is shown in Figure 3.Figure 3
Flowchart of the bee colony algorithm program.


## 4.1. Fitness Value and Selection Probability of the Bee Colony Algorithm

The value of the objective function determines the method for calculating the fitness value of the employed bee period. The definition of the bee colony algorithm takes the positive and negative values of the objective function. However, the values of the objective function proposed in this work are positive. Thus, the fitness function is calculated as(8)fitm=11+fm,where m is a bee and f(m) is the target path value of the bee.In the scout bee period, employed bees are chosen to follow the path. The selection probabilityρm of each employed bee is calculated as(9)ρm=fitm∑i=1SNfiti,where SN is the number of employed bees.


## 4.2. Bee Colony Algorithm Design

The bee colony algorithm program has two termination conditions:(1) a feasible solution is found and (2) the maximum cycle index is reached. During the cycle, onlooker bees choose to follow employed bees according to the selection probability value, which is calculated according to the path of the employed bees. The flowchart is shown in Figure 3.Figure 3
Flowchart of the bee colony algorithm program.


## 5. Experiment

### 5.1. Experiment Test Program Design

As for the three algorithms implemented in the heterogeneous platform, the unity of scheduling tasks and the differences in the parameter setting of each algorithm should be considered, and each algorithm should select the optimal parameters to achieve the best performance. The optimal state of each algorithm should then be used to compare the scheduling efficiencies of different algorithms.The configuration of the experiment platform used in this work is as follows:(1)
operating system: Windows 7 Ultimate,(2)
CPU: Intel® Core™ i3 2.27 GHz,(3)
memory: 2.00 GB.The three tests of the algorithm on the heterogeneous platform are mainly performance tests. Small-scale tasks are adopted in each performance test, and the main reference indicators are the algorithm’s scheduling success rate, scheduling length, and energy consumption. Each test is repeated 10 times. The test results are the average values of each test.The parameters of the three algorithms on the heterogeneous platform are shown in Table2 (genetic algorithm), Table 3 (ant colony algorithm), and Table 4 (bee colony algorithm), separately.Table 2
Experimental parameters of the genetic algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of chromosomes
200
2
Crossover rate
0.8
3
Mutation rate
0.15
4
Maximum number of iterations
1,000Table 3
Experimental parameters of the ant colony algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of ants
10
2
ρ
0.02
3
ω
20.00
4
Maximum number of iterations
1,000Table 4
Experimental parameters of the bee colony algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of bees
10 (twice the number of food sources)
2
Maximum number of iterations
1,000


### 5.2. Experiment Results

The genetic algorithm is taken as a standard to compare the performance of the ant colony algorithm and bee colony algorithm. The test results are shown in Table5, in which the values are the average values of 10 experiments.Table 5
Performance test data.
Task quantity
Genetic algorithm
BCO ant colony
ABC bee colony
10
Scheduling success rate
92.33%
Increase by 9.54%
Increase by 10.22%
Scheduling length
13.125
Decrease by 8.23%
Decrease by 6.14%
Energy consumption
64.024
Decrease by 5.24%
Increase by 5.22%
30
Scheduling success rate
90.35%
Increase by 8.43%
Decrease by 13.65%
Scheduling length
63.254
Decrease by 7.49%
Increase by 19.55%
Energy consumption
322.112
Decrease by 4.32%
Decrease by 5.32%
50
Scheduling success rate
91.67%
Increase by 11.24%
Decrease by 3.25%
Scheduling length
150.763
Decrease by 11.23%
Decrease by 13.22%
Energy consumption
579.245
Decrease by 10.25%
Increase by 6.88%As shown in the table, the ant colony algorithm is superior to the genetic algorithm in terms of achieving the three objectives. As for the bee colony algorithm, the scheduling results indicate its potential use for the combinatorial optimization of task scheduling; however, this algorithm needs to be improved further, or the program needs to be optimized to obtain convincing results. The results shown in the table cannot verify the advantages and disadvantages of the bee colony algorithm in task scheduling.


## 5.1. Experiment Test Program Design

As for the three algorithms implemented in the heterogeneous platform, the unity of scheduling tasks and the differences in the parameter setting of each algorithm should be considered, and each algorithm should select the optimal parameters to achieve the best performance. The optimal state of each algorithm should then be used to compare the scheduling efficiencies of different algorithms.The configuration of the experiment platform used in this work is as follows:(1)
operating system: Windows 7 Ultimate,(2)
CPU: Intel® Core™ i3 2.27 GHz,(3)
memory: 2.00 GB.The three tests of the algorithm on the heterogeneous platform are mainly performance tests. Small-scale tasks are adopted in each performance test, and the main reference indicators are the algorithm’s scheduling success rate, scheduling length, and energy consumption. Each test is repeated 10 times. The test results are the average values of each test.The parameters of the three algorithms on the heterogeneous platform are shown in Table2 (genetic algorithm), Table 3 (ant colony algorithm), and Table 4 (bee colony algorithm), separately.Table 2
Experimental parameters of the genetic algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of chromosomes
200
2
Crossover rate
0.8
3
Mutation rate
0.15
4
Maximum number of iterations
1,000Table 3
Experimental parameters of the ant colony algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of ants
10
2
ρ
0.02
3
ω
20.00
4
Maximum number of iterations
1,000Table 4
Experimental parameters of the bee colony algorithm.
Parameter serial number
Parameter name
Parameter value
1
Number of bees
10 (twice the number of food sources)
2
Maximum number of iterations
1,000


## 5.2. Experiment Results

The genetic algorithm is taken as a standard to compare the performance of the ant colony algorithm and bee colony algorithm. The test results are shown in Table5, in which the values are the average values of 10 experiments.Table 5
Performance test data.
Task quantity
Genetic algorithm
BCO ant colony
ABC bee colony
10
Scheduling success rate
92.33%
Increase by 9.54%
Increase by 10.22%
Scheduling length
13.125
Decrease by 8.23%
Decrease by 6.14%
Energy consumption
64.024
Decrease by 5.24%
Increase by 5.22%
30
Scheduling success rate
90.35%
Increase by 8.43%
Decrease by 13.65%
Scheduling length
63.254
Decrease by 7.49%
Increase by 19.55%
Energy consumption
322.112
Decrease by 4.32%
Decrease by 5.32%
50
Scheduling success rate
91.67%
Increase by 11.24%
Decrease by 3.25%
Scheduling length
150.763
Decrease by 11.23%
Decrease by 13.22%
Energy consumption
579.245
Decrease by 10.25%
Increase by 6.88%As shown in the table, the ant colony algorithm is superior to the genetic algorithm in terms of achieving the three objectives. As for the bee colony algorithm, the scheduling results indicate its potential use for the combinatorial optimization of task scheduling; however, this algorithm needs to be improved further, or the program needs to be optimized to obtain convincing results. The results shown in the table cannot verify the advantages and disadvantages of the bee colony algorithm in task scheduling.


## 6. Conclusion

This work takes a real-time parallel task based on the DAG model as a scheduling object, adds the energy consumption model for a heterogeneous platform, pursues the goal of reducing energy consumption, and designs the ant colony algorithm and bee colony algorithm for a heterogeneous platform. Through a series of experiments, this work verifies the combinatorial optimization ability of the genetic algorithm in optimizing task scheduling and proves that the ant colony algorithm is superior to the genetic algorithm in terms of combinatorial optimization. The bee colony algorithm can potentially be used for combinatorial optimization.



---

*Source: 8958170-2016-02-03.xml*