Performance measurement of a solution for the travelling salesman problem for routing through the incorporation of service time variability

This work assessed the performance of a solution to the problem of assigning service squads, incorporating the variability of service times. The initial problem was modelled as a Travelling Salesman Problem (TSP), whose solution was obtained by the ant colony algorithm, showing the efficient route to be followed by the squad. Assessment of the performance of the solution by discrete event simulation (DES) included the travel time and added the service time. The TSP solution indicated that up to six customer visits could be carried out in an 8-hour working day. Validation by DES presented a stable behavior of the variance, regardless of the number of visit sites assigned along the route.


Introduction
In the Chilean electricity market, distribution companies are responsible for delivering electricity to the final users. Due to the importance of this task, national legislation obliges these companies to pay compensation for failures to deliver service to customers in a timely manner. Consequently, the distribution companies seek to guarantee constant supply. One distribution company in particular has service squads available (work teams composed of two operators) which are sent to carry out maintenance and/or repairs to electricity grid cables in response to customer requests. The route taken by each squad is determined by a central operator without any tools, who provides information to support efficient decisionmaking. Therefore, a travelling salesman model is proposed to establish route assignment for the squads and minimize their total distance travelled. The mathematical model is solved by the heuristic ant colony algorithm, and then the performance of the solution obtained is evaluated by discrete event simulation. The aim of the simulation is to measure the efficiency obtained by the route, considering in addition the service times needed on the ground to solve the customers' requirements. This is done using probability distribution functions to define the service times.
The Travelling Salesman Problem (TSP) reflects the routing decisions that a salesman has to take. It involves travelling around a set of customers in order to visit each one. Furthermore, salesmans must start and end their route at the same point, while seeking to minimize the total distance travelled. The answer to the problem generates the ideal route with a visit to each customer and the minimum total distance travelled. The TSP is considered to be a NP-Hard problem. In 1954, Dantzig, Fulker-son and Johnson presented the first efficient algorithm for solving relatively big problems (Wang et al., 2015). Technological progress has developed new tools for solving this problem, including non-linear programming, ant colony, genetic algorithms, neural networks, etc.
Variations of the TSP have been introduced over time. Alkaya and Duman (2010) say that the addition of new restrictions produces different generalizations of the problem, and each new generalization constitutes the starting point for a new area of research. They therefore defined and formulated the Sequence Dependent Travelling Salesman Problem (SDTSP). In the SDTSP, the cost of travelling between two points does not depend only on the distance between them but also on the characteristics of a quantity of points to be visited subsequently. Other variations of the TSP found in the literature are: the Multiple Travelling Salesmen Problem (mTSP) (Chen, 2015), to find efficient routes for all the salesmen; the Travelling Salesman Problem with Draft Limits (TSPDL) (Todosijevic et al., 2017), which includes limitations on travel characteristics or conditions; the Travelling Salesman Problem with Pickups and Deliveries, Time Windows and Draft Limits (TSPPD-TWDL), which involves guaranteeing visits within defined time windows (Arnesen et al., 2017); and the Family Travelling Salesman Problem (FTSP), where the set of nodes on the graph are divided into various subsets, called families, and the objective is to visit a predefined number of nodes in each family at a minimum cost (Bernardino and Paias, 2018).
In another context, the TSP is the basis for the Vehicle Routing Problem (VRP), which seeks to establish a route involving the lowest cost (or distance) to visit the different customers, while also complying with the capacity of each vehicle and the demand requirements of each customer. Like the TSP, the VRP presents variations.
The aim of the present work is to verify whether the result of the travelling salesman model, obtained by ant colony, is able to provide a solution to the problem of assigning squads so as to ensure a working day of up to 8 hours, while incorporating the variability of service times. At the same time, an additional contribution of the document, within the distribution of electricity in Chile, is the field of study particularly focused on the operation of the allocation of service squads. The article is therefore organized as follows: Section 2 offers a general description of previous studies relating to the use of the TSP in related problems, and tools for solution. Section 3 describes the methodology and the assumptions made. In Section 4 the results obtained are presented and analyzed. Finally, Section 5 presents the conclusions. Vartdal et al. (2019) indicate that the electricity cables in tidal turbine farms generate high capital expenditure. They therefore aimed to find the cheapest configuration for routing the electrical supply cables, which connect the turbines to the collection center. They used TSP and mTSP models to solve the ideal route, obtaining the cheapest route for three concentrators, and an improvement in models for one or two concentrators. Tinarut and Leksakul (2019) proposed the Self-Organizing Map (SOM) algorithm, which is used to solve the TSP, but does not give the shortest route or the optimum solution. In consequence, they developed a solution based on SOM together with the local search algorithm to find a better solution. Evaluation of their results indicates that the proposed solution for the algorithm improves the processing time over the results of other researches, but the quality of the solution obtained is not better than that of other studies.

Related works
Through the incorporation of service time variability, Lynskey (2019) proposed an algorithm for the best way of finding drone ports, seeking to minimize the average journey distance from the ports to the tasks generated in a given area. In their proposal, they apply various travelling salesman algorithms to determine the shortest route to be travelled by the drone to visit all the tasks. The combination of approach algorithms guarantees that the group of tasks belonging to each drone port is within its range and that the drone can carry out the maximum number of tasks before returning to port to recharge. Dong et al. (2019) propose an artificial bee colony algorithm (ABC) to solve a combined optimization problem modelled as a colored traveling salesman problem (CTSP) applied to real-world planning problems, specifically a Multi-Machine Engineering System (MES). Zhou et al. (2019) indicate that the TSP belongs to the NP-hard type. Given its complexity, they propose a new algorithm based on Simulated Annealing (SA) and Gene Expression Programming (GEP) to find the best solution to the problem. The simulated annealing algorithm is used to increase the diversity of the Gene Expression Programming (GEP) population and improve its global search capacity. The results of their experiments show that the proposed algorithm outperforms other heuristic algorithms in terms of the best solution, the worst solution, algorithm execution time, velocity of convergence, and rate of difference between the best solution and the optimum known solution. Ko et al. (2018) suggest price policies and collaboration models to increase the competitiveness of urgent delivery companies, based on the time market density model. In the price model, they introduce a procedure for finding an optimum price, thus expanding the market for delivery services. They also derive a last mile delivery time function (LMF) of market density with the results of the TSP determined by a genetic algorithm (GA) and simulated with randomly generated customers. Furthermore, they propose a collaboration model as an alternative strategy to mediate in the service price in a difficult market situation. The applicability and efficiency of the two proposed models are shown in a numerical example. They also indicate that it is beneficial to carry out case studies with real data compiled from companies providing urgent delivery services.  propose a new test scheme for data compression for circular exploration. To do this, the previous test vector is used as the template of the next test vector, and only the bits in conflict between the previous response and the next vector need to be updated. To reduce the volume of test data and the application time of the test, the problem addressed seeks to minimize the number of bits in conflict by an optimum re-ordering of the test vectors. The problem is solved using the TSP: each vector represents a city and the number of bits in conflict between two test vectors is considered as the distance between them. The genetic algorithm is used to solve the TSP. The results of the experiment show that the proposed scheme could reduce the volume of test data efficiently with no additional hardware costs.
Chládek and Smetanová (2018) study the TSP in terms of shipping companies and Black Sea ports. They use algorithms based on graph theory to find the most economical route. The start and end of the route are in Prague, since the Czech companies currently operating in the Black Sea have their head offices there. Li et al. (2018) present a case study of a large triple bridge waterjet cutting system that is modelled as a serialcolored traveling salesman problem. To solve it, a greedy algorithm that selects a neighboring city satisfying proximity is developed. The algorithm allows a salesman to select randomly its shared cities and runs accordingly many times. It can thus be used to solve job scheduling problems with Multi-bridge machining systems. Meng et al. (2017) present a more common CTSP, in which city colors are diverse. They use a variable neighborhood search (VNS) approach to solve it, instead of computationally intractable exact solutions. Their results show that the proposed VNS is efficient heuristics to solve.
Anaya Fuentes et al. (2016) explain some methodologies for solving the TSP, which are also used for solving the VRP by coding it as a TSP. The solution tool applied is the genetic algorithm (GA), and they conclude that VRPs occurring in the industry can be solved fast enough by fitting the task times to a TSP. When this is solved by a metaheuristic method like GA, it produces results close to the optimum.
Osorio Gómez et al. (2008) solve a flexible job shop problem with interruptions and sequence dependent preparation times. For this purpose, they consider that the preparation times are sequence dependent and that preemptions are allowed. Thus, the problem of assignment to each center consists in determining which machine will be used for processing the sections or parts into which the operations that comprise a job can be divided. To assign the sections, they reduce the problem of each work center to one in which there is only one resource (single machine scheduling problem -SMSP), and then transform and solve these problems by a TSP solution. González and González (2007) present vehicle routing mechanisms. One way of solving the routing problem is by application of a genetic algorithm. The second way analyzed starts by clustering the customers to be visited and then solving the TSP to determine the best route. The TSP is solved by a local search heuristic.

Methodology
Mathematical model. Obtaining an efficient route requires the construction of a mathematical model allowing the available options to be recognized and evaluated. The mathematical structure used was that of the TSP.

Decision variables.
= Binary variable indicating whether (or not) the route between customer and customer has been assigned (1: assigned, 0: not assigned).

Parameters.
= number of service orders and/or requirements for assignment to a particular squad.
= travel distance in kilometers between the locations of customer and customer . The travel distance between the base (initial point) and the first customer, and between the last customer and the base. (1) Restrictions. The restrictions considered in the model are: Restrictions (2) and (3) guarantee the existence of a route assignment to visit the customers. Restriction (4) seeks to avoid the repeated travel and return routes (i.e. avoid creating a route that passes the same customer twice). Restriction (5) eliminates the choice of a variable with the same origin and destination.
Ant colony algorithm. The model is solved by the ant colony optimization algorithm (ACO). This algorithm replicates the efficient behavior of ants looking for the shortest way from their nest to a food source. The route is marked by a pheromone trail which intensifies as the route is more frequently used, which is what occurs with the shortest route.
According to Arias-Rojas et al. (2012), the algorithm starts considering a set of ants (or agents). Each ant (agent) constructs a viable solution to the problem by iterative application of a movement rule that includes information about which decisions are the best in the short term (through a heuristic or greedy rule), and which are the best in the long term (given by the knowledge stored in the pheromone trail).
To create a solution, each agent updates a pheromone trail that leads other ants to construct their own solutions. Thus, the ACO algorithm guides the ants to find good solutions in a relatively short time.
According to , ant k which is at location , at moment , moves to according to a certain probability of movement ( ) given by equation (6): where: represents the quantity of pheromones present in arc , of the route at moment ; is the visible coefficient from location to ; denotes the importance of the pheromones for the ant in selecting its direction of travel, and denotes the importance of the heuristic information; the nallowed set represents the following position, in which ant is allowed to travel from position , being a subset of the nodes of the network.

The visible coefficient
shows how desirable it is to move from to , and according to Xu et al. (2018) this coefficient can be expressed as the inverse of the distance between position and position . The shorter the distance, the more visible (or desirable) is the route. Yen and Cheng (2018) indicate that the ants will deposit pheromones on the routes that they travel. When a route is completed, it is compared with the shortest existing route in order to establish the best current route. The best route is updated by adjusting the quantity of pheromone available on the route. According to Rubaiee and Yildirim (2019), this is done using equation (7): where 0 is the initial level of pheromone and (0 < < 1) is the evaporation parameter of local pheromone.
After all the ants have completed their routes, pheromone evaporation begins in all arcs. Each ant deposits a quantity of pheromone Δ( ) in each arc, according to the following rule presented in equation (8): where ( ) is the route completed by an ant in iteration , and ( ) is its length. The advantage of evaporation is that it provokes delays and avoids convergence on a solution which is optimal at the local level. This means that the algorithm can explore different routes during the search process (Sabbani et al., 2019).

Evaluation of performance by simulation.
Using an interaction of optimization and simulation tools for routing problems, as proposed by Niu and Liu (2005) and Krushel et al. (2014), the performance of the solutions obtained by the optimization heuristic (ant colony) was evaluated, to include the effect of the variability of the squads service times. For this purpose, a discrete event simulation model was constructed, representing the working day of each squad, including travel times between customers (previously established) and the service carried out for each one. A gamma probability distribution function was used to represent service time (Garg, 2018). The aim of the application was to measure the effectiveness of the route defined by the optimization mechanism, by analyzing the completion of work orders defined by the time of a working day.

Results
To determine the best movement route of service squads, the TSP model was applied and solved using the ant colony algorithm. Real data were considered when determining the routes, allowing a preliminary evaluation of the efficiency of the model. The information used was taken from a day with high demand for service. Under the modus operandi of the company, the service requirements are received in a telephone exchange, which processes them and issues the assignment orders and routes of the squads for the following day. This information means that the geographical location of the service is known in advance.
The test data included the distances from the origin to the different service locations that each squad must visit.
The solution of the model using the ant colony algorithm considered = 1, = 2, = 0,5, and number of ants = 6. Table 1 shows the results of the distance travelled according to the assignment by the ant colony algorithm and compared with the manual method (without optimization and based on the operators' experience).
When comparing the total distances travelled presented in Table 1, a reduction of approximately 20% is found with solution of the TSP model by ant colony, as compared to the manual assignment method.
To evaluate the time of assignment established with the ant colony algorithm, a distance-time conversion factor of 45 km/h was used, which is the average travel speed in nonurban areas with gravel roads. To add the effect of the service time for each customer, a gamma probability distribution was used with parameters = 1,698 and = 30,90. A total of 385 replicas were simulated for each scenario (service squad) with a confidence level of 95%. Table 2 shows the results of the discrete event simulation routine associated with the total time implied in travel and service times. Table 2 show that in a working day of 8 hours, it is feasible to visit up to six customers. The variances tend to stabilize, and to be constant, when the same number of points assigned is considered. This is due to the number of replications simulated and the use of the same probability distribution for the customer service time.

Conclusions
The travelling salesman model was solved using the ant colony algorithm, produced more efficient squad movement routes than the manual method, with a reduction of up to 20% in the distance travelled by each service squad.
The valuation of the performance of the solution obtained by discrete event simulation, incorporating the service time required to attend to each customer visited on the route, showed that the result of the assignment allowed up to 6 customers to be visited within a maximum working day of 8 hours.
Validation by discrete event simulation presented a stable behavior of the variance, independently of the number of visit points assigned in the route. However, the specific value of the variance was identical, depending on the number of customers visited. Based on the results obtained, it is proposed that the TSP model needs to be adapted if visits to more than 6 customers are to be included, adding the service time as an additional restriction in order to ensure compliance with a defined working day.
Current research evaluates the efficiency of a solution, through a criterion that involves variable attention times, without incorporating this factor in the determination of the result. According to this, a line for future research could be the study of the effect that the incorporation of service time variability would have as part of the model that generates the solution.