# SVD Enhanced Metaheuristic for Plug-In Hybrid Electric Vehicle Routing Problem
## 4 Methodology
### Memetic Algorithm
Only a certain penalty should be added to reduce the probability of the solution selected, the objective function of the solution with penalty \(P\) will become worse and be eliminated in the process of iterating to produce the new solution. The reason for introducing penalty \(P\) is to ensure the diversity of population. However, when the residual electric and fuel energy of the vehicle are not enough to support its return to the depot or to the nearest energy station, the solution is not feasible. The feasibility checking of the solution refers to the checking of the vehicle energy capacity constraint, which is a constraint condition. If the constraint is violated, the solution is not feasible. We added an infinite number to the objective function to cancel the probability of the solution being selected.the pseudo-code for evaluation procedure is shown in Algorithm 2, where the symbols \(vn,EPCosti_{i},FPCosti_{i},time\_spent_{i}\) represent the number of the route, the cost of electric, the cost of fuel and the time spent in route \(i\), respectively. Figure 1: Example of the proposed representation. (**a**) is a feasible solution without accessing power stations. (**b**) is a feasible solution accessing power stations. ### Individual Initialization

Generally, the initial solutions are generated randomly but the convergence of the solution can be accelerated by using a heuristic. In this work, in order to speed up the convergence, we generate an initial population including a heuristic solutions and random solutions to explore the different regions of solution space. A single individual can be generated by a novel approach which is revised from Nearest Neighborhood Heuristic (NNH) [38] and the other individuals are generated randomly. The detailed procedure of this method is shown in Algorithm 3. ```
Input: An individual Output: The value of objective function Begin  Cost\(\leftarrow\)0 for\(i=1\) to \(\mathit{vm}\)do  Calculate \(\mathit{EPCost}_{i}\), \(\mathit{FPCost}_{i}\) of route \(i\) \(Cost\gets Cost+c_{e}\times\mathit{EPCost}_{i}+c_{f}\times\mathit{FPCost}_{i}\)  Calculate \(time\_spent_{i}\) If\(time\_spent_{i}\) > \(T_{max}\)then  Cost\(\leftarrow\) Cost + P  End  Solution-feasibility checking If unfeasible then  Cost\(\leftarrow\) Cost + A large Penally  End End  return Cost End
```
**Algorithm 2**Evaluation of the individual

### Select Individual for the Recombine Operator and The Mutate Operator

Inspired by [PERSON] and [PERSON] [39], [PERSON] and [PERSON] [40], to avoid premature convergence of programs, we have used a binary tournament individual selection based on the probability \(p_{better}\). The candidate with better fitness is selected with this probability. It is a pre-set value, and this value is suggested to 0.8 [41]. The binary tournament selection takes two individuals randomly from the population, it means that in each selection process, we first generate a random number. If this random number is smaller than the \(p_{better}\), we choose the better one in the two individuals, otherwise we choose the worst one. This process will be repeated twice to select two different individual as the parents for the recombine operator and the mutate operator. The pseudo code of the binary tournament selection is given in Algorithm 4.