Effective Permutation Encoding for Evolutionary Optimization of the Electric Vehicle Routing Problem

: This paper addresses the problem of route planning for a ﬂeet of electric vehicles departing from a depot and supplying customers with certain goods. This paper aims to present a permutation-based method of vehicle route coding adapted to the speciﬁcity of electric drive. The developed method integrated with an evolutionary algorithm allows for rapid generation of routes for multiple vehicles taking into account the necessity of supplying energy in available charging stations. The minimization of the route distance travelled by all vehicles was taken as a criterion. The performed testing indicated satisfactory computation speed. A real region with four charging stations and 33 customers was analysed. Different scenarios of demand were analysed, and factors affecting the results of the proposed calculation method were indicated. The limitations of the method were pointed out, mainly caused by assumptions that simplify the problem. In the future, it is planned for research and method development to include the lapse of time and for the set of factors inﬂuencing energy consumption by a moving vehicle to be extended.


Background
In order to meet social, economic and environmental challenges and adjust to global trends, it is necessary to implement a coherent and sustainable program for the development of transport systems, including: increasing competitiveness through integrated logistical solutions covering various means of transport; application of technologies ensuring the reduction of fuel consumption and enabling the use of alternative energy sources; adjusting transport policy to energy policy, aimed at improving its efficiency and giving it a pro-environmental character; and reduction of greenhouse gases and noise.
Electrically-powered vehicles are being promoted as a key factor in building a sustainable mobility system and there are indications that they will break the long-term dependence of mankind on internal combustion engines and diesel fuel as a means of meeting its transportation needs. Increasing the use of electric vehicles, in particular when powered by renewable energy, can play an important role in reducing greenhouse gas emissions and in the transition to a low-carbon economy in the future.
The growing popularity of electric drives in passenger vehicles and delivery trucks has prompted researchers around the world to turn their attention to electric drive operation, and to search for ways of efficient use in transportation and methods of managing fleets of such vehicles. As a result, knowledge in the area of Vehicle Routing Problems (VRPs) that has been developed for decades has reached a new level that includes environmental aspects. This is part of a broader development trend, the so-called (in the literature) Green Vehicle Routing Problem (G-VRP) or Environmentally Friendly Vehicle Routing Problem (EF-VRP) [1].

•
Each customer is visited exactly once (2n repetitions of the constrain test, where n is the number of customers visited); • All customer demands are satisfied (n repetitions of the constrain test); • The load and capacity of vehicles are consistent; • Goods travel routes are synchronized with vehicles' routes (n 2 -n repetitions of constrain test); • Number of vehicles dispatched and provided in the depot are consistent; • The route is not disconnected.
The MILP method is widespread in many varieties of VRP problems, and each additional complexity of the model imposes further constraints. When considering multiple types of vehicles [11], multiple types of goods [12], time windows [13], or dynamically changing demand [14], the number of checked conditions multiplies.
The MILP method dedicated to vehicles with alternative energy sources was proposed in [4]. The authors extended the set of assumptions by adding conditions: • Non-negative level of fuel in vehicles; • Sufficient fuel to continue the journey at each point of the route; and • The amount of replenishment at stations. Matrix coding is also commonly used in E-VRP problems. The study conducted by [3] indicates the very high popularity of the MILP method based on the analysis of 175 literature items. The method is readily adapted by the authors of the publications to various types of problems, e.g., charging time and variable travel time [15], time windows and path flexibility [16], and nonlinear charging time [5,6,17].
An alternative to matrix modeling of the vehicle route is the permutation notation. It is important to distinguish between the use of permutations to represent the solution obtained with the MILP method and the direct execution of calculations on permutation codes. The first of these two approaches appears in many of the publications mentioned above. The second proposal was applied first to the relatively simple Traveling Salesman Problems (TSP) [18], then to the increasingly complex VRP. The linear programming approach was judged to be too slow when solving TSP [19]. The authors pay attention to long computation times and the need for a lot of memory space. In the work [20], a method of permutation coding of the route of many vehicles was proposed. It was noted that such coding allows for simultaneous modeling of the divisions of visited points between vehicles. This method is applicable to VRP, but has not yet been adapted to electric vehicle route planning. In the methods review [3] the permutation coding is omitted.
The article [21] reviews the coding methods in terms of the possibility of using evolutionary algorithms for optimization. The effectiveness of combining permutation coding with the evolution optimization of the TSP was noted. In the work [22], the mutation operators acting on permutations were compared. The conclusions point to the inversion, displacement, and pairwise swap methods as computationally fast solutions.

Contribution of this Paper
The article presents a mathematical model for the E-VRP problem with a simplified consideration of the nonlinear charging time problem. The simplification results from the omission of the problem of time in the model. Based on the literature review, it was assumed that a rational level of charge obtained in the station is 80% of the maximum capacity of the battery.
A novelty in the developed model is the use of two levels of coding solutions. At the basic level, the solution is represented by a numerical sequence that directly defines the order of the visited points along the route, including the CS and the depot point. As the model is designed with the aim of conducting optimization calculations as fast as possible, a higher level of coding has been introduced, where only the order of visited customers is taken into account. The main advantages of this approach are that in every possible solution: • Every customer will be visited; • There are no returns to a previously visited customer; • The route is continuous.
The above features are not obvious for other encoding methods (MILP for example) and often require many additional constraints, the fulfilment of which must be verified. The comparative tests described in Section 4 show that permutation encoding is generally more efficient than the matrix-based approach, both in terms of the speed and quality of the results obtained.
An important element of the developed model is the encoding algorithm which, on the basis of permutation coding, enables determining when the vehicle must replenish energy and at which station and when it must return to the depot in order to load the goods.
The proposed approach to the E-VRP makes it combinatorial. Therefore, it is advisable to use an evolutionary algorithm as a method to find the optimal solution. For this purpose, appropriate genetic operators have been designed. When planning the optimization calculations, you can appreciate the advantages of the proposed permutation coding. Generating a random first population is a simple combinatorial problem and all obtained solutions are feasible. There is no need to use various penalty functions that help maintain evolution in the area of feasible solutions. In the test, calculations roulette selection and the order crossover method were used. The crossover of permutations generates solutions that are always feasible, which affects the running time of the algorithm. Mutation of permutations is also performed with a simple numerical operation.
The problem with permutation coding of VRP is that the points sequence has to be broken down into parts served by different vehicles. In the case of problems focused on the control of vehicle loading, this division results from the amount of goods needed by consecutively visited customers. The point (customer) where the load capacity of one vehicle is exceeded must be served by the next vehicle. However, the application of permutation encoding to the E-VRP requires developing a method that considers additional matters:

•
The need to recharge the battery while travelling a route; • Supervision of the range of a vehicle-preventing it from "getting stuck" on the route; • Selecting a charging station and taking into account the additional distance that the vehicle has to travel.
This paper has the objectives to implement the above functions by permutation encoding and to investigate the performance of the solution in real-life conditions.
Vehicle parameters, such as range, carrying capacity (payload), and battery charging time are variables in the theoretical model, but in the test calculations, they are chosen in a way that corresponds with the current state of the art. The goal is to verify not only the validity of the theoretical model, but also its effectiveness in the computational solving of real problems in a reasonable time.

Assumptions
The problem addresses routing for multiple electric vehicles. All vehicles share a common task and are managed by a single forwarder. The theoretical model has been developed, starting with the following assumptions: • A fleet of identical EV is waiting in the depot to set off to customers and deliver to each of them a certain quantity of goods that they ordered; • All EVs set off from the depot with 100%-charged batteries, which allows covering the established distance; • The carrying capacity of a single EV is limited by a fixed value which may not be exceeded; • No customer requests more than the maximum capacity of one vehicle; • In the area handled by the vehicle fleet there are charging stations allowing the batteries to be recharged in an acceptable time to level 80%; • Each charging station can handle multiple vehicles at the same time; • The route plan for each vehicle must include any need to replenish energy and return to the depot after the goods have been delivered; • Between points on the map (depot, charging stations, and customers), the route distances that the vehicle must cover are given; • The distance of a route between any two points is affected by the existing road infrastructure and is determined from empirical data or navigation. The route distances can be expressed in km, or in time units, which will allow the inclusion of additional aspects related to speed limitations on certain roads and delays due to traffic lights and periodic traffic congestion. Obviously, time data is more susceptible to variability than distance expressed in units of length.
The model does not take into account the wear of batteries and the associated reduction in capacity.
Another simplifying assumption is the linear decrease in the vehicle range as the distance is travelled. The effects of speed and vehicle loading are not considered. The model also does not consider the quality of the road surface, the slope of the route, the traffic volume, or the weather.

Mathematical Model
The following notations are used in the proposed mathematical model: s = 1, 2, . . . , S numbering of charging stations, c = 1, 2, . . . , C numbering of customers, P the total number of nodes considered in the planning (the depot, CSs and customers), b, b 1 , b 2 = 1, 2, . . . , B numbering of elements in the solution vector y, z = (z 1 , z 2 , . . . , z C ) vector of orders, L max carrying capacity of a single EV, R max range of EV with fully-charged batteries, R 80 range of EV with 80%-charged batteries-after visiting CS, D = (d i,j ) P × P the distance matrix, with rows and columns correspond to nodes, as shown in the Figure 1.
The model does not take into account the wear of batteries and the associated reduction in capacity.
Another simplifying assumption is the linear decrease in the vehicle range as the distance is travelled. The effects of speed and vehicle loading are not considered. The model also does not consider the quality of the road surface, the slope of the route, the traffic volume, or the weather.

Mathematical Model
The following notations are used in the proposed mathematical model: numbering of charging stations, c = 1, 2, …, C numbering of customers, P the total number of nodes considered in the planning (the depot, CSs and customers), b, b1, b2 = 1, 2, …, B numbering of elements in the solution vector y, z = (z1, z2, …, zC) vector of orders, Lmax carrying capacity of a single EV, Rmax range of EV with fully-charged batteries, R80 range of EV with 80%-charged batteries-after visiting CS, D = (di,j)P × P the distance matrix, with rows and columns correspond to nodes, as shown in the Figure 1. The task is to find a travelling route y to deliver ordered good to all the customers at the minimum distance: where y = (y1, y2, …, yB) is a vector of decision variables, whose components represent the numbers of nodes successively visited by one or more vehicles, B is the number of visited nodes depending on the number of returns to the depot and the number of visits to the charging stations. The customer numbers are separated with CS numbers and depot station (number 1) in selected positions. It should be noted that we define the range of variable values as a closed interval: [], which is understood as a certain subset of natural numbers. Therefore, we interpret the values in the vector y as EV is visiting in the step b: yb ∈ [1, P]-one of all considered nodes, yb ∈ [S+2, P]-one of the customers, yb ∈ [1, S+1]-the depot or one of the CSs, yb ∈ [2, S+1]-one of the CSs. The solution y should satisfy the following constraints: The task is to find a travelling route y to deliver ordered good to all the customers at the minimum distance: (1) where y = (y 1 , y 2 , . . . , y B ) is a vector of decision variables, whose components represent the numbers of nodes successively visited by one or more vehicles, B is the number of visited nodes depending on the number of returns to the depot and the number of visits to the charging stations. The customer numbers are separated with CS numbers and depot station (number 1) in selected positions. It should be noted that we define the range of variable values as a closed interval: [], which is understood as a certain subset of natural numbers. Therefore, we interpret the values in the vector y as EV is visiting in the step b: The solution y should satisfy the following constraints: where δ is the quantity of values 1 and γ is the quantity of values from the set {S+2, 3, . . . , S+C+1} in the segment of the vector y: Constraint (2) means that the vector y must contain at least enough elements to leave the depot, visit all clients and return to the depot; (3) defines the set of elements of the vector y; (4) means starting and ending the route at the depot. There may be additional values of 1 in the vector y, which means that the route consists of several loops; (5) ensures that each customer is visited only once; (6) checks if any part of the route after charging at the depot or CS is not greater than the range obtained from charging; (7) controls the vehicle loading level in relation to customer demand.
Additional assumptions relate to the definition of the problem: Constraint (8) ensures that no request exceeds the maximum capacity of a vehicle; (9) checks that no customer is too far from the depot or one of the charging stations.
The problem described by the model can be solved directly by evolutionary methods. However, the search for a vector y that satisfies all the constraints and minimizes the function (1) may be long term and give results far from the global optimum. Coding a solution in the form of a vector y is not computationally efficient; therefore, the aim of the presented research is to find a coding method that would narrow the search space to a set of acceptable solutions and thus speed up the calculations.

Permutation Encoding of Solution
The proposed solution is based on the conclusion that if we want to serve customers by covering the shortest possible route, we have to charge the battery and load goods as rarely as possible. In this case, for any given order of visiting customers, we can clearly determine when to replenish the load (i.e., visit the depot) and charge the battery (i.e., visit one of the CSs). In the proposed method, any solution to the E-VRP may be represented as a permutation of customer numbers: To find out when the vehicles visit the depot and CS's, we need to decode solution x taking into account additional information such as the distance matrix D and the vector of orders z = (z 1 , z 2 , . . . , z C ).
The proposed function that decodes solution x is the computational algorithm presented in the Figure 2. Two indexes are used in the calculations. The index b numbers the elements of the result vector y. Index c numbers the elements of the input vector x. The algorithm includes three logical conditions that check: the quantity of goods (condition I), the vehicle range (condition II), and the end of the operation (condition III). As a result, calculations take fractions of a second even for large sets of customers. The tests performed in the Matlab environment allowed the conclusion that the performance enables using the algorithm in evolutionary calculations. elements of the result vector y. Index c numbers the elements of the input vector x. The algorithm includes three logical conditions that check: the quantity of goods (condition I), the vehicle range (condition II), and the end of the operation (condition III). As a result, calculations take fractions of a second even for large sets of customers. The tests performed in the Matlab environment allowed the conclusion that the performance enables using the algorithm in evolutionary calculations. For example, we take the depot number 1, two charging stations numbers 2 and 3, and five customers with numbers 4, 5, …, 8. Let's assume that: • The maximum reach of the vehicle is 10; • The maximum payload of the vehicle is 1; • The charging station replenishes energy up to level 0.8; • The encoded solution of the problem is a vector x = (7, 5, 4, 6, 8). For example, we take the depot number 1, two charging stations numbers 2 and 3, and five customers with numbers 4, 5, . . . , 8. Let's assume that: • The maximum reach of the vehicle is 10; • The maximum payload of the vehicle is 1; • The charging station replenishes energy up to level 0.8; • The encoded solution of the problem is a vector x = (7,5,4,6,8).
Assumed significant distances between points and the quantity of ordered goods are shown in Figure 3. The graph on the left shows the theoretical route that the vehicle would have to travel if the decoding function was not used. It can be seen that the total distance to be travelled according to solution x is 14, while the total requirement is 1.6. Therefore, a vehicle cannot cover this distance, and it cannot deliver goods to all customers in one loop without replenishing energy and cargo. Assumed significant distances between points and the quantity of ordered goods are shown in Figure 3. The graph on the left shows the theoretical route that the vehicle would have to travel if the decoding function was not used. It can be seen that the total distance to be travelled according to solution x is 14, while the total requirement is 1.6. Therefore, a vehicle cannot cover this distance, and it cannot deliver goods to all customers in one loop without replenishing energy and cargo. We can follow the operation of the decoding function. Table 1 shows the vehicle's reach and load changes during the trip. The influence of testing conditions on the decisions about visiting the CS or returning to the base is visible. The vehicle sets off from the depot to customer 7, then travels to customer 5, then replenishes energy at charging station 3. After replenishing energy, it delivers the goods to customer 4 and returns to the depot because it has disposed of all the goods. The second vehicle sets off from the depot to customer 6, then drives to customer 8, and then returns to the depot. After decoding, we obtain vector y = (1, 7, 5, 3, 4, 1, 6, 8, 1). Charging station 2 is not used in this plan. Both vehicles can leave the depot at the same time. It is also possible that one vehicle returns to the depot, is loaded again, and begins another run. The allocation of tasks among vehicles is a separate problem that is not addressed in this paper.  We can follow the operation of the decoding function. Table 1 shows the vehicle's reach and load changes during the trip. The influence of testing conditions on the decisions about visiting the CS or returning to the base is visible. The vehicle sets off from the depot to customer 7, then travels to customer 5, then replenishes energy at charging station 3. After replenishing energy, it delivers the goods to customer 4 and returns to the depot because it has disposed of all the goods. The second vehicle sets off from the depot to customer 6, then drives to customer 8, and then returns to the depot. After decoding, we obtain vector y = (1, 7, 5, 3, 4, 1, 6, 8, 1). Charging station 2 is not used in this plan. Both vehicles can leave the depot at the same time. It is also possible that one vehicle returns to the depot, is loaded again, and begins another run. The allocation of tasks among vehicles is a separate problem that is not addressed in this paper. Step Results  1 ----

Example Study
With the formulated model, example optimisation calculations were performed for the following set of points ( Figure 4):

•
Point 1-the depot-Stargard City located in north-western Poland; • The maximum payload of the vehicle is Lmax = 1700 kg; • The maximum reach of the vehicle is Rmax = 120 km.
During the calculations, we consider the nonlinear charging time function and, simplifying it, assume that the charging station only replenishes energy up to 80% of the maximum capacity.
Firstly, it was checked how long it takes to decode a single solution x using the algorithm described in Section 2.2. For 100 randomly generated permutations of customer numbers, an average decoding time of 0.00015 sec. was obtained. Calculations were performed on a mid-range computer that featured Intel(R) Core(TM) i7-6700 3.40Ghz and 16 GB RAM. All computational procedures were coded in Matlab R2020a.  The listed points are actual locations on the map. The city of Stargard is the largest town in the area and is the base for many delivery companies. Charging stations have been proposed at points that are located on important routes and are easily accessible. Small towns, mainly villages, were established as clients. From the locations of points, the distance matrix D was determined. The best routes between points were selected based on the author's experience and conversations with the drivers of courier companies. The values used for the calculations are shown in Appendix A in Tables A1 and A2.
The following assumptions were made when analysing the offers of new electricpowered delivery vehicles available on the market:

•
The maximum payload of the vehicle is L max = 1700 kg; • The maximum reach of the vehicle is R max = 120 km.
During the calculations, we consider the nonlinear charging time function and, simplifying it, assume that the charging station only replenishes energy up to 80% of the maximum capacity.
Firstly, it was checked how long it takes to decode a single solution x using the algorithm described in Section 2.2. For 100 randomly generated permutations of customer numbers, an average decoding time of 0.00015 sec. was obtained. Calculations were performed on a mid-range computer that featured Intel(R) Core(TM) i7-6700 3.40Ghz and 16 GB RAM. All computational procedures were coded in Matlab R2020a. The next step was the testing of evolutionary optimisation. Firstly, an initial population is generated, with each individual being a random permutation. Secondly, each individual is decoded according to the developed algorithm (shown in Figure 2). Then the value of the fitness function (1) is determined for each individual. In the next step, the roulette method is used to choose the parents. The recombination of the parents' chromosomes takes place by the order crossover method described in detail in [11]. The creation of a new population ends with the use of the mutation operator, (i.e., random selection of individuals in which the order of visited points is randomly changed).
The number of individuals in population (G), the number of elite individuals (E), and the probability of mutation (P) are the parameters of the model and must be determined during the initial calculations for a particular problem. Obviously, the larger the population, the slower the calculation. The number of elite individuals is normally less than or equal to two. When the probability of mutation is being increased, the algorithm is prevented from converging to a local optimum. However, too many mutating individuals may interfere with the convergence of evolution.
All calculations were performed for the described set of points, including the depot in the city of Stargard and four charging stations. Customers demand for goods was assumed as variable parameters. The following scenarios were studied: 1.
Scenario 1: Each customer needs 60 kg of goods, so the demand vector is z = (60, 60, . . . , 60) 1 × 28 . In this scenario the total demand of the customers equals: 28 × 60 = 1680 kg, which is within the payload of one EV.  The computation time for the above parameters set is approximately 40 s. Figure 5 shows the process of evolution for the first scenario. By using elite individuals, the best solution in each generation is preserved. It is represented by a red line that falls as better solutions are found. The figure also shows the average adaptation of individuals in each generation. This gives an idea of how much diversity of solutions is maintained by the mutation operator. In solving the first scenario, the algorithm worked correctly and found a solution where one EV serves all the customers. During operation, it is necessary to charge the battery twice. In total, the vehicle covered a distance of 231.5 km. The best solution found is the following plan:  In solving the first scenario, the algorithm worked correctly and found a solution where one EV serves all the customers. During operation, it is necessary to charge the battery twice. In total, the vehicle covered a distance of 231.5 km. The best solution found is the following plan:   In solving the first scenario, the algorithm worked correctly and found a solution where one EV serves all the customers. During operation, it is necessary to charge the battery twice. In total, the vehicle covered a distance of 231.5 km. The best solution found is the following plan: Return to the depot. Figure 6 shows the order of the visited points on the map. The depot (1) and the visited charging stations (3 and 4) are highlighted. Charging stations 2 and 5 remain unused. The straight arrows between the points are symbolic. The vehicle is driven on real, much longer routes. It is worth noting that the route includes the three distinctive loops. After travelling to the southern loop, the vehicle heads to the north-eastern loop, where it charges the battery first. After travelling to the second loop, the battery is charged for the second time and the route is completed on the north-western loop. For the second scenario, as expected, a plan for two EVs was obtained. The vehicles 'shared' the customers, so they had shorter routes to cover. One of the vehicles needs to For the second scenario, as expected, a plan for two EVs was obtained. The vehicles 'shared' the customers, so they had shorter routes to cover. One of the vehicles needs to replenish energy before returning to the depot. The evolutionary algorithm has found the following plan: • Two EVs leave the depot; • The first EV supplies the customers: 11,12,7,8,13,14,15,16,17,18,19,20 The above plan requires the vehicles to cover 241.2 km, which is slightly more than in the first scenario. The visualization of the solution is shown in Figure 7.
During the implementation of the second adopted scenario, vehicle 1 mainly serves the eastern part of the region, while vehicle 2 initially travels north-west, then visits points south of Stargard.
The next stage of the study was to analyse the cases of randomly diversified customer demand. The number of vehicles needed to implement the plan depends on the total demand of all customers. For each sum, the minimum number of vehicles with a specific loading capacity can be specified- Table 1. For example, for the demand sum of 10,271, the result is 10,271/1700 ≈ 6.04, which means that at least seven vehicles are needed to deliver the ordered goods to all customers.
The above plan requires the vehicles to cover 241.2 km, which is slightly more than in the first scenario. The visualization of the solution is shown in Figure 7. During the implementation of the second adopted scenario, vehicle 1 mainly serves the eastern part of the region, while vehicle 2 initially travels north-west, then visits points south of Stargard.
The next stage of the study was to analyse the cases of randomly diversified customer demand. The number of vehicles needed to implement the plan depends on the total demand of all customers. For each sum, the minimum number of vehicles with a specific loading capacity can be specified- Table 1. For example, for the demand sum of 10,271, the result is 10,271/1700 ≈ 6.04, which means that at least seven vehicles are needed to deliver the ordered goods to all customers.
It is expected that the proposed algorithm for solving the E-VRP problem will be able to find delivery plans that require as few vehicles as possible. By comparing the number of vehicles required theoretically ( Table 2, third column) with the number determined by the algorithm (Table 2, fifth column), it can be seen that in half of the cases, the algorithm found a solution with the minimum number of vehicles. In four cases, the solution includes one vehicle more than the minimum value (problem no. 4, 5, 6 and 9).  It is expected that the proposed algorithm for solving the E-VRP problem will be able to find delivery plans that require as few vehicles as possible. By comparing the number of vehicles required theoretically ( Table 2, third column) with the number determined by the algorithm (Table 2, fifth column), it can be seen that in half of the cases, the algorithm found a solution with the minimum number of vehicles. In four cases, the solution includes one vehicle more than the minimum value (problem no. 4, 5, 6 and 9).  1  3358  2  304  2  2  7109  5  303  5  3  10,271  7  357  7  4  14990  9  454  10  5  19,992  12  542  13  6  22,814  14  611  15  7  37,251  22  891  28  8  14,475  9  428  9  9  15,155  9  432  10  10 15,589 10 446 10 Problem number 7 is special. In this case, each customer demands more than 1000 kg of goods. As a result, a single vehicle can serve only one customer, even though it will not use all of its payload. Therefore, the algorithm correctly established the only possible plan which required 28 vehicles. Figure 8 shows the solution to problem 2. The algorithm in this case found a plan that requires the minimum number of vehicles. Each vehicle travels a compact loop. Potential doubts can be raised by the inclusion of points 27 and 28 into the 'red' loop. However, it should be borne in mind that an important constraint is the quantities of goods ordered by the customers. use all of its payload. Therefore, the algorithm correctly established the only possible plan which required 28 vehicles. Figure 8 shows the solution to problem 2. The algorithm in this case found a plan that requires the minimum number of vehicles. Each vehicle travels a compact loop. Potential doubts can be raised by the inclusion of points 27 and 28 into the 'red' loop. However, it should be borne in mind that an important constraint is the quantities of goods ordered by the customers.

Assessment of the Performance of the Proposed Algorithm
The performance of the proposed coding method was assessed on the basis of two E-VRP instances described in [23]. The first example counts 25 points and the second one 35 points. In both cases, the point sets contain four charging stations. The order of point numbering has been changed to keep the numbering rule in the following order: base point, charging stations, customers.
To ensure the comparability of the obtained results, the maximum payload of the vehicle Lmax = 200 and maximum reach of the vehicle Rmax = 100 were adopted. The calculations were performed on the same computer as the example study in Section 3.
The proposed calculation algorithm based on permutation coding combined with evolutionary optimisation allowed obtaining the best solution of the first instance at the level of 247.4 km of the travelled route, which is the same result as obtained by Wang et al. [23]; however, the computation time was 4.8 s, which is slightly shorter than the Tabu search method and much better than the CPLEX method. In the solution of instance 1, customers are served by two vehicles. Each vehicle replenishes energy once during the tour. Figure 9 shows the vehicle routes designated for the first instance. Point 1 is the depot and points 2-5 are the charging stations.

Assessment of the Performance of the Proposed Algorithm
The performance of the proposed coding method was assessed on the basis of two E-VRP instances described in [23]. The first example counts 25 points and the second one 35 points. In both cases, the point sets contain four charging stations. The order of point numbering has been changed to keep the numbering rule in the following order: base point, charging stations, customers.
To ensure the comparability of the obtained results, the maximum payload of the vehicle L max = 200 and maximum reach of the vehicle R max = 100 were adopted. The calculations were performed on the same computer as the example study in Section 3.
The proposed calculation algorithm based on permutation coding combined with evolutionary optimisation allowed obtaining the best solution of the first instance at the level of 247.4 km of the travelled route, which is the same result as obtained by Wang et al. [23]; however, the computation time was 4.8 s, which is slightly shorter than the Tabu search method and much better than the CPLEX method. In the solution of instance 1, customers are served by two vehicles. Each vehicle replenishes energy once during the tour. Figure 9 shows the vehicle routes designated for the first instance. Point 1 is the depot and points 2-5 are the charging stations. For the second of the examined cases, a much better solution was found than that published in [23]. Visiting all customers requires the use of three vehicles, two of which have to recharge energy during the tour. The third vehicle takes a short route visiting only two points. The total length of the route is 394.76 km. The calculations took 7 s. The solution is shown in Figure 10. The markings of the points are the same as in the first instance. For the second of the examined cases, a much better solution was found than that published in [23]. Visiting all customers requires the use of three vehicles, two of which have to recharge energy during the tour. The third vehicle takes a short route visiting only two points. The total length of the route is 394.76 km. The calculations took 7 s. The solution is shown in Figure 10. The markings of the points are the same as in the first instance. For the second of the examined cases, a much better solution was found than that published in [23]. Visiting all customers requires the use of three vehicles, two of which have to recharge energy during the tour. The third vehicle takes a short route visiting only two points. The total length of the route is 394.76 km. The calculations took 7 s. The solution is shown in Figure 10. The markings of the points are the same as in the first instance. The results are compared in Table 3. Two methods tested in [23] were referred to. Both are based on matrix coding, but differ in the method of solving the optimisation problem. On the basis of the obtained results, it can be concluded that permutation coding in combination with evolutionary optimisation has significant advantages and allows to quickly achieve solutions that are better than in other methods.

Discussion and Conclusions
The case study performed for north-western Poland concerned different scenarios of the demand for goods. The results allow us to observe that the developed evolutionary The results are compared in Table 3. Two methods tested in [23] were referred to. Both are based on matrix coding, but differ in the method of solving the optimisation problem. On the basis of the obtained results, it can be concluded that permutation coding in combination with evolutionary optimisation has significant advantages and allows to quickly achieve solutions that are better than in other methods.

Discussion and Conclusions
The case study performed for north-western Poland concerned different scenarios of the demand for goods. The results allow us to observe that the developed evolutionary algorithm solves the defined E-VRP in a short time, generating formally correct and good results with respect to the adopted criterion. Of course, the evolutionary method does not guarantee finding the optimum, but the relatively low complexity of the example problem and visualisation of solutions on the map allow rating highly obtained solutions. Figure 11 summarises the results for all tested scenarios. The impact of the uniform distribution of customer demand on the distance travelled by the vehicles. In particular, it illustrates the comparison of scenario 2 and the first random problem of scenario 3. Both cases are related to a similar total demand for goods, but the route determined for the random problem is 25% longer than for scenario 2. The uniform distribution of demand gives vehicles more freedom to choose their next customer. However, the great variation in demand may make it necessary for a vehicle to bypass certain customers and search for remote customers with a demand matching the volume of the carried cargo.
In addition to the case study, the algorithm performance was assessed in terms of computation time as well as its ability to find good solutions. For this purpose, the obtained times and quality of solutions were compared with the published results for two E-VRP instances. The conclusions from the comparison to other methods are promis- ing. The proposed calculation algorithm is comparably fast and allows finding much better solutions. and visualisation of solutions on the map allow rating highly obtained solutions. Figure 11 summarises the results for all tested scenarios. The impact of the uniform distribution of customer demand on the distance travelled by the vehicles. In particular, it illustrates the comparison of scenario 2 and the first random problem of scenario 3. Both cases are related to a similar total demand for goods, but the route determined for the random problem is 25% longer than for scenario 2. The uniform distribution of demand gives vehicles more freedom to choose their next customer. However, the great variation in demand may make it necessary for a vehicle to bypass certain customers and search for remote customers with a demand matching the volume of the carried cargo. Figure 11. The distance of the route depends on the total demand of customers.
In addition to the case study, the algorithm performance was assessed in terms of computation time as well as its ability to find good solutions. For this purpose, the obtained times and quality of solutions were compared with the published results for two E-VRP instances. The conclusions from the comparison to other methods are promising. The proposed calculation algorithm is comparably fast and allows finding much better solutions.
The algorithm can be used to solve E-VRP-NL problems with the assumption that a critical point is identified for the function of battery charging time. This point sets the level, up to which vehicles are charged during a working day. Charging above this point takes too long and happens only during a long halt in the depot, for example at night. Therefore, the algorithm allows for the nonlinearity in a simplified manner, but this is in line with the practical operation of EVs by their drivers, who are forced to replenish energy within a limited time frame.
The model is restricted by the static distances between the landmark points on the map. The proposed method can be made more useful in practice by adding the time-oftravel criterion. In this way, the actual speed limits of vehicle traffic can be considered.
The implementation of the method in the dynamic fleet management system makes it possible to retrieve up-to-date data about disturbances related to increased traffic intensity and accidents on selected routes. Ongoing monitoring would allow for the method to be used for dynamic updating of the optimum vehicle route to avoid particularly congested sections. Extending the model to link it to the time axis is a planned direction for further research.
Depending on the needs of the users, the method can easily be extended to include the drop in the batteries' capacity after a certain number of charging cycles. This is an demand sum [kg] distance of determined solution [km] scenario 1 scenario 2 scenario 3/problem 1 Figure 11. The distance of the route depends on the total demand of customers.
The algorithm can be used to solve E-VRP-NL problems with the assumption that a critical point is identified for the function of battery charging time. This point sets the level, up to which vehicles are charged during a working day. Charging above this point takes too long and happens only during a long halt in the depot, for example at night. Therefore, the algorithm allows for the nonlinearity in a simplified manner, but this is in line with the practical operation of EVs by their drivers, who are forced to replenish energy within a limited time frame.
The model is restricted by the static distances between the landmark points on the map. The proposed method can be made more useful in practice by adding the time-of-travel criterion. In this way, the actual speed limits of vehicle traffic can be considered.
The implementation of the method in the dynamic fleet management system makes it possible to retrieve up-to-date data about disturbances related to increased traffic intensity and accidents on selected routes. Ongoing monitoring would allow for the method to be used for dynamic updating of the optimum vehicle route to avoid particularly congested sections. Extending the model to link it to the time axis is a planned direction for further research.
Depending on the needs of the users, the method can easily be extended to include the drop in the batteries' capacity after a certain number of charging cycles. This is an issue that will begin to become more important during the next few years of the EVs' operation.
The implementation of the method in practice may require additional experimental tests to be carried out on selected vehicle models to determine the energy consumption as a function of variable speed, load carried, and selected route.
In addition to ad hoc delivery planning, fleet management companies can use the proposed tool to simulate scenarios of fleet growth, diversification of vehicle size, driver hiring policies, diversification of delivery costs by customer location, etc.
The presented method can also be used as a tool to support investment decisions on the number and location of electric vehicle charging stations. Of course, such decisions must take into account not only the predicted needs of shipping and transportation companies but also the evolving market for passenger vehicles.   Customers  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33