1 Introduction
2 Traveling salesman problem specification
3 Ant colony optimization
3.1 Operation details
Name | Description | Suggested value |
---|---|---|
N
| Number of ants | Number of nodes |
Q0 | Probability of selecting exploitation over exploration | 0.8 |
\(\alpha \)
| Aging factor used in the global updating rule | 0.1 |
\(\beta \)
| Moderating factor for the cost measure function | 2.0 |
\(\rho \)
| Aging factor in the local updating rule | 0.1 |
3.2 ACO Optimization
3.3 Stopping Problem
4 Increasing the number of ants
Ant colony size | BSF fixed size | BSF normalized |
---|---|---|
30 | 1.82 [1000] | 1.80 [1666] |
50 | 1.81 [1000] | 1.81 [1000] |
80 | 1.80 [1000] | 1.80 [625] |
120 | 1.80 [1000] | 1.85 [417] |
150 | 1.79 [1000] | 1.80 [333] |
1000 | 1.78 [1000] | 1.78 [50] |
-
The necessary communication overhead must not diminish the advantages of speed up due to parallelism.
-
The lack or reduction of cooperation of ants from different colonies must have not much effect upon the quality of the resulting solution.
-
n – the number of ants.
-
k – the number of node computers.
-
m – the number of chunks of data.
-
\(t_{i}\) – time required to process one chunk of data by one ant.
-
\(t_{d}\) – time necessary to transmit data to and from the host and a node.
-
\(t_{c}\) - time for the establishing the initial connection between the host and a node.
5 Parallel implementations of ACO
5.1 Performance measures
Model | Population organization | # Colonies | # Pheromone matrices | Communication frequency |
---|---|---|---|---|
Coarse-grain master-slave | Hierarchical, non-cooperative | One | One | Medium |
Medium-grain master-slave | Hierarchical, non-cooperative | One | One | Medium-high |
Fine-grain master-slave | Hierarchical | One | One | High |
Cellular | Structured, cooperative | One | Many | Medium |
Parallel independent runs | Distributed, non-cooperative | Several | Several | Zero |
Multi-colony | Distributed, cooperative | Several | Several | Low |
Hybrids | Hierarchical | D/P | D/P | D/P |
5.2 Taxonomy of parallel ACO
5.2.1 Master-slave model
-
Coarse-grain master-slave model. The master manages the pheromone matrix and the interaction with the slaves is based on complete solutions. Each slave has one or more ants, and they compute complete solutions which are then communicated back to the master. The master can receive just one or many solutions from a slave. It selects the best solution or merges them.
-
Medium-grain master-slave model. The key feature is the domain decomposition. The slave processes solve work on each sub-problem independently. The master process is responsible for managing the overall problem information and constructing a complete solution from the partial solutions reported by the slaves.
-
Fine-grain master-slave model. The model requires the parallel evaluation of solution elements. The slaves perform minimum granularity tasks, e.g., selecting the next node. It is characterized by the frequent communications between the master and the slaves.
5.2.2 Cooperative models
-
Cellular model. The model uses follows the guidelines specified by the diffusion model employed in cellular evolutionary algorithm. A single colony is structured in small neighborhoods. Each one has its own pheromone matrix. The trail pheromone update in each matrix considers only the solutions constructed by the ants in its neighborhood. The model uses overlapping neighborhoods. This makes it possible to spread gradually high quality solutions from the place of their origin to other neighborhoods.
-
Parallel independent runs model. The cooperation between colonies is not required. Several sequential ACOs are concurrently executed on a set of processors. The individual ACO can use identical or different parameters. The executions are completely independent.
-
Multi-colony model. Several colonies explore in this model the search space using their own pheromone matrices. The colonies periodically exchange information.
-
Hybrid models. Some papers describe algorithms that feature characteristics from more than one parallel model. This may include approaches that combine master-slave models or that introduce hierarchical structure into the basic model.
5.3 Examples of fine-grain implementations of ACO
Node number | Number of processors | ||||||
---|---|---|---|---|---|---|---|
Message passing | |||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 | |
318 | 0.60 | 0.48 | 0.36 | 0.32 | 0.27 | 0.22 | 0.20 |
442 | 0.71 | 0.54 | 0.48 | 0.44 | 0.38 | 0.33 | 0.29 |
657 | 0.83 | 0.65 | 0.58 | 0.58 | 0.54 | 0.47 | 0.41 |
Shared memory | |||||||
318 | 0.83 | 0.80 | 0.77 | 0.73 | 0.69 | 0.66 | 0.60 |
442 | 0.86 | 0.82 | 0.81 | 0.80 | 0.76 | 0.75 | 0.69 |
657 | 0.87 | 0.87 | 0.85 | 0.82 | 0.80 | 0.77 | 0.77 |
5.4 Coarse-grain implementation
Operation | RMI network | Sockets | |
---|---|---|---|
Local server | Network server | ||
Initialization if the connection | 1.30 s | 0.75 s | 0.45 s |
Passing parameter (one double value) | 0.01 s | 0.01 s | 0.23 s |
Passing distance matrix (50 Nodes) | 1.60 s | 0.03 s | 0,26 s |
Connection type | Number of doubles | Mean time | Std. dev. | Rate |
---|---|---|---|---|
Local | 100 | 11.13 | 6.48 | 8.98 |
1200 | 34.99 | 7.054 | 34.31 | |
4900 | 136.31 | 12.35 | 35.95 | |
19800 | 511.37 | 96.89 | 38.72 | |
Network | 100 | 228.75 | 12.55 | 0.44 |
1200 | 261.27 | 39.37 | 4.59 | |
4900 | 342.85 | 31.13 | 14.29 | |
19800 | 726.55 | 330.26 | 27.25 |
Community server operation | Ant colony client operation | Remarks |
---|---|---|
Stop if work is accomplished | The stopping criteria are described in Sect. 3.3
| |
\(\leftarrow \) Register client | A separate thread is created to handle the client. Register data include: client identifier and location, current time. They are stored in a server’s registry | |
Initialization data\(\rightarrow \)
| Colony operational parameters distance matrix specification | |
Loop data \(\rightarrow \)
| Using data from server the client creates an ant colony and starts its operation | Community best so far solution [distance matrix][pheromone matrix] |
\(\leftarrow \)Found solution | Distance of the best path, sequence of visited nodes, [pheromone] matrix | |
Result Integration |
5.5 Presentation of ant colony community
6 Analysis of ACC operation
6.1 Experimental setup
Number of colonies | Total time | Time per colony |
---|---|---|
1 | 81 | 81.0 |
2 | 83 | 41.5 |
3 | 86 | 28.7 |
4 | 89 | 22.2 |
5 | 100 | 20.0 |
6 | 115 | 19.8 |
Code | Number of ant colonies | Computer/colony number |
---|---|---|
A | 1 | Cb /1 |
B | 3 | Ca/3 |
C | 7 | Ca/4; Cb/3 |
D | 12 | Ca/6; Cb/4; Cd/2 |
6.2 Evaluating the efficiency of the TSP ACO
Community |
\(\mathrm{Len}(C_x T_k )\)
|
\(\mathrm{PRV}(C_x ,T_k )\)
|
\(\mathrm{RV}(C_x )\)
| ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 4 | 5 | ||
C1 | 2.4 | 2.1 | 3.0 | 2.3 | 2.1 | 1 | 2 | 0 | 0 | 2 | 5 |
C2 | 2.5 | 1.9 | 2.2 | 2.1 | 2.7 | 0 | 3 | 2 | 2 | 1 | 8 |
C3 | 2.1 | 2.4 | 1.9 | 2.2 | 1.8 | 3 | 0 | 3 | 1 | 3 | 10 |
C4 | 2.3 | 2.2 | 2.6 | 1.9 | 2.8 | 2 | 1 | 1 | 3 | 0 | 7 |
Comm. code | Colony num. | Ant num. | Iter. # | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 8 | 10 | RV |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | 1 | 50 | 800 | 5 | 5 | 3 | 5 | 3 | 4 | 0 | 1 | 4 | 1 | 31 |
B | 2 | 50 | 400 | 1 | 0 | 5 | 3 | 5 | 5 | 4 | 4 | 1 | 5 | 33 |
C | 2 | 100 | 200 | 0 | 3 | 1 | 0 | 1 | 1 | 3 | 2 | 3 | 0 | 14 |
D\(_{1}\)
| 4 | 50 | 200 | 4 | 1 | 2 | 1 | 0 | 2 | 1 | 3 | 5 | 3 | 22 |
D\(_{2}\)
| 8 | 50 | 100 | 2 | 2 | 0 | 2 | 4 | 3 | 2 | 5 | 2 | 1 | 23 |
D\(_{3}\)
| 8 | 75 | 67 | 3 | 4 | 3 | 4 | 2 | 0 | 5 | 0 | 0 | 4 | 25 |
-
As stated in the Sect. 3.1 the exploitation mode of work uses random function to select the next node. The selection of the mode of work is also controlled by a random function. As the result the ACO is non-deterministic by nature. The same algorithm working with identical set of parameters and processing the same distance matrix produces usually different results every time it is activated. We must therefore consider not a single result, but their arithmetic mean, other statistical measures could be also considered.
-
A single solution, even a very good one, is not a decisive factor in evaluating a Community. It is very much possible that the next found solution will be not as good.
-
Measuring the performance using mean values is not entirely justified due to the dispersion of results obtained in consecutive runs.
-
For parallel implementations the computational complexity should be augmented or even replaced by duration of execution.
-
It is important not only what solution was found, but also how may iterations we executed. It is true for both parallel and sequential implementations. For the dynamic TSP good quality solutions must be found quickly enough to catch up with the changing distances matrix.
-
To evaluate a community we run test it several times using the same distance matrix.
-
Instead of using mean of route lengths we used ranks of route lengths.
-
Two criteria for stopping the run are used:
-
Equal complexity—the computational complexity measured by the number of node selection operations is the same for all Colonies. The time needed to find a solution could be different and depends on the architecture of the Community.
-
Equal time—the clock time given to all Colonies is the same. The complexity of operation could be different and it is the sum of the complexities of individual Colonies that make up a Community.
-
Comm. code | Iter. no. | Ant no . | Colony no. | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | RV |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | 800 | 50 | 1 | 0 | 1 | 3 | 0 | 0 | 3 | 0 | 1 | 0 | 0 | 8 |
B | 350 | 50 | 3 | 1 | 3 | 4 | 3 | 3 | 1 | 4 | 4 | 2 | 4 | 29 |
C | 350 | 50 | 7 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 2 | 4 | 4 | 45 |
D\(_{1}\)
| 100 | 50 | 12 | 3 | 4 | 1 | 4 | 4 | 3 | 3 | 3 | 4 | 3 | 32 |
D\(_{2}\)
| 50 | 100 | 12 | 4 | 2 | 0 | 1 | 2 | 0 | 1 | 4 | 3 | 2 | 19 |
D\(_{3}\)
| 100 | 100 | 12 | 2 | 0 | 1 | 2 | 1 | 2 | 2 | 0 | 1 | 1 | 12 |