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