Skip to main content
. 2015 Dec 15;15(12):31620–31643. doi: 10.3390/s151229875
Algorithm 5 Event source determination.
Require:
  • -

    gevt = (UVevt, EGevt, WGTevt) : a weighted graph representing the event coverage

Ensure:
  • -

    UVsrc : a set of top k% sensor nodes representing event sources

  • 1:

    cntsrcround(k% × sizeOf(gevt.UVevt))

  • 2:

    for each uvsrcgevt.UVevt do

  • 3:

    EGsrc ← retrieve a set of edges from gevt.EGevt, such that each edge connects uvsrc

  • 4:

    for each egsrcEGsrc do

  • 5:

       wgtsrc ← retrieve the weight for egsrc from gevt.WGTevt

  • 6:

       wgtsumwgtsum + wgtsrc

  • 7:

    end for

  • 8:

    if sizeOf (UVsrc) <cntsrc then

  • 9:

       UVsrcUVsrc ∪ {uvsrc}

  • 10:

    else

  • 11:

       uvlst ← retrieve a sensor node from UVsrc whose wgtsum is the smallest

  • 12:

       if uvlst.wgtsum<uvsrc.wgtsum then

  • 13:

          UVsrcUVsrc ∪ {uvsrc} - {uvlst}

  • 14:

       end if

  • 15:

    end if

  • 16:

    end for