# Hybrid Energy Routing Approach for Energy Internet
## 5 Improved ACO-Based Energy Routing Protocol (IACO-ERP)
The energy minimum loss path should satisfy the following constraints:  
* The power loss of a path should be less than the transmitted energy: \[w_{i}=(1-eff_{i})\times P_{cp} \tag{15}\]0 (22)
* The transmitted power should not exceed the maximum capacity of the path, which is the minimum between the lowest interface capacity of energy routers and the lowest capacity of the power lines that constructed the path: \[w_{i}=(1-eff_{i})\times P_{cp} \tag{15}\]1 (23)
* The total power transmitted through a power line should not exceed its available capacity: \[w_{i}=(1-eff_{i})\times P_{cp} \tag{15}\]2 (24)
* The total power flows into the same ER interface should not exceed its interface capacity: \[w_{i}=(1-eff_{i})\times P_{cp} \tag{15}\]3 (25)  
The energy routing selection method, in Figure 5, consists of ten steps which are carried out for each consumer-producer pair:  
1. First, ERs constructs the network model using the system information (Tables 2 and 3). 2. Thereafter, receiving the pair information (the amount of transmitted power \(P_{cp}\), identity of the producer/prosumer) and using the constraints (23)-(25), the ER eliminates all edges and nodes(ERs) that cannot transfer the \(P_{cp}\) and deducts a sub-graph G2. 3. The path selection method is based on ACO. Consumers and producers/prosumers represent the ant nest and food source, respectively. Ants are used to determine the best path between them. They use a chemical known as pheromone to communicate and trace the path to the food source. The path with the highest intensity of pheromone is the one widely used by ants. It is usually the shortest path. In nature, some ants depose more pheromones in the case where the food source is big or of higher quality and the path is very good [40]. Therefore, the pheromone level of a path is proportional to its power transmission loss. The amount of deposed pheromone on an edge (power line) \(e_{ij}\) by ant \(k\) is represented by Equation (26): \[w_{i}=(1-eff_{i})\times P_{cp} \tag{15}\]4 (26) \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Description** \\ \hline \(G=\{E,V,W\}\) & The Energy Internet-corresponding graph model, where \(E,V,W\) represents the set of nodes, edges that consist the graph \(G\) with their weights, respectively \\ \(G2=\{E2,V2,W2\}\) & The new graph of El that can support the transmission of \(p_{cp}\) \\ \(S\) & A set of the best paths of each iteration \\ \(maxit\) & Iterations maximum number \\ \(maxAnt\) & Ants maximum number \\ \(paths\) & A set of all paths determined by all ants in one iteration \\ \(path_{k}\) & An energy transmission path between the consumer–producer pair determined by an ant \(k\) \\ \(V_{i}\) & The current node where the ant is allocated \\ \(V_{j}\) & A neighbor of node \(V_{i}\) (the next node to producer) \\ \(F_{i}\) & A set of one hop neighbors of a node \(v_{i}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: IACO-ERP’s Parameters. where \(w^{path}\) is the power transmission loss of the path where the line \(e_{ij}\) belongs to this path. When the line \(e_{ij}\) connecting routers \(v_{i}\) and \(v_{j}\) is chosen by an ant \(k\), the amount of pheromone on this line is updated using Equation (27):  
\[\tau_{ij}^{k}=\Sigma_{k=1}^{n}\Delta t_{ij}^{k} \tag{27}\]  
where \(n\) represents the number of ants selected on the line \(e_{ij}\). In this step, the ER initializes the colony parameters: number of iterations, ants, and pheromone level. 4. Each ant travels from the graph from one node (ER) to another until it arrives to the producer. The selection of the next hop (node) is determined by calculating a probability for each neighbor with the use of the roulette wheel principle.