\setcounter{AlgoLine}{0}
\DontPrintSemicolon
	\KwIn{Set $E$ of elements constituting a solution; incremental cost function $c(s, e) > 0$; fitness function $f$ to minimize, parameters \textcolor{myevidence}{$I_{max}, m, \alpha, \beta, \tau_{min}, \tau_{max}, \rho$} and improvement method \textcolor{myevidence}{$a(\cdot)$}}
	\KwResult{Solution $s^*$}
	$f^* \leftarrow \infty$\\
	\For{$\forall e \in E$}
	{ $\tau_e \leftarrow \tau_{max}$}
	\For{$I_{max}$ iterations}
	{ \For {$k = 1 \dots m$}
		{Initialize $s$ as a trivial, partial solution\\
			$R \leftarrow E$\tcp*[r]{Elements that can be added to $s$}
			\While(Build a new solution){$R \neq \varnothing$}
			{Randomly choose $e \in R$ with a probability proportional to $\tau_e^\alpha \cdot c(s,e)^\beta$\tcp*[r]{Ant colony formula}
				$s \leftarrow s \cup e$\\
				From $R$, remove the elements that cannot be added any more to $s$\\
			}
			$s_k \leftarrow a(s)$\tcp*[r]{Find the local optimum $s_k$ associated with $s$}
			
			\If(Update the best solution found){$f^* > f(s_k)$}
			{$f^* \leftarrow f(s_k)$\\
				$s^* \leftarrow s_k$
			}
		}
		\For(Pheromone trail evaporation){$\forall e \in E$}
		{$\tau_e \leftarrow (1 - \rho)\cdot \tau_e$}
		$s_b \leftarrow$ best solution from $\{s_1,  \dots, s_m\}$\\
		\For(Update trail, maintaining it between the bounds){$\forall e \in s_b$}
		{$\tau_e \leftarrow max(\tau_{min}, min(\tau_{max}, \tau_e + 1/f(s_b)))$}
	}
