SOLVING A PERIODIC CAPACITATED VEHICLE ROUTING PROBLEM USING SIMULATED ANNEALING ALGORITHM FOR A MANUFACTURING COMPANY

Kenan Karagul kkaragul@pau.edu.tr Pamukkale University, Dept. of Logistics, Honaz, Denizli, Turkey. ABSTRACT Goal: This paper aims to implement a periodic capacitated vehicle routing problem with simulated annealing algorithm using a real-life industrial distribution problem and to recommend it to industry practitioners. The authors aimed to achieve high-performance solutions by coding a manually solved industrial problem and thus solving a real-life vehicle routing problem using Julia language and simulated annealing algorithm. Design / Methodology / Approach: The vehicle routing problem (VRP) that is a widely studied combinatorial optimization and integer programming problem, aims to design optimal tours for a fleet of vehicles serving a given set of customers at different locations. The simulated annealing algorithm is used for periodic capacitated vehicle routing problem. Julia is a state-of-art scientific computation language. Therefore, a Julia programming language toolbox developed for logistic optimization is used. Results: The results are compared to savings algorithms from Matlab in terms of solution quality and time. It is seen that the simulated annealing algorithm with Julia gives better solution quality in reasonable simulation time compared to the constructive savings algorithm. Limitations of the investigation: The data of the company is obtained from 12 periods with a history of four years. About the capacitated vehicle routing problem, the homogenous fleet with 3000 meters/vehicle is used. Then, the simulated annealing design parameters are chosen rule-of-thumb. Therefore, better performance can be obtained by optimizing the simulated annealing parameters. Practical implications: In this study, a furniture roving parts manufacturing company that have 30 customers in Denizli, an industrial city in the west part of Turkey, is investigated. Before the scheduling implementation with Julia, the company has no effective and efficient planning as they have been using spreadsheet programs for vehicle scheduling solutions. In this study, the solutions with Julia are used in practice for the distribution with higher utilization rate and minimum number of vehicles. The simulated annealing and savings algorithms are compared in terms of solution time and performance. The savings algorithm has produced better solution time, the simulated annealing approach has minimum total distance objective value, minimum number of required vehicles, and maximum vehicle utilization rate for the whole model. Thus, this paper can contribute to small scale business management in the sense of presenting a digitalization solution for the vehicle scheduling solution. Also, Julia application of simulated annealing for vehicle scheduling is demonstrated that can help both academicians and practitioners in organizations, mainly in logistics and distribution problems. Originality / Value: The main contribution of this study is a new solution method to capacitated vehicle routing problems for a real-life industrial problem using the advantages of the high-level computing language Julia and a meta-heuristic algorithm, the simulated annealing method.


INTRODUCTION
Nowadays, once starting the rapidly spreading implementations of Industry 4.0 for the companies, the supply chain management 4.0 procedure is also developed for which a bibliometric analysis reinforce the growing importance of the topic. According to Frazzon et al. (2019), the approaches of big data, cloud computing, and Internet of Things are the most widely used technologies for the smart applications and digitalization of the supply chain process. At this phase, the routing solutions are also important for transportation management system by linking enterprise resource planning and warehouse management system.
The vehicle routing problem (VRP) is a combinatorial optimization and integer programming problem and belongs to NP-hard computational complexity class. Formerly, It was described and solved by Dantzig and Ramser (1959) as a linear programming problem. Five years after these novel description, Clarke and Wright (1964) proposed the Clarke and Wright Savings Algorithm that depends on the idea of computing the savings for linking two customers at the same route (Pichpibul and Kawtummachai, 2013). As generated from Travelling Salesman Problem with set of constraints, VRP aims to obtain the minimization of delivery costs of vehicles to customers at different locations from a depot. In the literature, VRP variants with various constraints, goals and states have been presented and solved. Thus, in the operational research area, VRP has numerous applications.
Both exact and heuristics based solution methods have been proposed to solve VRPs. In VRP solutions, vehicle capacity and/or route distance constraints are taken into consideration. For instance, in Capacitated Vehicle Routing Problem (CVRP) the aim is to provide the delivery process with known demands by optimizing the cost bearing in mind the vehicle capacity constraints (Cordeau et al., 2004). As in the case of VRP, exact and heuristic based solutions have been also used from the time when it is first defined for solving CVRP. The non-exact heuristics solution methods improve the computation time algorithm complexity with respect to exact solutions and add liability to vehicle capacity and route distance constraints (Barhant and Laporte, 2006;Laporte, 2009).
In this paper, a CVRP is solved using Julia programming language with simulated annealing algorithm under reasonable time and reasonable number of vehicles. As an instance, a furniture roving part manufacturing company has examined with 30-customers for 12 periods with a homogenous fleet size from a depot. The rest of the paper is organized as follows. Section 2 introduces a mathematical model for the CVRP. Section 3 defines simulated annealing algorithms and Julia programming language solution approach, and Section 4 defines the proposed model and presents the simulations and analysis, followed by conclusions and further research in the last section.  Vol. 17, No. 1, e2020866, 2020DOI: 10.14488/BJOPM.2020 3/13

CAPACITATED VEHICLE ROUTING PROBLEM
Capacitated vehicle routing problem, CVRP, can be structured to start using undirected graph as ( ) is a set of vertices. Here, is the depot with no demand level. When the cost for moving from i to j does not depend on the direction, undirected graph ( ) In CVRP, the total cost of the route of the vehicle is minimized under the following constraints: • Each city on the route is visited by only one vehicle, • Each route starts at the depot and ends at the depot, • The total number of cities on a route, vehicle capacity, time windows and total service time are limited.
The VRP is given in (1)-(10) as a constraint optimization problem. (1) is used for the minimization of the route cost in which the delivery vehicles are traveling. The constraint in (2) is used for each vehicle to serve an i-j connection, (3) is used to avoid returning to the same node. The constraint (4) guarantee that the number of the vehicles arriving at every customer and entering the depot is equal to the number of the vehicles leaving. The constraints (5) and (6) guarantee that each vehicle can leave the depot and visit the j-th node only once. The constraint (7) shows the remaining capacity after the vehicle came i-th node from j-th node when the vehicle is assigned to the i-j connection. The constraint (8) guarantees that the initial capacity of the vehicles is Q. According to the constraint (9), the total demand of customers assigned to a vehicle will not exceed the capacity of the vehicle. The constraint (10) is an integer constraint for the variable , Many methods have been developed for the solution of CVRP. The methods that provide the optimal solution are categorized as the exact solution methods. On the other hand, the methods that give the near-optimal results are classified as the heuristic solution method. From a literature review, it is seen that branch & cut and branch & bound algorithms and dynamic programming models and set partition algorithms are frequently used as the exact solution methods. Although it is also used for the final solution, the preferred savings as a solution provider are the closest neighbor, two-stage method, and the petal intuitive classical intuition. In addition, in the third and the last group, metaheuristics such as genetic algorithms, simulated annealing, tabu search, particle swarm optimization such as ant colony and artificial bee colony, local search and acceptance threshold are also other methods used to solve CVRP. Metaheuristics methods are algorithms generally inspired by natural events to solve complex optimization problems that cannot be solved in a reasonable time by precise mathematical solution methods. Especially in large and integrated structures, the metaheuristics methods are the most practical way to solve real-life problems. The aim of these methods is to investigate the solution space effectively and to provide solutions that are close to the optimal. Being easy to understand and practical, it is widely used today because it can be used with slight changes in the solution of different problem types. The metaheuristic methods

4/13
can be classified in terms of the inspiration used (natural or artificial), the initial solution used (population or single solution), the objective function used (dynamic, static), the neighborhood structure (single, multiple) and memory status (memory, memory-free) (Blum and Roli, 2003). In the last three decades, genetic algorithms (Holland, 1975), simulated annealing (Kirkpatrick et al., 1983), tabu search (Glover and McMillan, 1986), artificial immune system (Farmer et al., 1986), ant colony (Dorigo et al., 1991), particle swarm (Kennedy and Eberhart, 1995), artificial bee colony (Karaboga, 2005) are the frequently used metaheuristic methods in the solution of integrated optimization problems.
In this paper, simulated annealing algorithm is applied for solving the CVRP problem with a real-life industrial model and its results are obtained with minimizing the sum of the total distance.

Simulated Annealing (SA) Algorithm
In general, analytical methods don't provide the optimal solution for the CVRP at a reasonable time. Thus, heuristics and metaheuristic approaches are used for solving combinatorial optimization problems. The goal of heuristics/metaheuristics approach is to carry out the solution space and to provide convenient results close to the optimal solution well planned.
In this study, simulated annealing (SA) algorithm which was first applied by Kirkpatrick et al. (1983) is used that is efficient metaheuristic approach that can be applied to solve CVRP. The method, which is named after metallurgical science and the annealing of metals, is often used for discrete optimization problems. SA is based on the physical annealing treatment which is using widely known metropolis algorithm in inner-loop of the algorithm (Johnson et al., 1989). SA has generally used to solve combinatorial optimization problems the same as other heuristics/metaheuristics approaches. Fundamental stone of SA algorithm is the dynamically decreasing iterations of the p value, which is likely to accept the bad solution instead of sacrificing the good solution. When this arrangement is made, in the first parts of the problem solution there is a lot of leap between the solution regions, and when the number of iterations increases and the solutions we get are at a very good level, it approaches 0 and so our search zone becomes narrower. The basic principle of the annealing algorithm is precisely this. Annealing process based on the solidifying which is make liquefied by high and efficient heating treatment. Material change with the high temperature that mean internal particles and shape imbalances. Next phase of the process, it is systematically decreased temperature by system until the steady state condition. So, the possibility of selecting a bad solution is systematically reduced by temperature. Temperature is an expression due to iteration (usually smooth or logarithmic decreasing). Similarly, atoms is getting balance which is steady state condition in each iteration temperature. Finally, internal energy of the material is down minimum point because of the system heat's catch the environmental temperature (Lin and Fei, 2012;Şahin and Eroğlu, 2014;Karagul et al., 2019). Osman (1993) developed a hybrid simulated annealing algorithm with the tabu search algorithm for solving a CVRP. Zeng et al. (2005) proposed an assignment-based local search algorithm used with simulated annealing. Tavakkoli 2011) presented a novel mathematical model for a competitive VRPTW to optimize routes considering the minimum travel cost and maximum sale using simulated annealing (SA) algorithm. By using both a small and a large dataset, it is shown that the SA algorithm can find useful solutions for VRPTW in a shorter time than exact methods. A multi-objective variant of the VRPTW based on the simulated annealing, namely, the multiple temperature Pareto simulated annealing is proposed and solved on the Solomon's datasets by Baños et al. (2013) where the travelled cost and the imbalance in the distances travelled by the vehicles, and in the loads delivered by them is optimized at the same time. Then, Vincent et al. (2017) developed simulated annealing with a restart strategy to solve this problem for hybrid VRP that is an extension of the green VRP. Their strategy determines the acceptance probability of a worse solution using the Boltzmann function at first and, employs the Cauchy function to determine the acceptance probability of a worse solution at the second part of strategy. Their study shows that the proposed SA approach has effectively solved the problem on vehicle type and the number of electric charging stations that have an impact on the total travel cost. The initial temperature, the number of solutions to be produced at each temperature, the temperature reduction function, and the stop criterion are the four parameters of SA.
The convergence of SA is given as in Figure 2. Graph showed to readers, convergence realized step by step in each iteration. The SA based solution algorithm for CVRP is given as follows in Chart 1 which includes pseudo-code and

5/13
the values of the simulation parameters in detail. The SA method has four parameters: the initial temperature, the number of solutions to be produced at each temperature, the temperature decrease function, and the halt condition. The convergence of SA is given as in Figure 2 and the SA based solution algorithm for CVRP is given as follows in Chart 1 which includes Matlab/Octave code like as pseudo-code and trivial optimized running parameters. The code is easy readable and understable.

Julia Programming Language
Modern programming languages have worked with stylish design objects and their compiler tools have reasonable performance. However, to provide a working environment for different disciplines or even for interdisciplinary studies, high performance scientific computing tools should present a user-friendly coding environment and syntax for research studies. In computer programming, a scientific language is a programming language especially optimized for mathematical contents such as linear algebra, dynamic equations, differential equation solvers and matrices used in scientific computing. Julia programming language which is carried out at the Julia Lab at Massachusetts Institute of Technology (MIT) in 2012, is a high-level, high-performance dynamic language suitable for scientific computation. In Julia, there are unexpectedly many ways in which utterings in the language can be used that makes Julia a flexible language. Being a free and MIT licensed open source software is another advantage of Julia. The custom software developed with Julia programming language can be compiled to a native code for multiple platforms via a low level virtual machine. In Julia, the user-defined types are as fast and compact as builtins. In Julia, the vectorization of the code is not necessary for computation performance; the de-vectorization of the code is also fast. Julia is designed for parallelism and distributed computation. Also, the C functions can be directly called without wrappers or special APIs.
For a performance comparison of Julia and typical dynamic programming languages, the results of micro-benchmarks such as sorting, string parsing, numerical loops, random number generation, recursion, array operations, and  Vol. 17, No. 1, e2020866, 2020DOI: 10.14488/BJOPM.2020 6/13 function calls from the Julia homepage are given in Figure 3 (Julialang.org). These micro-benchmarks have related to do test compiler performance on a range of common code patterns, (Julialang.org).
Julia's ease of use and computation time advantages over other languages mentioned above makes it a good candidate for general purpose programming in addition to scientific analysis. From security point of view, there have been a few interesting issues that have come up that indicate that a deeper exploration of Julia in a potentially untrusted, multi-user, multi-threading environments such as Web applications, mobile platforms is warranted. However, the logistics optimization toolbox used for solving the CVRP is limited only for scientific usage for a standalone, single-user environment. Therefore, these security issues are not considered in this study.
Consequently, it is seen that Julia has more effective working fields such as machine learning, data analysis, parallel computing and scientific domains besides using general purposes and visualization. So, in this paper, Julia language is preferred to start with developing a new logistics toolbox and this paper is also presented for this purpose.

NUMERICAL RESULTS
As a case study, a furniture roving part manufacturing company which is located in Denizli, Turkey is considered.
The company has the demand values from 30-customers for 12 periods as seen in Table 1. A sample photo of the furniture roving part is given as in Figure 4, the total demand fluctuations are given for each period as in Figure 5 where the seasonal and economic fluctuations can be observed. As seen in Figure 5, there are 12 periods corresponding to four years. Thus, each period belongs to four months. Appendix A shows the distances from depot to customers and also between each other.
The programs run on Julia v1.0 environment with i7 4800QM CPU and 16 GB RAM capacity. The SA parameters are used in the tests as: the maximum number of iterations is 10K, the maximum number of inner-iteration is 100, the initial temperature level is 250 and, the temperature damping rate is 0.99. The computational results are summarized in Table 2. According to the results, the minimum total demand values are 9013.9 and 9906 as the simulated annealing algorithm with Julia and savings algorithm with Matlab, respectively. So, the objective function value is better with the proposed method as 9%. On the other hand, as the savings algorithm is a constructive algorithm much better solution times were reached, however, for the numbers of required vehicles, the proposed approach requires at most 5 vehicles instead of 6 vehicles from savings algorithm. In addition, the more effective vehicle utilization rate is up to 88.72% from 86.27%. Obtaining a better vehicle utilization rate may provide two important advantages. The first is the positive effect on the economy by reducing the fuel  Vol. 17, No. 1, e2020866, 2020DOI: 10.14488/BJOPM.2020

8/13
In this paper, a new scientific computing language Julia is used for solving CVRP with SA as the proposed approach. The CVRP model has investigated in a furniture roving part manufacturing company which is located in Denizli, Turkey. The company has the demand values from 30-customers for 12 periods. Before the scheduling implementation with Julia, they have no effective and efficient planning as they have been using spreadsheet programs for vehicle scheduling solutions. In this study, the solutions with Julia are used in practice for the distribution with higher utilization rate and minimum number of vehicles. The homogenous fleet is used with 3000 meters of vehicle capacity. The obtained results are compared to savings algorithms from Matlab programming language in terms of solution quality and time at the same problem.
In this study, the latest technology in the literature is taken into consideration in the developed SA code. However, it is not the SA algorithm that demonstrates the state-of-art. The authors aimed to achieve high-performance solutions by coding an industrial problem manually solved with a state-of-art language. Another state-of-art situation here is to solve a real vehicle routing problem using Julia language and SA and recommend it to the industry practitioners.
According to the results, the minimum total demand value for the simulated annealing algorithm is better than savings algorithm. The savings algorithm is a constructive algorithm. Therefore, solution times were better than simulated annealing algorithm. On the other hand, the simulated annealing algorithm requires at most 5 vehicles instead of 6 vehicles of the savings algorithm. This has a positive effect on the fuel economy and the environment.
Even if the savings algorithm has produced better solution time, the proposed approach has minimum total distance objective value, minimum number of required vehicles, and maximum vehicle utilization rate for the whole model. Furthermore, this study can be evaluated by starting to develop a new logistics toolbox with Julia scientific computing. So, as a further study, the VRP variants and the new and/or known solution methodologies with Julia can be considered.
The industrial problem handled in this study can be evaluated from different perspectives as a further study. For instance, the problem can be evaluated within the framework of inventory routing problems. Also, heterogeneous fleet vehicle routing problems, another complex vehicle routing problem, can be solved by these algorithms. Time window constraint can be added to deal with a more complex problem. The same industrial problem may arise as a more difficult vehicle routing problem in case of the state-of-art problems such as stochastic demand, green vehicle routing or electrical vehicle routing. When the industrial problem handled in this study and the theoretical approaches listed below are evaluated together, different expansions can be revealed for future studies.