Open Access
This article is

- freely available
- re-usable

*Sensors*
**2019**,
*19*(5),
1023;
https://doi.org/10.3390/s19051023

Article

Task Scheduling Based on a Hybrid Heuristic Algorithm for Smart Production Line with Fog Computing

School of Mechanical and Automotive Engineering, South China University of Technology, Guangzhou 510641, China

^{*}

Author to whom correspondence should be addressed.

Received: 15 January 2019 / Accepted: 21 February 2019 / Published: 28 February 2019

## Abstract

**:**

Fog computing provides computation, storage and network services for smart manufacturing. However, in a smart factory, the task requests, terminal devices and fog nodes have very strong heterogeneity, such as the different task characteristics of terminal equipment: fault detection tasks have high real-time demands; production scheduling tasks require a large amount of calculation; inventory management tasks require a vast amount of storage space, and so on. In addition, the fog nodes have different processing abilities, such that strong fog nodes with considerable computing resources can help terminal equipment to complete the complex task processing, such as manufacturing inspection, fault detection, state analysis of devices, and so on. In this setting, a new problem has appeared, that is, determining how to perform task scheduling among the different fog nodes to minimize the delay and energy consumption as well as improve the smart manufacturing performance metrics, such as production efficiency, product quality and equipment utilization rate. Therefore, this paper studies the task scheduling strategy in the fog computing scenario. A task scheduling strategy based on a hybrid heuristic (HH) algorithm is proposed that mainly solves the problem of terminal devices with limited computing resources and high energy consumption and makes the scheme feasible for real-time and efficient processing tasks of terminal devices. Finally, the experimental results show that the proposed strategy achieves superior performance compared to other strategies.

Keywords:

fog computing; task scheduling; smart manufacturing; hybrid heuristic (HH) algorithm## 1. Introduction

With the rapid development of emerging technologies such as the Internet of Things (IoT) [1], big data [2] and cloud computing [3], the industrial revolution has entered the so-called stage 4.0, and manufacturing modes have also entered the intelligent category [4]. Emerging technologies are widely used in the intelligent plant; in particular, a large amount of IoT equipment is deployed in the intelligent plant, analysing and processing enormous amounts of data that introduce challenges to cloud computing. Considering the disadvantages of cloud computing, fog computing is used to solve the processing of real-time tasks in the Industrial IoT [5]. The main difference between fog computing and cloud computing is that fog computing can provide low latency computing services for terminal devices, which is decided by the fog nodes deployed at the location. Fog nodes are usually deployed around the terminal devices, and often through one jump, they can complete data forwarding, greatly reducing the data transmission delay; however, this advantage cannot be achieved with cloud computing.

Rely on its own advantages, fog computing plays a great role in the field of smart manufacturing. The performance of fault detection and state analysis of devices in production line can be improved through a wealth of computational and storage services provided by fog computing [6]. Efficient manufacture inspection systems with fog computing can be implemented [7]. A fog-based solution is proposed in [8] for real-time monitoring and data processing in manufacturing. By using fog computing technology, an enhancing smart maintenance management solution is presented in [9]. However, among the existing works few focus on task scheduling with fog computing in the smart manufacturing area. Despite the fact fog computing provides many convenient computing services for manufacturing task processing [10], however, fog computing still faces many challenges in manufacturing applications [11,12], particularly since the fog service ability is ultimately limited, and each fog node has a strong heterogeneity, such as differences in computing ability, storage capacity and communication ability. The task requests from terminal devices also have very strong heterogeneity, such as real-time requirements, energy consumption requirements, etc. Therefore, determining the approach of task scheduling among different fog nodes to minimize the delay and energy consumption is the purpose of this paper. As well as we know, task scheduling is an NP-hard problem, it is also a very challenging problem. Therefore, a hybrid heuristic algorithm to solve the task scheduling problem has been a research hotspot of scholars worldwide. The hybrid heuristic algorithm which combines the advantages of a variety of heuristic algorithm, the accuracy of results and the optimization process are both improved. The main contributions of this paper can be summarized as follows:

- (1)
- We design a distributed fog computing system architecture for smart production line. The fog computing system model and task scheduling-related mathematical model are established. The task scheduling objective function is given, whose goal is to minimize the delay and energy consumption.
- (2)
- A hybrid heuristic algorithm is proposed, which combines the improved particle swarm optimization (IPSO) algorithm and the improved ant colony optimization (IACO) algorithm to provide a hybrid heuristic algorithm for the task scheduling problem.
- (3)
- We establish a fog computing based smart production line simulation environment, and the task scheduling strategy proposed is compared with other strategies, then using three performance metrics for experimental verification, achieving results that prove the effectiveness of the strategy.

The rest of this paper is organized as follows: the related work is presented in Section 2. The system model, task scheduling-related mathematical model and the task scheduling objective function are established in Section 3. A task scheduling strategy is put forward in Section 4, and the task scheduling problem is solved by a hybrid heuristic algorithm, which combines the advantages of the IPSO with the IACO. Experimental verification is given in Section 5, the task scheduling strategies are compared using three performance metrics, the simulation results showing that the proposed scheduling strategy is superior to other strategies. Finally, Section 6 concludes the paper.

## 2. Related Work

In recent years, many scholars worldwide have conducted research on fog computing, and the main research directions are focused on the definition [13,14], architecture [15,16,17], application [18,19,20], computing offloading [21,22,23] and task scheduling [24,25,26]. Based on the terminal equipment and its requirement of real-time performance and energy consumption, the task scheduling of the fog computing mode is a necessary research hotspot. The task scheduling research on fog computing is still at the preliminary stage. Yin et al. [6] introduced fog computing in the intelligent manufacturing environment in which the container virtual technology was adopted, and through the task scheduling and resource allocation to ensure the real-time task performance, the reallocation mechanism to further reduce the computing delay of the task was accomplished. Yang et al. [25] studied the task scheduling in a homogeneous fog network; they put forward a novel delay–energy balance task scheduling algorithm, and reduced the average service time delay and delay jitter of minimizing the overall energy consumption at the same time. Pham et al. [26] formulated the task scheduling problems in a cloud-fog environment, and proposed a heuristic-based algorithm. Chekired et al. [27] designed a multilayer fog computing architecture, in which they calculated the priority of IoT data and task requests; then, according to the priority conduct rank, high priority tasks that required fast deployment were accommodated by using two priority queuing models to complete industrial network scheduling and analysis of the data. Liu et al. [28] investigated a joint optimization algorithm of scheduling multiple jobs and a lightpath provisioning for minimizing the average completion time in a fog computing micro datacenter network. Bittencourt et al. [29] studied mobility-aware application scheduling in fog computing. Zeng et al. [30] designed an efficient task scheduling and resource management strategy with a minimized task completion time for promoting the user experience. Deng et al. [31] studied workload scheduling towards worst-case delay and optimal utility for a single-hop Fog-IoT architecture. A workload dynamic scheduling algorithm is proposed, which can maximize the average throughput utility while guaranteeing the worst-case delay of task processing. Chen et al. [32] applied fog computing technologies for enhancing the vehicular network, and two dynamic scheduling algorithms are proposed based on the fog computing scheme for the data scheduling in vehicular networks, in which these algorithms can dynamically adapt to a changeable network environment and achieve a benefit in efficiency. Zhao et al. [33] proposed a fog-enabled multitier network architecture which can model a typical content delivery wireless network. A new fog enabled multitier operations scheduling approach based on Lyapunov optimization techniques is developed to decompose the original complicated problem into two operations across different tiers. Extensive simulation results show the algorithm is fair and efficient. Wang et al. [34] designed a fog computing-assisted smart manufacturing system, and a Software-Defined IIoT system architecture based on fog computing was set up in a smart factory. An adaptive computing mode selection method is proposed, and simulator results show that this method can achieve real-time performance and high reliability in IIoT. Ni et al. [35] proposed a resource allocation strategy for fog computing based on priced timed Petri nets (PTPN). The strategy comprehensively considers the price cost and time cost to complete a task, and constructs the PTPN models of tasks in fog computing in accordance with the features of fog resources. The algorithm that predicts the task completion time is presented. The method of computing the credibility evaluation of the fog resource is also proposed. A dynamic allocation algorithm of fog resources is given. Simulation results demonstrate the proposed algorithms can achieve a higher efficiency than static allocation strategies in terms of task completion time and price.

The current main heuristic algorithms are the genetic algorithm (GA), particle swarm optimization (PSO) algorithm, ant colony optimization (ACO) algorithm, simulated annealing (SA) algorithm, and so on. The heuristic algorithms mainly mimic natural phenomena or rules and have a very good self-organizing, self-learning and adaptive ability, obtaining global optimal solutions with good robustness, therefore, these are widely used in complex problem solving. To obtain a better scheduling performance, many scholars have improved heuristic algorithms. In [36], a novel architecture is proposed, in addition to a task scheduling algorithm based on a dynamic scheduling queue algorithm and particle swarm optimization algorithm, and this algorithm fully considers the dynamic characteristic of the cloud computing environment, with experimental results that show the architecture can effectively achieve good performance, load balancing and improvements in resource utilization. In [37], an improved genetic algorithm for the task scheduling strategy was proposed. Moreover, in some literature, combinations of multiple single algorithms to form a hybrid algorithm for solving the task scheduling problem are proposed. Rahbari et al. [38] proposed a safety-aware scheduling scheme based on a hybrid heuristic algorithm in the fog computing environment. Dai et al. [39] proposed a task scheduling algorithm based on genetic and ant colony optimization algorithms in cloud computing. Ref. [40] focuses on the task scheduling and resource management problems in the cloud computing environment, and a hybrid bio-inspired algorithm was proposed to implement task scheduling. Ref. [41] put forward a mixed average minimum and max-min algorithm in cloud computing for task scheduling. To solve the problem of cloud computing load balancing, the literature [42] proposed an improved load balanced min-min algorithm using a genetic algorithm. In addition, the traditional scheduling algorithms, such as the first come first server (FCFS) algorithm, the round-robin (RR) scheduling algorithm, the max-min, min-min and other algorithms, which are relatively simple and are often used for performance comparison with other algorithms. There are many works in the literature about task scheduling algorithms that have been published; however, most of them are applied in cloud computing, while the literature of task scheduling algorithms in fog computing is sparse. Therefore, this paper focuses on the task scheduling strategy in fog computing.

## 3. System Model and Problem Formulation

In this section, a smart manufacturing system architecture based on fog computing is set up, we describe the system model. The delay mathematic model and energy consumption mathematic model of task processing under different fog nodes are formulated.

#### 3.1. System Architecture and System Model

More and more delay sensitive and computing intensive tasks need to be processed in smart manufacturing scenarios. Fog computing can provide real-time computing services for terminal devices by closely deploying fog nodes. However compared to a cloud server, the computing ability of fog nodes are limited and different, so how to use the computing resources of fog nodes effectively is the purpose of this study. First of all, we establish a smart production line system architecture based on fog computing. As shown in Figure 1, the system architecture consists of four layers: terminal device layer, fog computing layer, cloud computing layer and application layer.

Terminal device layer: The terminal device layer mainly includes production line processing devices (manipulators, motors, CNCs), transmission equipment (conveyor belts, AGV), sensing devices and a variety of handheld terminal devices. Processing devices are mainly used to complete the product formulation, sensing devices are responsible for processing during the process of data collection, and handheld terminals help visualize the results.

Fog computing layer: The fog computing layer is located in middle position between the terminal device layer and cloud computing layer. Fog nodes which are deployed on the edge of the network mainly provide services for delay sensitive tasks. In smart production lines, the fog nodes refer to switches and routers as well as some special servers. For some common computing equipment, such as intelligent sensors, intelligent processing equipment, intelligent multimedia devices can also be used as fog nodes. Fog nodes have a certain computation capacity, communication ability and storage capacity, and these work between the cloud and the terminal device. Fog computing has remedied the high latency of cloud computing, thus the quality of service of real-time application can be guaranteed. However, the fog nodes’ ability is limited after all, the fog nodes also have a strong heterogeneity and dynamism in the face of vast amounts of real-time data processing, so how to rapid and efficient data analysis is the main goal of the fog computing.

Cloud computing layer: The cloud computing layer contains the cloud data center, cloud storage, cloud computing equipment, providing a remote service to intelligent production lines. High-performance computing equipment and large capacity storage devices which can transmit, calculate and store all kinds of huge data from terminal equipment through the control center of coordination management to provide comprehensive, high quality service for terminal users. Due to its remote deployment, cloud computing can’t complete real-time data processing and analysis, so cloud computing can’t meet the QoS demands of real-time tasks.

Application layer: The applications of the smart production line are product detection, fault diagnosis, device maintenance, real-time monitoring, inventory management, etc.

The heterogeneous task processing flow in the fog environment of a production line is shown in Figure 2. In a smart factory, G is a terminal device set, G = {g

_{1}, g_{2}, g_{3}, …, g_{i}, …, g_{n}}, where i denotes the serial number of the terminal device. The attributes of the terminal device g_{i}are described by P_{g}= {p_{ir}, p_{ie}, a_{i}, w_{it}, w_{ie}, E_{il}}, where p_{ir}denotes the transmission power of g_{i}, p_{ie}denotes the idle power of g_{i}, and a_{i}is a binary variable, which is a mobile symbol for g_{i}. w_{it}denotes the delay weight of g_{i}, and w_{ie}denotes the energy consumption weight of g_{i}. If a_{i}= 1 denotes g_{i}is a mobile device, the energy of the mobile terminal equipment is limited. In the process of task scheduling, we need to consider the energy consumption problem, so we set w_{it}= 0.7, w_{ie}= 0.3; if a_{i}= 0 denotes g_{i}is a static device, the energy of the static terminal equipment can be considered infinite, so we set w_{it}= 1, w_{ie}= 0. E_{il}denotes the residual energy of g_{i}.For the task set Φ

_{F}, Φ_{F}= {I_{1}, I_{2}, I_{3}, …, I_{i}, …, I_{n}}, I_{i}denotes the task request of terminal equipment g_{i}, the attribute of I_{i}is described by P_{I}= {D_{i}, θ_{i}, T_{i}_{,max}, T_{i}_{,exp}}, D_{i}denotes the data size of task I_{i}, θ_{i}denotes the computation intensity of task I_{i}, T_{i}_{,max}denotes the maximum tolerate time of task I_{i}, T_{i}_{,exp}denotes the expected completion time of task I_{i}.For the fog nodes set, F = {F

_{1}, F_{2}, F_{3}, …, F_{j}, …, F_{m}}, j denotes the number of fog nodes, the attribute of F_{j}is described by P_{F}= {C_{j}, K_{j}, B_{j}}, C_{j}denotes the computing resource of fog node F_{j}, K_{j}denotes the storage capacity of fog node F_{j}, and B_{j}denotes the network bandwidth of fog node F_{j}.We assume that time is slotted, and denote the time slot length and the time slot index set by Δτ and φ

_{t}= {0, 1, 2, …}, respectively.#### 3.2. Delay Model and Energy Consumption Model

The task scheduling problem in fog computing can be described as n independent tasks assigned to m fog nodes, in which the goal of the task scheduling is to minimize the time cost and energy consumption cost through a reasonable allocation.

At slot t, t ∈ φ

_{t}, s_{ij}(t) denotes the allocation relationship between task I_{i}and fog node F_{j}, s_{ij}(t) ∈ {0,1}, if task I_{i}is executed at fog node F_{j}, s_{ij}(t) = 1; otherwise, s_{ij}(t) = 0.The completion time includes the task execution time te

_{ij}and the transmission time, at slot t, the execution time of task I_{i}at fog node F_{j}can be expressed as:
TE

_{ij}(t) = D_{i}(t)θ_{i}/C_{j}(t),D

_{i}(t) denotes the data size of task I_{i}, θ_{i}is the computing intensity of task, C_{j}(t) denotes the computing resource of fog node F_{j}.At slot t, the transmission time is sending task I
where r
where ω(t) denotes the network bandwidth, σ is the noise power, h(t) denotes the channel power gain, p(t) is the transmission power.

_{i}to fog node F_{j}:
TR

_{ij}= D_{i}(t)/r_{ij}(t),_{ij}(t) is the transmission rate between terminal device g_{i}and fog node F_{j}:
$${r}_{ij}(t)=\omega (t)\ast {\mathrm{log}}_{2}(1+\frac{h(t)\ast p(t)}{\sigma}),$$

Therefore the total delay can be expressed as:

$${T}_{ij}(t)=T{R}_{ij}(t)+T{E}_{ij}(t),$$

From the perspective of terminal devices, the energy consumption on terminal device g

_{i}is divided into two parts, one part is transmission energy consumption; the other part is waiting energy consumption:
$${E}_{ij}(t)=T{R}_{ij}(t)\ast {p}_{ir}(t)+T{E}_{ij}(t)\ast {p}_{ie}(t),$$

#### 3.3. Problem Formulation

Task scheduling in fog computing mode is designed to allocate multiple tasks to multiple fog nodes according to a certain scheduling strategy, and, as far as possible, to meet the task requests of terminal equipment while simultaneously reducing the task completion time and the energy consumption of the terminal equipment.

To simplify the problem complexity and reduce the difficulty of solving the problem, the following assumptions are put forward: each task is independent and there is no constraint relationship among tasks; each task can only be allocated to a fog node and none of the tasks are allowed to allocate repeatedly. The task in the computation process does not consider the impact of the mobility of the terminal equipment. All the fog nodes are static and task in the process of execution cannot be interrupted.

The objective function mainly considers the overhead of the terminal equipment to perform all tasks, including the completion time of all tasks and the energy consumption of all the mobile terminal equipment; therefore, the overhead of fog nodes will not be considered here. The objective function of task scheduling in the fog computing with delay and energy consumption constraints is formulated as follows:

$$f=\mathrm{min}{\displaystyle \sum _{i=1}^{n}\{{w}_{it}{\displaystyle \sum _{j=1}^{m}[{s}_{ij}(t)\ast {T}_{ij}(t)]+{w}_{ie}{\displaystyle \sum _{j=1}^{m}[{s}_{ij}(t)\ast {E}_{ij}}(t)]\}}}$$

- s.t. (C1): s
_{ij}(t) ∈ {0,1}, i = 1, 2, …, n; j = 1, 2, …, m, - (C2): s
_{i}_{1}(t) + s_{i}_{2}(t) + … + s_{im}(t) = 1, i = 1, 2, …, n, - (C3): s
_{ij}(t)*T_{ij}(t) ≤ T_{i}_{,max}, i = 1, 2, …, n; j = 1, 2, …, m, - (C4): s
_{ij}(t)*E_{ij}(t)≤ E_{il}, i = 1, 2, …, n; j = 1, 2, …, m, - (C5): $\{\begin{array}{l}{w}_{it}=0.7\\ {w}_{ie}=0.3\end{array}$, a
_{i}= 1, i = 1, 2, …, n, - (C6): $\{\begin{array}{l}{w}_{it}=1\\ {w}_{ie}=0\end{array}$, a
_{i}= 0, i = 1, 2, …, n,

## 4. Task Scheduling Algorithm Design

The task scheduling is a multi-objective nonlinear combinatorial optimization problem. There are many multi-variables and multi-constraints in the objective function, therefore, it is difficult to find the optimal solution through the polynomial method. A hybrid heuristic algorithm is designed which combines the improved discrete particle swarm optimization algorithm with the improved ant colony optimization algorithm, and a task scheduling strategy about fog computing based on the hybrid heuristic algorithm is proposed.

#### 4.1. Improved Particle Swarm Optimization Algorithm

The particle swarm optimization (PSO) algorithm provides a quick and efficient choice for solving complex optimization problems, but because the parameters of the task scheduling problem in fog computing are discrete, the standard particle swarm optimization algorithm cannot be used to solve the optimization. Therefore, the standard particle swarm optimization algorithm requires discretization processing, and to redefine the particle’s position and speed, the discrete particle swarm optimization algorithm is adopted to solve the task scheduling problem.

#### 4.1.1. Discrete Particle Swarm Initialization

A direct binary encoding method is adopted, therefore the particle’s location information is represented by 0 and 1, and the velocity of the particles is in the interval [0, 1]. In a discrete particle swarm, the position of each particle represents a possible task scheduling scheme, and according to the task allocation decisions s

_{ij}(t), the position of particle i can be simplified as s_{ij}, s_{ij}∈ {0,1}, i = 1, 2, …, n; j = 1, 2, …, m. Similarly, the speed of the particle i can be simplified as v_{ij}, v_{ij}∈ [−v_{max}_{,}v_{max}], i = 1, 2, …, n; j = 1, 2, …, m.#### 4.1.2. Updating Position and Speed of the Particle

To improve the performance of the basic particle swarm optimization algorithm, we introduce the adaptive inertia weight ω and the contraction factor η. The inertia weight ω plays an important role for the particle’s search ability. The contraction factor η not only can accelerate the convergence speed of the particles but can also improve the accuracy of the algorithm. The inertia weight ω and the contraction factor η can improve the performance of the particle swarm optimization algorithm, so the combination of both is represented in the particle velocity updating equation:

$${v}_{ij}^{k+1}=\eta (\omega {v}_{ij}^{k}+{c}_{1}{r}_{1}({p}_{ij}^{k}-{s}_{ij}^{k})+{c}_{2}{r}_{2}({g}_{ij}^{k}-{s}_{ij}^{k}))$$

To represent the position vector of the particles s

_{ij}values as binary variables, the sigmoid function is introduced:
$$Sig({v}_{ij}^{k+1})=\frac{1}{1+\mathrm{exp}(-{v}_{ij}^{k+1})}$$

The particle position update formula is:
where k is the serial number of the iteration, p

$${s}_{ij}^{k+1}=\{\begin{array}{c}1,{r}_{3}<Sig({v}_{ij}^{k+1})\\ 0,{r}_{3}\ge Sig({v}_{ij}^{k+1})\end{array}$$

_{ij}is the best location for the particle individual of the j vector, g_{ij}is the best location for particle groups of the j vector, ${\nu}_{ij}^{k}$ is the current velocity of the k generation particle, c_{1}and c_{2}are accelerating factors, and r_{1}, r_{2}, r_{3}are random numbers in [0, 1].#### 4.1.3. Fitness Function

The fitness function is the objective function of the particle swarm algorithm, and through the fitness function, the particle swarm judges the stand or fall of the current position and speed, so that it constantly searches and updates the individual and global optimum and the fitness of some value for the target iteration until the termination of the algorithm. When the fitness function value is greater, the solution is better; according to Equation (6), the fitness function is shown in Equation (10):
where the objective function of task scheduling is the denominator of Equation (10), when the fitness function value is greater, the solution is better.

$$fitness=\frac{1}{\mathrm{min}{\displaystyle \sum _{i=1}^{n}\{{w}_{it}{\displaystyle \sum _{j=1}^{m}[{s}_{ij}(t)\ast {T}_{ij}(t)]+{w}_{ie}{\displaystyle \sum _{j=1}^{m}[{s}_{ij}(t)\ast {E}_{ij}}(t)]\}}}}$$

#### 4.1.4. Inertia Weight ω and Contraction Factor η

The inertia weight ω determines the search ability of the particles in the global and local search, which follows the premise that the greater the ω is, the stronger the global searching ability of the algorithm; otherwise, the local search ability of the algorithm is stronger. To improve the intelligence of the particle swarm optimization algorithm, many methods have been proposed regarding inertia weighting, such as: linear decreasing weight, weight decrease of linear differential and so on. This paper combines the inertia weight with the number of iterations, and the solution formula of the inertia weight is shown in Equation (11):
where ω

$$\omega =\{\begin{array}{cc}{\omega}_{\mathrm{max}}-\frac{({\omega}_{\mathrm{max}}-{\omega}_{\mathrm{min}})\times k}{{K}_{\mathrm{max}}},& k<0.7\times {K}_{\mathrm{max}}\\ {\omega}_{\mathrm{min}}+({\omega}_{\mathrm{max}}-{\omega}_{\mathrm{min}})\times rand,& k\ge 0.7\times {K}_{\mathrm{max}}\end{array}$$

_{max}is the maximum inertia weight, ω_{min}is the minimum inertia weight, k is the number of iterations, and k_{max}is the largest number of iterations. Through adjusting the inertia weight ω, the improved algorithm not only retains the original global search ability but also improves the local search ability. It can be seen from (11), that the inertia weight ω is changed dynamically with the increase of the iteration times, which guarantees that the algorithm has the opportunity to gain a larger inertia weight value later in the search and is prevented from falling into the local optimum.The contraction factor and inertia weight factor have the same function, such that when the contraction factor is larger, the global search ability of the algorithm is enhanced, whereas the local search ability is enhanced. This contraction factor computation formula is as follows:
where ϕ = c

$$\eta =\frac{2}{\left|2-\phi -\sqrt{{\phi}^{2}-4\phi}\right|}$$

_{1}+ c_{2}, ϕ >4.#### 4.2. Improved Ant Colony Optimization Algorithm

The ant colony optimization (ACO) algorithm is a bionic optimization algorithm, inspired by biological evolution. The ant colony optimization algorithm is based on swarm intelligence, and the group size is usually large, the motion state of each individual in the group is random, and the process of the ant colony is to find the shortest path according to the nature of the proposed dynamic random search algorithm. This algorithm has the advantages of flexibility and robustness, and the dynamic environment system is used to solve combinatorial optimization problems. Therefore, to improve the efficiency of task scheduling and the satisfaction in fog computing, the ant colony optimization algorithm is used to solve the combinatorial optimization problem between the fog nodes and tasks.

Based on the ant colony optimization algorithm in the fog computing scenario, the task scheduling problem can be expressed by a directed acyclic graph (DAG). G = (S, L), S denotes the set for the task allocation nodes, S = {s

_{ij}(t) | i = 1, 2, ..., n, j = 1, 2, ..., m}. L denotes the path set, L = {l_{ij}| i = 1, 2, ..., n, j = 1, 2, ..., m}. The ant selecting path l_{ij}with the denoted task I_{i}is assigned to the fog node F_{i}, and the length of the path l_{ij}is a computational overhead of task I_{i}in fog node F_{i}, where the computational overhead includes the delay cost and energy consumption costs, which follow the premise that the longer the length of the path l_{ij}is, the larger the computational overhead, |l_{ij}| = f_{ij}= T_{ij}(t) + E_{ij}(t).The total number of ants is σ, and each ant has the following features: the ant walking route is a directed acyclic graph, as shown in Figure 3, and all the ants start from the starting point for S

_{S}, then choose the next node according to the path transition probability. The path transition probability is a function of the path distance and the path pheromone amount. The legal walking route of each ant is shown in Figure 3, and to prevent the ant to have ever walked to the node, a tabu table is introduced. The tabu table of ant k is set to tabu_{k}; after the ant k has walked to the node s_{ij}, the node s_{ij}will be added to the tabu table, and in the process where the ants are walking below it, s_{ij}will not be chosen. When the ant k walks to the end point S_{E}, the ant has completed its travel (all task scheduling), and the ants leave pheromone on the path to walk through.#### 4.2.1. Improved Heuristic Information

The heuristic information of the ant colony algorithm can make the ants preferred path satisfy the objective function, namely, the expectations of task I
where f

_{i}assigned to the fog node F_{j}. If the computational overhead is larger, the η_{ij}will be smaller, so the probability of the ant selecting the node is small. In the previous task scheduling application with the basic ant colony algorithm optimization design, the heuristic information η_{ij}is equal to 1/f_{ij}, and f_{ij}denotes the computational overhead of task I_{i}on fog node F_{j}. However, this situation only considers the expenses of the current fog node without considering the influence of the global state of the heuristic information, thus reducing the efficiency and accuracy of the obtained global optimal solution. Here, therefore, the heuristic information should be improved, as shown in (13):
$${\eta}_{ij}={\omega}_{1}\frac{1}{{f}_{ij}}+{\omega}_{2}\frac{1}{{\displaystyle \sum _{v=1}^{i-1}{f}_{vj}}}$$

_{ij}is the computational overhead of task I_{i}on fog node F_{j}, ${{\displaystyle \sum}}_{\nu =1}^{i-1}{f}_{\nu j}$ is the computational overhead of tasks that have chosen fog nodes. ω_{1}and ω_{2}are weight of the local computational overhead and the global computational overhead, respectively, ω_{1}+ ω_{2}= 1, ω_{1}, ω_{2}∈ [0, 1].#### 4.2.2. Improved Path Transition Probability

Some ants are placed on the start node S
where τ
where τ is the pheromone average value of all nodes for each iteration. From (15), the path transition probability adjustment factor μ

_{S}to travel, and the probability of the k-th ant from the current routing to selecting a neighbouring path is determined by the pheromone τ_{ij}and the heuristic information η_{ij}. To avoid allowing the ant colony optimization algorithm to be prematurely trapped in a local optimum, the path transition probability is further improved. Therefore, a regulating factor μ_{ij}is introduced to the path transition probability formula, and as the number of iterations increases, the factor is conducive to the ant selecting the pheromone of the smaller node, and avoiding some nodes’ pheromone where the phenomenon of rapid accumulation appears, thus guaranteeing that the ants can still search for a better solution in the later iterations and avoid having the algorithm encounter the premature phenomenon. The calculation formula of the path transition probability is shown below:
$${p}_{ij}{}^{k}=\{\begin{array}{l}\frac{{[{\tau}_{ij}]}^{\alpha}{[{\eta}_{ij}]}^{\beta}{\mu}_{ij}}{{\displaystyle \sum _{i\in allowe{d}_{k}}{[{\tau}_{ij}]}^{\alpha}{[{\eta}_{ij}]}^{\beta}{\mu}_{ij}}},i\in allowe{d}_{k}\\ 0,else\end{array}$$

_{ij}is the residual pheromone of node s_{ij}, η_{ij}is the heuristic information of node s_{ij}, allowed_{k}denotes the node set allowed access by ant k, allowed_{k}= S − tabu_{k}. α is the pheromone weight of the path, β is the heuristic information weight of the path. μ_{ij}is the regulatory factor of the path transition probability, and the computational formula is given as:
$${\mu}_{ij}={e}^{(-|{\tau}_{ij}-\tau |)}$$

_{ij}is decided by τ_{ij}and τ.#### 4.2.3. Update of the Pheromone

After the ant k has selected node s
where ρ is the pheromone volatility coefficient, 1 − ρ is the pheromone residual coefficient, ρ ∈ [0,1). Δτ
where Δτ

_{ij}, for which task I_{i}is assigned to the fog node F_{j}, the pheromone of node s_{ij}needs to be updated since the pheromone update improves the convergence speed and precision of the ant colony algorithm. The local pheromone updating formula is shown in (16) and (17):
$${\tau}_{ij}(t+1)=(1-\rho ){\tau}_{ij}(t)+{\displaystyle \sum _{k=1}^{\sigma}\Delta {\tau}_{ij}{}^{k}}$$

$$\Delta {\tau}_{ij}{}^{k}=\{\begin{array}{ll}\frac{Q}{{f}_{ij}{}^{k}},& \mathrm{the}\text{}k\mathrm{th}\text{}\mathrm{ant}\text{}\mathrm{choose}\text{}{s}_{ij}\text{}\mathrm{at}\text{}t\\ 0,& else\end{array}$$

_{ij}^{k}(t) denotes the pheromone of ant k on node s_{ij}at time t. Q is a constant, f_{ij}^{k}is the length of path l_{ij}chosen by ant k:
$${\tau}_{ij}(t+n)=(1-\rho ){\tau}_{ij}(t)+{\displaystyle \sum _{k=1}^{\sigma}\Delta {\tau}_{ij}{}^{k}}$$

$$\Delta {\tau}_{ij}{}^{k}=\{\begin{array}{ll}\frac{Q}{{f}^{k}},& \mathrm{the}\text{}k\mathrm{th}\text{}\mathrm{ant}\text{}\mathrm{choose}\text{}{s}_{ij}\text{}\mathrm{at}\text{}\mathrm{current}\text{}\mathrm{iteration}\\ 0,& else\end{array}$$

_{ij}^{k}denotes the pheromone of ant k on node s_{ij}in the process of the current iteration, and f^{k}denotes the path length that ant k has walked in the process of the current iteration.#### 4.3. Hybrid Heuristic Algorithm

The PSO algorithm and ACO algorithm are introduced in detail, and the two kinds of algorithms are improved. However, each algorithm has its own limitations. For example, the PSO algorithm has a fast search speed, but the accuracy is not high, and the ACO algorithm has high precision, but the search speed is low and so on. To solve the legacy problems of PSO and ACO, a HH algorithm can compensate for the shortage of the single heuristic algorithm, and the HH algorithm combines the advantages of the IPSO algorithm with the IACO algorithm. First, the fast convergence characteristics of the IPSO algorithm are used to collect the optimal solution, and then the optimal solution is the initial pheromone distribution of the IACO algorithm, so that the IACO algorithm is used for the optimal solution of task scheduling. The flowchart of the HH algorithm is shown in Figure 4.

The basic steps of the task scheduling strategy in fog computing based on the hybrid heuristic algorithm are as follows:

- Step 1:
- Define the task scheduling objective function in fog computing.
- Step 2:
- Set related parameters of the hybrid heuristic algorithm and the algorithm termination conditions.
- Step 3:
- Initialize the position and speed of the improved discrete particle swarm.
- Step 4:
- Calculate each particle’s fitness, and determine the particle’s individual optimal position and the global optimal position.
- Step 5:
- According to Equations (7) and (9), the velocity and position of the discrete particle are updated.
- Step 6:
- Judging whether the algorithm’s termination conditions are satisfied, output the task initial scheduling results of the fog computing mode, and turn to Step 7; otherwise, go to Step 4.
- Step 7:
- Referencing to the scheduling results of the improved particle swarm optimization algorithm to initialize the pheromone of the improved ant colony optimization algorithm.
- Step 8:
- Some ants are placed on the start node for travelling.
- Step 9:
- Each ant according to Equation (14) chooses the next node; according to Equations (16) and (17), update the local pheromone, and add the selected node to the task scheduling list.
- Step 10:
- After scheduling all the tasks, calculate the fitness value of the scheduling results according to the task scheduling list, and then according to Equations (18) and (19), update the global pheromone. Otherwise, go to Step 9.
- Step 11:
- Judging whether the algorithm’s termination conditions are met, output the task optimal scheduling results of the fog computing mode. Otherwise, go to Step 8.

## 5. Implementation and Simulation Results

In this section, simulations are conducted to evaluate the performance of the proposed task scheduling strategy. Both the simulation setup and performance metrics are described detail. Our strategy is compared with three other strategies from four different performance metrics, and the evaluation results verify that our strategy is superior to other strategies.

#### 5.1. Simulation Setup

We develop the simulation platform and verify the proposed task scheduling strategy in the MATLAB environment. The fog computing system model and the task scheduling related model are set up, and the improved particle swarm optimization algorithm and the improved ant colony optimization algorithm are introduced to solve the task scheduling objective function. The system model parameters and simulation parameters are shown in Table 1.

#### 5.2. Performance Metrics and Reference Methods

Three performance metrics are adopted, the first performance metric is the completion time; here, the completion time refers to the time of processing all tasks. The second performance metric is the energy consumption, which refers to the energy of processing all the tasks (for mobile terminal equipment). The third performance metric is reliability, which refers to the success rate of the task execution under the constraints of the maximum tolerance time and the residual energy available.

The proposed task scheduling strategy- HH is compared with other three strategies, which are IPSO, IACO and RR. The HH task scheduling strategy is based on the hybrid heuristic algorithm; the IPSO task scheduling strategy is based on the improved particle swarm optimization algorithm; the IACO task scheduling strategy is based on the improved ant colony optimization algorithm; the RR task scheduling strategy is based on the round-robin algorithm.

#### 5.3. Evaluation Results

#### 5.3.1. Completion Time

First, the completion time is used to verify the performance of the four task scheduling strategies. Experiments were conducted 20 times, and then the average was used. The task number is set to 50, 100, 150, 200, 250 and 300 respectively. The results are shown in Figure 5.

In Figure 5, we examine how the completion time delivered by our algorithm changes with the growth of the number of tasks. With the increasing task number, the completion time of the four task’s scheduling strategies is also increasing. The completion time of HH is the smallest, the completion time of IPSO and IACO are greater than HH, and the completion time of RR is the largest. This is because HH, IPSO and IACO conduct the task scheduling by taking the minimum completion time as a goal. In addition, HH integrates the advantages of IPSO with IACO, so the performance of HH is better than that of IPSO and IACO. RR schedules task requests to different fog nodes in turn, and the completion time is not considered in the process of scheduling; therefore, the performance of RR’s completion time is the worst.

#### 5.3.2. Energy Consumption

The energy consumption simulation results of the four task scheduling strategies under different numbers of tasks are shown in Figure 6. It is clearly shown that with the increase of the number of tasks, the energy consumptions of all the four scheduling strategies present a rising trend, the reason is that with the growth of the task number, the terminal devices have to consume more energy to complete the process of sending of the task data and receiving the task results. The energy consumption of terminal device is decided by the power and the elapsed time of terminal device. The power value of the terminal device is fixed; therefore, the energy consumption is only related to the completion time, for which the more the completion time is, the more the terminal device energy consumption.

From Figure 6, it can be concluded that the energy consumption of the HH is the lowest, which is in keeping with minimum completion time of the HH. The energy consumption of the IPSO and IACO are higher than the HH. This is because the completion time of the IPSO and IACO is more than the HH. The completion time of the RR is the most, so this leads to the energy consumption of RR reaching the highest value. When the task number is less than 100, the completion time difference of the four strategies is small, so the energy consumption difference is also small. When the task number is more than 100, however, the waiting delay is increasing, where the waiting delay includes the waiting delay in the terminal equipment and the waiting delay in the fog node. Since the greater the task number is, the more the waiting delay; therefore, the task completion time will increase, and the purpose of HH is to accomplish the scheduling of different tasks to different fog nodes meanwhile make the completion time achieve a minimum, and realize the energy consumption minimum.

#### 5.3.3. Reliability

To verify the reliability of the four kinds of task scheduling strategies, the number of tasks is initially changed, the task number increases from 50 to 300, and the reliability change of the four kinds of task scheduling strategies can be observed, the simulation results are shown in Figure 7.

Then, the number of tasks is set at 200, the maximum tolerance time of the tasks is changed, increasing from 10 s to 100 s and observing the reliability of the four scheduling strategies under different maximum tolerance times. The simulation results are shown in Figure 8. Figure 7 presents the reliability change trend of four strategies under different task numbers. With the number of tasks increasing, the reliability of strategies shows an obvious downward trend. When the task number is less than 100, the change tendency of the four strategies is gentle, and the reliability is very high. This occurs because in this period of the scope of the task before the transfer, there is no waiting for the delay, and fewer tasks will not cause the computing pressure of the fog node for the fog mode; therefore, within the scope of the task number, the completion time and energy consumption are very small, which is also in in keeping with the results of the above task completion time. As seen from the diagram, the reliability of HH is the highest in the four strategies, the reason is that both completion time and energy consumption of HH are the least, then are IPSO and IACO, while the reliability of the RR is the lowest.

Figure 8 further explores the reliability performance under the proposed HH strategy and the other three scheduling strategies. With the growth of the maximum tolerance time, the reliability of the four strategies shows a rising trend, the reliability of HH always is the highest, the reliability of the IPSO and IACO is between the HH and RR, while the reliability of the RR is the lowest. In the process of task scheduling, three strategies (HH, IPSO and IACO) not only meet the requirements of real-time tasks but also to minimize the task completion time as the optimization goal. The HH concentrates the advantages of the IPSO and IACO, so the HH outperforms the IPSO and IACO.

By comprehensively considering completion time, power consumption and reliability, the comprehensive performance of the HH is the best among the four scheduling strategies, so the HH is an efficient task scheduling strategy in fog computing.

## 6. Conclusions

This paper has proposed a HH algorithm for task scheduling in smart production lines with fog computing. The smart production line system model is set up and a related mathematic model concerning task scheduling is also given. Considering the features of terminal devices, tasks and fog nodes, an objective function of task scheduling of fog computing is formulated under the constraints of delay and energy consumption. To solve the task scheduling effectively, the HH algorithm which combines the advantages of IPSO and IACO is proposed to search for the optimal solution. The HH algorithm is validated by simulation, and compared with other three algorithms, our strategy demonstrates the best performance using three performance metrics. Our future research work will extend this research on task clustering and fog node clustering for task scheduling in fog computing.

## Author Contributions

Methodology, J.W. and D.L.; Software, J.W.; Validation, J.W. and D.L.; Formal Analysis, J.W.; Writing-Original Draft Preparation, J.W. and D.L.; Writing-Review & Editing, J.W. and D.L.; Visualization, J.W.; Supervision, D.L.; Project Administration, D.L.; Funding Acquisition, D.L.

## Funding

This research was funded by The National Key Research and Development Program of China] (grant No. 2018YFB1700500) and Science and Technology Planning Project of Guangdong Province (grant No. 2017B090913002 and 2017B090914002) and Smart Manufacturing Project of Integrated Standardization and New Model Application, and the Fundamental Research Funds for the Central Universities (grant No. 2017MS01) and New Model Application Project of Intelligent Manufacturing in the Ministry of Industry and Information (New Model Application of Traditional Chinese Medicine Granule).

## Acknowledgments

The authors thank the Intelligent Manufacturing Laboratory of SCUT.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Xu, L.; He, W.; Li, S. Internet of things in industries: A survey. IEEE Trans. Ind. Inform.
**2014**, 10, 2233–2243. [Google Scholar] [CrossRef] - Wan, J.; Tang, S.; Li, D.; Wang, S.; Liu, C.; Abbas, H.; Vasilakos, A. A manufacturing big data solution for active preventive maintenance. IEEE Trans. Ind. Inform.
**2017**, 13, 2039–2047. [Google Scholar] [CrossRef] - Geng, H. Internet of things and cloud computing. In Internet of Things and Data Analytics Handbook; Wiley: San Diego, CA, USA, 2017; p. 1. [Google Scholar]
- Bi, Z.; Xu, L.; Wang, C. Internet of things for enterprise systems of modern manufacturing. IEEE Trans. Ind. Inform.
**2014**, 10, 1537–1546. [Google Scholar] - Aazam, M.; Zeadally, S.; Harras, K. Deploying Fog Computing in Industrial Internet of Things and Industry 4.0. IEEE Trans. Ind. Inform.
**2018**, 14, 4674–4682. [Google Scholar] [CrossRef] - Yin, L.; Luo, J.; Luo, H. Tasks Scheduling and Resource Allocation in Fog Computing Based on Containers for Smart Manufacturing. IEEE Trans. Ind. Inform.
**2018**, 14, 4712–4721. [Google Scholar] [CrossRef] - Li, L.; Ota, K.; Dong, M. Deep Learning for Smart Industry: Efficient Manufacture Inspection System with Fog Computing. IEEE Trans. Ind. Inform.
**2018**, 14, 4665–4673. [Google Scholar] [CrossRef] - Mocanu, S.; Geampalia, G.; Chenaru, O.; Dobrescu, R. Fog-Based Solution for Real-Time Monitoring and Data Processing in Manufacturing. In Proceedings of the 2018 22nd International Conference on System Theory, Control and Computing (ICSTCC), Sinaia, Romania, 10–12 October 2018. [Google Scholar]
- Ashjaei, M.; Bengtsson, M. Enhancing smart maintenance management using fog computing technology. In Proceedings of the 2017 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), Singapore, 10–13 December 2017. [Google Scholar]
- Wang, J.; Li, D. Computing modes-based task processing for Industrial Internet of Things. Int. J. Auton. Adapt. Commun. Syst.
**2018**, in press. [Google Scholar] - Mouradian, C.; Naboulsi, D.; Yangui, S.; Glitho, R.; Morrow, M.; Polakos, P. A comprehensive survey on fog computing: State of-the-art and research challenges. IEEE Commun. Surv. Tutor.
**2017**, 20, 416–464. [Google Scholar] [CrossRef] - Bouzarkouna, I.; Sahnoun, M.; Sghaier, N.; Baudry, D.; Gout, C. Challenges Facing the Industrial Implementation of Fog Computing. In Proceedings of the 2018 IEEE 6th International Conference on Future Internet of Things and Cloud (FiCloud), Barcelona, Spain, 6–8 August 2018; pp. 341–348. [Google Scholar]
- Vaquero, L.; Rodero-Merino, L. Finding your way in the fog: Towards a comprehensive definition of fog computing. ACM SIGCOMM Comput. Commun. Rev.
**2014**, 44, 27–32. [Google Scholar] [CrossRef] - Baccarelli, E.; Naranjo, P.G.V.; Scarpiniti, M.; Abawajy, J H. Fog of everything: Energy-efficient networked computing architectures, research challenges, and a case study. IEEE Access
**2017**, 5, 9882–9910. [Google Scholar] [CrossRef] - Dubey, H.; Monteiro, A.; Constant, N.; Abtahi, M.; Borthakur, D.; Mahler, L.; Sun, Y.; Yang, Q.; Akbar, U.; Mankodiya, K. Fog computing in medical internet-of-things: Architecture, implementation, and applications. In Handbook of Large-Scale Distributed Computing in Smart Healthcare; Springer: Richardson, TX, USA, 2017; pp. 281–321. [Google Scholar]
- Wu, D.; Liu, S.; Zhang, L.; Terpenny, J.; Gao, R.; Kurfess, T.; Guzzo, J. A fog computing-based framework for process monitoring and prognosis in cyber-manufacturing. J. Manuf. Syst.
**2017**, 43, 25–34. [Google Scholar] [CrossRef] - Naha, R.K.; Garg, S.; Georgakopoulos, D.; Jayaraman, P.P.; Gao, L.; Xiang, Y.; Ranjan, R. Fog Computing: Survey of trends, architectures, requirements, and research directions. IEEE Access
**2018**, 6, 47980–48009. [Google Scholar] [CrossRef] - Markakis, E.K.; Karras, K.; Zotos, N.; Sideris, A.; Moysiadis, T.; Corsaro, A.; Alexiou, G.; Skianis, C.; Mastorakis, G.; Mavromoustakis, C.X.; et al. EXEGESIS: Extreme edge resource harvesting for a virtualized fog environment. IEEE Commun. Mag.
**2017**, 7, 7–173. [Google Scholar] [CrossRef] - Markakis, E.K.; Karras, K.; Sideris, A.; Alexiou, G.; Pallis, E. Computing, Caching, and Communication at the Edge: The Cornerstone for Building a Versatile 5G Ecosystem. IEEE Commun. Mag.
**2017**, 55, 152–157. [Google Scholar] [CrossRef] - Mutlag, A.A.; Ghani, M.K.A.; Arunkumar, N.; Mohamed, M.A.; Mohd, O. Enabling technologies for fog computing in healthcare IoT systems. Future Gener. Comput. Syst.
**2019**, 90, 62–78. [Google Scholar] [CrossRef] - Meng, X.; Wang, W.; Zhang, Z. Delay-constrained hybrid computation offloading with cloud and fog computing. IEEE Access
**2017**, 5, 21355–21367. [Google Scholar] [CrossRef] - Mao, Y.; Zhang, J.; Letaief, K. Dynamic computation offloading for mobile-edge computing with energy harvesting devices. IEEE J. Sel. Areas Commun.
**2016**, 34, 3590–3605. [Google Scholar] [CrossRef] - Zhang, G.; Shen, F.; Yang, Y.; Qian, H.; Yao, W. Fair Task Offloading among Fog Nodes in Fog Computing Networks. In Proceedings of the 2018 IEEE International Conference on Communications (ICC), Kansas City, MO, USA, 20–24 May 2018; pp. 1–6. [Google Scholar]
- Wan, J.; Chen, B.; Wang, S.; Xia, M.; Li, D.; Liu, C. Fog Computing for Energy-aware Load Balancing and Scheduling in Smart Factory. IEEE Trans. Ind. Inform.
**2018**, 14, 4548–4556. [Google Scholar] [CrossRef] - Yang, Y.; Zhao, S.; Zhang, W.; Chen, Y.; Luo, X.; Wang, J. DEBTS: Delay Energy Balanced Task Scheduling in Homogeneous Fog Networks. IEEE Internet Things J.
**2018**, 5, 2094–2106. [Google Scholar] [CrossRef] - Pham, X.; Huh, E. Towards task scheduling in a cloud-fog computing system. In Proceedings of the 2016 18th Asia-Pacific Network Operations and Management Symposium (APNOMS), Kanazawa, Japan, 5–7 October 2016; pp. 1–4. [Google Scholar]
- Chekired, D.; Khoukhi, L.; Mouftah, H. Industrial IoT Data Scheduling Based on Hierarchical Fog Computing: A Key for Enabling Smart Factory. IEEE Trans. Ind. Inform.
**2018**, 14, 4590–4602. [Google Scholar] [CrossRef] - Liu, Z.; Zhang, J.; Li, Y.; Bai, L.; Ji, Y. Joint jobs scheduling and lightpath provisioning in fog computing micro datacenter networks. IEEE/OSA J. Opt. Commun. Netw.
**2018**, 10, 152–163. [Google Scholar] [CrossRef] - Bittencourt, L.; Diaz-Montes, J.; Buyya, R.; Rana, O.; Parashar, M. Mobility-Aware Application Scheduling in Fog Computing. IEEE Cloud Comput.
**2017**, 4, 26–35. [Google Scholar] [CrossRef][Green Version] - Zeng, D.; Gu, L.; Guo, S.; Cheng, Z.; Yu, S. Joint optimization of task scheduling and image placement in fog computing supported software-defined embedded system. IEEE Trans. Comput.
**2016**, 65, 3702–3712. [Google Scholar] [CrossRef] - Deng, Y.; Chen, Z.; Zhang, D.; Zhao, M. Workload scheduling toward worst-case delay and optimal utility for single-hop Fog-IoT architecture. IET Commun.
**2018**, 12, 2164–2173. [Google Scholar] [CrossRef] - Chen, X.; Wang, L. Exploring Fog Computing-Based Adaptive Vehicular Data Scheduling Policies Through a Compositional Formal Method-PEPA. IEEE Commun. Lett.
**2017**, 21, 745–748. [Google Scholar] [CrossRef] - Zhao, S.; Yang, Y.; Shao, Z.; Yang, X.; Qian, H.; Wang, C. FEMOS: Fog-Enabled Multitier Operations Scheduling in Dynamic Wireless Networks. IEEE Internet Things J.
**2018**, 5, 1169–1183. [Google Scholar] [CrossRef] - Wang, J.; Li, D. Adaptive Computing Optimization in Software-Defined Network-Based Industrial Internet of Things with Fog Computing. Sensors
**2018**, 18, 2509. [Google Scholar] [CrossRef] [PubMed] - Ni, L.; Zhang, J.; Jiang, C.; Yan, C.; Yu, K. Resource Allocation Strategy in Fog Computing Based on Priced Timed Petri Nets. IEEE Internet Things J.
**2017**, 4, 1216–1228. [Google Scholar] [CrossRef] - Ben Alla, H.; Ben Alla, S.; Ezzati, A. A novel architecture for task scheduling based on Dynamic Queues and Particle Swarm Optimization in cloud computing. In Proceedings of the 2016 2nd International Conference on Cloud Computing Technologies and Applications (CloudTech), Marrakech, Morocco, 24–26 May 2016; pp. 108–114. [Google Scholar]
- Agarwal, M.; Srivastava, G.M.S. A genetic algorithm inspired task scheduling in cloud computing. In Proceedings of the 2016 International Conference on Computing, Communication and Automation (ICCCA), Noida, India, 29–30 April 2016; pp. 364–367. [Google Scholar]
- Dadmehr, R.; Sabihe, K.; Mohsen, N. A security aware scheduling in fog computing by hyper heuristic algorithm. In Proceedings of the 2017 3rd Iranian Conference on Signal Processing and Intelligent Systems (ICSPIS), Shahrood, Iran, 20–21 December 2017; pp. 87–92. [Google Scholar]
- Dai, Y.; Lou, Y.; Lu, X. A Task Scheduling Algorithm Based on Genetic Algorithm and Ant Colony Optimization Algorithm with Multi-QoS Constraints in Cloud Computing. In Proceedings of the 2015 7th International Conference on Intelligent Human-Machine Systems and Cybernetics, Hangzhou, China, 26–27 December 2015; pp. 428–431. [Google Scholar]
- Domanal, S.; Guddeti, R.; Buyya, R. A Hybrid Bio-Inspired Algorithm for Scheduling and Resource Management in Cloud Environment. IEEE Trans. Serv. Comput. 2017. [CrossRef]
- Santhosh, B.; Manjaiah, D. A hybrid AvgTask-Min and Max-Min algorithm for scheduling tasks in cloud computing. In Proceedings of the 2015 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), Kumaracoil, India, 18–19 December 2015; pp. 325–328. [Google Scholar]
- Rajput, S.; Kushwah, V. A Genetic Based Improved Load Balanced Min-Min Task Scheduling Algorithm for Load Balancing in Cloud Computing. In Proceedings of the 2016 8th International Conference on Computational Intelligence and Communication Networks (CICN), Tehri, India, 23–25 December 2016; pp. 677–681. [Google Scholar]

Parameters | Valve | Description |
---|---|---|

n | 100 | number of terminal devices |

m | 10 | number of fog nodes |

D_{i} | 10–50 Mb | data size of I_{i} |

C_{j} | 1–2G cycles/s | computing capacity of F_{j} |

θ_{c} | 300 cycles/bit | computing intensity |

P_{ir} | 0.1 W | transmission power of g_{i} |

P_{ie} | 0.05 W | idle power of g_{i} |

B | 100 MHz | link bandwidth |

μ_{T} | 0.7 | real-time satisfaction weight |

μ_{E} | 0.3 | energy consumption satisfaction weight |

ω | [0.4, 0.9] | inertia weight factor |

η | 0.9 | constriction factor |

K_{max} | 200 | maximum iterations |

c_{1}, c_{2} | 2 | accelerate factor |

r_{1}, r_{2}, r_{3} | 0–1 | random variable |

α | 1 | pheromone weight coefficient |

β | 1 | weight coefficient of heuristic information |

ρ | 0.5 | pheromone volatilization coefficient |

© 2019 by the authors. 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 (http://creativecommons.org/licenses/by/4.0/).