You are on page 1of 8

2022 18th International Conference on Distributed Computing in Sensor Systems (DCOSS)

Mechanism for Optimizing Resource Allocation in


2022 18th International Conference on Distributed Computing in Sensor Systems (DCOSS) | 978-1-6654-9512-7/22/$31.00 ©2022 IEEE | DOI: 10.1109/DCOSS54816.2022.00054

VANETs Based on the PSO Bio-inspired Algorithm


Douglas D. Lieira∗† , Matheus S. Quessada∗§ , André L. Cristiani‡ ,
Robson E. De Grande§ ,Rodolfo I. Meneguette¶
∗ Sao
Paulo State University, Sao Jose do Rio Preto, SP, Brazil
† Federal
Institute of São Paulo (IFSP), Catanduva, SP, Brazil
‡ Federal University of São Carlos (UFSCar), São Carlos, SP, Brazil
§ Brock University (BrockU), St. Catharines, ON, Canada
¶ University of São Paulo (USP), São Carlos, SP, Brazil
Email: {douglas.lieira, matheus.quessada}@unesp.br, andre.cristiani@estudante.ufscar.br,
rdegrande@brocku.ca, meneguette@icmc.usp.br

Abstract—With the increase of vehicles in cities and the cles, and its users to collect information from vehicles. These
technology used by these vehicles, there is also a need to use the vehicles in the network share their computational resources
technology made available by intelligent transport systems in an among themselves to transmit and process some tasks and
efficient and agile way. Edge computing services assist in the agile
process of exchanging and sharing information and resources services [7], [8]. Some of these services can be represented
between vehicles. However, the limitations of edge services bring as message exchange, route calculation, traffic monitoring,
the need to optimize resource allocation processes. Thus, in this etc [3]. As a way to reduce the latency to execute these
article we propose the MARIA, a mechanism for optimizing services, the use of Edge Computing (EC) comes to solve
computational resources in Vehicular Ad Hoc Networks based on a couple of problems that VANET faces.
the particle swarm optimization bio-inspired algorithm. The ease
of adaptation to various scenarios by a bio-inspired algorithm Edge computing is a paradigm related to VANETs that
is presented in the work. In addition, the MARIA mechanism allows the use of computational resources of the edges to
proved to be efficient when compared with techniques frequently process resources and execute the tasks and services requested
used in the literature and was able to increase the amount of by the vehicles closer to them, reducing latency, delay, and
services accepted and reduced the amount of refused services. traffic access to the networks [9], [10]. Even with the advan-
Index Terms—bio-inspire algorithm, edge computing , particle
swarm optimization, resource allocation tages that EC brings, the resource allocation of the available
resources is still a problem in these networks and needs some
solutions [11].
I. I NTRODUCTION
Nature Inspired Computing (NIC) are paradigms that are
Nowadays, the increase of vehicles in cities and the un- composed of swarm intelligence, evolutionary, and computa-
preparedness for these cities to receive that amount of traffic tional intelligence algorithms and techniques. Computational
impacts directly the economic and social part of human life. intelligence techniques based on swarm intelligence or other
We can highlight the importance of an individual being able NIC mechanism are widely used in developing models for
to reach your destination, easily, without traffic jams, and smart cities, resource allocation problems, and ITS applica-
in a safe way. As a consequence of the increasing number tions. These methods are considered bio-inspired computing
of vehicles, the concern about pollution and gas emission is or bio-inspired methods, because of the background they use
growing in recent years [1], [2]. With the advent of high as a basis for the techniques. Such techniques can produce sig-
technological capacity applied to these vehicles and the impact nificant performance in highly complex optimization problems
that this technology brings to the transportation systems, new with large samples and different research fields [12].
ways to explore this capacity through new services using the In this work is proposed a MechAnism for optimizing
Intelligent Transportation Systems (ITS) are being studied [3], Resource allocatIon in vAnets based on the particle swarm
[4]. optimization (PSO) bio-inspired algorithm called MARIA.
Due to the increase of the technology and applications of The particle swarm optimization algorithm is inspired by the
these technology into the ITS, the Vehicular Ad Hoc Networks social flight behavior of birds or shoal of fish movement during
(VANETs) play a fundamental role in disseminating and inter- the search for a specific target. MARIA was based on PSO
connecting the vehicles to exchange data between themselves for its optimization algorithm that has fast convergence, is
helping the vehicular environment [5], [6]. The VANETs simple and easy to program and adjust to various scenarios,
connect the vehicles and infrastructures, like Roadside Units and does not need the differential optimized functions [13].
(RSUs) through two different types of connection, vehicle-to- When these groups are moving, they use three simple rules
vehicle (V2V), and vehicle-to-infrastructure (V2I). The ITS that can show their behavior: i) avoid crowding neighbours,
uses cameras, sensors, and other electronic devices of the vehi- separating themselves from the neighbour; ii) align with the

2325-2944/22/$31.00 ©2022 IEEE 283


DOI 10.1109/DCOSS54816.2022.00054
Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
average heading of the neighbours; iii) be cohesive with the resources, services served, allocation reward, and processing
average position of neighbors [14]. By sharing information time were analyzed. The results showed that TOVEC provided
among the members of the swarm, the objective is to find better resource management and served a greater number of
the optimal solution in a search space. Applied to the com- tasks in vehicular cloud environments.
putational resource allocation scenario in VANETS, with the
main objective of finding the best edge service solution to In [18] the authors present a bat-inspired meta-heuristic
allocate the resources of a vehicle, we consider that ECs share approach to resource allocation in vehicular clouds called
current capacity information of their computational resources NAUTILUS. The authors propose the use of the meta-heuristic
to find the best solution to allocate a service that needs network technique, together with a fog-based paradigm, to optimize
resources. the search process to define the decision-making process of
The main contributions of this work are as follows: resource allocation in vehicular networks. The NAUTILUS
• An efficient bio-inspired heuristic mechanism for re- analysis and choice process can be divided into two parts,
source allocation in VANETs; the first part checks the fog and vehicle status, the second
• Maximizing the use of limited resources of edge comput- part selects the best fog, based on the bat meta-heuristic
ing services; algorithm. NAUTILUS was compared with two others that
• Facility for adapting the mechanism to different environ- use traditional resource allocation techniques, evaluating the
ments and circumstances. number of blocked, serviced and denied services. The simula-
The rest of the paper is organized as follows: Section II tion results showed that the use of the meta-heuristic technique
presents the related works. Section III discusses the system served more services and denied and blocked fewer services
model with the problem and the proposed mechanism. Sec- in relation to traditional techniques.
tion IV shows the simulation scenario and the results of
the evaluation. Finally, Section V concludes the paper and In [19] an approach, called FRACTAL, based on the Fog
indicates future works. paradigm, is presented to perform resource allocation using
a hierarchical method Multiplicative Analytic Hierarchy Pro-
II. R ELATED W ORKS cess, to allocate as many resources as possible along a road
This section presents related works that utilize techniques in vehicle cloud. FRACTAL was compared with three other
traditionally used for resource allocation in vehicular networks approaches, one based on random choice, another based on
and other network structures. distance and another based on the Analytic Hierarchical Pro-
In [15] a solution for the allocation of resources in computer cess, with FRACTAL being an evolution of the latter. The main
networks based on the improved greedy algorithm is proposed. difference between FRACTAL and the other approaches is the
The authors added new components to the greedy algorithm approach used to make the decision, which performs a pairwise
so that the solutions found by the algorithm do not violate comparison and builds a decision matrix, characteristics that
constraint conditions. In this way, the strategy makes the reduced the algorithm’s time to make decisions. As purchase
computational resources of the nodes found to be greater than metrics, the authors considered the number of services served,
the computational resources needed to attend the subtasks, the number of services blocked and the number of services
reducing the number of nodes. In this work, the authors did denied. The results showed that the proposed approach served
not carry out a comparative analysis of the performance of more services and denied fewer services in relation to the
the proposed algorithm, only a scenario of application of the comparison algorithms.
algorithm is presented.
The work by [16] presents an algorithm based on particle In the Table I we summarize the state-of-the-art works listed
swarm optimization for resource allocation in multi-access, above, regarding the algorithm method used, type of structure
multi-user edge computing in heterogeneous networks. The considered in the application, main objective considered, and
authors propose a joint decision-making strategy of resource problems, which were sought to solve. We can see that the
allocation and computing offloading to minimize the total works by [16]–[18] use bio-inspired algorithms, however, only
overhead of mobile devices, including processing time and in the work of [16] the limitations of EC services were
energy consumption. The results showed that the proposed considered. But, the work is not focused on maximizing
approach reduced the processing overhead of mobile devices service attendance. The works of [15], [19] use traditional
and was effective in solving optimization problems. techniques from the literature. However, [15] is not aimed
In [17] a task optimization mechanism in the vehicular cloud at maximizing attendance, while the algorithm proposed by
is presented, called TOVEC. The proposal is based on the [19] needs several modifications to be applied in different
meta-heuristic algorithm, which uses the Grey Wolf Optimizer scenarios. Also, both do not consider the limitations of EC
(GWO), which seeks to improve the use of available resources services. Thus, seeks to address the problem of optimizing
in a vehicular cloud and maximize the allocation of tasks. the allocation of computational resources using an algorithm
TOVEC was compared with two approaches, an approach that is easy to adapt to various scenarios and with the main
based on the Greedy algorithm and another approach based objective of maximizing the service requesting services and
on dynamic programming. As evaluation metrics, the use of minimizing service refusals.

284

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
TABLE I messages, route suggestions, traffic information, among others.
R ELATIONSHIP BETWEEN THE RELATED WORKS In this way, the ECs execute the MARIA mechanism to select
the best EC to service the requesting vehicle.
Work Method Structure Problem
We assume that each service of a vehicle has an individual
Bo et al. [15] Greedy CC Task unloading
Huynh et al. [16] PSO EC Task offloading
identification s ∈ [1, n], and shares a pool of computing
Lieira et al. [17] GWO VCC Resource allocation resources R = (pr , lr , mr , sr ), such as processing power,
Quessada et al. [18] BAT VC Resource allocation bandwidth, memory, and storage capacity. Considering that
Pereira et al. [19] AHP VC Resource allocation
MARIA PSO EC Resource allocation
the pointed services use few computational resources, each
resource is defined with random values in the interval of [1,6].
Thus, optimizing the distribution of vehicle resources in the
III. M ECHANISM FOR O PTIMIZING R ESOURCE available edge computing services, maximizing service, is the
A LLOCATION IN VANETS BASED ON THE PSO problem to be improved.
B IO - INSPIRED A LGORITHM - MARIA B. MARIA
In this section, we describe the system model and the In this work, the mechanism MARIA is proposed. MARIA
problem considered for this work, as well as the mechanism was developed based on the particle swarm optimization (PSO)
developed to solve the problem. algorithm. The PSO algorithm is a stochastic optimization
A. System Model technique that uses as a basis for simulation the migration
We consider for this work a scenario where vehicles with of intelligent animals in nature, such as birds, herds, and fish,
onboard units (OBUs) communicate with each other (V2V) or where it considers the continuous iteration of particles to find
with edge computing services installed in RSUs (V2I). Such the optimal solution. Each element is considered a particle and
communication between RSUs and vehicles is done through represents a candidate option as a possible solution for the
a 5G network. Vehicles move through the road system inde- result of the optimization process [13], [20]. In the literature,
pendently and with random routes. ECs share their computing PSO is commonly used because it is a simple algorithm that
resources with vehicles while they are within their coverage is easy to apply in different scenarios, has a low convergence
area. In Fig. 1 the abstraction of the system model with ECs rate, and does not require optimized differential, derivative
and vehicles is represented. and continuous functions. The PSO does not direct its search
directly to the calculation procedure, but to the information on
the swarm and individual optima obtained at each iteration of
the [13] algorithm.
The PSO algorithm works with two versions, which are
called the global version and the local version. In the first
one, the algorithm tracks the positions pbest and gbest, which
are the extremes of the optimal position of itself and the
swarm, respectively. While in the second, it tracks pbest
and the optimal position of all particles in its neighborhood,
called nbest. Based on this, the algorithm was developed
for the problem of allocation of computational resources in
edge computing services. Thus, we make an analogy in which
particles are edge computing services that seek the best option
to serve the target, which is the resource requesting service. In
the applied concept, computing services interact with others,
through their resource capacity, for their decision-making. The
iteration mechanism of any EC during the execution of the
algorithm is illustrated in Fig. 2.
Where the first part considered is the speed of the previous
EC, which uses its current movement and generates an inertial
movement considering its current speed. The second is called
the cognitive acceleration factor, as it performs the movement
based on its own experience, where it considers the distance
Fig. 1. System model representation. from its current position and its pbest. The third part is
the social learning factor, where it considers the sharing and
The decision-making mechanism is installed in the edge cooperation between the elements to define their movements
computing services and is activated when a vehicle, within the [13].
coverage area of the ECs, requests computing resources for a We consider that each individual, represented by the CE
given service. Such services can be text messages, multimedia services, moves towards the target at an initially random speed,

285

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. PSO iteration mechanism [13]

and its position is the Euclidean distance between its resources


and the resources of the requesting service, according to Eq.
1, where ed corresponds to the number of resources of the
current EC and rv is the number of resources of the vehicle
service.


 n 2
Euclidean =  (edij − rvij ) (1)
j=1

A random variation of speed is applied to each iteration.


Suppose that each EC manages to memorize the best position
it has already reached (pbest) and, based on that, improves its Fig. 3. Flowchart of the MARIA mechanism.
next position relative to the target. Based on this knowledge
and on the updating of the speed of each EC, the pbest and
gbest positions are updated at each iteration, as illustrated in Thus, the algorithms that make up the simulation of the
the flowchart of the mechanism in Fig. 3. mechanism MARIA are divided into two stages. The first
The Eqs. 2 and 3 present the formulas applied to define step is performed when a vehicle that is in the edge services
the velocity and update the current positions of each EC, coverage area makes the request to allocate a service. During
respectively, at each iteration. this step, the decision-making mechanism MARIA is executed
to find the best EC to fulfill the request.
vi+1 = w∗vi +c1∗r1rand ∗(pi −xi )+c2∗r2rand ∗(pg −xi ) (2) The abstraction of the first step is presented in Algorithm
1. The first step consists in the process that the vehicle
vehicle status makes a request to some EC in the cover-
xi,t+1 = xi + vi+1 (3) age area. As output, the algorithm returns the service status
service status. Right from the start, in line 2, a repetition
Where, w represents an inertia weight, vi is current iteration structure is executed to pass through all ECs. On line 3, the
speed, c1 is the cognitive acceleration factor, r1rand is the engine checks if vehicle status is an incoming request. If
random value for cognitive acceleration, pi is the current local true, on line 2, the mechanism MARIA is executed, passing
optimal position of the neighbor (pbest), xi is the current as parameters the resources of the requesting vehicle and
best position of the edge service of the iteration, c2 is the the ECs. As a return, it will have the EC selected by the
social acceleration factor, r2rand is the random value for social selectEC mechanism. If selectEC has resources to serve
acceleration, and pg is the current global optimum (gbest). the service, the amount of resources from vehicle service
The inertia weight is calculated at each iteration, according vehicle service resources is taken from the availability of
to the formula presented in Eq. 4: EC selectEC resources, and returns that the service status
service status is allocated (lines 4, 5, and 6). Otherwise, it
w = wM ax − N i ∗ ((wM ax − wM in)/maxi ter) (4) is counted as blocked (line 8). If it passes through all ECs
and none has sufficient resources to service the vehicle, it is
Where wM ax and wM in are the maximum and minimum returned that the service was denied (line 11). On line 13,
inertia, N i the current iteration, and maxi ter the maximum it checks if vehicle status is an outgoing request from the
iteration amount. network. If true, the vehicle service resources are released

286

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
Algorithm 1 MARIA- General Algorithm 2 MARIA - EC Selection
Input: vehicle status Input: vehicle resources, ECs
Output: service status Output: gbest
{Checks if the request is entry} 1: Inicialize variables dim, V M ax, wM ax, wM in, c1, c2,
1: if (vehicle service == entry) then maxi ter
2: while (EC next ≤ num available EC) do {Fill the population}
3: selectEC = M ARIA(vehicle resources, ECs) 2: for l in range(0, len(ECs)) do
4: if (selectEC resources ≤ requested resource) then 3: for j in range(0, dim) do
5: selectEC resources = selectEC resources − 4: pos[i,j] ← Euclidean (vehicle resources, ECs) (Eq. 1)
vehicle service resources 5: end for
6: return allocated() 6: end for
7: else {Initializes the iteration process and calculates the fitness}
8: blocked() 7: for linrange(0, len(maxi ter)) do
9: end if 8: for iinrange(0, len(ECs)) do
10: end while 9: f itness ← f unc f itness(pos[i, :])
11: return denied() {Selects the current best}
12: end if 10: if (pbest > f itness) then
{Check if the order is outbound} 11: pbest ← fitness
13: if (vehicle status == leave) then 12: end if
14: EC aloc = EC aloc + vehicle resources 13: if (gbest > f itness) then
15: end if 14: gbest ← fitness
15: end if
16: end for
{Updates movement variables and positions}
from the EC it is allocated EC aloc (line 14). 17: update w (Eq. 4)
The second stage is when the decision-making mechanism 18: for m in range(0, len(ECs)) do
MARIA is activated to select the best EC. The abstraction 19: for n in range(0, dim) do
of the algorithm MARIA is presented in Algorithm 2. The 20: update r1 and r2
21: update velocity and position (Eqs 2 and 3)
MARIA receives as parameters the service resources of the 22: end for
requesting vehicle and the ECs with their current resource 23: end for
capacities and returns the best EC to serve the service. Thus, 24: end for
in line 1 the variables dim, V M ax, wM ax, wM in, c1, c2, 25: return gbest
and max iter are initialized, which correspond, respectively,
to the dimension of the resources, maximum speed , maximum
inertia, minimum inertia, cognitive acceleration factor, social • Rosenbrock function: is used for conventional test ap-
acceleration factor, and maximum iterations. Subsequently, plication in many algorithms and uses Eq. 5 [23];
the vector of agents is filled, with the difference between
d−1 

the Euclidean distance of the resources of each ECs for the  2 2
resource of the vehicle service (line 4). A repetition structure Ros(x) = 100 xi+1 − x2t + (xi − 1) (5)
i=1
is executed for the maximum of defined iterations (line 7).
Another structure goes through all the ECs (line 8) and Where x is the resource set of the population of the
calculates the fitness value f itness of each one with the fitness algorithm used, and i corresponds to the specific resource
function f uncf itness, and checks if the new fitness of the of the iteration that the algorithm is executing.
current EC is less than pbest and gbest, and if so, it updates • Rastrigin’s function: is applied in performance testing
these variables (lines 9 through 15). In line 17, the inertia value problems in algorithm optimization [25]. The fitness in
w is updated. Afterward, the algorithm loops through all the Rastrigin is calculated according to Eq. 6;
ECs again, passing feature by feature and updating the speed
and position of each EC (lines 18 to 21). After all iterations, Ras(x) = 20 + X12 + X22 − 10(Cos2πX1 + Cos2πX2 )
the engine returns the selected EC gbest. (6)
To define the best solutions in the meta-heuristic algorithms, Where X corresponds to the resource set of the popula-
we use fitness functions, mentioned in line 9 of Algorithm tion of the current iteration;
2. To calculate the aptitudes, benchmarks functions are used, • Ackley’s function: is considered a classical optimization
which are mathematical functions with the purpose of finding function [26] and uses Eq. 7.
the global or local optimum during the iterations defined in

the algorithms [21]. In this work, the values assigned to the 
agent population pos are based on the computational resources 1  D
Ackley = − 20 exp(−0.2 x2 )
of the edge computing services and used for the aptitude D i=1 i
calculations. We chose to analyze three benchmarks functions (7)
1 
D
that are considered efficient for use in bio-inspired algorithms
− exp( cos(2πxi )) + 20 + e
[22]–[24], as follows: D i=1

287

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
Where n represents the population resources of the al- which are the services that were prevented from allocating
gorithm, x represents the value of the resource from the their resources in all ECs, due to insufficient resources of
current iteration, and e an exponential value assigned to the ECs to provide such service, and iii) blocked services:
the default value of the function. corresponding to the number of times that an EC cannot attend
a service due to lack of resources.
IV. E VALUATION AND A NALYSIS To analyze the efficiency of the mechanism, the was com-
This section presents the application of the MARIA mecha- pared resource allocation techniques found in the literature,
nism in the urban scenario with ECs. We describe the scenario which are: i) greedy method: uses the concept of allocating
configuration, evaluation metrics, comparison techniques and services in the first EC that it finds, ii) Fractal: based on
results obtained. an improvement of the AHP method, it considers influencing
factors, degrees of importance and a multicriteria matrix to
A. Scenario configuration, metrics and comparison techniques help in its decision-making process, and the iii) WORST:
For the scenario, we consider the district of Manhattan, which is a computational method for allocating memory, which
located in New York, USA. It is considered that 4 RSUs always selects the EC that has the most resources available.
are installed at strategic points in the district so that they are
interconnected with each other and can communicate through B. Results
a 5G network. Each RSU has an EC installed, which is In this section, we describe and analyze the results obtained.
responsible for managing the sharing of network computing The was simulated with the Ackley, Rastrigin, and Rosen-
resources. For the simulation, diversified numbers of vehicles brock fitness functions. In order to define the best function
are considered, generated according to the simulation time in for comparison with the allocation metrics, the results of the
each scenario, being 2400, 4800, and 7200 seconds. Thus, accepted services were compared, as this is the metric that
381, 778, e 1175 vehicles were generated in each simulation, represents the maximization of service attendances. In Table
respectively. III, the average of the results obtained in the simulations is
To simulate the entry and exit of vehicles in a heterogeneous presented, considering the average number of devices (381,
way, the Pearson III distribution was used, considered an 778, and 1175) with the fitness functions Ackley, Rastrigin,
advanced gamma pattern, capable of heterogeneously simu- and Rosenbrock.
lating the entries and exits of vehicles in the simulation. We
assume that each EC shares 100% of each computing resource TABLE III
AVERAGE OF DEVICES SERVED BY EACH FITNESS ROLE
(EC = [100, 100, 100, 100]). The shared resources are: i) pro-
cessing capacity, ii) bandwidth, iii) memory and iv) storage Vehicles/Function Ackley Rastrigin Rosenbrock
capacity. Each vehicle service has the same computational
371 291.21 290.12 300.60
resources, with consumption values generated randomly in an 778 481.06 469.00 495.33
interval of [1, 6], considering low consumption services such 1175 692.54 696.0. 698.72
as text messages, multimedia, security services, entertainment,
among others. The data are generated synthetically during the In the simulation with the smallest number of vehicles, the
simulation. Each simulation was run 33 times and a 95% Rosenbrock function accepted an average of 300.60 services,
confidence interval was applied. The simulation was developed while the Ackley and Rastrigin functions accepted 291.21
in the Python language. and 290.12, respectively. In the second simulation, with 778
In Table II we present the parameters of the simulation vehicles requesting service allocation, Rosenbrock served an
configuration of this scenario in a summarized way. average of 495.33, followed by Ackley with 481.06 accepted
services and Rastrigin with 469.00. In the last simulation,
TABLE II with 1175 vehicles, Rosenbrock again accepted more services,
S IMULATION SETUP. 698.72. Rastrigin accepted 696.00 services, while Ackley
Parameters Values served 692.54. We can see that, in the applied scenario and
Urban Scenery City of Manhattan for the MARIA mechanism, the Rosenbrock function managed
Number of Vehicles [381, 778, 1175] to obtain better performance. Thus, for comparison with
Simulation Time [2400, 4800, 7200] seconds
Number of ECs 4 ECs interconnected traditional techniques in the literature, we use the Rosenbrock
Resource values synthetic and random of [1,6] function to calculate the fitness of ECs in MARIA.
Vehicle entry and exit Pearson III Distribution With that, in Fig. 4, we present the evaluation of the number
Number of runs 33
Confidence Interval 95% of services accepted. This metric represents the services of
Programming language Python (version 3.8) the vehicles that we managed to be allocated in some edge
computing service. In the first configuration, with 371 vehicles
In this article, the following evaluation metrics were consid- in the scenario, the MARIA performed better, accepting an
ered: i) accepted services: which correspond to the services average of 300.60 services, followed by Fractal with 288.45,
that requested resources and had their request accepted for Greedy with 280.42, and Worst with 279.42 services accepted
having storage capacity in some EC, ii) refused services: in ECs. In the configuration with 778 vehicles, MARIA

288

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
accepted an average of 495.33 services, Fractal served 489.36,
while Worst and Greedy allocated, respectively, 358.66 and
358.60 services in ECs. In the configuration with the highest
number of vehicles (1175), the MARIA again accepted more
services in the ECs, with an average of 698.73 services. Fractal
accepted 694.51 services, Worst accepted 413.94, and Greedy
allocated 412.00. Therefore, we can see that the MARIA
mechanism can better manage the distribution of services by
the ECs in the scenario, accepting the largest number of
services and thus maximizing the service. This is because
MARIA have an iteration mechanism that seeks to find the
best global solution among the ECs, but also uses the best
local solution in its decision-making process, in case it cannot
find the global one.
Fig. 5. Number of services blocked.

followed closely by Fractal, which refused service to 281.64.


While Greedy and Worst were tied with 419.30 denials. In
the configuration with 1175 vehicles, MARIA declined an
average of 472.27 services, Fractal declined 473.49, Worst
denied 761.06, and Greedy denied 763.00 services. Again, the
algorithm of selection by the gbest of the MARIA demon-
strates to be able to select the best EC, by basing the fitness
calculation on the current resource capacity of each EC. Thus
managing to minimize service denied.

Fig. 4. Number of accepted services in the ECs.

In Fig. 5 the result obtained with the average number of


blocked services in the ECs is shown. Blocked services are
counted for each attempt to allocate a service to an EC, but the
EC has no resource availability. In the configuration with 381
vehicles, the MARIA blocked services the fewest times, with
an average of 435.97 blocks. Being, 30.72% fewer blocks than
Fractal, 68.75% less than Greedy, and 85.78% less than Worst.
In the second simulation, with 778 vehicles, the acronym
blocked 1433.94 times the service allocation attempts. It
outperformed 7.53% over Fractal, 48.65% over Greedy, and
57.05% over Worst. In the last configuration, MARIA again Fig. 6. Number of refused sevices in the ECs.
performed better, blocking 2402.00 times allocation attempts
on ECs. Higher by 3.32%, 49.15% and 55.96% over Fractal, In general, the MARIA performed better in all evaluation
Greedy, and Worst, respectively. This demonstrates that, due to metrics. In the configuration with fewer vehicles, its per-
its characteristic of finding the best fitness based on the ECs formance was even more significant when compared to the
resource capacity, the MARIA can distribute services better other resource allocation techniques. This demonstrates that,
and faster across ECs. in addition to being easy to adjust to various scenarios, the
Finally, Fig. 6 presents the result for the recused services, MARIA is efficient to maximize service attendance, more
which are those that could not be allocated in any of the ECs agilely distribute services across the network and minimize
due to insufficient resources. In the first configuration, with the number of service denials.
381 vehicles, the MARIA refused an average of 80.39 services.
Fractal appears next with 85.55 services refused, followed V. C ONCLUSION
by Greedy and Worst, with 100.57 and 101.58, respectively. With the evolution of smart transport systems, the in-
In the configuration with 778 vehicles, MARIA remained crease of vehicles in cities, and the constant advancement
the mechanism with the fewest service refusals, with 280.67, of technology, new challenges arise to improve the services

289

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.
provided in smart cities. Among these challenges is the [9] A. Araldo, A. D. Stefano, and A. D. Stefano, Resource Allocation
for Edge Computing with Multiple Tenant Configurations. New York,
need to improve service requests for vehicles, which need NY, USA: Association for Computing Machinery, 2020, p. 1190–1199.
to be increasingly faster and more efficient. Edge computing [Online]. Available: https://doi.org/10.1145/3341105.3374026
services are being used to make service faster. However, [10] Y. Wang, H. Wang, S. Chen, and Y. Xia, A Survey on Mainstream
Dimensions of Edge Computing. New York, NY, USA: Association
its limitation of computational resources brings the need to for Computing Machinery, 2021, p. 46–54. [Online]. Available:
optimize the resource allocation process. Therefore, in this https://doi.org/10.1145/3471287.3471295
work, we propose the MARIA, a mechanism for optimizing [11] K. Gaur and J. Grover, “Exploring vanet using edge computing and sdn,”
in 2019 Second International Conference on Advanced Computational
resource allocation in VANETs based on the bio-inspired and Communication Paradigms (ICACCP), 2019, pp. 1–4.
PSO algorithm. The MARIA are easy to adjust to different [12] T. T. Dhivyaprabha, M. Manjutha, and P. Subashini, “Survey on nature
environments and circumstances. In addition, when compared inspired algorithm for smart city applications,” in Proceedings of the
Mediterranean Symposium on Smart City Application, ser. SCAMS
to traditional techniques in the literature, it proved to be ’17. New York, NY, USA: Association for Computing Machinery,
more efficient in all the analyzed configurations. Being able 2017. [Online]. Available: https://doi.org/10.1145/3175628.3175642
to maximize service attendance by up to 69.59%, minimize [13] D. Wang, D. Tan, and L. Liu. (2018, jan) Particle
swarm optimization algorithm: an overview. [Online]. Available:
blocks during the search for an EC by up to 85.78%, and https://doi.org/10.1007/s00500-016-2474-6
minimize refusals by up to 60.20%, during comparison with [14] J.-Y. Jung, H.-H. Choi, and J.-R. Lee, “Survey of bio-inspired resource
some techniques in simulation. allocation algorithms and mac protocol design based on a bio-inspired
algorithm for mobile ad hoc networks,” IEEE Communications Maga-
As future works, we intend to improve the search for the zine, vol. 56, no. 1, pp. 119–127, 2018.
global optimum of MARIA, in addition to analyzing the imple- [15] H. Bo, T. Xiaolei, Y. Chao, J. Wei, D. S. D. Jie, C. Minghui, C. Wu,
mentation in a hybrid way with other bio-inspired algorithms. C. Shu, and W. Zhangjun, “A dynamic resource chain task unloading
method based on improved greedy algorithm,” Journal of Physics:
We also hope to explore other simulation scenarios, analyzing Conference Series, vol. 1883, no. 1, p. 012021, apr 2021. [Online].
the impact of other factors that might be encountered in a Available: https://doi.org/10.1088/1742-6596/1883/1/012021
real scenario, where we expect a better adaptation of the [16] L. N. T. Huynh, Q.-V. Pham, X.-Q. Pham, T. D. T. Nguyen, M. D.
Hossain, and E.-N. Huh, “Efficient computation offloading in multi-tier
mechanism with a greater number of data for exploration. multi-access edge computing systems: A particle swarm optimization
approach,” Applied Sciences, vol. 10, no. 1, 2020. [Online]. Available:
ACKNOWLEDGMENT https://www.mdpi.com/2076-3417/10/1/203
[17] D. D. Lieira, M. S. Quessada, J. B. D. da Costa, E. Cerqueira,
This work was partially supported by FAPESP (São D. Rosário, and R. I. Meneguette, “Tovec: Task optimization mechanism
for vehicular clouds using meta-heuristic technique,” in 2021 Inter-
Paulo Research Foundation) under grant #2020/07162-0, national Wireless Communications and Mobile Computing (IWCMC),
Brazil, CNPq 307914/2021-6, Brazil, NSERC Discovery grant, 2021, pp. 358–363.
Canada, and Government of Canada. [18] M. S. Quessada, D. D. Lieira, R. S. Pereira, R. E. De Grande, and R. I.
Meneguette, “A bat bio-inspired mechanism for resource allocation in
vehicular clouds,” in 2021 17th International Conference on Distributed
R EFERENCES Computing in Sensor Systems (DCOSS), 2021, pp. 197–204.
[19] R. S. Pereira, T. S. Gomides, M. S. Quessada, R. I. Meneguette, D. D.
[1] Y. Su, X. Liu, and X. Li, “Research on traffic congestion Lieira, D. L. Guidoni, L. H. V. Nakamura, and R. E. De Grande, “Fog-
based on system dynamics: The case of chongqing, china,” oriented hierarchical resource allocation policy in vehicular clouds,” in
Complexity, vol. 2020, pp. 1–13, Mar. 2020. [Online]. Available: 2021 17th International Conference on Distributed Computing in Sensor
https://doi.org/10.1155/2020/6123896 Systems (DCOSS), 2021, pp. 212–219.
[2] Y. Xie, D. Wu, and S. Zhu, “Can new energy vehicles subsidy curb [20] Z. Chen, L. Yang, Y. Huang, X. Chen, X. Zheng, and C. Rong, “Pso-ga-
the urban air pollution? empirical evidence from pilot cities in china,” based resource allocation strategy for cloud-based software services with
Science of The Total Environment, vol. 754, p. 142232, Feb. 2021. workload-time windows,” IEEE Access, vol. 8, pp. 151 500–151 510,
[Online]. Available: https://doi.org/10.1016/j.scitotenv.2020.142232 2020.
[3] R. I. Meneguette, R. De Grande, and A. A. Loureiro, Intelligent [21] W. Wong and C. I. Ming, “A review on metaheuristic algorithms: Re-
Transport System in Smart Cities. Springer, 2018. cent trends, benchmarking and applications,” in 2019 7th International
[4] C. Correa, J. Ueyama, R. I. Meneguette, and L. A. Villas, “Vanets: Conference on Smart Computing Communications (ICSCC), 2019, pp.
An exploratory evaluation in vehicular ad hoc network for urban 1–5.
environment,” in 2014 IEEE 13th International Symposium on Network [22] R. W. Garden and A. P. Engelbrecht, “Analysis and classification of
Computing and Applications, 2014, pp. 45–49. optimisation benchmark functions and benchmark suites,” in 2014 IEEE
[5] R. S. Pereira, D. D. Lieira, M. A. da Silva, A. H. Pimenta, J. B. da Costa, Congress on Evolutionary Computation (CEC), 2014, pp. 1641–1649.
D. Rosário, and R. I. Meneguette, “A novel fog-based resource allocation [23] S. K. Valluru and M. Singh, “Multi-objective genetic and adaptive
policy for vehicular clouds in the highway environment,” in 2019 IEEE particle swarm optimization algorithms: A performance analysis with
Latin-American Conference on Communications (LATINCOM), 2019, benchmark functions,” in 2nd IEEE ICPEICES, 2018, pp. 847–851.
pp. 1–6. [24] X.-S. Yang, X.-S. He, and Q.-W. Fan, “Chapter 7 -
[6] R. I. Meneguette and A. Boukerche, “Vehicular clouds leveraging mobile mathematical framework for algorithm analysis,” in Nature-
urban computing through resource discovery,” IEEE Transactions on Inspired Computation and Swarm Intelligence, X.-S. Yang,
Intelligent Transportation Systems, vol. 21, no. 6, pp. 2640–2647, 2020. Ed. Academic Press, 2020, pp. 89–108. [Online]. Available:
[7] R. Kaur, R. K. Ramachandran, R. Doss, and L. Pan, “The importance https://www.sciencedirect.com/science/article/pii/B9780128197141000178
of selecting clustering parameters in vanets: A survey,” Computer [25] W. Qiao and Z. Yang, “Modified dolphin swarm algorithm based
Science Review, vol. 40, p. 100392, 2021. [Online]. Available: on chaotic maps for solving high-dimensional function optimization
https://www.sciencedirect.com/science/article/pii/S1574013721000320 problems,” IEEE Access, vol. 7, pp. 110 472–110 486, 2019.
[26] J. Liang, P. Suganthan, and K. Deb, “Novel composition test functions
[8] R. I. Meneguette, E. R. M. Madeira, and L. F. Bittencourt, “Multi-
for numerical global optimization,” in Proceedings 2005 IEEE Swarm
network packet scheduling based on vehicular ad hoc network appli-
Intelligence Symposium, 2005. SIS 2005., 2005, pp. 68–75.
cations,” in 2012 8th international conference on network and service
management (cnsm) and 2012 workshop on systems virtualiztion man-
agement (svm), 2012, pp. 214–218.

290

Authorized licensed use limited to: UNIVERSIDADE DE SAO PAULO. Downloaded on June 26,2023 at 15:55:33 UTC from IEEE Xplore. Restrictions apply.

You might also like