# Table 2 Algorithm 1

Algorithm 1 Coordinated antenna patterns selecting scheme for maximizing total capacity of the network
1: Initialization: Cbn0 = (AP1,0,...APk,0,...APN,0), where APk,0(k = 1~N) is randomly set and ${f}_{Cb{n}_{0}}$ is computed according to formula (), the iteration number t = 0, T = T0;
2: Cbn* = Cbn0,${f}^{*}={f}_{Cb{n}_{0}}$;
3: One FBS k is randomly chosen to change its antenna pattern to an arbitrary different one, and antennas configuration combination changed from Cbn t = (AP1,t,...AP k, t ,...AP N, t ) to $Cb{{n}_{t}}^{\prime }=\left(A{P}_{1,t},...A{{P}_{k,t}}^{\prime },...A{P}_{N,t}\right)$;
4: if ${f}_{Cb{n}_{t}}\le {f}_{Cb{{n}_{t}}^{\prime }}$then
5: the new antenna patterns combination $Cb{{n}_{t}}^{\prime }$ is accepted;
6: else
7: $Cb{{n}_{t}}^{\prime }$ is accepted with probability$exp\left(-\frac{{f}_{Cb{n}_{t}}-{f}_{Cb{{n}_{t}}^{\prime }}}{T}\right)$.
8: end if;
9: if ${f}_{Cb{n}_{t}}>{f}^{*}$then ${f}^{*}={f}_{Cb{n}_{t}}$ and Cbn* = Cbnt;
11: end if;
12: t = t+1;
13: if t > max_num or f * hasn't changed in 10 iterations then
14: Break;
15: else T = αT(0 <α < 1 and α is related with max_num) and return to step 3;
16: end