# A Novel Spectrum Scheduling Scheme with Ant Colony Optimization Algorithm
## 3 The IACO-Based Spectrum Allocation Method
### The Process and Description of IACO  
The process of IACO-based spectrum allocation is described as below (see Algorithm 1):  
**Step 1:** Initialization. Generate the initial vector \(P_{initial}\) and initialize pheromone of each path with \(\tau_{0}\) (the edge between vertices is connected) or \(\tau_{1}\) (the edge between vertices is available). Set the maximum evolution time \(E_{max}\), the maximum evolution time with low convergence speed \(E_{convergence}\), the number of population \(Num\). **Step 2:** Interference removal. The spectrum allocation scheme \(A\) must be interference free, and therefore \(A\) needs to satisfy the interference constraints from matrix \(C\). Based on this, we would remove the interference-path to correct the solution. While \(A\) does not satisfy constraints defined by \(C\), it is necessary to equiprobably set one value to 0. **Step 3:** Fitness evaluation. Calculating fitness value is a way to convert binary sequence solutions into real space \(R\), which can be expressed as: \(f\to R^{+}\). Get the best path sequence \(P_{best}\) and the highest fitness value \(f_{max}\). **Step 4:** Monitor convergence rate. The monitoring mechanism is designed in IACO to detect the rate-of-change in fitness. If the growth rate stays slow and meets Equation (8) during \(\Delta t\), then turn to the 7 th step to accelerate convergence speed of IACO by employing DE, otherwise, go to the 5 th step for ACO traversing. \[f^{\prime}=\frac{f(x_{t+2\times\Delta t})-f(x_{t+\Delta t})}{f(x_{t+\Delta t}) -f(x_{t})}<1 \tag{8}\]  
where \(f(x_{i})\) is the fitness value of \(x_{i}\), \(\Delta t\) is the evolution times, \(f^{\prime}\) indicates the rate-of-change. **Step 5:** Ants traversal. All ants move back and forth between the starting point and the ending point. As described below in Figure 3, spectrum allocation can be seen as row traversal, where row and column represent cognitive users and bands, respectively. In this row traversal, if the available channel number \(z_{i}>0\) and \(k_{i,j}=1\), then band \(j\) is available for user \(i\), that is to say node \(i\) in column \(j\) is visible for ants, otherwise the ants skip the node. Then the evolution time \(E=E+1\). Figure 3: The way of IACO for spectrum allocation. Path selection. The transfer probability between node \(i\) and \(s\) in the choice process is presented as follows:  
\[s= \begin{cases}arg\max_{j\in allowed_{l}}\{\tau_{i,j}^{\alpha}\mu_{i,j}^{\beta} \},&q\leq q_{0}\\ J,&q>q_{0}\end{cases}  \tag{9}\]  
where \(q_{0}\) is a constant in the scope \([0,1]\), and \(J\) is a random variable generated by the following formula:  
\[p_{i,s}= \begin{cases}\frac{\tau_{i,s}^{\alpha}\mu_{i,s}^{\beta}}{\sum_{j\in allowed _{l}}\tau_{i,j}^{\alpha}\mu_{i,j}^{\beta}},&s\in allowed_{l}\\ 0,&s\
otin allowed_{l}\end{cases}  \tag{10}\]  
where \(\alpha\) and \(\beta\) are the weighted factor of information and expectation heuristic respectively. \(allowed_{l}\) is the available node-set for ant \(l\) at node \(i\), \(tabu_{l}\) is the infeasible node-set for ant \(l\) and it would be cleared after \(l\) finishes traversal. 2. Update pheromone. Using an elitist strategy to update pheromone. The pheromone concentration on path\((i,j)\) is updated as the following rules: \[\tau_{i,j}=(1-\rho)\times\tau_{i,j}+\Delta\tau_{i,j}\] (11) \[\Delta\tau_{i,j}=\sum_{k=1}^{m}\Delta\tau_{i,j}^{k}\] (12) \[\Delta\tau_{i,j}^{k}=\frac{Q}{f_{min}}\] (13) where \(\rho(0<\rho<1)\) is the pheromone evaporation coefficient, \(1-\rho\) is the residual factor of pheromone. \(Q\) is a constant of total pheromone released from all ants in each traversal, \(f_{min}\) is the cost calculated by fitness function. **Step 6:** Termination judgment. If reach the maximum iteration times \(E_{max}\), the solving process is over. Then map the best solution \(P_{best}\) to allocation matrix \(A\). If \(E<E_{max}\) and the convergence speed is slow and and satisfy \(E_{convergence}\), then go to the 7 th step, otherwise, go to the 8 th. **Step 7:** Accelerate the convergence speed.