Research Article

An MSCN-Based Virtual Computing Cell-Oriented BSM Dissemination Mechanism

Algorithm 3

The process of distributing scheduling rights.
Input: vehicle set V, density threshold ρ0, MSCN set mscn_set.
(1)Density ← calculate_density ( )
(2)If density <ρ0,then
(3)  Allocation_timeslots (mscn_set)
(4)  CH_id ← getCH (mscn_set)
(5)  For each  ∈ V, do
(6   If CH_id = = getid (), then
(7)    scheduler_flag (CHid, true)
(8)    controlright_confirm ()
(9)   Else
(10)    scheduler_flag (getid (),false)
(11)    scheduler (CH_id)
(12)   End if
(13)   End for
(14)Else
(15)  Allocation_timeslots (mscn_set)
(16)  controlright_handout ( )
(17)  parameterbrocast ( )
(18)  For each  ∈ V, do
(19)   poweradjust ()
(20)   mscnid ← getmscnid (mscn_set)
(21)   If mscnid == getid (), then
(22)    scheduler_flag (mscnid, true)
(23)    controlright_confirm ()
(24)   Else
(25)    scheduler_flag (getid (), false)
(26)    scheduler (mscnid)
(27)   End if
(28)  End for
(29)End if