Skip to main content
. 2022 Nov 29;22(23):9304. doi: 10.3390/s22239304
Algorithm 1 WGS for illumination pattern determination.
  • Input: 

    collection of cells {N}, set of demand of all cells Dt={DtiiN}

  • Output: 

    the set of illuminated cells Φ

  • 1:

    Initialize Φ=Ø, Count=0;

  • 2:

    for i=1 to N do

  • 3:

        count the du,ti and dnu,ti;

  • 4:

    end for

  • 5:

    Normalize two types of demand: nor_d,ti=d,ti/i=1Nd,ti;

  • 6:

    Obtaion weighted demand: d˜ti=ω1nor_du,ti+ω2nor_dnu,ti;

  • 7:

    whileCount<Kdo

  • 8:

        i=argmaxd˜ti,i{N}

  • 9:

        Add i to Φ and reomve i from {N}

  • 10:

        Count=Count+1

  • 11:

    end while