## 3 Methodology
### The Goal, Data Inputs, and Data Processing Involved in the Development of the ANN-PSO Model  
Particle swarm optimization is a strong and effective metaheuristic algorithm that resolves complicated and non-linear optimization problems [58]. This swarm optimization technique can efficiently solve global optimization issues compared with other classical optimization techniques. Particle swarm optimization is a modern optimization technique dependent on social methods such as fish schooling and bird flocking [59]. Depending on the mathematical conceptual framework of particle swarm optimization, these three significant parameters play important roles in PSO optimizations: position, velocity, and fitness. The primary steps of PSO to solve any complex optimization issues is as follows:  
* Initializing a population of individuals (particles) with random velocities and positions in the domain of the problem. * Computing the fitness value for all particles. * Investigating fitness of particles. * Updating the velocity and position of particles using Equations (4) and (5). \[V_{ij}^{t} =\chi\left[\omega v_{ij}^{t-1}+c_{1}r_{1}\left(p_{ij}^{t-1}-x_{ij} ^{t-1}\right)+c_{2}r_{2}\left(G_{j}^{t-1}-x_{ij}^{t-1}\right)\right]\] (4) \[x_{ij}^{t} =x_{ij}^{t-1}+v_{ij}^{t}\] (5)  
\(r_{1}\) and \(r_{2}\) are called random numbers. \(c_{1}\) and \(c_{2}\) are the acceleration constants. \(w\), \(\chi\), \(P^{t}\) and \(G^{t}\) are all called the weight of inertia, _pbest_, and _gbest_. When an artificial neural network is adequately trained in the MATLAB environment, it will function as a black-box model, explaining the relationship between a complex dataset, which comprises an input and output (irrespective of the number of variables). An artificial neural network consists of mathematical processing units called neurons. These neurons can be found in the black box during a neural network operation on MATLAB. These neurons can form a relationship with each other via weights and biases. An artificial neural network consists of three primary layers: the input, hidden, and output layers. The neurons are placed in the hidden and output layers, while the input layers do not contain any neurons. After the neural network toolbox has been opened in MATLAB, training will be conducted with the input data and the corresponding output datasets. The inputs in Table 2 were divided into 13 columns; the output datasets are in a single column on another excel sheet. These are all carried out to determine the appropriate weights and biases of the neurons. Neural network training of data (input and outputs) means determining the optimum variables of different weights and biases of the neural network. Generally, different methods are applied to determine the appropriate parameters of weights and biases of the Artificial Neural Network. In this research, the suitable optimum training of the network has been done by applying an artificial intelligence technique called Artificial Neural Network--Particle Swarm Optimization, which can be found in the MATLAB software environment. Once the ANN-PSO training has been done adequately on the datasets, the network validation is performed using the testing data-independent variables. An artificial neural network is perfect if the fitness function values are lower or closer to one for the training and validation of the traffic datasets. Particle swarm optimization is created through different species' social and cooperative behaviour to fill the loopholes in a multidimensional search space. The PSO algorithm is based on the personal experience (_Pbest_), the overall personal experience of the species (_Gbest_), and the decision m particles' decision-making to determine the subsequent positions in the search space.