Skip to main content
. 2020 Dec 31;21(1):218. doi: 10.3390/s21010218
Algorithm 1 Node reliability-aware backup survivable embedding algorithm (NCS).
  • Input: physical WSN GS; VSNR GTV

  • Output: The node mapping results set NODE={njs,,nks}

  • Initialization: Candidate node set Ns=, node mapping results set NODE=

  • forniv in VSNR do

  •        if loc(niv)-loc(njs)M then

  •          Add njs to Ns

  •       end if

  •       ifNs=then

  •           NODE=

  •          return Node embedding failed

  •       else

  •           for each njs in Ns do

  •              if c(niv)Rc(njs) and m(niv)Rm(njs) then

  •                Calculate RD(njs) through Equation (19)

  •           end if

  •        end for

  •       Choose njs with the highest RD(njs)

  •       Add njs to NODE

  •    end if

  • end for

  • return Node embedding successfully