## 4 Algorithm Design
### Hybrid Ant Colony Optimization Algorithm
#### 4.2.2 Solution Construction
\begin{array}{c}N_{BSI1}=\left\{\begin{array}{c}h*d_{is} \leq z_{i}\\ h*d_{s0}\leq z_{s}\\ \tau_{i}+t_{is}+t_{bs}+t_{s0}\leq T_{max}\end{array}\right\},if\;BSI\to depot \;directly\\ N_{BSI2}=\left\{\begin{array}{c}h*d_{is}\leq z_{i}\\ h*d_{s}\leq z_{i}\\ h*(d_{sc}+d_{c0})\leq z_{s}\\ sumq_{i}+q_{c}\leq q_{v}\\ \tau_{i}+t_{is}+t_{bs}+t_{sc}+s_{c}+t_{c0}\leq T_{max}\end{array}\right\},if \;BSI\to UC\to D\\ \end{array} \right\} \tag{40}\]  
Taking the concatenation of the above three sets, we obtain the following:  
\[allow_{k}=N_{UC}\cup N_{CI}\cup N_{BSI}\]
2. Heuristic information and state transition probability When solving the EVRP using the HACO algorithm, the state transition probability \(P_{ij}^{k}\) represents the probability that ant \(k\) moves from node \(i\) to node \(j\) at time \(t\). This probability guides the ant to select the next node from \(allow_{k}\) until no unserved customer points remain in \(allow_{k}\). It is calculated as follows: \[P_{ij}^{k}=\left\{ \begin{array}{c}\frac{[\tau_{ij}(t)]^{\alpha}\cdot[\eta_{ ij}(t)]^{\beta}}{\sum_{\inallow_{k}}\;[\tau_{is}(t)]^{\alpha}\cdot[\eta_{is}(t)]^{ \beta}},&j\in allow_{k}\\ 0,&\mbox{other}\end{array} \right.\] (41)  
Here, \(\eta_{ij}(t)\) represents the heuristic information. In TSP and traditional VRP, \(\eta_{ij}(t)\) is typically defined as the reciprocal of the distance, i.e., \(\eta_{ij}(t)=1/d_{ij}\), reflecting the desirability of transitioning from node \(i\) to node \(j\). \(\tau_{ij}(t)\) denotes the pheromone concentration on the path between nodes \(i\) and \(j\) at time \(t\). The parameter \(\alpha\) is the pheromone importance factor, where a higher value emphasizes the role of pheromone concentration in node selection. Similarly, \(\beta\) is the heuristic information importance factor, where a higher value prioritizes heuristic information in decision-making. In real-world distribution scenarios, the remaining battery level of an electric logistics vehicle significantly influences subsequent route planning. A higher remaining battery level increases the likelihood of serving customer points, while a lower level raises the probability of visiting nearby energy replenishment infrastructures. To address this, we redefine the heuristic information \(\eta_{ij}(t)\) based on problem-specific characteristics and update the state transition probability formula accordingly. By introducing a power threshold of \(E_{th}\) to characterize the critical battery level and \(E\) to represent the current remaining power, the vehicle can prioritize customer points or energy replenishment infrastructures based on its power status. The updated heuristic information is calculated as follows. \[\eta_{ij}(t)= \begin{cases}\dfrac{1+\gamma\cdot\max\left(0,\dfrac{E-E_{th}}{E} \right)}{d_{ij}},&\text{$j$ is customer node}\\ \dfrac{1+\delta\cdot\max\left(0,\dfrac{E_{th}-E}{E}\right)}{d_{ij}},&\text{$j$ is ERI node}\end{cases}  \tag{42}\]  
In the above equation, \(\gamma\) and \(\delta\) are heuristic information regulation factors, adjusting the heuristic value when the next node is a customer or an energy replenishment infrastructure, respectively. When \(E\geq E_{th}\), a higher battery level increases the heuristic value for customer points, making the vehicle more likely to select customers. Conversely, when \(E<E_{th}\), a lower battery level increases the heuristic value for CI and BSI, prioritizing energy replenishment infrastructures. Two-stage construction of feasible initial solutions  
Due to the limited capacity of CI, a two-stage construction method is adopted to ensure the feasibility of the initial solution (i.e., not exceeding the limited capacity of CI). In the first stage, the HACO algorithm calculates the state transition probability from the current node \(i\) to the next node \(j\) using the updated \(P_{ij}^{k}\) formula, where \(j\in allow_{k}\).