Goal is to find the shortest path between the starting and ending positions, the total path length is chosen to be the cost or reward associated with each possible solution. In the simulation, three different sizes of grid network are considered, i.e., 20X20, 30X30, and 40X40. It is assumed that one ant can only occupy one node and moves to one of its adjacent nodes at a time in four different directions, i.e., up, down, left, and right. All the nodes are evenly distributed in the network; and the distance between any two adjacent nodes is normalized to 1 (or 1 unit block). Thus, the path length is represented in terms of the number of (unit) blocks. The simulation starts with a "clean" environment; i.e., there is no obstacle in the original network. The upper-left comer is chosen to be the starting point and the lower-right comer is chosen to be the destination. All the pheromones are initialized as 0.1. The ant colony algorithm is then applied to find the shortest path and pheromones are deposited. A computational flow chart is shown in Fig. 1. Fig. 2 illustrates the path found by ACO algorithm in a 20X20 grid network convergences to its optimal value, where y-axis represents the path length (in number of blocks/grids) and x-axis represents the simulation run-time (in seconds). To simulate a dynamic environment, barriers (obstacles) are added after the algorithm converges (for a fair comparison, the sizes of obstacles are proportional to the sizes of networks).where the two darker areas inside the 40X40 grid represent two arbitrary obstacles added at the positions that are randomly chosen. The ACO algorithm must be called again in order to find the shortest path in this new network with obstacles.Pheromone initialization plays an important role in ACO algorithm. In this project, after the obstacles are added, the pheromones in the network are re-initialized. Two different re-initialization schemes, namely, the global initialization and the local initialization are tested and their performances are compared. In global initialization, all the pheromones in the entire network are uniformly reset back to the original pheromone level, which is 0.1. With local initialization, a "gradient" of pheromones is initialized around the object. The value of half the highest pheromone levels in the network is applied directly to the points that are next to the object. The pheromone levels are then decreased by a fraction (e.g., 50%) as the points move outward in a "circle" around the object.
Asked
Active
Viewed 121 times
0
-
4Welcome to StackOverflow! We'd like to help you, but your question is very open-ended, so it's hard to even know where to start... I would suggest posting the code for one of your models, and trying to describe in a bit more details the kind of "obstacles" you would like to add to it. I would also suggest taking a look at https://stackoverflow.com/help/how-to-ask, where you can find some good tips on how to ask StackOverflow questions. – Nicolas Payette May 05 '18 at 17:31
-
Nicolas Payette I want to create an environment for simulation which should contain obstacles of different shapes it will also contain a start and an end point ants should navigate through that environment and reach end point with shortest path using pheromone trailing. – user9153965 May 05 '18 at 17:59
-
4This is still much too vague. Why don't you try breaking it into steps (creating obstacles, navigating, creating the output you want) and try and code the first step? The NetLogo models library has some models with obstacles, including "Chaos in a box" – JenB May 06 '18 at 07:56