## 4 Solution Algorithms
### An Adaptive Large Neighborhood Search Algorithm with Efficient Initial Solution  
It is well known that exact methods are often able to find good solutions at early stages of the search (in this paper, initial solutions' average GAP obtained by branch-and-bound algorithm is less than 10% and the acquisition time is shorter than 2 s) but employ a lot of time to marginally improve that solution or prove its optimality. This behavior suggests a classical way to design a heuristic algorithm: adopt the initial good solution generated by the branch-and-bound algorithm; then, explore the neighbors to improve the solution quickly. [55] pointed out that even using local search to obtain a feasible solution of classical quadratic assignment problems is difficult, and the time complexity is exponential for simple neighborhood structures. Since the adaptive large neighborhood search (ALNS) algorithm can explore larger searching space [56], this heuristic algorithm is integrated to improve the initial solution.  
The large neighborhood search algorithm includes two types of operators: destroy operator and repair operator. The solution is destructed and reconstructed using these operators, which are selected by a roulette-wheel method according to their previous performance in each iteration of ALNS algorithm. For QSAP-C model, some warehouses or stations are removed from its current assigned DC in the destruction step, leading to a partial solution. This partial solution is repaired in the reconstruction step, which focuses on the unassigned warehouses or stations. After the reconstruction phase, a feasible solution is obtained. The roulette statistics are updated and iteration continues until the termination condition is met. The pseudocode is displayed in Algorithm 3.  
```
Step 1: Initialization Step 1.1: Obtain the initial solution  Call Algorithm 2 to obtain the initial feasible solution in the time limit \(T\) Step 1.2: Initialization for ALNS  Given the total iteration num \(Q\), initial weight of operators \(w(h)\), reaction factor \(\rho\) Step 2: ALNS For i = 1... Q do (1) select a destroy operator \(d\) by the roulette-wheel procedure, destroy current solution and obtain the set of removed nodes (2) select a repair operator \(r\) by the roulette-wheel procedure, repair and obtain the new_solution (3) update the number of times the operator has been used, \(u(d)+=1,u(r)+=1\) (4) calculate the objective function of new_solution, if it is infeasible a large constant value will be given. If new_solution_obj <= current_solution_obj update current solution, current_solution_obj = new_solution_obj If current_solution_obj <= best_solution_obj update the best solution, best_solution = current_solution update the success of operators, \(s(d)+=\delta_{1},u(r)+=\delta_{1}\) Else update the success of operators, \(s(d)+=\delta_{2},u(r)+=\delta_{2}\) update the weight of selected operators, \(w(d)=(1-\rho)w(d)+\rho\frac{s(d)}{u(d)},w(r)=(1-\rho)w(r)+\rho\frac{s(r)}{u(r)}\) If current solution keeps the same for M consecutive iterations break Return the best solution
```  
**Algorithm 3** An adaptive large neighborhood search algorithm with efficient initial solution.