## 3 Methodology
### Adaptive Variable Neighborhood Search  
The variable neighborhood search (VNS) algorithm uses a set of fixed sequence neighborhoods for search. However, this problem contains two replenishment modes, and changing the routes of one replenishment mode will affect the route selection of another mode. A fixed search sequence may produce a fixed search structure, resulting in insufficient diversity of solutions. In this section, an adaptive variable neighborhood search algorithm is proposed. Two customer pools for each mode to determine which demand location is not served by the replenishment mode in the planning cycle. The \"inter-route\" and \"pool\" operators are used in the shaking phase, and the \"intra-route\" operators are used in the variable neighborhood descent (VND) phase. An adaptive mechanism is developed to select the operator from the shaking neighborhoods set in the first phase. The AVNS heuristic is described as follows:  
1. Algorithm framework The algorithm begins with an initial solution \(S_{init}\) which is generated randomly. At each iteration, a neighborhood solution \(S^{\prime}\) is generated from the current solution \(S_{cur}\) by using a selected shaking operator. Five heuristics are employed in this phase: removal, insertion, exchange, swap, and relocation operators. Then a neighborhood solution \(S^{\prime\prime}\) is generated from \(S^{\prime}\) by using the VND strategy. Three heuristics are employed in this phase: 2-Opt, Or-Opt, and 3-Opt operators. The current solution is updated by the simulated annealing (SA) acceptance criterion. At the end of each iteration, scores for shaking operators are updated by the improvement of the solution. A segment contains severaliterations, and the select probability of shaking operators is updated at the end of each segment. These processes repeat until the termination criteria are satisfied. In the shaking phase, five operators are used. Removal and insertion operators are \"pool\" operators, which are used for one route to evaluate whether a demand location should be replenished. Let \(f(S)\) represent the objective value and the penalty of the solution \(S\), we define the operation cost as \(f(S^{\prime})-f(S_{cur})\). These two operators choose a replenishment mode randomly, then traverse their entire neighborhood of \(S_{cur}\) to select the lowest operation cost solution as \(S^{\prime}\). The removal operator removes a demand location from a route and puts the demand location into the pool accordingly to the replenishment mode. The insertion operator inserts a demand location from the pool accordingly to the replenishment mode into a route. Exchange, swap, and relocation operators are used for \"inter-route\", which operates on two routes under the same replenishment mode. These three operators randomly select a solution as \(S^{\prime}\) from their neighborhood. The exchange operator exchanges two segments of different routes randomly. The swap operator randomly chooses two different routes. Then an arc of each route is opened, and swap demand locations are after the breakpoint. The relocation operator randomly chooses a demand location from a route and inserts it into another route. The illustration of these operators is shown in Figure 2.  
After the shaking phase, the \"intra-route\" operators with the VND strategy further optimize the affected routes. 2-Opt, Or-Opt, and 3-Opt operators are employed in this phase. These operators traverse their entire neighborhood of \(S^{\prime}\) to select the lowest operation cost solution. Let \(i\), \(j\), and \(k\) are three positions in a route, where \(i<j<k\). The 2-Opt operator first opens the arc \((i,i+1)\) and the arc \((k,k+1)\), then reverse the route between \(i+1\) and \(k\), and finally connect the arc \((i,k)\) and the arc \((i+1,k+1)\). The Or-Opt operator opens arc \((i,i+1)\), \((j,j+1)\), \((k,k+1)\) and connect arcs \((i,j+1)\), \((k,i+1)\), \((j,k+1)\). Similarly, the 3-Opt operator opens three arcs and connects them, respectively.