Input: and c
|
1: mK ← 0 |
2: fork = 1 to Kdo
|
3: t ← 0, , w ← 1 |
4: evaluate all and calculate
|
5: evaluate all and ; calculate
|
6: whilet ⩽ tfdo
|
7: ifthen
|
8: mK ← mK + w
|
9: break out of the while loop |
10: endif
|
11: generate two unit-interval uniform random numbers r1 and r2
|
12:
|
13: j ← smallest integer satisfying
|
14:
|
15: t ← t + τ,
|
16: update all and ; recalculate , and
|
17: endwhile
|
18: endfor
|
19: return
|