Skip to main content
. 2019 Jun;5(2):248–259. doi: 10.18383/j.tom.2018.00056

Algorithm 2.

Annealing Function 2

1: for or j < ⌊Ti⌋ + 1 do
2:     Cr ← random configuration
3:     v1 ← random amplifier index 1
4:     v2 ← random amplifier index 2
5:     if random(0, 1) > 0.5 then
6:         Yi ← swap_amplifiers(Yi, Cr, v1, v2)
7:     else
8:         Yi ← flip_amplifier_orientation(Yi, Cr, v1)
9:     end if
10:     jj + 1
11: end for
12: Return Yi