Angewandte Mathematik und Optimierung Schriftenreihe Applied Mathematics and Optimization Series AMOS # 12(2014)
Armin Fügenschuh, Matthias Knapp, and Hendrik Rothe
The Multiple Traveling Salesmen Problem with Moving Targets
Herausgegeben von der Professur für Angewandte Mathematik Professor Dr. rer. nat. Armin Fügenschuh Helmut-Schmidt-Universität / Universität der Bundeswehr Hamburg Fachbereich Maschinenbau Holstenhofweg 85 D-22043 Hamburg Telefon: +49 (0)40 6541 3540 Fax: +49 (0)40 6541 3672 e-mail:
[email protected] URL: http://www.hsu-hh.de/am Angewandte Mathematik und Optimierung Schriftenreihe (AMOS), ISSN-Print 2199-1928 Angewandte Mathematik und Optimierung Schriftenreihe (AMOS), ISSN-Internet 2199-1936
1
The Multiple Traveling Salesmen Problem with Moving Targets By Armin F¨ ugenschuh, Matthias Knapp, Hendrik Rothe Helmut Schmidt University / University of the Federal Armed Forces Hamburg
Abstract The multiple-weapons-to-multiple-targets assignment problem (MWMTAP) can be seen as a multiple traveling salesmen problem with moving targets (MTSPMT), where the weapons play the role of the salesmen, and the cities to be visited are the targets. Approaches in the literature for the MTSPMT include complexity results and approximation algorithms, where additional restrictions on the targets’ trajectories and velocities are imposed. Our approach is based on a discretization of the time, which leads to large-scale integer linear programming (ILP) problems, that need to be solved in very short time. Our computational studies on a set of test problems demonstrate, how many moving targets and salesmen can be handled, and how much solutions from a fast and simple first-come first-serve heuristic can be improved.
1. Introduction We consider the following multiple-weapons-to-multiple-targets assignment problem (MWMTAP). An area (for example, a military base or an airport) must be protected from hostile rocket, artillery, or mortar (RAM) fire. The flight time for a mortar shell is approximately 30 seconds, whereas the first 5-10 seconds are needed to radar-detect the shell and estimate its trajectory. Based on the estimated impact point the decision must be taken whether it needs to be destroyed. We assume that a battery of laser guns is deployed, where the guns are scattered over (or near) the protected area. Then it has to be decided which of the available guns to select for the countermeasure. Here it needs to be taken into account that a single laser gun cannot fire arbitrarily often without recharging the electric fuel cells. In our problem, the laser guns are electrified in a decentralized way, and the energy surplus at one laser gun cannot be shifted to another laser gun with a temporary shortage. Besides power issues, one tries to assign the closest laser gun to a target, where “close” does not refer to the physical distance, but to the angle the laser gun needs to traverse for aiming at the flying mortar shell. Furthermore, due to safety requirements, a laser should not shoot across the protected area. However, this rule will be neglected, if the destruction of the shell is impossible otherwise. The goal is to destroy all incoming shells, preferable as early as possible (i.e., in minimum time). For more details on the application we refer to Knapp and Rothe, 2012. From a mathematical point, the MWMTAP is an online optimization problem, meaning that the data is not given in advance. In our study we initially solve it as an offline problem. Having developed a solution algorithm for the offline problem, it can be adapted to solve the online problem by a moving horizon approach, that is, the data is introduced to the (offline) algorithm at runtime, and the algorithm now needs to decide how to insert the new data to the already constructed solution, which means that this solution can be partially reverted.
The Multiple Traveling Salesmen Problem with Moving Targets
2
The offline variant of the MWMTAP belongs to the class of NP hard problems, since it contains other well-known NP complete problems as subproblems. For instance, the case of a single laser gun and multiple shells that do not move in the sky can be seen as an instance of the classical traveling salesman problem (TSP), which is known to be theoretically difficult, see Garey and Johnson, 1979. For a survey on the TSP we refer to Lawler et al., 1985 or Reinelt, 1994. The case of a single laser gun and multiple moving shells corresponds to a problem that was more recently described in the literature as the “traveling salesman problem with moving targets”, see Helvig et al., 1998, Helvig et al., 2003, Jiang et al., 2005, Jindal et al., 2011, Liu, 2013. In the solution approaches presented there, several restrictive assumptions are made, for example, all targets move on straight lines in two dimensions at constant velocity. We present a computational approach that does not impose such restrictions. The moving targets can move in three dimensions, and also with varying acceleration and on arbitrary trajectories (although parabola-shaped trajectories would be sufficient for our application). The targets also do not necessarily need to travel from or to the same origin or destination, as in some of the existing approaches. Furthermore, we can handle the case of one as well as several salesmen (i.e., laser guns). Our approach is to discretize the time by introducing a (small) time step. Then we are able to formulate the problem as a mixed-integer linear programming problem on a timeexpanded graph. This formulation is of enormous size (in terms of number of variables and constraints), but still modern standard integer linear (ILP) solvers (such as IBM ILOG CPLEX or Gurobi) can deal with them to some extent. We describe two variants of a first-come-first-serve assignment strategy, and show on a test set of problems how much an ILP can improve these solutions within a real-time setting. Here we impose a time limit of 3 seconds, and report the ILP gap of the best available solution compared to the respective lower bound. As a more theoretical approach, we further let the solver run until a proven global optimal solution is computed. For larger instances, this would take up to several hours. Although not practically meaningful today, it reveals the potential of faster computers and more advanced solution techniques on this problem.
2. A Mathematical Model We introduce some notation to formulate the MTSPMT as an optimization problem. We assume a finite time horizon [0, . . . , T ]. Let V = {1, . . . , n} be a set of nodes (cities in the MTSPMT, targets in the MWMTAP) and A ⊆ V × V be a set of arcs (roads in the MTSPMT, gun movements in the MWMTAP). Let W = {1, . . . , w} be a set of salesmen (weapons in the MWMTAP). The time (or distance) for traveling from node i to node j for salesman k at time t is given by the function ci,j,k : [0, . . . , T ] → R+ ∪ {∞}. That is, ci,j,k (t) denotes the travel time (distance) between i and j when salesman k arrives at j at time t. In the MWMTAP the targets are only visible within a certain time window, and thus we have ci,j,k (t) = ∞ for all t outside this window. The goal is to assign exactly one salesman from W to each node V such that the sum of all traveled times of all salesmen (that is, the movements of the weapons for aiming at the targets) is minimal. In order to give an ILP formulation of the MTSPMT, we introduce a time discretization. To this end, let m be an integer number. Then the step size is defined by ∆ := T /m. The set of all time steps is T := {0, . . . , m}. The distance function c is only evaluated at the discrete points in time defined by t` := ` · ∆. As abbreviation we set c`i,j,k := ci,j,k (t` ). ` The travel time t is aligned to discrete time steps by δi,j,k := dc`i,j,k /∆e. Denote by Lk the number of nodes that can be visited within each hk consecutive time steps by k ∈ W.
HEURISTIC SOLUTIONS TO THE MODEL
3
We introduce a family of binary decision variables x`i,j,k ∈ {0, 1}. Here x`i,j,k = 1 shall represent the decision of sending traveling salesman k from i to j, arriving in j at time step ` (i.e., at time t` ). The objective is to minimize the total time for all movements of all salesmen: X X X c`i,j,k x`i,j,k → min . (2.1) k∈W (i,j)∈A `∈T
The following constraints are imposed. Each node must be visited exactly once by exactly one salesman: X X X x`i,j,k = 1, ∀ j ∈ V. (2.2) k∈W i:(i,j)∈A `∈T
The following flow conservation constraints ensure the compatibility of the time flow: X X `+δ ` x`i,j,k = xj,i,kj,i,k , ∀ j ∈ V, k ∈ W, ` ∈ T . (2.3) i:(i,j)∈A
i:(j,i)∈A
At each point in time, each salesman can do at most one trip: X x`i,j,k ≤ 1, ∀ k ∈ W, ` ∈ T .
(2.4)
(i,j)∈A
If energy consumption is crucial, then we can limit the number of visits per salesmen within a certain time period: X t+h Xk
(i,j)∈A `=t
x`i,j,k ≤ Lk ,
∀ k ∈ W, t ∈ T , t ≤ |T | − hk .
(2.5)
Summing up, we aim to solve the following optimization problem: min{(2.1) | (2.2), (2.3), (2.4), (2.5), x ∈ {0, 1}A×W×T }.
(2.6)
3. Heuristic Solutions to the Model We solve model (2.6) by addressing it from two sides. First, we develop a primal heuristic that assigns targets to salesmen on a first-come first-serve basis. Then we compute a dual bound by solving the LP relaxation of (2.6). The dual bound is further improved by adding cutting planes and a branch-and-bound procedure. The primal solution here serves as a first initial upper bound, which is replaced, if further integer feasible solutions are found. Our heuristic assigns targets to the salesmen on a first-come, first-serve (or first-in, first-out, FIFO) strategy. We implemented this basic strategy in two variants. Least Time. Each target is defined by a lower and an upper bound in time. It has to be visited by exactly one of the salesmen in that period. From the list of unassigned targets we select the one that emerges first. Then we compute the distances and travel times from all salesmen. We assign the target to that particular salesman that is able to be at the target at the earliest possible point in time, even if he needs to travel a longer distance compared to other salesmen nearby. This salesman is now prohibited from further assignments until he has reached his destination. After that, he is free for the next assignment. Least Distance. In this variant, we select the target that emerges earliest in each step of the heuristic. We then check for each salesmen if he can intercept the target at all, and at what point in time he would have to travel the least distance. We then assign the target to that particular salesman that has to travel the least distance.
The Multiple Traveling Salesmen Problem with Moving Targets
4
Since both heuristics are very fast, we can allow to run them both. It turns out that the first strategy (least time) is more robust in terms that it more often finds a feasible solution. The second strategy (least distance) in many cases is not able to find a feasible solution. It focuses on the traveled distances too much, so that the salesmen wait too long and, as a result, are not able to catch later targets. However, if it does find a feasible solution, it in principle is better than the one found by the ’least time’ strategy.
4. Computational Results We applied our method described above to a set of randomly generated test problems. We created a total of 36 instances of different sizes, which can be found in Table 1. An instance is generated by specifying the number of lasers/salesman (column ’ns’ in Table 1) and the number of targets (column ’nt’). Motivated by our application, we chose values between 1 and 3 for the salesmen and 6 to 24 for the moving targets. The targets are assumed to have a constant traveling speed (column ’st’). The salesmen have a maximum traveling speed (column ’ss’), and their actual traveling speed can be any value less or equal to the maximum speed. In particular, waiting is also permitted for the salesmen. We tested three different combinations of target and salesmen speed: 20-200 (slow targets, fast salesmen), 40-100 (slightly faster targets, slightly slower salesmen), and 60-60 (targets and salesmen traveling at the same speed). The values refer to the number of length units that are traversed per time unit. In all instances, the salesmen start their tours in an initial “home” location, based at the center of the operating space, which is a square of size 500 length units. The trajectories of the targets are straight lines of random lengths between 100 and 400 length units. The method, however, is capable to handle also non-linear trajectories. The size of the resulting ILP models is shown in the next three columns of Table 1: ’var’ refers to the number of (binary) decision variables, ’cons’ shows the number of linear constraints, and ’nz’ gives the number of nonzero entries in the constraint matrix of the problem. We apply the two variants of the first-come, first-serve heuristic assignment strategy, and if both produce feasible solutions, we take the one with the lower objective function value. The resulting value is shown in column ’fcfs’. The are no CPU times reported for the heuristic runs, because they solve each problem in virtually no time. Our computational experiments were carried out on a MacBook Pro laptop running the MacOS operating system with an Intel Core 2 Duo running at 2.33 GHz on 2 cores, 4 MB L2 cache, and 3 GB 667 Mhz DDR2 SDRAM. As solver for the ILPs we used CPLEX 12.5.0.1 (IBM ILOG CPLEX, 2013). The relative duality gap (i.e., the difference between upper and lower bound divided by the primal bound) was set to 0.0%. Other than that we used the solver’s default settings. We use the heuristics’ results as starter for the ILP branch-and-cut process. We solve each model twice, once with a three seconds time limit and once with unlimited time. The objective function value of the best solution found after three seconds is given in column ’sol3s’, and the remaining ILP gap can be found in column ’gap3s’; its value is computed as gap3s = (sol3s − lb3s)/sol3s · 100%, where lb3s is the dual (lower) bound value after three seconds. As one can see, in 28 of the 36 instances, the ILP solver was able to find a better solution that requires less movements from the salesmen. In 25 out of 36 instances, the solver was even able to prove that its solutions were indeed global optimal. For curiosity reasons, we raised the time limit to infinity and solved each instance to proven optimality. The objective function values of the global optimal solutions are shown in column ’opt’, and the corresponding computation times can be
COMPUTATIONAL RESULTS
5
name ns nt st ss
var
cons nz
fcfs
sol3s
gap3s opt
time
inst1 inst2 inst3 inst4 inst5 inst6 inst7 inst8 inst9 inst10 inst11 inst12 inst13 inst14 inst15 inst16 inst17 inst18 inst19 inst20 inst21 inst22 inst23 inst24 inst25 inst26 inst27 inst28 inst29 inst30 inst31 inst32 inst33 inst34 inst35 inst36
1481 809 299 8546 2285 1673 16331 6759 3280 27731 9508 6057 2878 1382 510 16226 4172 3104 31670 12940 6232 53952 18364 11648 4323 1551 537 23808 6033 4455 45963 18591 8877 78555 26727 17166
93 84 90 192 156 193 268 252 271 353 303 377 168 136 114 348 228 262 472 390 364 606 448 490 249 180 144 498 321 333 669 528 459 858 606 630
1430.23 1045.43 1198.77 3171.24 2744.64 3368.57 5411.91 3702.96 3923.58 7693.2 5547.78 7254.22 675.74 702.77 797.56 3070.92 1504.71 3101.39 2778.69 2270.65 2240.76 4283.03 4001.87 3927.98 599.16 614.81 726.17 2851.89 1455.93 1236.92 2211.31 1830.64 2419.62 5565.25 2369.76 2478.72
905.6 962.86 1142.19 3171.24 2664.37 2729.2 3605.82 3503.4 3652.0 7693.2 5174.88 4703.86 576.63 697.7 634.96 3070.92 1315.64 1307.79 2778.69 1584.84 2108.52 4283.03 2890.95 3147.53 516.44 570.61 668.74 1200.74 1111.46 1058.12 2211.31 1392.47 1963.98 5565.25 2369.76 1785.85
0.0 0.0 0.0 51.52 0.0 0.0 39.34 0.0 0.0 97.96 0.0 0.0 0.0 0.0 0.0 66.43 0.0 0.0 52.09 0.0 0.0 99.99 3.36 0.0 0.0 0.0 0.0 15.2 0.0 0.0 42.31 0.0 0.0 99.99 21.76 0.0
0.18 0.04 0.01 7.72 0.22 0.23 29.0 0.92 0.24 36.26 1.2 0.63 1.2 0.32 0.12 5.09 0.12 0.08 37.29 1.12 0.28 1878.76 9.33 4.28 0.13 0.06 0.2 9.5 0.59 0.15 33.56 3.19 1.78 8958.26 7.56 1.9
1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3
6 6 6 12 12 12 18 18 18 24 24 24 6 6 6 12 12 12 18 18 18 24 24 24 6 6 6 12 12 12 18 18 18 24 24 24
20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60 20 40 60
200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60 200 100 60
5863 3192 1170 34046 9069 6632 65137 26917 13040 110682 37893 24116 11394 5444 1988 64632 16546 12296 126308 51524 24768 215326 73180 46368 17115 6087 2070 94836 23931 17646 183303 74016 35268 313506 106497 68334
905.6 962.86 1142.19 1788.88 2664.37 2729.2 2990.03 3503.4 3652.0 4403.24 5174.88 4703.86 576.63 697.7 634.96 1100.37 1315.64 1307.79 1531.42 1584.84 2108.52 2615.41 2890.91 3147.53 516.44 570.61 668.74 1099.27 1111.46 1058.12 1372.44 1392.47 1963.98 1939.96 1968.44 1785.85
Table 1. Instances, problem sizes, heuristic and exact solutions.
found in column ’time’. It turns out that those instances where the targets are slow and the salesmen are fast are particularly difficult for the ILP solver. These instances have the longest total time horizon, and due to the potential speed of the salesmen the largest amount of possible tours for the salesmen. This results in problem instances with a high number of binary variables, and leaves a higher burden in finding an optimal combination to the ILP solver. For one of the instances in our test set, we graphically compare the solutions found by the heuristic and the exact method. The left image in Figure 1 shows the result of the first-come first-serve assignment. The two salesmen are initially located at the center of the image, from where they start their tours. For the lasers in the application that would mean that both lasers are located in the same position, and initially point in the same
The Multiple Traveling Salesmen Problem with Moving Targets 9 30
29
28
3
30
29
28
3
50
8 6
47
48
7
6 0 4
5
10 49
50
7
6 20 21
47
48
6 4
21
5
38
3 2
37
25
2
22
37
25
9
9
23
23 36
24
36 24
24 48
15 7 23 2618
16
1 178 25
11 63 64
60
7 23
16
1 178 25
46 4 45
5
49
48
43
47 21
42
63
60 61
11 50
35
47
23
24
44
62
51
48
15
22
61
44 43
24
2618
46 4 45
42
35
47
23
24
22
21
7
6 0
38
2
22
7
20
3 2
33
32
31
8 6 10 49
6
9 33
32
31
62
51
50
5
49
48
47
64
Figure 1. Instance 18. Left: heuristic solution, right: exact solution.
direction. The tours of the salesmen in these images correspond to angles of the lasers pointing in the sky. Note that our methods can still be applied, if the lasers are installed in different positions and point in different directions. According to Table 1 the heuristic has an objective function value of 3101.39 units. On the right image of this figure, the global optimal solution is depicted. It was found after 0.08 seconds and has an objective function value of only 1307.79 units. So the necessary movements could be reduced in this particular case by almost 60%.
5. Conclusion We gave an integer programming formulation for the multiple traveling salesmen problem with moving targets that is based on a discretization of time. It turns out that modern ILP solvers are able to solve instances of relevant size for a weapon-to-target assignment problem in reasonable short time (less than three seconds). The solutions often are already global optimal. In many cases, the best feasible solution that was found after three seconds improves the one that was found by a first-come first-serve heuristic. REFERENCES Garey, M. R. and Johnson, D. S. (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, New York. Helvig, C., Robins, G., and Zelikovsky, A. (1998). Moving-Target TSP and Related Problems. In G. Bilardi, G. F. Italiano, A. P. and Pucci, G., editors, Proceedings of the European Symposium on Algorithms, volume 1461 of Lecture Notes in Computer Science, pages 453 – 464. Springer Verlag, Berlin. Helvig, C., Robins, G., and Zelikovsky, A. (2003). The moving-target traveling salesman problem. Journal of Algorithms, 49(1):153 – 174. IBM ILOG CPLEX (2013). Information available at http://www.ibm.com/software/ integration/optimization/cplex/. Jiang, Q., Sarker, R., and Abbass, H. (2005). Tracking moving targets and the non-stationary traveling salesman problem. Complexity International, 11:171 – 179. Jindal, P., Kumar, A., and Kumar, S. (2011). Multiple Target Intercepting Traveling Salesman Problem. International Journal on Computer Science and Technology, 2(2):327 – 331. Knapp, M. and Rothe, H. (2012). Concept for Simulating Engagement Strategies for C-RAM Systems using Laser Weapons. In Proceedings of the DMMS. Lawler, E., Lenstra, J., Rinnooy, A., and Shmoys, D. (1985). The Traveling Salesman Problem: a Guided Tour of Combinatorial Optimization. John Wiley and Sons, Chichester, New York. Liu, C.-H. (2013). The Moving-Target Traveling Salesman Problem with Resupply. Technical report, The National Chung Cheng University Library, http://ccur.lib.ccu.edu.tw/handle/987654321/7877. Reinelt, G. (1994). The Traveling Salesman: Computational Solutions for TSP Applications. Springer Verlag, Berlin.