1 Introduction

The speedy raise in populace and development of vehicles creates a mess in urban areas with traffic jams and road accidents. Every year, nearly 1.25 million people around the world die due to road accidents. Meanwhile, anxiety, delays, and noise are the major causes of traffic jams [1,2,3]. These problems are solved by a smart and effective means of transport named VANET. VANET is a mobile network introduced for moving vehicles that acts as a bridge between the physical and digital worlds. The emergence of VANET [4,5,6] is to improve road safety and decrease road congestion. VANET not only obtains information on vehicle nodes and roads but could also provide route planning, road warning, and other services for drivers and passengers [7,8,9]. It can also assist to find parking areas, to pay for parking and tolls downloading music, video, and software updates, updating default vehicle navigation systems with real-time traffic situations, and so on. Generally, VANET [10,11,12] model has two components namely RSU and OBUs, where RBUs are installed on the roadside and OBUs are installed on vehicles with maps and GPS [13,14,15]; still, it has the challenges to limit its performance.

The challenges faced by VANET are intermittent connection, recurrent transforms in the topology of the network, and vehicle density’s uniformness [16, 17]. These challenges can be rectified by the usage of an effective routing protocol. RPs is classified into two categories. They have distributed routing and centralized routing. In distributed routing, the way of routing is selected previously instead nodes are elected dynamically from the relay nodes whereas centralized routing has a preselected routing path but it causes a problem packet transmission process due to the movement of the vehicle. The RPs in VANETs [18,19,20] can be broadly classified into four types: cluster-based RPs, topology-based RPs, location-based RPs, and broadcast-based RPs. The development of wireless technology helps VANETs in the creation of a larger spectrum to promote a higher volume of data transfers. The standards for wireless access are WAVE and DSRC. The WAVE is actually an updated version of DSRC, which was introduced for VANETs high-volume data transfer. Due to the great mobility of the nodes in the network region accessible, connection failures are highly prevalent [21,22,23]. After establishing the new parallel pathways prior to the packets saved in the buffer through the destination newly formed path, the node before the failure of packet buffers [24]. With VANET, comfort and protection are ensured in regard to petrol stations, weather, parking, traffic jams and emergency notifications [25,26,27]. The majority of the techniques listed rely on one-hop clustering, which only permits communication between one-hop neighbors. As a result, there are numerous clusters created and the coverage range is narrow, which lowers cluster stability. Furthermore, the bulk of these research projects merely took the location or speed of the vehicles into account while forming the clusters; the direction or equipment of the vehicles was not fully taken into account. When choosing the CH, these procedures also employed a variety of tactics, each with its own set of restrictions and disadvantages. Though, the performance of VANET routing is to be significantly enhanced to deal with the minimization of packet loss, link breakage, clustering problem, privacy preservation, etc.

Below points are the contributions:

  • Developed a VANET routing model with optimal CHS on considering the distance, delay, energy, and trust.

  • Performs routing on considering the distance, congestion, LDB measure with proposed evaluation, and LT.

  • Ensures better link breakage handling by considering link reliability, next hop selection with the calculation of new distance degree, and new trust evaluation of nodes based on its past data transmission.

Section 2 describes extant VANET routing works. Section 3 describes the system model on VANET. Section 4 describes optimal CHS and Sect. 5 briefs routing under proposed parameters. Sections 6 and 7 brief objectives and link breakage handling. Sections 8 and 9 explained the results and conclusions.

2 Literature review

2.1 Related works

In 2021, Chen et al. [28] proposed to solve data acquisition by using the protocol named TLBGR in VANETs. The protocol was separated into 2phases: next-hop selection and next-intersection selection. In 2021, Folsom et al. [29] designed a new NRHCS for VANETs. Concepts like cluster configuration, re-clustering, CHS, and adding and deleting clusters were carried out with factors such as vehicle displacement, and vehicle link counts. The vehicle with improved linkage support was considered as CH during cluster arrangement. In 2020, Manivannan et al. [30] presented a general idea of problems that arose in VANETs such as verification, privacy, and dissemination of secured messages. In 2019, RSU-assisted QTAR, a routing system for VANETs was presented by Jinqiao et al. Combining spatial routing's benefits with static road map data allowed QTAR to examine traffic data for individual road segments using the Q-learning algorithm. In 2020, Sun et al. [31] proposed an IVF model which formed a collection of vehicles at an intersection. In 2021, Mohammed et al. [32] introduced a 2HMO-HHO algorithm that forwarded data among destination and source vehicles. In 2021, Ammar et al. [33] solved the crisis of multi-criterion routing like reduction in e2e latency, minimization of network overhead, and increased e2e delivery ratio in VANETs. In 2020, in Cheng et al. [34] proposed a CP-oriented DC model for VANET. Based on vehicle features and nodes among vehicle nodes a connectivity prediction method was implemented based on connectivity amongst nodes. In 2023, Ali et al. [35] have suggested a brand-new clustering approach for VANET that is based on the Harris Hawks Optimization (HHO) algorithm. In 2019, Mohammed et al. [36] Using an imperialist competitive algorithm, a clustering-based routing protocol is developed in this paper, where nodes are grouped in accordance with movement information like vehicle velocity and node degree. In 2018, Bagher et al. [37] For VANETs with reliable applications, a clustering-based reliable routing technique was put forth in this study.

3 System model on VANET

The TA (server), a mobile onboard unit fitted with a vehicle, and an RSU are the three fundamental elements that make up the VANET system paradigm.

  • TA TA stands for the trustworthy management centre of the network. As RSUs and OBUs join the network, TA assists with registration and certification [38].

  • Road Side Unit RSUs are used to control and interact with vehicles that are within their communication range [38].

  • On-Board Unit On-board equipment periodically broadcast traffic-related status information. The selected network consists of the vehicles denoted as Vn, in which n implies vehicles moving to various sites and is specified as L1, L2, L3, L4, L5, L6, L7, L8 and L9. To go to the destinations, it is assumed that the cars would move at a constant pace. Any location designated as, AP1, AP2, AP3, and AP4 with a comparable coverage area is enclosed by an exact Access Point (AP). Congestion problems arise if the routes chosen are not the best ones. As a result, the best route should be chosen in order to avoid traffic and crashes and reduce congestion. Every AP has the capacity to be controlled by many vehicles.

Figure 1 illustrates the recommendedHSS-NBO oriented model for VANET routing.

Fig. 1
figure 1

Architecture of proposedVANET routing

4 Optimal cluster head selection

The optimal CHS is the initial phase for VANET routing that is done by considering.

  1. a.

    Trust

  2. b.

    Distance

  3. c.

    Energy

  4. d.

    Delay

  • Trust [39]: It is a joint measure, which guarantees mobility, reliability, privacy as well as security. It is split into indirect and direct trusts. It is modeled in Eq. (1), wherein, \(B\),\(A\) and \(C\) points to nodes, \(TS_{\left( {B - A} \right)}\) points to the final trust of \(B\) on \(A\) and \(W\) refers to the weight associated with trust.

    $$ TS_{\left( {B - A} \right)} = W \times DT_{\left( {B - A} \right)} + \left( {1 - W} \right) \times IDT_{\left( {B - A} \right)} $$
    (1)
    $$ DT = \frac{E}{{D\left( {B,A} \right)}} $$
    (2)
    $$ IDT = \sum {DT\left( {B - C} \right) \times DT\left( {C - A} \right)} $$
    (3)
  • Energy [40]: Here, the energy of each node is taken and its mean is computed to obtain the energy as shown in Eq. (4). The energy lies between 0.5 and 1.

    $$ E = Mean\left( {V_E } \right) $$
    (4)
  • Distance [41]: The distance amid each node to CH is assessed with Euclidean distance as revealed in Eq. (5).

    $$ D_{iab} = \sqrt {{\left( {a_2 - a_1 } \right)^2 + \left( {b_2 - b_1 } \right)^2 }} $$
    (5)

    Here, \(\left( {a_1 ,b_1 \,} \right)\) points to coordinate of node and \(\left( {a_2 ,b_2 \,} \right)\) points to coordinate of CH. The overall distance is assessed by considering the mean of \(D_{iab}\) as in Eq. (6), here, \(i = 1,2...count\,\,of\,CH\).

    $$ D = Mean\left( {D_{iab} } \right) $$
    (6)
  • Delay [42]: It is defined as the ratio of distance and speed as exposed in Eq. (7).

    $$ Dy = \frac{{\it Distance}\ \left( D \right)}{{Speed}} $$
    (7)

5 Routing under proposed parameters

The routing takes place on considering.

  1. a.

    Distance

  2. b.

    Congestion

  3. c.

    Proposed LDB measure

  4. d.

    LTI

  • Congestion \(\left( {Cn} \right)\) [35]: It is computed based upon the velocity of the vehicle as shown in Eq. (810). Higher the speed of the vehicle in the route; the less will be the congestion. Let U and Q refers to routes.

    $$ P\left( {U / Q} \right) = \frac{{P\left( {U \cap Q} \right)}}{P\left( U \right)} $$
    (8)
    $$ P\left( {U \cap Q} \right) = \frac{{n\left( {U \cap Q} \right)}}{n\left( s \right)} $$
    (9)
    $$ n\left( {U \cap Q} \right) = n\left( U \right) + n\left( Q \right) - n\left( {U \cup Q} \right) $$
    (10)

    Here, \(P\left( {U / Q} \right)\) refers to congestion probability in route U or \(Q\).

    \(n\left( U \right)\) refers to count of vehicles in \(U\).

    \(n\left( Q \right)\) refers to count of vehicles in \(Q\).

    \(n\left( {U \cap Q} \right)\) refers to count of same vehicle velocity in route \(U\) and \(Q\).

    \(n\left( s \right)\) refers to entire count of vehicle in route \(U\).

    \(n\left( {U \cup Q} \right)\) refers to jointvehicle velocity of route \(U\) and \(Q\).

    If the probability of vehicle velocity is high, the congestion will be low and if the probability of vehicle velocity is low, the congestion will be high.

  • Proposed LDB measure The purpose to propose the Dynamic Behaviour model is to characterize the efficiency of the link connected with the subsequent hop forwarder of the candidate.

    Therefore, the link’s dynamic behavior is defined as \(u = \left( {V_n ,\,V_i } \right)\) LDB [5], as in Eq. (11).

    $$ LDB_u \left( {V_n ,\,V_i } \right) = ETZ_u \left( {V_n ,\,V_i } \right) - LTI_u \left( {V_n ,\,V_i } \right) $$
    (11)

    In Eq. (11), \(u\) implies link between \(V_n\) and \(V_i\), \(ETZ_u \left( {V_n ,\,V_i } \right)\) represents the link quality cost to select the link u among the candidate forwarding node \(V_i\) and present forwarding node \(V_n\), and \(LTI_u \left( {V_n ,\,V_i } \right)\) is used to estimate the obtainable bandwidth at Vi by means of physical intrusion models and throughput at the MAC layer.

    $$ ETZ_u \left( {V_n ,\,V_i } \right) = \frac{1}{{d_{for} \times d_{rev} }} $$
    (12)

    In Eq. (12), \(d_{for}\) implies the delivery ratio of packets transmitted from \(V_n\) to \(V_i\), \(d_{rev}\) implies a delivery ratio of the packet transmitted from \(V_i\) to \(V_n\).

    As per the proposed evaluation, LDB is modeled based upon \(X\) as shown in Eq. (13). In Eq. (14), \(\,\,LQI\) implies link quality indicator and \(X\) implies the influence of LQI.

    $$ LDB_u \left( {V_n ,\,V_i } \right) = ETZ_u \left( {V_n ,\,V_i } \right) - LTI_u \left( {V_n ,\,V_i } \right) + X $$
    (13)
    $$ X = \left\{ \begin{gathered} 0,\,\,\,\,\,\,\,\,\,\,LQI \ge 0\,dBm \hfill \\ \left| {LQI} \right|,\,\, - 255dBm < LQI < 0dBm \hfill \\ 255,\,\,\,\,\,LQI \le - 255dBm \hfill \\ \end{gathered} \right. $$
    (14)
    $$ \,\,LQI = - 0.33^\ast d + 110 $$
    (15)

    The LTI for \(u\) among \(V_n\) and \(V_i\) is defined as in Eq. (16).

    $$ LTI_u \left( {V_n ,\,V_i } \right) = IR_u \left( {V_n } \right) \times normaT_u \left( {V_n ,\,V_i } \right) $$
    (16)

    Equation (16), \(IR_u \left( {V_n } \right)\) is described by means of the physical interfering model and \(normaT_u \left( {V_n ,\,V_i } \right)\) implies normalized link throughput [43], which could approximate accessible interference and bandwidth at the transmitter. Equation (17), \(SINR\) implies signal to interference and noise ratio and \(SNR\) implies signal to noise ratio [5].

    $$ IR_u \left( {V_n } \right) = \frac{{SINR_u \left( {V_n } \right)}}{{SNR_u \left( {V_n } \right)}} $$
    (17)

    If the interference is high on the receiver side, the link has poor quality.

  • LT measure [5]: The link throughput is measured at the receiving side which incurs no broadcast overhead except for the transmitter time-stamp, whilst the computing overhead is small. Presuming that \(V_n\) receives the packet \(K\) from \(V_i\), the throughput of \(u\) among \(V_i\) and \(V_n\) is modeled as in Eq. (18).

    $$ LT_{u\left( K \right)} \left( {V_n ,\,V_i } \right) = \frac{size\left( K \right)}{{Delay_{u\left( K \right)} }} $$
    (18)

In Eq. (18), \(size\left( K \right)\) implies packet size received in bits, \(Delay_{u\left( K \right)}\) implies elapsed time among time-stamp at receiver and sender.

6 Objectives with HSS-NBO-based optimization

The objective considered here is the minimizing function as in Eq. (19). The energy, trust, LDB, and LTP should be high, while, the delay, congestion, and distance during transmission of data must be small. In Eq. (19), the summation of weighs \(\omega_1\)\(\omega_7\) is 1, i.e. \(\sum {w_i } = 1\).

$$ Fit = Min\left[ \begin{array}{l}w_1 \ast \left( D \right) + w_2 \ast \left( {Dy} \right) \\ \quad+ w_3 \ast \left( {1 - E} \right) + w_4 \ast \left( {1 - TS} \right) \\\quad+ w_5 \ast \left( {Cn} \right) + w_6 \ast \left( {1 - LDB} \right)\\\quad+ w_7 \ast \left( {1 - LT} \right) \\ \end{array} \right] $$
(19)

The optimal CH is elected in this work by means of a new HSS-NBO algorithm.

6.1 HSS-NBO algorithm

The conventional NBO [44] and SSOA [45] approaches are combined to form a new HSS-NBO algorithm. The combination of 2 standard optimizations will boost the optimal convergence rate. The arithmetical formula of the suggested HSS-NBO technique is described here.

In actuality, NBO is used to solve optimization problems since it is a population-oriented slope optimization technique.

6.1.1 Initial population

The entire issue recorded in the \(d\) dimension is depicted as a beetle as in Eq. (20).

$$ nb = \left[ {q_1 ,q_2 ,....,q_d } \right] $$
(20)

Each beetle has a deciding variable. Some beetles, together with the population \(s\) and range \(p\) in Eq. (21), are determined arbitrarily l.

$$ Pop = \left[ {\begin{array}{*{20}c} {nb_{1,1} } & {nb_{1,2} } & {...} & {nb_{1,d} } \\ {nb_{2,1} } & {nb_{2,2} } & {...} & {nb_{2,d} } \\ \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} \\ {nb_{l,1} } & {nb_{l,2} } & {...} & {nb_{l,d} } \\ \end{array} } \right] $$
(21)

The term \(Pop\) implied the initial population of the beetle and \(nb_{x,y}\) implies \(y\) component connected to the beetle \(x\). Beetles create solutions as in Eq. (22).

$$ nb_{x,y} = p + (s - p).ra(0,1) $$
(22)

On considering the objective, Eq. (23) shows the populace of beetles.

$$ Fit = \left[ {\begin{array}{*{20}c} {f(nb_{1,1} } & {nb_{1,2} } & {...} & {nb_{1,d} )} \\ {f(nb_{2,1} } & {nb_{2,2} } & {...} & {nb_{2,d} )} \\ \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} & \begin{gathered} . \hfill \\ . \hfill \\ \end{gathered} \\ {f(nb_{l,1} } & {nb._{l,2} } & {...} & {nb_{l,d} )} \\ \end{array} } \right] = \left[ \begin{gathered} f(nb_1 ) \hfill \\ f(nb_2 ) \hfill \\ . \hfill \\ . \hfill \\ f(nb_l ) \hfill \\ \end{gathered} \right] $$
(23)

6.1.2 Aptness of each region to collect water

Every beetle gathers additional water and moisture if it selects a higher objective value. Equation (24) shows if a specific beetle area \(nb_x\) has the prospective to hold up a larger number of beetles.

$$ Y_x = Y_{\max } .\sin \left( {\frac{{f\left( {nb_x } \right) - f_{\min } }}{{f_{\max } - f_{\min } }}.\frac{\pi }{2}} \right) $$
(24)

\(Y_{\max }\) \(\to\) High capacity of beetle count,\(Y_x\)\(\to\) capability of beetles count at \(nb_x\),\(f\left( {nb_x } \right)\)\(\to\) beetle competence, \(f_{\min }\) and \(f_{\max }\)\(\to\) minimum and maximum beetle competencies. The emergence of beetles is shown in Eqs. (25) and (26). The whole beetles to look for water is \(Y\).

$$ Y = \sum_{x = 1}^l {Y_x = } Y_1 + Y_2 + ... + Y_l $$
(25)
$$ \begin{aligned} Y& = \sum_{x = 1}^l {Y_{\max } .\sin \left( {\frac{{f\left( {nb_x } \right) - f_{\min } }}{{f_{\max } - f_{\min } }}.\frac{\pi }{2}} \right)} \hfill \\ &= Y_{\max } .\sin \left( {\frac{{f\left( {nb_1 } \right) - f_{\min } }}{{f_{\max } - f_{\min } }}.\frac{\pi }{2}} \right) + ... \\ & + Y_{\max } .\sin \left( {\frac{{f\left( {nb_l } \right) - f_{\min } }}{{f_{\max } - f_{\min } }}.\frac{\pi }{2}} \right) \hfill \\ \end{aligned} $$
(26)

6.1.3 Moving toward damp areas

Let's consider beetle \(nb_x\), \(nb_y\) and \(Y_x\). We can compute the distance amid \(nb_x\), \(nb_y\) as exposed in Eq. (27), \(h\)\(\to\) order of normand \(\beta\)\(\to\) [initial humidity] Hum0.

$$ D_{xy} = \left\| {nb_x - nb_y } \right\|\, = \sqrt {{\sum_{k = 1}^D {\left( {nb_{x,a} - nb_{y,a} } \right)^2 } }} $$
(27)

The attractive count of a region to attract beetles is shown in Eq. (28), where, \(Hum\left( c \right)\)\(\to\) moisture quantity that \(nb_y\) felt from \(nb_x\).

$$ Hum\left( c \right) = \kappa \ast Hum_0 .\exp \left( { - D_{xy} } \right) $$
(28)

The coefficient of humidity rise \(\kappa\) is revealed in Eq. (29).

$$ \kappa = \kappa_{\max } - \kappa_0 .\left( {1 - \frac{it}{{\max it}}} \right).ra(0,1) $$
(29)

Here, \(\kappa_0\)\(\to\)initial humidity increase coefficient, it and \(Maxit\)\(\to\)current and maximum iterations.

One beetle attracts other by the moisture sensing coefficient and current position. Equation (30) is employed to recognize this attraction mechanism.

$$ nb_y^{new} = nb_y^{old} + Hum.(nb_x - nb_y^{old} ) + levy $$
(30)

In Eq. (30), old and new beetle location\(\to\)\(nb_y^{old}\) and \(nb_y^{new}\). The \(levy\) in Eq. (30) is given in Eq. (31), here, \(u\) and \(v\) \(\to\)particular random vector (0, 1) and \(\gamma\)\(\to\) 1.5 (constant).

$$ levy = \frac{u}{{\left| v \right|^{\frac{1}{\gamma }} }}.\left| {\frac{{\Gamma \left( {1 + \gamma } \right).\sin \left( {\frac{\pi }{2}\gamma } \right)}}{{\Gamma \left( {\frac{1 + \gamma }{2}} \right).\gamma .2^{\frac{\gamma - 1}{2}} }}} \right|^{\frac{1}{\gamma }} $$
(31)
6.1.3.1 Moving wet mass

Beetles utilize their sense of smell to locate areas that are more humid. Beetles employ their center of gravity and wet patches to mimic this behavior. The beetles look for the center of gravity, according to Eq. (32).

$$ nb_x^{new} = nb_x^{old} + ra.(nb^\ast - \overline{nb}) + Levy $$
(32)

In Eq. (32), \(nb_x^{new}\)\(\to\)new position, \(nb^\ast\)\(\to\)position with higher moisture and \(\overline{nb}\)\(\to\) water gravity position, \(\overline{nb}\) is specified in Eq. (33).

$$ \overline{nb} = \frac{{\sum_{x = 1}^l {nb_x } }}{l} = \frac{nb_1 + nb_2 + .... + nb_l }{l} $$
(33)
$$ nb_x^{new} = nb_x^{old} + ra.\left( {\kappa .nb^\ast - \left( {1 - \kappa } \right)\overline{nb}} \right) + levy $$
(34)

As per HSS-NBO, Eq. (34) is modeled by mingling the concept of SSOA as shown in Eq. (38). The SSOA update is shown in Eq. (35), where, \(y_{i,j}^{newshep}\) implies new position of \(j^{th}\) shepherd in \(i^{th}\) herd, \(stepsize_{i,j}^{shep}\) implies step size of sheep and horse.

$$ y_{i,j}^{newshep} = y_{i,j}^{shep} + stepsize_{i,j}^{shep} $$
(35)

On adding Eqs. (34) and (35), (36) is formed.

$$ \begin{gathered} nb_x^{new} + \,y_{i,j}^{newshep} = nb_x^{old} + y_{i,j}^{shep} + \hfill \\ ra.\left( {\kappa .nb^\ast - \left( {1 - \kappa } \right)\overline{nb}} \right) + levy + stepsize_{i,j}^{shep} \hfill \\ \end{gathered} $$
(36)

Consider \(nb_x^{new}\) and \(\,y_{i,j}^{newshep}\) as \(y_i \left( {it + 1} \right)\). Let \(nb_x^{old}\) and \(y_{i,j}^{shep}\) be \(y_i \left( {it} \right)\).

$$ \begin{gathered} 2y_i \left( {it + 1} \right) = 2y_i \left( {it} \right) + \hfill \\ ra.\left( {\kappa .nb^\ast - \left( {1 - \kappa } \right)\overline{nb}} \right) + levy + stepsize_{i,j}^{shep} \hfill \\ \end{gathered} $$
(37)
$$ y_i \left( {it + 1} \right) = \frac{\begin{gathered} 2y_i \left( {it} \right) + ra.\left( {\kappa .nb^\ast - \left( {1 - \kappa } \right)\overline{nb}} \right) \hfill \\ + levy + stepsize_{i,j}^{shep} \hfill \\ \end{gathered} }{2} $$
(38)

Here, conventionally, the ra value is set as (0, 1). Instead of that, we use ms and Dyadic transformation maps [26].

$$ ra = \left\{ \begin{gathered} \frac{r\lambda 2y_n }{{1 + \lambda \left( {1 - 2y_n } \right)^2 }}\,\left( {\bmod \,1} \right),\,\,0 \le y_n < 0.5 \hfill \\ \frac{{r\lambda \left( {2y_n - 1} \right)}}{{1 + \lambda \left( {2 - 2y_n } \right)^2 }}\,\left( {\bmod \,1} \right),\,\,0.5 \le y_n < 1 \hfill \\ \end{gathered} \right. $$
(39)

6.1.4 Population hunting or removal

The beetles returned to the nest after gathering moisture from the air. Incorrect solutions were prone to hunting and removal and in subsequent repetition; a new random solution could be created in the issue space.

Also, the flowchart of the HSS-NBO is depicted in Fig. 2.

Fig. 2
figure 2

Flowchart of proposed HSS-NBO algorithm

7 Link breakage handling

VANETs have a very dynamic environment and the mobility of nodes in VANETs results in a higher probability of link breakage. on its past data transmission.

  • Link reliability It is computed based upon RSSI [46] as shown in Eq. (40), which, RSSI refers to the received signal strength indicator.

    $$ RSSI = - 36^\ast \log \left( D \right) - 55 $$
    (40)
  • New distance degree Instead of Euclidean distance [41] computation, a new distance computation is modeled as shown in Eq. (41). In Eq. (41),\(O\) refers to order of norms where the limit between 0 and 1, \(n\) denotes the total count of path, \(M\) and \(L\) denotes the various paths and \(\beta\) = 0.6.

    $$D = \frac{{\sum\limits_{{K = 1}}^{n} {\left( {\left| {M_{i} - L_{i} } \right|^{O} } \right)^{{1/O}} } }}{{\min \left[ {\left( {\sum\limits_{{K = 1}}^{n} {\left( {M_{i}^{2} } \right)^{{1/O}} } } \right),\,\left( {\sum\limits_{{K = 1}}^{n} {\left( {L_{i}^{2} } \right)^{{1/O}} } } \right)\,} \right] + \beta }}$$
    (41)
  • New trust evaluation A new trust [39] computation is modeled for handling link breakage as shown in Eq. (42).

    $$ T_{i,j} \left( t \right) = \left[ \begin{gathered} \frac{n}{{\sum_{i = 1,j = 1}^n {\left( {\frac{1}{{\left( {1 - \alpha } \right)T_{ij}^X \left( {t - \Delta t} \right)}}} \right)} }} \\ + \frac{n}{{\sum_{i = 1,j = 1}^n {\left( {\frac{1}{{\alpha .T_{ij}^X DT\left( t \right)}}} \right)} }} \hfill \\ + \frac{n}{{\sum_{i = 1,j = 1}^n {\left( {\frac{1}{{\left( {1 - \alpha } \right).T_{ij}^X IDT\left( t \right)}}} \right)} }} \hfill \\ \end{gathered} \right] $$
    (42)

In Eq. (42), \(T_{ij}^X\) refers to trust value, \(node\left( i \right)\) refers to 1 hop of neighbor, \(T_{ij}^X IDT\) and \(T_{ij}^X DT\) refers to indirect and direct observation, \(T_{ij}^X \left( {t - \Delta t} \right)\) refers to previous experience, \(\Delta t\) refers to trust update period, \(\alpha \left( {0 \le X \le 1} \right)\) refers to parameter used to weight these 2 contributions.

8 Results and discussion

8.1 Simulation setup

The HSS-NBO method for VANET routing was made in NS2. The assessment was made forHSS-NBO over NBO, SSOA, HHO, LOA, and RHSO. The investigation was done on energy, delay, and so on for varied counts of vehicles from 100, 150, 200, 250, and 300. In addition, statistical analysis was done on congestion, delay, distance, energy, and LTP constraints.

8.2 Convergence analysis

The cost graph based on the minimization function is shown in Fig. 3 for 100 rounds. The evaluation of HSS-NBO is performed over NBO, SSOA, HHO, LOA, and RHSO. The constructed VANET routing model employing HSS-NBO has a somewhat higher fitness value in Fig. 3. For all schemes, the cost is higher at early iterations of 0. The HSS-NBO model, however, has a lower cost over NBO, SSOA, HHO, LOA, and RHSO models at the 60th iteration. The cost that the HSS-NBO model achieves is substantially lower in the 100thiteration, at roughly 1.2. As a consequence, the adopted scheme has the lowest cost by HSS-NBO-assisted optimum CHS. Also, routing under the conditions of distance, congestion, LDB measure (suggested evaluation), and LT also produced the lowest cost for the adopted scheme.

Fig. 3
figure 3

Convergence analysis onVANET routing for varied rounds

8.3 Analysis of delay and energy

The study of delay and residual energy is conducted for HSS-NBO over NBO, SSOA, HHO, LOA, and RHSO. Figure 4. In order to guarantee the timely delivery of data packets, the delay must be minimal. For effective data transmission, there should be a significant level of residual energy following data delivery. In Fig. 4a, the delay obtained using HSS-NBO is less than that obtained using NBO, SSOA, HHO, LOA, and RHSO. Thus, the selected scheme has a high residual energy as a result of the HSS-NBO-assisted optimum CHS. Nevertheless, the implemented system got reduced delay when routing was carried out using the proposed LDB technique.

Fig. 4
figure 4

Analysis of VANET routing for varied vehicle count (a) Delay and (b) Energy

9 Conclusion

A new VANET routing model with link breakage handling was presented in this work. The first step involved choosing the best CH, for which the HSS-NBO algorithm was developed to choose the CH by taking into account distance, delay, energy, and trust. After choosing the best CHS, the routing was done while taking into account the LT, suggested LDB measure, congestion, and distance. To prevent performance degradation, it was necessary to estimate the link breakage during routing. If the link breaks, the situation should be handled well. This study ensured better link breakage handling by taking link dependability, next hop selection with the computation of a new distance degree, and new trust evaluation of nodes based on their historical data transmission into account. From analysis, the delay increased with increasing vehicles for all techniques, including HSS-NBO and NBO, SSOA, HHO, LOA, and RHSO. The further research could look into the relationship between cluster size and network performance. The proactive intra-cluster communications to build communication links and forward data packets rise as the number of nodes in the clusters increases. In other words, if the network is deployed densely and the clusters are crowded, the routing overhead increases. Network overhead has to be focused in the future.