Skip to main content
. 2019 Feb 18;19(4):847. doi: 10.3390/s19040847
Algorithm 1. Find minimum-cost path of bλ for collaborative task execution.
1.    Input:
2.               S, D, Td
3.    pbPathAlgorithm(S, D, b)
4.    If     d(pb)Td then
5.              return pb
6.    end if
7.    pdPathAlgorithm(S, D, d)
8.    If d(pd)>Td then
9.              return “There is no solution”
10.    end if
11.    while true do
12.              λb(pb)b(pd)d(pd)d(pb)
13.              pλPathAlgorithm(S, D, bλ)
14.              If bλ(pλ)=bλ(pb) then
15.                    return pd
16.              else
17.                    if d(pλ)Td then
18.                       pdpλ
19.                    else
20.                       pbpλ
21.                    end If
22.              end If
23.    end while
24.    Output: pλ*