Edge Computing for Resource Allocation in Smart Cities Based on the IoT

: Smart cities using the Internet of Things (IoT) can operate various IoT systems with better services that provide intelligent and efﬁcient solutions for various aspects of urban life. With the rapidly growing number of IoT systems, the many smart city services, and their various quality of service (QoS) constraints, servers face the challenge of allocating limited resources across all Internet-based applications to achieve an efﬁcient per-formance . The presence of a cloud in the IoT system of a smart city results in high energy con-sumption and delays in the network. Edge computing is based on a cloud computing framework where computation, storage, and network resources are moved close to the data source. The IoT framework is identical to cloud computing. The critical issue in edge computing when executing tasks generated by IoT systems is the efﬁcient use of energy while maintaining delay limitations. In this paper, we study a multicriteria optimization approach for resource allocation with distributed edge computing in IoT-based smart cities . We present a three-layer network architecture for IoT-based smart cities. An edge resource allocation scheme based on an auctionable approach is proposed to ensure efﬁcient resource computation for delay-sensitive tasks.


Introduction
Smart cities are technologically advanced metropolitan areas that use information and communication technology to solve their particular challenges and to help implement sustainable social, economic, or environmental development. In recent years, transforming urban areas into smart cities has become an objective for many cities worldwide, which have developed specific strategies that can be used in different ways to achieve this goal. Deploying 5G technology as part of a smart city approach enhances productivity and the standard of living and reduces costs and resource consumption. The significant advantages of intelligent services are that they provide more accommodation, shared infrastructure, resources, and flexibility, improved quality of service (QoS), and quality of experience (QoE) methods, depending on the required service and infrastructure location. These services improve citizens' quality of life and provide a better user experience [1,2].
IoT systems at home benefit energy demand and make life more comfortable and enjoyable. In an IoT-based smart city, many facilities are controlled by IoT devices, and the various resources required to run the services are deployed using distant cloud services. The QoS conditions for deployment of diverse, intelligent city services include excellent computation capability, exact delay limitations, efficient power use, etc.; i.e., there is a hard limit on the tolerable delay in virtual reality. In contrast, in video monitoring, the unavoidable delay is adaptable. Moreover, if the processing of a task in an intelligent traffic application exceeds the desired time, an accident may occur. IoT-based smart cities comprise a variety of use cases, such as smart home IoT systems that have beneficial effects on energy consumption and provide a more relaxed and enjoyable life. Smart cities use many IoT systems to control many facilities, and the various resources required to run the facilities are stored on remote cloud servers. Intelligent buildings help improve occupant comfort and reduce unnecessary energy consumption, e.g., in banks, businesses, shopping malls, restaurants, universities, etc. Intelligent medical systems permit physicians to observe diseases by utilizing smart devices anywhere. This process lowers the cost of medical treatment and enhances the physician and patient experience. Intelligent implementation of transportation, vehicle identification, and route monitoring improve cities' transportation network security and capability [3][4][5][6].
The growth of IoT systems and the variety of intelligent city-based IoT applications, with their diverse QoS requirements, make it difficult to operate these systems efficiently [7]. The large amounts of information produced by these systems make withdrawing money from a remote data center costly and inefficient. The information produced by IoT systems and transmitted over the internet to a distant cloud requires an abundance of bandwidth and power in the IoT network. Furthermore, this leads to an increased load on the cellular network as these systems access cloud servers. Using core cloud services over a cellular network can result in restrictions for IoT application areas requiring lower latency and higher efficiency. This highlights the significance of edge computing patterns with MEC quality. The basic idea of MEC is to increase cloud capacity at the edges of mobile networks. Theoretically, this can be achieved by locating storage and computing resources at the edge of the radio access network (RAN) on demand; some of the capabilities provided by the cloud are shifted to these extra resources at the edge. Standard features of MEC technology include extremely low latency, location information, and background information about the network. The typical cloud computing model encounters difficulties, such as communication costs and undesirable delays, because of the restricted computing capacity of intelligent IoT systems and the remotely accessed cloud server. These challenges affect delayed operations and applications involving IoT sensing devices. One primary concern is to avoid long delays during the execution of IoT systems due to the problem of information congestion in IoT-enabled smart cities [8][9][10].
The RAN is an essential element of a wireless telecommunications system connecting various devices to other network parts through a radio link. The RAN connects client devices, such as cell phones, computers, or remotely controlled machines, via a fiber-optic or wireless backhaul link. This connection links to the core network, which manages subscriber information and location data, among other things [11]. Modern computational techniques are an appropriate solution in this context, as they allow storage and computational resources to be moved closer to IoT systems, as represented by base stations (BSs). The edge computing used in UAVs [12], a fundamental level in the IoT framework, reduces the delay between IoT systems and the computational backend infrastructure (mini-cloud). The UAV level adjacent to the IoT system offers more minor delays; however, it offers fewer resources than the use of BSs and a mini-cloud. Therefore, an effective, modern edge resource allocation system ensuring QoS for various smart city use cases is required. Auctionable methods are appropriate for dealing with the difficulty of allocating multiple conditional resources. Allocating resources in environmental IoT systems requires numerous entities, such as virtual machines (VMs), to complete the most significant tasks and undertake VM distribution. Moreover, the balance point of the simulation game may be superior resource allocation for specific tasks and VMs, where original resource allocation optimization occurs locally at each edge's site, balancing the minimization of energy consumption and delay for QoS assurance. A distributed technique can be applied to forward the overflow workload, thus balancing resource usage and achieving superior resource management [13,14].
Edge computing techniques are one prospective solution as they allow computing and storage resources to be moved closer to IoT devices. The middle layer in IoT systems is edge computing, which fills the delay gap between IoT systems and the bottom-layer cloud computing framework. The edge layer connects to the IoT devices and offers lower service delay, but it has fewer resources than a remote cloud. Therefore, an efficient edge resource allocation method is needed to guarantee the QoS of various innovative city applications. Auction-based methods are one potential approach when investigating the complexity of multicriteria resource allocation [15].
The contributions of this article can be summarized as follows: 1.
We used a three-layer network structure for IoT-based smart cities in this work. The first layer was the IoT layer, consisting of IoT systems with various smart city implementations, and the second layer contained the edge layer. The third layer was the cloud layer.
(1) Controllers were deployed at the center or the edge of UAVs to obtain resource allocation results for tasks and VMs. (2) For delay-sensitive tasks in smart cities relying on the IoT, an auction-based approach for allocating edge resources is proposed to minimize the energy consumed and computation delay for tasks.
A comparative study of the proposed method and existing techniques was undertaken to illustrate the efficiency of the suggested approach. (4) Simulation results indicated that the proposed method outperformed current techniques.

2.
The paper is structured as follows: Section 2 reviews the related literature, Section 3 presents the system structure and problem formulation, Section 4 introduces the proposed approach, and the simulation results are discussed in Section 5. Finally, Section 6 concludes the paper.

Literature Review
Many researchers have proposed edge solutions for resource allocation problems, including energy consumption and service delays, in smart cities based on IoT systems to make people's lives comfortable. Some of these solutions are described below.
Yang et al. [16] studied the effective use of energy for resource distribution in a UAVbased MEC network and solved the network's energy reduction issues. Energy efficiency in a UAV-based MEC was investigated in [17] through a functional migration method and route planning. In [18], edge resources were allocated to minimize average latency while numerous IoT systems powered multiple smart city facilities and met the edge server capacity limits. Another article [19] proposed an algorithm for offloading tasks with low complexity and balancing energy efficiency based on two-sided correspondence in an IoT system; the suggested method is innovative in dynamically balancing energy efficiency and delay and stably offloading tasks with low complexity.
Abdullah et al. [20] investigated the influence of the edge network's computation offloading framework on original applications and proposed a light-effect migration-based framework for computation offloading. Another article [21] proposed a resource-based task allocation method and executed and examined it to obtain enhanced efficiency in a heterogeneous multi-cloud network. The suggested task distribution method reduced the consumed energy and decreased the time between tasks. A joint algorithm for consumer choice and resource allocation in MEC has been proposed to optimize energy capacity [22]. MEC offers cloud services at the edge of the cellular network. With ultra-low latency and significant bandwidth, the use of edge computing to support IoT systems is the backbone for advancing intelligent systems and use cases, such as smart homes, competent healthcare, intelligent traffic control, intelligent farming, and smart cities [23].
Anagnostopoulos et al. [24] examined specific techniques for offloading computational power at the network edge to self-computing nodes, a context characterized by insufficient resources and many restrictions that can be violated when performing analytical tasks. Chen et al. [25] proposed a model that could improve the allocation of system resources and efficiently optimize the objective function and customer satisfaction for computation offloading methods in edge computing networks, considering UAV transmission and clean energy.
Attiya et al. [26] suggested another task scheduler for managing IoT application tasks using a CCE. Specifically, they suggested a new hybrid swarm intelligence method, based on a modified manta ray foraging optimization (MRFO) algorithm and the salp swarm algorithm (SSA), to process the scheduling of IoT tasks in cloud computing. Sahraoui et al. [27] discussed the role of IoT systems in social relationship management, including the issue of the bursting of social relationships in IoT systems, and reviewed the suggested ASIbased solutions, such as social-oriented machine-learning and deep-learning techniques. A modified Harris hawks optimization (HHO) algorithm using simulated annealing (SA) for scheduling jobs in the cloud environment was presented in [28]. Iman El-Dessouki et al. [29] focused on combining a smart grid with smart cities with 5G technology and demonstrated the benefits of network slicing and of adopting virtual MPN systems for smart cities. Aamir Anwar et al. [30] proposed a framework for achieving an optimal solution for smart, secure parking that has broader implications for applying 5G in smart cities.

System Structure and Problem Formulation
This study investigated a multicriteria optimization issue in an IoT-based smart city to minimize energy and delay. Here, we first introduce a three-layer network structure for IoT-based smart cities. Then, we develop an auctionable edge resource allocation method to guarantee low computational delay with energy-saving benefits for delay-sensitive applications in IoT systems. Figure 1 shows a three-layer network structure in an IoT-enabled smart city. computation offloading methods in edge computing networks, considering UAV transmission and clean energy. Attiya et al. [26] suggested another task scheduler for managing IoT application tasks using a CCE. Specifically, they suggested a new hybrid swarm intelligence method, based on a modified manta ray foraging optimization (MRFO) algorithm and the salp swarm algorithm (SSA), to process the scheduling of IoT tasks in cloud computing. Sahraoui et al. [27] discussed the role of IoT systems in social relationship management, including the issue of the bursting of social relationships in IoT systems, and reviewed the suggested ASI-based solutions, such as social-oriented machine-learning and deep-learning techniques. A modified Harris hawks optimization (HHO) algorithm using simulated annealing (SA) for scheduling jobs in the cloud environment was presented in [28]. Iman El-Dessouki et al. [29] focused on combining a smart grid with smart cities with 5G technology and demonstrated the benefits of network slicing and of adopting virtual MPN systems for smart cities. Aamir Anwar et al. [30] proposed a framework for achieving an optimal solution for smart, secure parking that has broader implications for applying 5G in smart cities.

System Structure and Problem Formulation
This study investigated a multicriteria optimization issue in an IoT-based smart city to minimize energy and delay. Here, we first introduce a three-layer network structure for IoT-based smart cities. Then, we develop an auctionable edge resource allocation method to guarantee low computational delay with energy-saving benefits for delay-sensitive applications in IoT systems. Figure 1 shows a three-layer network structure in an IoT-enabled smart city. The bottom layer comprises IoT systems that manage ongoing tasks created by the IoT systems' changing sizes. The IoT systems transmit QoS requests and task characteristics, such as the size of the task and the time limit, to the UAVs. In addition, the restricted The bottom layer comprises IoT systems that manage ongoing tasks created by the IoT systems' changing sizes. The IoT systems transmit QoS requests and task characteristics, such as the size of the task and the time limit, to the UAVs. In addition, the restricted potential computation power and short operating period of the IoT systems result in the tasks being offloaded to the UAVs to minimize energy consumption and computational time.

System Structure
The UAV layer is near the IoT layer and includes VMs and controllers responsible for resource allocation, energy and delay analysis, and decision making. The top layer is the cloud layer (mini-cloud), which consists of VMs, and the controller comprises three subcomponents: resource distribution, energy and delays analysis, and decision making. Figure 2 depicts the resource allocator and evaluates the accessible resources at the (drone) edge and in the cloud layers for allocating tasks created via an IoT system to suitable VMs. The power and delay analysis unit assess whether the desired task has been completed with the lowest power consumption and delay ewhile satisfying the time limit. The decision-maker can utilize the suggested auction-enabled method to choose a suitable VM for tasks. potential computation power and short operating period of the IoT systems result in the tasks being offloaded to the UAVs to minimize energy consumption and computational time.
The UAV layer is near the IoT layer and includes VMs and controllers responsible for resource allocation, energy and delay analysis, and decision making.
The top layer is the cloud layer (mini-cloud), which consists of VMs, and the controller comprises three subcomponents: resource distribution, energy and delays analysis, and decision making. Figure 2 depicts the resource allocator and evaluates the accessible resources at the (drone) edge and in the cloud layers for allocating tasks created via an IoT system to suitable VMs. The power and delay analysis unit assess whether the desired task has been completed with the lowest power consumption and delay ewhile satisfying the time limit. The decision-maker can utilize the suggested auction-enabled method to choose a suitable VM for tasks. The drone-edge and cloud layers send the controller VM data, for example, computation capabilities and power consumption. The controller utilizes the information nontask and the VM data to allocate the task to a suitable VM. Every controller in an IoT system gathers information via its insurance region and operates through drone or cloud layers. After obtaining the task, the controller takes the subsequent steps: the task will be rejected if the delay for the task outcomes does not satisfy the time conditions; otherwise, the controller transmits the task to the appropriate preference queue according to its preference layer; i.e., the deadline. For each task, the controller checks whether the accessible resources at the edge level are adequate to perform the task or otherwise checks other preference queues. The task is accomplished if the requirement is satisfied, considering the delays and consumed power for the corresponding VM. If not, the task is transmitted to the cloud level for implementation.

Problem Formulation
All intelligent-city use cases involve massive quantities of IoT systems. Assume that there are n IoT devices and suppose that numerous delay-sensitive tasks at the IoT level must be addressed locally (i.e., in the IoT system) or at the UAV or cloud level. Table 1 lists the different symbols used in this article. The drone-edge and cloud layers send the controller VM data, for example, computation capabilities and power consumption. The controller utilizes the information non-task and the VM data to allocate the task to a suitable VM. Every controller in an IoT system gathers information via its insurance region and operates through drone or cloud layers. After obtaining the task, the controller takes the subsequent steps: the task will be rejected if the delay for the task outcomes does not satisfy the time conditions; otherwise, the controller transmits the task to the appropriate preference queue according to its preference layer; i.e., the deadline. For each task, the controller checks whether the accessible resources at the edge level are adequate to perform the task or otherwise checks other preference queues. The task is accomplished if the requirement is satisfied, considering the delays and consumed power for the corresponding VM. If not, the task is transmitted to the cloud level for implementation.

Problem Formulation
All intelligent-city use cases involve massive quantities of IoT systems. Assume that there are n IoT devices and suppose that numerous delay-sensitive tasks at the IoT level must be addressed locally (i.e., in the IoT system) or at the UAV or cloud level. Table 1 lists the different symbols used in this article.
A task (U i ) produced in an IoT system ( D i ), where i = 1, 2,..., n, has the following characteristics: task size (U szi ), (E i.l ) energy consumed/CPU cycle, computational capacity (f i ) in terms of CPU cycles/second, and deadline (dl i ). This task information is sent to the controller, which undertakes resource allocation to reduce energy consumption and delay simultaneously. There are three possible cases for calculation, depending on where the calculation occurs: the local case (in the IoT layer), edge case (in the UAV layer), or cloud case (in the mini-cloud layer). The controller maintains two main queues: Q E for the UAV level and Q C for the cloud level. Let (L dl ) and (H dl ) be the lowest and highest thresholds through to the deadline.
Assume VM edge and VM cloud are virtual machines (VMs) in the edge and cloud layers. The computation capability describes each VMj ∈ {VM edge or VM cloud } f j in terms of CPU cycles/second and consumed energy E ij for each CPU cycle. The calculation of delay and the consumed power is explained below for each case.
With the local method, the IoT device performs the task calculation. The completion time T i.l of U i is Now, the computing delay d i.l for device D i is ST i.l represents the beginning time of U i for device D i . The consumed energy E i.l for D i due to U i is: In UAV or cloud mode, the computations are performed on a single VM at the edge or cloud level. Suppose that the task (U i ) is offloaded toward the UAVs at the edge level. The transmission time (T tr.i ) of the task (U i ) is: (4) f i.link is the transmission capability of the communication channel, and the implementation time T i.j of U i on VMj ∈ ES is Therefore, the computational delay d i.j of Ui due to task offloading is Here, ST i.j represents the starting time of U i in VMj, supposing E t to be the energy used to transmit information for each CPU cycle. The transmitted energy E t.i due to Ui is calculated as follows: The computational energy E i.j of U i in VMj is: Therefore, the overall used energy tot. E i.j as a result of task offloading to the edge level is: Assume that h i is the binary predictor that states whether a task is performed locally or by offloading to UAVs or the cloud level: The delay edge_d i.j and the expended energy E i.j of task U i executed on V M j are: Further, the following restriction is supposed to be met: where E max is the maximum power usage for the technique. The multiple criteria optimization issue is computed as one object (y i.j ) to minimize power and delays. It is developed as follows: where d max represents the maximum delay, and α is the weight element related to the delay and consumed power. Likewise, for n devices, the number of loss functions y t is computed as: (15) in which x i.j is a binary variable that demonstrates whether U i is performed on VMj or not. The purpose of this operation is to minimize y t as follows:

Proposed Approach
The auctionable method will be one of the primary methods for resource allocation with a multiagent approach in future generations. The main advantage of auctionable methods is that they are not based on the utility of the nodes. Thus, they can achieve the de-Information 2022, 13, 328 8 of 12 sired resource allocation without knowing the utility functions of the entities involved. The auctionable approach can help address significant research challenges in IoT environments, such as network entity obstacles, economic issues, decentralized resource allocation, and limited or missing information about network status and benefits. In auctionable methods, a central controller decides on the distribution based on the recommendations submitted by the agents participating in the auctionable system. In this study, we developed a resource allocation approach using an auction-based method to minimize delays and consumed power in IoT systems.
We suppose that every VM edge or VM cloud operates as a proxy and can offer a proposal to carry out a task or represent an object. Each agent provides suggestions for tasks at the head of the queue. It is assumed that only one VM can assign a task. A loss function or proposal value determines the priority of a VM within a group of VMs that are eligible for allocation. Every VM receives a prize based on the speed with which it completes the task before the deadline. The controller decider can use the suggested auctionable approach to choose a group of capable VMs, and the winner performs the task to meet the goal.
A VM's capacity to perform a task Ui depends on the objective value developed in Equation (14). The VMs in VM edge meet the deadline (dl i ) limitations for the task U i and make offers in the auction. The offer value is similar to the loss value. For the VMs that make the offers, the reward profit received from performing the calculations for U i is determined by the following equation: Here, β = 0. The victor V M j among the group of possible VMs that contribute to the auction is determined using the following equation:

Simulation Result
In this study, we simulated the system models using MATLAB R2020a on an Intel ® Core™ i7-10700K processor running at 5.10 GHz, with 16 GB RAM, GPU/NVIDIA Gtx 1080, and Windows 10/64 bit. Table 2 shows the detailed simulation parameters used in this article. The suggested auctionable method for distributing edge resources was compared in terms of two primary forms:

1.
Local processing: task calculation is performed over the IoT system to produce the task.

2.
Edge offloading: complete tasks created with the IoT systems are offloaded to the UAV level, utilizing a greedy method to implement tasks. The metrics used to test the system's operation included power usage and average delay. To calculate the capacity of the suggested method, we compared it with its competitors and studied different schemes, such as switching various tasks and VMs. We supposed that the task arrival would support a Poisson distribution with an expected value of λ = 0.8. The execution as a function of the tasks implemented is illustrated in Figures 3 and 4 We supposed that the task arrival would support a Poisson distribution with an expected value of λ = 0.8. The execution as a function of the tasks implemented is illustrated in Figures 3 and 4. The number of VMs was fixed at about 30.    Figure 3 that the delays also increased as the number of tasks increased. The delay in the local case was more significant than for the edge (UAV offloading) case and the suggested auction-enabled approach. The device's processing power was weak, so it was not easy to process many tasks.
The delay was low with the edge method (UAV offloading), but there was a bottleneck in the transmission delay. The number of VMs remained unchanged as many tasks were added, incrementally increasing the computation delay. However, the delay was We supposed that the task arrival would support a Poisson distribution with an expected value of λ = 0.8. The execution as a function of the tasks implemented is illustrated in Figures 3 and 4. The number of VMs was fixed at about 30.   Figure 3 displays the typical computational delays when the tasks were increased. It can be observed in Figure 3 that the delays also increased as the number of tasks increased. The delay in the local case was more significant than for the edge (UAV offloading) case and the suggested auction-enabled approach. The device's processing power was weak, so it was not easy to process many tasks.
The delay was low with the edge method (UAV offloading), but there was a bottleneck in the transmission delay. The number of VMs remained unchanged as many tasks were added, incrementally increasing the computation delay. However, the delay was  Figure 3 displays the typical computational delays when the tasks were increased. It can be observed in Figure 3 that the delays also increased as the number of tasks increased. The delay in the local case was more significant than for the edge (UAV offloading) case and the suggested auction-enabled approach. The device's processing power was weak, so it was not easy to process many tasks.
The delay was low with the edge method (UAV offloading), but there was a bottleneck in the transmission delay. The number of VMs remained unchanged as many tasks were added, incrementally increasing the computation delay. However, the delay was lower in the suggested auction-based approach than in the greedy method (UAV offloading). The equilibrium between offloading tasks to the UAV level and local computation in the auction-based form maintained the same computational delay. Figure 4 shows that the consumed energy increased with the number of tasks. The device had to consume a lot of energy to perform the tasks. The number of tasks increased the VM's operation time, thus increasing the consumed energy. Moreover, the VMs' timeout also entailed energy utilization. The proposed method consumed less energy in comparison to the other algorithms. Choosing a VM by relying on the target (or bid) value and reward value worked well in the auctionable approach. Figures 5 and 6 show the operating system for the case with VMs at the edge level. At this point, the number of tasks was fixed at 80. The typical delay relating to the multiple criteria optimization issue is demonstrated in Figure 5.
lower in the suggested auction-based approach than in the greedy method (UAV offloading). The equilibrium between offloading tasks to the UAV level and local computation in the auction-based form maintained the same computational delay. Figure 4 shows that t h e consumed energy increased with the number of tasks. The device h a d t o consume a lot of energy to perform the tasks. The number of tasks increased the VM's operation time, thus increasing the consumed energy. Moreover, the VMs' timeout also entailed energy utilization. The proposed method consumed less energy in comparison to the other algorithms. Choosing a VM by relying on the target (or bid) value and reward value worked well in the auctionable approach. Figures 5 and 6 show the operating system for the case with VMs at the edge level. At this point, the number of tasks was fixed at 80. The typical delay relating to the multiple criteria optimization issue is demonstrated in Figure 5.
It can be noted from Figure 5 that increasing the number of VMs decreased the computational delay. Nevertheless, the auctionable method with the greedy approach had a lower computational delay than the edge method (UAV offloading). Choosing a VM with an offer value defined by considering the system's purpose improved the suggested approach's efficiency. Figure 6 shows the consumed energy based on the VMs. VMs increase their power usage as the effective task executions increase. Moreover, the energy spent by the significant number of inactive VMs contributes to the consumed energy. However, the suggested auctionable method consumed less power than the edge offloading method (UAVs) when using the greedy approach.

Conclusions
Delay-sensitive applications in the IoT era, such as smart grids and intelligent medicine, require a low computational delay. In addition, the energy needed to execute the diverse tasks created through IoT systems is an important problem for IoT networks. The It can be noted from Figure 5 that increasing the number of VMs decreased the computational delay. Nevertheless, the auctionable method with the greedy approach had a lower computational delay than the edge method (UAV offloading). Choosing a VM with an offer value defined by considering the system's purpose improved the suggested approach's efficiency. Figure 6 shows the consumed energy based on the VMs. VMs increase their power usage as the effective task executions increase. Moreover, the energy spent by the significant number of inactive VMs contributes to the consumed energy. However, the suggested auctionable method consumed less power than the edge offloading method (UAVs) when using the greedy approach.

Conclusions
Delay-sensitive applications in the IoT era, such as smart grids and intelligent medicine, require a low computational delay. In addition, the energy needed to execute the diverse tasks created through IoT systems is an important problem for IoT networks. The edge computing represented by UAVs solves these problems in IoT networks, bringing the computations close to the information provider. This study described a three-layered network architecture (IoT, edge, and cloud) for IoT-based smart cities. Furthermore, an auctionable mechanism to overcome the problem of allocating IoT-based edge resources was developed. The auctionable tool was developed by considering the energy consumption and delay associated with VMs in task execution. The test results demonstrated that the suggested edge resource allocation outperformed the other methods. The average improvements for the proposed model compared to other methods in terms of the number of VMs vs. computational delay were 3.1% with 90 VMs and 9.2% with 30 VMs. Furthermore, the average improvement in terms of the number of tasks vs. the computational delay was 7% with 200 tasks. Moreover, the average improvement when using energy vs. the number of tasks was 157% with 200 tasks, but the average improvements in terms of energy vs. the number of VMs were 188% with 30 VMs and 565% with 90 VMs.

Future Work
In the future, this simulation can be further developed by adding air offloading algorithms based on the load and volume of the UAV's engine, its height above the ground, and the area it can cover. A networked group of UAVs could also be created, where a central UAV and four secondary drones connected to it undertake data offloading using the functions of the 5G network.

Data Availability Statement:
The article contains the data, which are also available from the corresponding author upon reasonable request.