Skip to main content
. Author manuscript; available in PMC: 2017 Jan 3.
Published in final edited form as: Proc ACM Int Conf Ubiquitous Comput. 2016 Sep;2016:706–717. doi: 10.1145/2971648.2971753

Algorithm 2.

GenerateCandidate

Require: cand =< c1, …, cl >, ℂk, hk, remDur
1: if dur == 0 and isConnect(cl, next(hk)) then
2:   ℂk = ℂkcand
3: else if dur > 0 then
4:   for each sj ∈ 𝕊 do
5:     if isConnect(cl, sj) then
6:       remDur′ = remDur − (sj.tesj.ts)
7:       cand′ =< c1, …, cl, sj >
8:       GenerateCandidate(cand′, ℂk, hk, remDur′)
9:     end if
10:   end for
11: end if