# An Improvement of a Mapping Method Based on Ant Colony Algorithm Applied to Smart Cities

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

- (1)
- The greedy algorithm and its variants.

- (2)
- Graphical division.

- (3)
- Algorithm based on graph similarity.

- (4)
- The heuristic algorithm.

- (1)
- Average hop count.

- (2)
- Link load balancing.

- (3)
- Node load balancing.

- (4)
- Energy consumption.

- (5)
- Forwarding delay.

- (1)
- Initialization.

- (2)
- Solution construction.

- (3)
- Pheromone update.

## 2. Improved Ant Colony Mapping Algorithm

#### 2.1. Initialization

#### 2.2. Solution Construction

#### 2.3. Pheromone Update

Algorithm 1: Given the neuron connection matrix and the number of nodes, iteratively optimise 2D Mesh mapping functions |

Input: Neuronal connection matrix CM, Number of ants ant _num, the maximum number of iterations max _iter_num, Decay factor p, magnification q, pheromone index, enlightening information index Output: Mapping function 1: Calculational neuronal importance: importance (i) 2: Degree of calculation of node centre: centre (i) 3: Calculate the mapping heuristic information: _{i,j}4: The initialised pheromone matrix is the full 1: pheromone_matrix 5: for iter = 1:max _iter_num: 6: for ant_group in group_num: 7: for ant =1:ant_num: 8: Generate the mapping matrix map _matrix by strategy 9: The mapping matrix, m in_map_matrix _one_iter that calculates the minimum cost 10: Update the pheromone matrix 11: Updates the global minimum cost mapping matrix, m in_map_matrix 12: end for 13: return m in_map_matrix |

## 3. Algorithmic Simulation and Result Analysis

#### 3.1. Simulation Analysis of Randomly Generated Neural Networks

#### 3.1.1. Logical Network Generation Algorithm

Algorithm 2: Given the neural network size and the connection probability, generate the connection matrix |

Input: Number of neurons n, exponential distribution parameters Output: Connection matrix CM 1: Neuronal locations were randomly generated 2: Initialise the CM and set the zero 3: for i = 0: n − 1 / / source neuron traversation 4: for j = 0: n − 1 / / destination neuron traversal 5: p = random.exp(- D (i, j)2/ λ) // generates exponentially distributed random numbers 6: CM[i][j] = B(1, p) 7: end for 8: end for 9: return CM |

#### 3.1.2. Superparameter Setting

#### 3.1.3. Control Group Setting

#### 3.2. Conclusions Derived from the Simulation Results

#### 3.3. Simulation Analysis for Special Cases of the Classical Topological VOPD

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Qiu, W. Design and application of group intelligent algorithm for smart city. Artif. Intell.
**2021**, 5, 15. [Google Scholar] - Ling, H.; Fu, Y.; Hua, M.; Lu, A. An Adaptive Parameter Controlled Ant Colony Optimization Approach for Peer-to-Peer Vehicle and Cargo Matching. IEEE Access
**2021**, 9, 15764–15777. [Google Scholar] [CrossRef] - Hoefler, T.; Jeannot, E.; Mercier, G. An Overview of Topology Mapping Algorithms and Techniques in High-Performance Computing; John Wiley & Sons, Inc.: Hoboken, NY, USA, 2014. [Google Scholar]
- Xu, Q.; Wang, J.; Li, P.; Li, H. Fast three-dimensional matching Algorithm based on image segmentation. Comput. Eng.
**2006**, 32, 209–211. [Google Scholar] - Li, Y.; Soleimani, H.; Zohal, M. An improved ant colony optimization algorithm for the multi-depot green vehicle routing problem with multiple objectives. J. Clean. Prod.
**2019**, 227, 1161–1172. [Google Scholar] [CrossRef] - Bell, J.E.; McMullen, P.R. Ant colony optimization techniques for the vehicle routing problem. Adv. Eng. Inform.
**2004**, 18, 41–48. [Google Scholar] [CrossRef] - Dorigo, M.; Di Caro, G.; Gambardella, L.M. Ant Algorithms for Discrete Optimization. Artif. Life
**1999**, 5, 137–172. [Google Scholar] [CrossRef] [PubMed] [Green Version] - He, M.; Wei, Z.; Wu, X.; Peng, Y. An Adaptive Variable Neighborhood Search Ant Colony Algorithm for Vehicle Routing Problem with Soft Time Windows. IEEE Access
**2021**, 9, 21258–21266. [Google Scholar] [CrossRef] - Abdulkader, M.M.; Gajpal, Y.; ElMekkawy, T.Y. Hybridized ant colony algorithm for the Multi Compartment Vehicle Routing Problem. Appl. Soft Comput.
**2015**, 37, 196–203. [Google Scholar] [CrossRef] - Skanderova, L.; Zelinka, I. Differential Evolution Based on the Node Degree of its Complex Network: Initial Study. In AIP Conference Proceedings; AIP Publishing LLC: Melville, NY, USA, 2016. [Google Scholar]
- Xiao, J.; Zhang, Y.-J.; Xu, X.-K. Convergence improvement of differential evolution for community detection in complex networks. Phys. A Stat. Mech. Its Appl.
**2018**, 503, 762–779. [Google Scholar] [CrossRef] - Simon, H.D.; Teng, S.H. How Good is Recursive Bisection? Siam J. Sci. Comput.
**1997**, 18, 1436–1445. [Google Scholar] [CrossRef] [Green Version] - Chen, X.; Liu, J.; Li, S.; Xie, P.; Chi, L.; Wang, Q. A New Topology-Aware Mapping Method for Parallel Applications on the Tianhe-2A Supercomputer; Springer: Cham, Switzerland, 2018. [Google Scholar]
- Leo, D. The Prime Sequence: Demonstrably Highly Organized While Also Opaque and Incomputable—With Remarks on Riemann’s Hypothesis; Department of Egyptology and Assyriology, Brown University: Providence, RI, USA, 2014. [Google Scholar]
- Filletti, É.R.; Da Silva, J.M.; Ferreira, V.G. Predicting of the Fibrous Filters Efficiency for the Removal Particles from Gas Stream by Artificial Neural Network. Chem. Eng. Sci.
**2015**, 5, 317. [Google Scholar] [CrossRef] [Green Version] - Dorigo, M. Ant Colony Optimization; Marco, D., Thomas, S., Eds.; IEEE Computational Intelligence Magazine: Piscataway, NJ, USA, 2004. [Google Scholar]
- Colorni, A.; Dorigo, M.; Maniezzo, V. Distributed Optimization by Ants Colonies. In Proceedings of the first European Conference on Artificial Life, Paris, France, January 1991. [Google Scholar]
- Legenstein, R.; Maass, W. Edge of chaos and prediction of computational performance for neural circuit models. Neural Netw.
**2007**, 20, 323–334. [Google Scholar] [CrossRef] [PubMed]

**Figure 1.**Ant colony algorithm. (

**a**) Ants follow a path between points A and E. (

**b**) An obstacle is interposed. (

**c**) On the shorter path more pheromone is laid down.

Simulation Number | Number of Nodes | Number of Neurons | Node Capacity | λ | Random Map Average Hop Count | Ant Colony Algorithm Average Hops | The Average Hop Count in The Improved Ant Colony Algorithm |
---|---|---|---|---|---|---|---|

1 | 4 ∗ 4 | 1000 | 100 | 0.02 | 12.62 | 9.66 | 8.43 |

2 | 4 ∗ 4 | 1000 | 100 | 0.10 | 14.98 | 12.67 | 11.74 |

3 | 8 ∗ 8 | 1000 | 20 | 0.02 | 45.38 | 35.65 | 33.96 |

4 | 8 ∗ 8 | 1000 | 20 | 0.10 | 61.82 | 52.85 | 51.04 |

5 | 8 ∗ 8 | 1000 | 100 | 0.02 | 45.14 | 16.49 | 8.78 |

6 | 8 ∗ 8 | 1000 | 100 | 0.10 | 61.88 | 33.00 | 12.09 |

The Newly Proposed Algorithm | AVNSACA | PSO | CNDE | Stochastic Mapping | |
---|---|---|---|---|---|

Energy consumption (10^{5} PJ) | 2.75 | 2.91 | 3.24 | 3.12 | 6.33 |

Performance improvement | 56.56% | 54.03% | 48.82% | 50.71% | — |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Xu, K.; Wu, J.; Huang, T.; Liang, L.
An Improvement of a Mapping Method Based on Ant Colony Algorithm Applied to Smart Cities. *Appl. Sci.* **2022**, *12*, 11814.
https://doi.org/10.3390/app122211814

**AMA Style**

Xu K, Wu J, Huang T, Liang L.
An Improvement of a Mapping Method Based on Ant Colony Algorithm Applied to Smart Cities. *Applied Sciences*. 2022; 12(22):11814.
https://doi.org/10.3390/app122211814

**Chicago/Turabian Style**

Xu, Kaiming, Jianjun Wu, Tengchao Huang, and Lei Liang.
2022. "An Improvement of a Mapping Method Based on Ant Colony Algorithm Applied to Smart Cities" *Applied Sciences* 12, no. 22: 11814.
https://doi.org/10.3390/app122211814