Skip to main content
. 2016 Jul 21;16(7):1138. doi: 10.3390/s16071138
Algorithm 1: Incentive algorithm for delay-constrained data query and feedback.
  • 1:

    When User i meets User j, User i updates his or her DCCP, DRCP and DFCP and creates his or her candidate query, reply and feedback lists, i.e., Li=Lj-(LiLj), L^i=L^j-(L^iL^j) and Lˇi=Lˇj-(LˇiLˇj).

  • 2:

    if User i is the data provider for query q in Li then

  • 3:

     replies to the query and gives back to User j;

  • 4:

    Li=Li-{q};

  • 5:

    γq=γq-1;

  • 6:

    else if User i is the query issuer for reply q^ in L^i then

  • 7:

     pays a number of credits to User j;

  • 8:

    else if User i is the receiver for feedback f in Lˇi then

  • 9:

     pays a number of credits to User j;

  • 10:

    end if

  • 11:

    Users i and j exchange queries, replies and feedbacks pair by pair according to the Nash bargaining solution.