Joint Task Offloading and Resource Allocation in Vehicular Edge Computing Networks for Emergency Logistics

,


Introduction
Data from the International Disaster Database showed that the average annual number of natural disaster events over the last decade was almost double that of the 1980s [1].In emergency incidents, whether the emergency logistics can timely ensure the supply of emergency materials will directly afect the emergency response efciency [2].Terefore, Internet of Tings (IoT) technology has been widely used in emergency logistics operations, efectively promoting the improvement of emergency logistics efciency, among which Internet of Vehicles (IoV) technology is a typical representative.
Under the continuous promotion of IoT technology and wireless communication technology, the level of vehicle intelligence has been continuously improved [3].Te requirement of computational capability for the smart vehicle has been constantly increasing, thus cloud computing is introduced into the IoV, using cloud computing servers to provide centralized data storage and computing services for vehicles [4].Te features and economic benefts of cloud computing have been widely recognized [5]; however, the disadvantages still exist.Cloud servers are often centrally deployed in remote areas, and IoT makes the amount of data that needs to be processed increase faster, making it harder for the cloud computing paradigm to meet the low-latency requirement of smart applications, especially in VEC tasks [6].To compensate for the shortage of cloud computing in latency, VEC was proposed, which improves the quality of information services by setting computing nodes such as roadside units (RSUs) near the vehicle [7].
VEC is a new type of computing paradigm that introduced MEC into vehicular networks [8].In VECNs, vehicles can make use of MEC servers or other vehicles to compute, greatly improving the quality of service and reducing service latency [9].Te algorithm to ofoad the computational task and the allocation method of resources play a key role in the efciency of VECNs [10].Several excellent works have been proposed to tackle the problem.Aiming at optimizing the time delay in the unloading process, some researchers use queuing theory, game theory, particle swarm optimization, deep learning algorithm, and other methods to build a computational task ofoad model [11][12][13][14].Other studies focus on reducing energy consumption or the dual optimization of energy consumption and time delay [15][16][17][18][19]. Te reliability and use of computing resources have received the attention from many researchers [8,[20][21][22].Research on the JTORA problem is used to treat computing tasks as a whole, but this is not the case in emergency logistics.Te computational tasks typically performed by the VEC in emergency logistics are to deal with data from multisensors on the vehicle, and the tasks consist of multiple steps.Generally, the process is divided into three steps: data preprocessing, feature extraction, and data fusion.Te computational complexity and the size of the data for each step are diferent.Terefore, the task unloading and resource allocation scheme should be designed according to the diferences in each step, thus achieving the expected optimization efect.
Tis paper makes targeted research on the JTORA problem in VECNs for emergency logistics.We designed a joint optimization method that comprehensively considers the computational complexity and computational amount of each computational step to maximize task assignment gains, which is measured by a weighted sum of time consumption and the number of devices occupied in the task.
Te rest of the paper is organized as follows.Te model of the system and the problem is formulated in Section 2. Section 3 describes a method, which we call the hybrid solution of GSA and PSO and introduces the basic idea and steps of the algorithm.Te simulation experiment is designed in Section 4, and the results are analyzed.Finally, Section 5 gives a summary of our work and makes suggestions on the application of the method.

Model Formulation
We consider a VECNs system for emergency logistics with multivehicle and multiedge devices as illustrated in Figure 1, in which each vehicle is equipped with a computing terminal and many sensors.Te computing terminals and edge devices (RSUs) are regarded as information agents (IAs) with certain computing and communication capabilities.Any two IAs in the network can be connected, but the communication speed is different.Te sensing information of the sensors can be handed over to any IA for processing, but it must be transmitted through the computing terminal of the vehicle, on which the sensor is deployed.We denote the IA set in the VEC system as X = {X(1), X(2), X(3), . .., X(E)}, where E represents the total number of IA.Te computational task is initiated from a vehicle in the feet and needs to process simultaneous information from several sensors in the vehicle.We denote the set of sensing information as S = {S(1), S(2), S(3), . .., S(N)}, where N represents the number of sensors.

System Model.
Te procedure of the computational task is shown in Figure 2. It consists of three steps: data preprocessing, feature extraction, and data fusion, which are diferent in computational complexity.In addition, the size of the data changes at each step of the process.For ease of reference, the key notations used in the article are summarized in Table 1.
Te computational task is generated from a vehicle, and sensing information is sent to IA to process.Te IA should complete the task or hand it over to other IAs.Te computational task with a large amount of data and low computational complexity may be handed over to an IA with a good communication channel but weak computing power, and vice versa.Each IA can undertake multiple missions at the same step of the task.Multiple IAs cooperate through the division of the computational task, thus improving the overall performance of the VECNs system.

Problem Formulation.
In the computation of the VECNs for emergency logistics, the response speed is the primary factor that must be considered.Secondly, to efectively deal with emergencies in complex environments, the task should occupy as little equipment as possible to ensure that enough computing resources can be reserved to deal with multiple emergencies that may occur concurrently.
We assume that S(i) is initiated from X(e1) and handed over to information agents X(e2), X(e3), and X(e4).Te transmission of information is subject to both sending and receiving capabilities, so it is necessary to use the smaller one as the calculation basis.At the same time, it should be considered that if the data are processed by the IA itself, the transmission time is 0. Te computational time consumed can be obtained by multiplying the data size by the computational complexity and then dividing it by the calculation capacity.Based on the above-given assumptions, we can analyze the computational procedure one by one.
Take the data preprocessing step as an example, for each S(i), the data size is Q(i)•RI(i, 1) and the computational complexity index is CI(i, 1).Te sending capacity assigned to S(i) is SC(e1)•SCR(i, e1,1), and the receiving capacity assigned to S(i) is RC(e2)•RCR(i, e2, 1).Te time consumed for transmitting TT(i, 1) and time consumed for computing TC (i, 1) in the frst step can be calculated by the following formula: 2 Mathematical Problems in Engineering TT(i, 1) � , SC(e1)•SCR(i, e1, 1) < RC(e2)•RCR(i, e2, 1), e1 ≠ e2, Te total time consumed in the data preprocessing step can be calculated as (2) Equation ( 3) is a restriction condition.Te time consumption of the other two steps is calculated in the same way as mentioned above.Te objective function of the JTORA problem is α and β are the weight coefcient of the time consumed and the number of IA used in the task, respectively.Te problem can be divided into subproblems: the task ofoading (TO) problem is to decide which information agent should the sensing information be delivered for processing, and the resource allocation (RA) problem is to decide the number of resources the information agent should allocate to perform the task.

Emergency logistics feet
Roadside Unit Roadside Unit

Proposed Methods
Te TO problem is a complex knapsack problem (KP), which is a classical combinatorial optimization problem [23].In the literature, algorithms based on dynamic programming and randomized algorithms based on evolutionary strategies are regarded as the main methods of solving KP [24].As a typical evolutionary algorithm, the genetic algorithm (GA) has achieved considerable success in solving the knapsack problem [25].
Te RA problem is a continuous nonlinear problem.PSO has been widely applied in solving such problems due to the advantages of simple rules, few parameter sets, and fast convergence speed [26,27].
Aivaliotis-Apostolopoulos and Loukidis proposed a hybrid algorithm that nests particle swarm optimization operations in the genetic algorithm, which is named the swarming genetic algorithm (SGA) [28].Examined by continuous optimization problems and discrete (traveling salesman) problems, the SGA has overall signifcantly better performance than PSO, GA, and two existing hybrid algorithms in terms of accuracy.
However, SGA has greater randomness in the selection of schemes and has a strong dependence on the initial solution population.Terefore, we propose the genetic simulated annealing (GSA) algorithm, which uses the simulated annealing process to control the execution of the genetic algorithm, to avoid the reduction of algorithm efciency caused by the initial population.Ten, we fuse the GSA and PSO algorithms to solve the JTORA problem and name the algorithm a hybrid solution of the GSA and PSO algorithms (GSA-PSO), as shown in Figure 3.
In GSA-PSO, GA is used to generate and optimize the task-ofoading scheme; PSO is used to calculate the optimal resource allocation based on the task-ofoading scheme.Te simulated annealing process is used to control GA execution to avoid the infuence of a weak initial population on the calculation process.Te solution steps of GSA-PSO are as follows: Step 1: generate the initial population at random.Each seed of the population represents a task-ofoading scheme and contains 2N + 1 random numbers, which are greater than 0 and less than or equal to E. For example, if N is 3 and E is 7, a scheme composed of [1,2,3,4,5,6,7], means that S(1), S(2), and S(3) are, respectively, assigned to X(1), X(2), and X(3) at the data preprocessing step and are, respectively, assigned to X(4), X(5), and X(6) at the feature extraction step and are assigned to X (7) at the data fusion step.
Step 2: pass the initial population to PSO and calculate the best SCR, RCR, and CCR value to optimize resource allocation.
Step 3: check the end condition.If the number of iterations reaches, the computation should stop; otherwise, it should go to Step 4.
Step 5: check the ftness index.If the ftness index of this generation is better than before, the computation should go to Step 7, else it should go to Step 6.
Step 6: check the annealing coefcient.If the annealing coefcient is greater than zero, the computation should subtract 1 from the annealing coefcient and go to Step 7, else it should reinitialize the population, reset the annealing coefcient, calculate the resource allocation, and ftness, then go to Step 7. Tis step is to ensure that if the ftness index is continuously declining after several generations of evolution, the population should be reinitialized.Step 7: execute the crossover and mutation process of the population according to the rules of GA to produce a new population, then go to Step 2.

Experimental Results and Analysis
To verify the performance of the GSA-PSO algorithm, a simulation experiment is designed in the Matlab simulation environment with multiple groups of experimental data.

VECNs System Composed of 6 Vehicles and 1 Roadside
Unit.We consider a VECNs system composed of 6 vehicles and 1 roadside unit and calculate the solution scheme of the JTORA problem with GSA-PSO and SGA, respectively.Finally, the results are compared and analyzed.Various indicators are shown in Table 2. Te values of RI, CI, SC, RC, and CC are given by experimental data.Te iteration times of the two methods are set to 100, the number of seeds per generation is set to 100, the annealing coefcient is set to 10, α,β is set to 1, and other relevant parameters of the GA and PSO algorithms adopt the same settings.Te two methods are used, respectively, to solve the same JTORA problem.Te efectiveness of the two methods is compared by recording the optimal value of each iteration.
Figures 4(a) and 4(b) are the results of the GSA-PSO and SGA simulations, respectively.In Figure 4, the abscissa represents an index value of the number of iterations, and the ordinate represents the optimal value.It can be seen that both results are better than the randomly generated scheme, by comparing the initial scheme with the optimal scheme.Furthermore, we can see that the initial population is regenerated through the simulated annealing process in the GSA-PSO algorithm, and the result (19.45) is better than the result of SGA (20.18).Te fnal optimal scheme of the algorithm GSA-PSO is [1,1,3,3,3,1,4], and SGA is [3,4,1,7,4,4,7].

VECNs System Composed of 10 Vehicles and 3 Roadside
Units.To test the infuence of IA quantity on the quality of service, we consider a VECNs system composed of 10 vehicles and 3 roadside units.Various indicators are shown in Table 3. Te iteration times of the two methods are set to 200, the number of seeds per generation is set to 200, the annealing coefcient is set to 30, and other parameters remain unchanged.
Figures 5(a) and 5(b) are the results of the GSA-PSO and SGA simulations, respectively.Te result of GSA-PSO (17.99) is better than the result of SGA (19.59).Te fnal optimal scheme of algorithm GSA-PSO is [13,12,1,12,9,13,7], and SGA is [1, 3, 1, 3, 2, 1, 13].By comparing the results with those in Figure 4, we can also conclude that the formance of the VECNs system can be improved by increasing the number of IAs.Tis conclusion is consistent with universal logic and also shows the efectiveness of our algorithm.
We further tested more IA cases with the same parameters.Each time an IA, whose CC, SC, and RC are 200, is added to the VECNs, the results are shown in Figure 6.In Figure 6, the abscissa represents an index value of the number of IAs and the ordinate represents the optimal value.
It can be seen that when the number of RSUs is higher than the number of sensing information, the performance of

VECNs System Composed of High-Performance IAs.
To test the infuence of IA performance on the quality of service, we consider two VECNs systems, which are the same as we used in Section 4.1, but one improves the computing capability (CC) of each IA by 10%, and the other improves the network communication capability (SC and RC) of each IA by 10%.
Figure 7(a) is the simulation results of the VECNs system, whose computing capability (CC) of each IA is improved by 10%. Figure 7(b) is the simulation results of the VECNs system, whose network communication capability (SC, RC) of each IA is improved by 10%.It can be seen that the performance of the VECNs system can be improved by improving the performance of IAs.

Conclusions
In this paper, the JTORA problem is decomposed into three computational steps according to the computational tasks that the VEC typically performs in emergency logistics.A GSA-PSO algorithm is proposed, considering the computational complexity and the size of the data for each computational step.Te performance of the algorithm is evaluated by a simulation experiment and the results proved its efectiveness.By comparing several groups of experimental results, we can also conclude that the performance of the VECNs system can be improved in two ways.One is to increase the number of IAs, but the efect decreases when the number of RSUs is higher than the number of sensing information needed.Te other is to improve the capability of IAs, which contains computing and network communication capabilities.

Figure 3 :
Figure 3: Te algorithmic procedure of the hybrid solution of the genetically simulated annealing algorithm and the particle swarm optimization algorithm.

Figure 4 :
Figure 4: Te simulation results of the VECNs system composed of 6 vehicles and 1 roadside unit.

Table 3 :
Values of various indicators in a VECNs system composed of 10 vehicles and 3 roadside units.

Figure 5 :
Figure 5: Te simulation results of the VECNs system composed of 10 vehicles and 3 roadside units.
CCRSet of the proportion of computing capacity assigned by IA to sensing information.CCR (i, e, j) means that the information agent X(e) assigns CCR (i, e, j) of the computing capacity to S(i) at the j-th step TT Set of the time consumed for transmitting.TT (i, j) means the time consumed by S(i) to transmit in the j-th step TC Set of the time consumed for computing.TC(i, j) means the time consumed by S(i) to compute in the j-th step TS Set of the time consumed in each step.TS (j) means the time consumed in the j-th step 4 Mathematical Problems in Engineering

Table 2 :
Values of various indicators in a VECNs system composed of 6 vehicles and 1 roadside unit.