Research Article

Optimal Mandatory Lane-Changing Location Planning for CAV Based on Cell Transmission Model

Algorithm 1

The ACO algorithm.
Input: ant number m, limited iteration number N
Output: CELLTABLE, ROUTETABLE
Initialize list CELLTABLE and ROUTETABLE with lane-changing vehicle j ← 2, …, J and ant k ← 1, …, m separately
Initialize the pheromone intensity matrix with an all-ones matrix and the heuristic information function matrix with 0.2
while n ≤ N do
j ← 1 //Assign the 1st lane-changing vehicle to j
 ← RAND k = 1, …, m //For the ant k, match a lane-changing cell to vehicle j, and name the selected cell as
 CELLTABLE (j) ← //Match m lane-changing cells to vehicle j
for (k ← 1, …, m) do
  for (j ← 2, …, J) do
   //Given cell
    is matched to vehicle j − 1, the conditional probability of selecting cell i to match with vehicle j is shown in this equation
    ← Roulette () //Acquire the j th matching cell based on roulette wheel selection
  end
end
 CELLTABLE (j) ← r
 ROUTETABLE ← TRANSPOSE (CELLTABLE)
 ← Simulate (ROUTETABLE (k)) k = 1, …, m //For the ant k, execute CTM simulation according to equations (1)–(9), and output the objective value
//heuristic information function update
//pheromone intensity update
 Update () //Compare the objective function values of all ants in this iteration and the optimal value in the last iteration, and choose the minimum one as the optimal objective function value of this iteration, and then use its corresponding cell sequence as the optimal solution
 Update n and CELLTABLE and ROUTETABLE as appropriate
end