Tool-Path Problem in Direct Energy Deposition Metal-Additive Manufacturing: Sequence Strategy Generation

The tool-path problem has been extensively studied in manufacturing technologies, as it has a considerable impact on production time. Additive manufacturing is one of these technologies; it takes time to fabricate parts, so the selection of optimal tool-paths is critical. This research analyzes the tool-path problem in the direct energy deposition technology; it introduces the main processes, and analyzes the characteristics of tool-path problem. It explains the approaches applied in the literature to solve the problem; as these are mainly geometric approximations, they are far from optimal. Based on this analysis, this paper introduces a mathematical framework for direct energy deposition and a novel problem called sequence strategy generation. Finally, it solves the problem using a benchmark for several different parts. The results reveal that the approach can be applied to parts with different characteristics, and the solution to the sequence strategy problem can be used to generate tool-paths.


I. INTRODUCTION
Many engineering problems, such as the design of machine tools, airplanes and automobiles, are multicriteria optimization problems. On the one hand, some factors, such as productivity, strength, reliability, longevity and efficiency must be increased. On the other hand, other factors, such as vibration and noise, production and maintenance costs and the number of failures need to be decreased [1]. Optimization problems are basically mathematical models of decision problems. Simply stated, a decision problem offers a set of alternatives; solving the problem requires finding the best option in the presence of certain criteria [2]. This problem can be called multi-objective optimization problem, where multiple criteria must be considered to optimize the overall performance of the process [3]. In multi-objective optimization, however, The associate editor coordinating the review of this manuscript and approving it for publication was Mauro Gaggero .
there is not usually a globally optimal solution, the following concepts are thus used to represent optimal solutions. A point is Pareto optimal, if there is no other point that improves at least one of its objectives without detriment to another objective. A Pareto set (PS) is the set of all Pareto optimal points [4].
The tool-path problem is an engineering problem that has been extensively studied for industrial processes [5], [6], including machining and cutting operations [7], and it can be posed as a multicriteria optimization problem. This is because it is a necessary stage for automation of control programs of computer numerical control (CNC) systems [8]. Depending on the specific field, it can be called the tool-path planning problem, cutting path problem, drilling path problem or tool routing problem.
The tool-path cutting problem is directly applicable to a number of processes, including laser cutting operations, where optimal torch path generation has a considerable impact on production time. In this case, the problem consists of finding the path that minimizes the total time required to cut all the parts from a sheet while respecting the precedence constraints [9]. Consequently, several commercial computer-aided design (CAD)/computer-aided manufacturing (CAM) packages offer automatic torch path sequencing.
This problem is studied in other machining operations as well, because optimizing the process has the potential to minimize the financial and environmental costs of producing a part. For instance, in a multi-hole drilling process [10], most of the total time is employed in tool movement and switching. Thus, tool-path optimization is important in cost minimization. Another important factor to consider in optimizing the process is the minimization of the idling length [8].
Additive manufacturing (AM) or 3D printing is an emerging technology with an array of possibilities for manufacturing technology [11]. Despite its early promise, the technology still has some weaknesses. One is the lack of control over certain defects, such as pores or lack of fusion; another is the repeatability and reproducibility of the part quality [12]. A third major constraint is the amount of time required to fabricate parts [13]. To rectify the latter problem, researchers have proposed the application of better process planning algorithms [14]- [16]. In the process planning of CAM, the selection of an appropriate tool-path is critical [17], consequently, the tool-path generation problem is dominating research. In AM, the manufacturing series are shorter than in other technologies which employ mass production [18]. AM allows more than one part to be manufactured in the same substrate (batches of workpieces), so it is important to generate optimal sequences.
Overall equipment efficiency (OEE) is an indicator (product of availability, performance and quality) used to measure how well a piece of equipment is used in batch production [19]. Several studies [20]- [22] have proposed enhancing OEE by implementing total productive maintenance, a maintenance system that covers equipment throughout the planning, manufacturing and maintenance stages, thus increasing overall availability/ effectiveness. Additive manufacturing, a new paradigm, has the potential to enhance OEE by improving process planning, thus making optimal tool-path planning essential in AM.
The tool-path required for AM technologies is a predefined trajectory of the nozzles to deposit material in the boundary and interior of each sliced layer [23]. Some AM technologies have several features in common with existing CNC milling machines. The machines are given the instructions in a similar way, the movements are similar, and they both have a rigid tool inside the machine [24]. Accordingly, the approaches used to generate tool-paths in milling can be adapted for AM processes. Until now, tool-path generation in AM has mainly been based on geometric analysis, but this is not usually optimal from a manufacturing engineering point of view [17]. Geometric analysis involves following the boundary of a trend to generate paths without considering an optimality criterion. In actual CAM software, for example, standard tool-paths are generated, such as zig, zigzag or radial, and these are far from optimal [25].
This paper analyzes the tool-path problem for AM technologies, specifically direct energy deposition (DED) technology. It describes the AM tool-path problem, and discusses the approaches used in the literature to solve it. Based on the discussion, it introduces a novel problem called sequence strategy generation and the problem is solved using a benchmark of parts that have different characteristics.

II. ADDITIVE MANUFACTURING
Additive manufacturing or 3D printing consists of depositing material layer-by-layer [26] to create a three-dimensional object. The American Society for Testing Materials (ASTM) [27] divides additive manufacturing processes into seven categories: binder jetting [28], DED [29], material extrusion [30], material jetting [31], powder bed fusion [32], sheet lamination [33] and vat photopolymerization [34]. These processes vary in how the material is deposited (binder, laser, heated), what material is employed (plastics, metals, ceramics) and whether the feedstock state is solid (powder, wire, sheet) or liquid. This investigation considers only DED technology. In DED, a nozzle mounted on a multi-axis arm deposits material layer-by-layer. This process can be divided into three main groups: arc-welding-based, laser-based and electron-beam based [35]. Wire arc additive manufacturing (WAAM), an arc-welding-based technology, employs different types of electrogenic weldings; gas tungsten arc-welding (TIG), gas metal arc-welding (GMAW) and plasma arc-welding (PAW). The parts in the benchmark used to solve the problem are manufactured by PAW. Figure 1 shows the torch and wire of a PAW process.

A. TOOL-PATH PROBLEM CHARACTERISTICS
This section explains the technical characteristics of the processes defined above. The total time plays a major role in WAAM technology, as a long cooling time is needed. The deposition must be performed at a fixed temperature to ensure consistent deposition conditions [36]. The total time is divided into adding time, cooling time and machine movement time. The cooling time can be reduced by applying   optimal tool-paths, as the deposition can be carried out in a bead that has already been cooled.
The literature identifies two precedence constraints to DED processes [37]. The first is accessibility constraints related to the nozzle. These depend on the process itself and the capabilities of the machine used [36]. The second is heat dissipation. Different WAAM technologies have significant differences in torch movement limitations. For instance, in PAW technology, the torch is more limited than in GMAW or TIG technology, as the wire is coaxial to the torch. For that reason, the trajectories of the path can be predefined for a technology and machine. The process of finding the predefined trajectories is currently not automated. Figure 2 shows the head of the machine and the predefined trajectories for a specific part.
As Figure 3 shows, in PAW, the temperature is monitored by a pyrometer as the deposition proceeds. The adding sequence is connected with the temperature, because the heat propagates differently depending on the location of the beads. As indicated in Figure 3, the temperature in the central bead is lower than at the extremities. Figure 4 shows the time required by each bead to cool (until it reaches 400 • C). The time to reach a given temperature varies depending on the bead and layer ( Figure 4).
For optimality, AM requires better weld bead geometry and surface accuracy, as significant differences can appear at the start and the end of a weld path [38]. Optimality can be achieved by generating tool-paths that optimize both quality characteristics.

B. PROPOSED APPROACHES IN THE LITERATURE
An automated process planning algorithm for AM should take into account the 2D slicing into layers, the bead geometry, tool-path generation and process parameter selection. The steps of the process planning of all AM technologies are identical, but it is difficult to design an optimal algorithm to generate the tool-paths for all AM technologies [24]. For that reason, the CAM packages for AM offer slicing algorithms rather than specialized algorithms. Another difficulty is that more mature CAM approaches, such as CNC, require an experienced user to make decisions.
Many CAD/CAM packages offer automatic torch-path sequencing for conventional manufacturing, but several constraints in AM are difficult to satisfy using an optimization algorithm; these include the surface quality and the effect of the workpiece heating on the adding sequence. AM's limited capabilities depend, among other things, on the characteristics of AM processes, the current capacity of AM machines and the impact of the AM technology on the material properties [36].
There are some software packages for metal AM, but this is an emerging technology with a wide variety of processes. Most of this software is related to 3D design (CAD) and not to manufacturing (CAM). To be optimal, the software should include such options as changing the process parameters and simulating the piece that will be manufactured. However, a fully automated CAD/CAM software has not been developed for WAAM technology, as there is not yet an automatic way to link the generation of robotic welding paths to the CAD model [39].
One of the AM processes for which the tool-path problem has been studied is fused deposition modelling (FDM). FDM, a popular AM technology, uses a plastic filament as feedstock extruded through a nozzle [40]. In an investigation of the path generation for DFM [41], researchers compared FDM and conventional milling. They analyzed the specific features of FDM, identified the three most critical ones and proposed a parallel-based tool-path generation method. Another study [42] proposed, a novel tool-path generation method for FDM for thin-wall structures, noting that it is difficult to obtain the desired quality using the commonly employed tool-paths.
The literature has proposed various types of path patterns for AM technologies, including raster, zigzag, contour or spiral [16]. Although these patterns are suitable for powder-based technologies, they have limitations for wire-feed AM technologies, because in these technologies the deposition width is thicker. In addition, it is important to avoid frequent start/stop points and to avoid changing the deposition path direction as the welding process requires a certain time to stabilize [14].
These path patterns (raster, zigzag, contour and spiral) are based on scan lines [43] and follow the geometrical trend of the boundary [38]. They are not suitable for WAAM because WAAM must meet the following requirements: geometrical accuracy, minimization of the number of tool-path passes and minimization of line segments representing the travel path. Given these requirements, several investigations [14], [15], [44] have used medial axis transformation (MAT) to generate tool-paths. This technique allows the geometry to be filled from the inside to the boundary (as opposed to the contour path pattern), avoiding the narrow gaps. The extra material is removed in post-process machining.
To conclude, in WAAM technology, the approaches proposed to solve the tool-path problem are geometric-based and do not consider optimality criteria. The techniques do not take the sequence strategy into account; for example, in the MAT approach, the generated paths for each domain go in a counter-clockwise direction [15]. To the best of  our knowledge, no research has addressed the other main DED technologies. Moreover, there is a lack of commercial software for AM technology, especially software related to CAM. To fill the gap in the research, we propose a novel problem, sequence strategy generation, in which we consider the previously defined problem characteristics.

III. MULTICRITERIA OPTIMIZATION APPROACH
As previously mentioned, some research on machining and cutting operations has used multicriteria optimization approaches to address the tool-path generation problem. One study proposed an algorithm to minimize non-productive time in milling by optimally connecting the segments of the tool-path [45]. This work indicates a possible path for the design of AM strategies; the problem was formulated as a generalized traveling salesman problem (GTSP) and solved using a heuristic algorithm. Similarly, Chan and Na [46] presented a tool-path algorithm based on simulated annealing; the model improved on the previous traveling salesman problem (TSP) model. It included the incorporation of the heat into the cost function, together with the minimization of the tool-path length and the effect of the minimum heat.
Another study formulated a tool-path optimization model for a milling process [47], considering three different objective functions: optimization of the cutting time, minimization of the changes in acceleration and constant cutter engagement. Other researches considered the tool-path optimization problem for a drilling process to increase productivity and reduce costs [48]. They reduced the optimization problem to the TSP. Also, other researches modeled the problem of finding the optimum path for a CNC turret typing system using an asymmetric TSP [49]. The aim was to enhance the productivity of the machine by reducing tool changes and optimizing tool routes. A genetic algorithm, a heuristic optimization approach inspired by natural selection, was used in all of these studies. Together, they suggest that the TSP model is relevant for AM, as some AM technologies have several features in common with CNC machining machines.
A review [9] of tool-path algorithms for laser cutters identified six types of problems: continuous cutting problem, endpoint cutting problem, intermittent cutting problem, touring polygons problem, TSP and GTSP. Most were solved using heuristics and meta-heuristics (74%); a few (17%) used exact algorithms and the remainder used approximation algorithms or constraint programming techniques.
Bearing all this in mind, we propose a mathematical framework that models various relevant aspects of DED processes. VOLUME 8, 2020 Using this framework, we formulate a multiple multicriteria optimization problem for DED and solve it for parts manufactured by PAW technology.

A. GRAPH REPRESENTATION OF DED
A graph G is an ordered triple G = (V (G), E(G), ψ G ), consisting of a non-empty set V (G) of vertices, a set E(G) of edges and an incidence function ψ G . The incidence function, associates an unordered pair, a set of the form {a, b} with no particular relation between a and b, of (not necessarily distinct) vertices of G with each edge of G [50]. A walk is a sequence of alternating vertices and edges of a graph. A graph is used to represent the part to be manufactured; a graph can express relationships between pairs of variables and show other interesting structures, such as cycles and paths, making it a very useful tool for abstraction. In the following lines, we offer some definitions before defining the problem.
Definition 1: A bead S is defined as a set comprising two elements, a vectorial function g that takes a real variable as argument and a layer number l: where g is the parametrization of a curve C, a continuous line traced on the plane. The initial point (a, g(a)) and the final point (b, g(b)) are called extreme points. Definition 2: An intersection of a bead S i is a point p, an extreme point of S i that belongs to another bead S j i, j = {1, . . . , nl} i = j. Definition 3: A segment is a bead in which at least one extreme point is an intersection. Figure 6 is the graph representation of a part manufactured by PAW, shown in Figure 5. The blue lines represent the segments, the red circles represent the intersections and the black arrows are the beads. In this way, the part can be represented as a graph with vertices and edges. For instance, for the first layer, the first bead, S 1 , is S 1 = {g 1 , 1 | Definition 4: Given a part, a part decomposition graph (PDG) is a planar graph where each vertex is an intersection, an edge represents a segment, and a region is associated with the faces.   Figure 7 shows the PDG of the previously introduced part ( Figure 5). The manufacturing scheme, M S , is expressed in Equation (2). For each part, these (i, j)− walks are predefined, minimizing the start and end points and joining the segments in which the machine can add the material without stopping. Predefining the adding options of the graph in such a way helps to achieve better quality parameters (see Section II-A). Note that a PDG is a graph showing the predefined trajectories (adding options). The set of adding options, M S , is used to build the G m . The sequence strategy problem is formulated in the G m , as shown in Section III-B.

B. FORMULATION OF A NOVEL PROBLEM
This framework allows us to propose a novel scenario related to the tool-path generation for every part manufactured by DED. It takes into account the particular specifications of the tool-path problem described in Section II-A.
Definition 8: The sequence strategy problem consists of finding the simple cycle of length N = |M S | in a manufacturing graph G m , which is optimal with respect to one or more pre-defined criterion.
The solution space of the problem, , is the set of all variable assignments that satisfies the constraints of the problem. In this specific problem, any combination of all the adding options in the manufacturing scheme, or, in other words, a permutation of the vertices in the manufacturing graph, G m is a feasible solution. A feasible solution corresponds to the previously mentioned geometric-based approach, as it does not consider the order in which the material is deposited. In this investigation, F(x) = (F 1 (x), F 2 (x)), where F 1 and F 2 are defined as follows.
• Distance (F 1 ): The distance of a solution is the addition of the distances between two consecutive adding options. The distance between two adding options is computed as the euclidean distance from the final vertex of the first adding option to the initial vertex of the second adding option: d(I i,j , I k,l ) = d euclidean (j, k). The distance between the adding options is traveled by the machine, once the deposition in the bead has accomplished, thus without adding material. For that reason, the torch has freedom to make movements. This distance was chosen because there is no limitation on the torch's movements, and it represents the shortest distance between two points.
• Waiting time (F 2 ): The waiting time of a solution is the addition of the waiting times between two consecutive adding options. The waiting time of two adding options depends on the distance. The adding options that are nearer to each other have a longer waiting time (as the temperature has to decrease to a certain value after deposition), while adding options which are further apart have less waiting time. In this study, the waiting time is computed using the temperature monitored by the pyrometer in realistic process conditions. This is made using empirical research based on experience. The machine and monitoring system employed to perform the experiments are detailed in [51].
Algorithm 1 Permutation-Based MOEA 1: D 0 ← Generate M individuals randomly and evaluate them using the objective functions. 2: l = 1 3: while stopping criterion not met do 4: Select a population D s l from D l−1 using NSGA-II selection method 5: Create a population D l applying ordered crossover to individuals in D s l with a given probability 6: Apply shuffle mutation to individuals in D l with a given probability 7: Evaluate the individuals in D l 8: l → l + 1 9: end while

C. AN EVOLUTIONARY OPTIMIZATION APPROACH TO THE FORMULATED PROBLEM
Any combination of the elements in M S is a feasible solution, but the optimal one(s) can be found using two optimization criteria: distance and waiting time. In this case, the problem is posed as a bi-objective minimization problem, in the solution space of permutations, where the PS of the solutions is computed.
The problem is addressed as a multi-objective TSP. Traditional methods used to solve single-objective TSPs cannot be directly applied to the bi-objective case. Therefore, we use an evolutionary algorithm (EA) [52] based on the permutation representation. EAs are population-based optimization methods based on the theory of natural evolution. Genetic operators such as selection, crossover, and mutation are applied to the population. The idea of these methods is to bias the search process to more promising regions of the search space. Our algorithm shares these general characteristics of EAs and has other particular characteristics related to the type of solution representation used (permutation-based).
The genetic operators employed in the multi-objective EA (MOEA) do not violate the restrictions of the multi-objective TSP. Some EA approaches to permutation problems have been tested on large instances (e.g., up to n = 500 in [53], [54]). The fact that EA approaches can deal with permutation problems of this large dimensionality enables the possibility of addressing tool-path problems in very complex parts.
Algorithm 1, shows the pseudocode of the permutationbased MOEA used to solve the problem. The algorithm starts from a set of randomly generated solutions and evaluates them using the bi-objective functions. Selection is based on the fast non-dominated sort algorithm, called non-dominated sorting genetic algorithm (NSGA-II), with the addition of a crowding distance step [55]. This efficient method of selection sorts solutions according to the non-dominated front which they belong to; the first solutions belong to the set of non-dominated solutions. Solutions within each front are also sorted, taking into account the crowding distance, a metric The ordered crossover, a specialized crossover operator that guarantees the offspring will be valid permutations, is applied, and the shuffle mutation operator is applied to the offspring. The latter works by shuffling two positions of the permutation and thus guarantees valid permutations. For the optimization problems addressed here, we use a population of 500 individuals and 100 generations. The EA is implemented using the DEAP library programmed in Python [56].  The overall complexity of Algorithm 1 for a problem of M objectives is O(g · M · N 2 ), where g is the number of generations and M is the number of objectives. This cost is governed by the selection operator used by the algorithm, as it has complexity O(M (2N ) 2 ) [55].
The optimization problem of the example shown in Section III-A can be posed as follows. To make the notation of the formulation easier, the adding options are renamed. The objective functions corresponding with the example are presented in Equations (5)(6) in the Appendix. The constraints are shown in Equation (3).

IV. RESULTS AND DISCUSSION
In this section, we present the results from the experiments using a benchmark compound by ten parts. Table 1 gives the information about the parts. The manufacturing schemes for each part and the figures of the PDGs are indicated in Figures 7 and 8, respectively. The number of vertices in each of the manufacturing graphs, (|V (G m )|), is also shown. Note that |V (G m )| is also the length of the permutations in the solution space of each of the graphs. The manufacturing schemes were built to minimize the start and end points of the sections where the machine can add material without stopping, taking into account the movement limitations of a PAW torch. As Figure 8 shows, the segments joined by a straight line can be considered adding options. This is noticeable in the graph in Figure 8(a); the graph has 24 edges, but only eight adding options are in the manufacturing scheme. In contrast, in the graphs shown in Figure 8(b) and Figure 8(d), all the segments correspond to a different adding option. The objective functions of distance and waiting time are generated for each of the parts as explained in Section III-B.
The PSs obtained by applying Algorithm 1 to the bi-objective problems defined for each of the parts are shown in Figure 9 and Figure 10. The legends in the figures indicate the number of individuals in the PSs that reach the same values in the objective functions. For instance, for the PS of the first graph, shown in Figure 9(a), the points in red indicate that those values are reached by only one individual in the PS, whereas the crosses in blue indicate they are reached by two individuals in the PS.
The distribution of the points in the PSs varies significantly from one case to another. The most significant case is the one related to graph 5 (shown in Figure 9(e)), with some noticeable gaps between the points represented in the PS. In comparison, in graph 4 (Figure 9(d)), the points cover almost the whole PS. It should be noted that in almost all cases, with the exception of graph 1, one point is repeated several times (from 4 to 91), indicating that those values are reached by many individuals.
To clarify the results, Table 2 links each graph with its corresponding PS figure, indicating the execution time of the MOEA and minimum and maximum values related to the two objectives in the PSs. In all cases, the execution time is quite similar with a mean value of 119.44 seconds. The minimum execution time is achieved in graph 5 and the longest execution time in graph 8. As observed in Table 1, the number of vertices in the manufacturing graphs, therefore the length of the permutations in the solution spaces, are the lowest and the highest for the graphs 5 and 8, respectively. Accordingly, the execution time of the problems is related to the length of the individuals in the solution space. The minimum and maximum values of the two objectives for all the PSs are also indicated in the table.
This analysis suggests it is feasible to compute the optimization before manufacturing a part, as the computation times shown here are affordable. Although the algorithm offers more than one choice for each part, the user can select the most appropriate solution in the PS according to his/her criteria. For example, depending on the material or geometry, one objective function may be more critical than another, and the user can select the solution with minimum value in the preferred criterion. Moreover, the minimum and maximum values of the two objectives indicate the limits of the solutions obtained in the PSs. Solutions that are better than the minimum one will not be reached, nor will solutions that are worse than the maximum one. For illustrative purposes, a solution with the minimum waiting time in the PS for graph 1 is the following: x 1 = (4, 1, 8, 3, 5, 6, 2), where F 1 (x 1 ) = 99 and F 2 (x 1 ) = 1883.57. The solution translated to the sequence of adding options is shown in Equation (4).

V. CONCLUSIONS
This investigation introduces a sequence strategy generation problem for DED processes and proposes a mathematical framework to model it based on a critical review of the previous work. It applies the problem for a benchmark of ten parts in PAW technology. The results show that this approach can be applied to parts with different characteristics, for example, a different number of beads and geometry. The PSs are obtained in affordable execution times, thus offering the opportunity to select the most appropriate tool-paths in each case. This study reveals the need to go deeper into the tool-path problem in DED and to extend the proposed framework to specific characteristics of other DED processes, and to the automatic generation of the M S given specific PDG. The proposed novel problem can be solved using a preference-based evolutionary algorithm, where, at each iteration, the decision maker is asked to give preference information in terms of optimality.