Skip to main content
. 2022 Aug 14;22(16):6068. doi: 10.3390/s22166068
Algorithm 3. BENS Algorithm For Reservation (BENS-R).
Input: N number of available channels in the CRN,
   Nnp Number of PU-occupied channels in Unreserved CRN
   Nns Number of SU-occupied channels in Unreserved CRN
   Nrp Number of PU-occupied channels in Reserved CRN
   Nrs Number of SU-occupied channels in Reserved CRN
   fa number of failed channels in the CRN
   maxres number of maximum reserved channels
   values Ki such that Ka+1 < Ka < Ka − 1 < Ka − 2...< Ki <...<K0;
   i = 1 to a, where Ka and Ka+1 = 0
Output: M number of reserved channels in the CRN,
Step 1: Calculate β = (pn + qn + pr + qr)/(Q − e)
Step 2: Find MAvailable = Q − (pn + qn + pr + qr + e)
Step 3: Find RN = pr + qr
Step 4: while(k > 0) do
   if (ki + 1 ≤ β < ki)
   thentraffic_threshold_level = j;
   k = k − 1; repeat
Step 5: do break;
Step 6: end
Step 7: Switch to operating mode:
  • Operating mode = 0 indicates that the objective is to increase the retainability of current monitoring services.

  • Operating mode = 1 denotes the increase in the availability of channels for fresh users.

Step 8: if selected Operating mode = 0 then
Step 9: M’ = maxres − traffic_threshold_level
Step10: end
Step 11: if selected Operating mode = 1 then
Step 12: M’ = maxres − (a-traffic_threshold_level)
Step 13: end