*3.5.3 Ant colony optimization algorithm*

Ant-colony optimization takes inspiration from the foraging behavior of ant colonies. Initially all of the ants search for the food randomly. When an ant finds a food, it starts to deposit a chemical substance produced and released into the environment called pheromone on the ground while returning back to the colony. By depositing pheromone on the ground, they mark the path to the food that should be followed by other members of the colony. If an ant comes across a path with pheromone, it stops searching for the food randomly and starts to follow the path marked with pheromone. If it reaches the food, it starts to deposit pheromone on the path back to the colony also. This positive feedback strengthens the pheromone trail on the same path and causes all of the ants to follow a single path. On the other hand, if the path is not followed by other colony members, the pheromone evaporates in time and eventually, the path disappears [1, 16].

An Ant-Colony Optimization algorithm basically consists of 3 main steps. After the initialization of pheromone trails, while there is still time, at each iteration:

1.Ants create solutions.


The description of the algorithm is given below:

**Algorithm**: Ant Colony Optimization Algorithm.

```
1: start Time Now
```

```
2: end Time start Time + allowed Search Time
```

```
3: solution. Allocations {}
```
<sup>4:</sup> *solution. value MaxValue*

<sup>5:</sup> if *no Of Targets > no Of Weapons* **then**

*Weapon Target Assignment DOI: http://dx.doi.org/10.5772/intechopen.93665*

9: **end if**

11: **while** *end Time < Now* do

17: *solution sol From Indv*

*3.5.3 Ant colony optimization algorithm*

1.Ants create solutions.

1: *start Time Now*

**190**

3: *solution. Allocations* {} 4: *solution. value MaxValue*

19: *individual No individual No +* 1

21: *parents Select Parents (population)* 22: *population CrossOver (parents)* 23: *population Mutate (population)*

rates in time and eventually, the path disappears [1, 16].

known as daemon actions and it is an optional process.

associated with bad solutions (pheromone evaporation).

The description of the algorithm is given below:

**Algorithm**: Ant Colony Optimization Algorithm.

2: *end Time start Time + allowed Search Time*

5: if *no Of Targets > no Of Weapons* **then**

12: *individual No* 1

18: **end if**

24: **end while** 25: **return** *solution*

20: **end while**

10: *population Generate Initial Population (no Of Individuals)*

*Concepts, Applications and Emerging Opportunities in Industrial Engineering*

15: *sol Value From Indv Calculate Solution Value (sol From Indv)*

Ant-colony optimization takes inspiration from the foraging behavior of ant colonies. Initially all of the ants search for the food randomly. When an ant finds a food, it starts to deposit a chemical substance produced and released into the environment called pheromone on the ground while returning back to the colony. By depositing pheromone on the ground, they mark the path to the food that should be followed by other members of the colony. If an ant comes across a path with pheromone, it stops searching for the food randomly and starts to follow the path marked with pheromone. If it reaches the food, it starts to deposit pheromone on the path back to the colony also. This positive feedback strengthens the pheromone trail on the same path and causes all of the ants to follow a single path. On the other hand, if the path is not followed by other colony members, the pheromone evapo-

An Ant-Colony Optimization algorithm basically consists of 3 main steps. After the initialization of pheromone trails, while there is still time, at each iteration:

2.Created solutions are improved through a local search. This process is also

3.Pheromone update is applied to increase the pheromone values that are

associated with good solutions and to decrease the pheromone values that are

13: **while** *individual No < =no Of Individuals* **do** 14: *sol From Indv population [individual No]*

16: **if** *sol Value From Indv < solution. Value* **then**

```
6: no Of Ants no Of Targets
7: else
8: no Of Ants no Of Weapons
9: end if
10: Calculate Heuristic Values ()
11: Calculate Pheromone Values ()
12: while end Time < Now do
13: min Solution Value Max Value
14: ant No 1
15: while ant No < =no Of Ants do
16: constructed Sol Construct Solution ()
17: if constructed sol.solution Value < min Solution. Value then
18: best sol value constructed Sol solution Value
19: iteration Best Sol. Alloc constructed Sol. allocations
20: if constructed Sol. Solution Value < solution. Solution Value then
21: solution constructed sol
22: end if
23: end if
24: Calculate Heuristic Values ()
25: ant No ant No + 1
26: end while
27: Update Pheromone Values (iteration Best Sol Alloc, best Sol Value)
28: end while
29: return solution
```