*3.2. ACO-MaxIt*

Although ACO-Index modifies ACO with a better path construction strategy, it inherits a similar opposite path generation method from [43]. In this section, a novel opposite path generation method, together with a novel pheromone updating rule, is proposed as an improved ACO algorithm, named ACO-MaxIt, which will be described in detail as follows.

The mirror point *M* is defined by

$$M = \left\lceil \frac{1+n}{2} \right\rceil \tag{8}$$

where · denotes the ceiling operator.

Considering the case when *n* is odd, the opposite city *C* ˜ for the current city *C* could be defined as follows:

$$
\bar{\mathbf{C}} = \begin{cases}
\mathbf{C}, & \text{if } \mathbf{C} = M \\
\mathbf{C} + M, & \text{if } \mathbf{C} < M \\
\mathbf{C} - M, & \text{if } \mathbf{C} > M
\end{cases}
\tag{9}
$$

Considering the case when *n* is even, the opposite city *C* ˜ for the current city *C* could be defined as follows

$$\bar{\mathcal{C}} = \begin{cases} \mathcal{C}, & \text{if } \mathcal{C} = n/2 \text{ or } (n/2 + 1) \\ \mathcal{C} + M, & \text{else if } \mathcal{C} < M \\ \mathcal{C} - M, & \text{else if } \mathcal{C} > M \end{cases} \tag{10}$$

The pseudocode for opposite path construction is shown in Algorithm 4.

**Algorithm 4** Constructing the opposite path based on the mirror point

**Input:** original path

1: Decide mirror point *M*, according to Equation (8)

2: **for** *C* = 1 to *n* **do**˜

3: Calculate *C* through Equation (9) or Equation (10) according to the parity of *n*

4: **endfor**

**Output:** opposite path

The pheromone update process consists of two stages. For the first stage, when *N*c ≤ *gN*max and 0 < *g* < 1, opposite paths will be decided through Algorithm 4. Meanwhile, the pheromone will be updated according to Algorithm 2. In the later stage, when *N*c > *gN*max, no more opposite paths could be calculated, and pheromones will still be updated according to Equation (2).

The pseudocode of ACO-MaxIt is presented in Algorithm 5.

#### **Algorithm 5** ACO-MaxIt algorithm

**Input:** parameters: *m*, *n*, *α*, *β*, *ρ*, *Q*, *g*, *m*1, *m*2, *N*max 1: Initialize pheromone and heuristic information 2: **for** iteration index *Nc* ≤ *N*max **do** 3: **for** *k* = 1 to *m* **do** 4: Construct paths according to Equation (1) 5: **endfor** 6: **if** *N*c ≤ *gN*max **then** 7: Construct opposite paths according to Algorithm 8: Update pheromone according to Algorithm 2 9: **else** 10: Update pheromone according to Equation (2) 11: **endif** 12: **endfor Output:** the optimal solution
