10

Click here to load reader

Using artificial neural networks to solve the orienteering problem

Embed Size (px)

Citation preview

Page 1: Using artificial neural networks to solve the orienteering problem

Annals of Operations Research 61 (1995) I I 1 - 120 111

Using artificial neural networks to solve the orienteering problem

Qiwen Wang a), Xiaoyun Sun b), Bruce L. Golden b) and J iyou Jia a)

a) College of Business and Management, Beijing University, Beijing 100871, PR China

b)College of Business and Management, University of Maryland, College Park, MD 20742, USA

In the orienteering problem, we are given a transportation network in which a start point and an end point are specified. Other points have associated scores. Given a fixed amount of time, the goal is to determine a path from start to end through a subset of locations in order to maximize the total path score. This problem has received a considerable amount of attention in the last ten years. The traveling salesman problem is a variant of the orienteering problem. This paper applies a modified, continuous Hopfield neural network to attack this NP-hard optimization problem. In it, we design an effective energy function and learning algorithm. Unlike some applications of neural networks to optimization problems, this approach is shown to perform quite well.

1. Introduction

In the orienteering problem (OP), we are given a transportation network in which a start point and an end point are specified. Other points have associated scores. Given a fixed amount of time, the goal is to determine a path f rom start to end through a subset of locations in order to maximize the total path score.

Le t P be the set of points and L be the set o f edges or lines between points in P. The graph G = {P, L} is a complete graph. Each point i in P has a score S(i) > 0 associated with it. The starting point is point 1 and the end point is point N, and each of these points has a score of zero. Each edge in L has a symmetric , nonnegat ive cost d(i, j) associated with it, where d(i, j) is the distance between point i and point j , or d(i, j) is the cost of traveling between the two points. For the OP, we need to find a path that starts at point 1 and finishes at point N such that the score amassed f rom the visited intermediate points is maximized. Each point can be visited at most once and the total distance traveled cannot exceed the specified limit D. We point out that the traveling salesman problem (TSP) is a special case where D is just large enough and the start and end locations coincide.

© J.C. Baltzer AG, Science Publishers

Page 2: Using artificial neural networks to solve the orienteering problem

112 Q. Wang et al., Using artificial neural networks

The OP can be used to model many practical problems. Golden et al. [3] use the OP in the solution of a subset selection subproblem for a large inventory/routing problem. In particular, they model the delivery of home heating fuel as an OP. The urgency of a customer's request for fuel is treated as a score and the distribution manager must select a subset of customers to service each day. Keller [6] treats the OP as a special case of the multi-objective vending problem in which the decision maker must trade off maximizing reward potential by visiting as many points as possible and minimizing travel cost by visiting as few points as possible. See Chao [1] for additional potential applications.

Most of the research into solution methods for the OP has occurred over the last ten years or so. Heuristic approaches (using more or less traditional operations research (OR) techniques) have been developed by Tsiligirides [15], Golden et al. [4,5], Keller [6], Sokkappa [14], Ramesh and Brown [12], and Chao [1]. Leifer and Rosenwein [8] find a tight upper bound on the optimal objective function value. Exact solution methods (using branch and bound ideas) have recently been presented by Laporte and Martello [7], Sokkappa [14], Ramesh et al. [13], and Pillai [10]. In general, the exact procedures are only capable of solving relatively small problems, whereas the heuristics can be applied to larger problems.

2. Neural network representation

In this paper, we approach the OP from a neural network perspective. The neural network model presented here is similar to the model presented by Wang et al. [16] for the two-dimensional cell suppression problem. The key question that we seek to answer is: Can the neural network approach compete with the traditional OR heuristic approaches developed over the past decade?

We conceptualize the neural network as an N by N + 1 matrix of neurons or nodes. Each row corresponds to a particular point, while each column corresponds to a particular position in the path from start to end. By definition, v(i, j) is the state or activation level of the i, j node. At the completion of our computations, each v(i , j) is either 0 or 1. F o r j <N, if v( i , j )= 1, then point i is the j th point visited in the path. We can set v(1, 1) = v(N, N) = 1. Column N + 1 is used to calculate the total path score. That is, if v(i, N + 1) = 1, then point i is in the path; if v(i,N + 1) = 0, then point i is not included in the path.

3. The energy function

One of the key obstacles to overcome in the building of a Hopfield-like neural network is the formulation of the energy function (see Potvin [11]). The standard form of the Hopfield network includes a quadratic energy function and constant link weights. The energy function that we propose is a fourth order convex function. The weights are not constant, as they depend on the current state of the neural network.

Page 3: Using artificial neural networks to solve the orienteering problem

Q. Wang et al., Using artificial neural networks 113

In particular, each weight is the second partial derivative of the energy function with respect to a state (as in the Hopfield network). The energy function, denoted by E, is shown below:

where

a b E = ~ ~. ~ .v( i , j )v(h , j )+-~ ~ . v ( i , j ) - N I j h~ i j

+ -~ • H ~., ~.~ d(i, h) v(i, j) v(h, j + 1) - D j h

+ r [ 2 - v ( 1 , 1 ) - v ( N , N ) l + g ~ v ( i , N + l ) , l - ~ v ( i , j ) i j

N

- f ~ S ( i ) • o ( i , N + l ) , i

(1)

= I x2 i fx > 0, H(x) [ 0 otherwise.

At this point, we seek to motivate the proposed energy function, which consists of six terms. Each term has an associated constant coefficient. The neural network tries to minimize E.

With respect to the "a" term, the goal is to penalize any column with more than one activated node, since only one point can be the j th point in a path. The "b" term seeks to ensure that the number of activated nodes will be equal to N, one for each column. Note that if fewer than N nodes are in the path, then some rows will have a string of consecutive activated nodes. This follows from the minimization of E. This is a bit subtle and requires some explanation. Consider three possible solutions to a hypothet ical geometr ic problem with N = 5: (i) 1 - 3 - 2 - 3 - 5 , (ii) 1 - 3 - 3 - 2 - 5 , and (iii) 1 - 2 - 3 - 3 - 5 . We observe that all three solutions have the same energy function except for the "c" term and that the distance from a node to itself is zero. All other distances are positive. Suppose the route length r for solution (i) exceeds D. The route lengths for solutions (ii) and (iii) are shorter than r and may be less than D. Therefore, solutions (ii) and (iii) may be local minima, but solution (i) is not. Nodes are added to the route until either all nodes are included or a string of consecutive activated nodes becomes necessary. The "'c" term is designed to prevent the total path length from exceeding D units. The path is encouraged to start at point 1 and end at point N by the "~" term. The "g" term sets v(i,N+ 1 ) = 0 if point i is not in the path. Finally, the '~f" term is used to maximize the total score, since v(i, N + 1) = 1 if point i is in the path.

Page 4: Using artificial neural networks to solve the orienteering problem

114 Q. Wang et al., Using artificial neural networks

DISCRETE-TIME DYNAMICS

At the heart of our neural network procedure is the updating of neuron (node) states. For each node in the neural network, we let I be the input and u = I/(1 + e -t) be the output. For node i, j, we use asynchronous updating of states (that is, we change the state of one node at a time) via the formula

- 3 E AI(i, j) - 3v(i, j~ At, (2)

where At represents the time step. From the chain rule, we have

Substituting from (2) yields

DE 3E 3u 31 ~t ~u c3I /)t"

(3)

~t - 3v 31 " (4)

= - ~,~v) t, g t ) < 0. (5)

The inequality in (5) follows since Ov13I > 0. The result is that the updating rule in equation (2) ensures that energy decreases over time, when the step At is small enough.

The partial derivative of energy with respect to v(i,j) is given below:

where

3 ~ , j ) a v(h,j) +b v ( h , k ) - N

+ c . K ~_~ ~d ( p ,h ) u ( p , q ) v ( h , q + l ) - D • Q(i,j) p q h

- r " S ( i , j ) + g . L ( i , j ) - f . M ( i , j ) ,

J" x i fx > 0, K(x)

0 otherwise,

(6)

Q(i, j) = {

~,~d(i, h) Iv(h, j - 1) + v(h, j + 1)]

Z~d(i, h) u(h, j - 1)

Y~d(i, h) v(h, j + 1)

i f l < j < N ,

i f j = N,

i f j = l ,

Page 5: Using artificial neural networks to solve the orienteering problem

Q. Wang et al., using artificial neural networks 115

1 if (i, j ) = (1, 1) or (N, N),

t~(i,j) = 0 otherwise,

{ 1 - ~ , ~ v ( i , h ) i f j = N + l ,

L ( i , j ) = - v ( i , N + l ) i f j < N ,

S(i) if j = N + I ,

M ( i , j ) = 0 i f j < N .

4. State updating algorithm

At this point, we are ready to present a basic version of the neural network procedure. The parameter settings work well for all test problems considered in this paper. Essentially, the algorithm applies gradient descent in order to obtain a local minima to the energy function. The steps are provided below.

Step 1.

Step 2.

Step 3.

Step 4.

Initialization:

(a) Initial states for all nodes are set to random values between 0 and 0.5.

(b) Parameter settings, a = b = l , c = 2 0 , 7'=10, g = 2 0 , f = 1 5 , A t = l , A/cnt = 2, THRESHOLD = 0.5.

Randomly select one row or column,

From all nodes in this row or column, select the one with the largest I~E/3v(i , j ) l . This identifies a state such that a small change in value will cause a large change in the total energy.

Let l(i,j)[t] and v(i,j)[t] be the current inputs and outputs. Then the new state of node i , j is calculated as follows:

where

l(i, j ) [t + At] = l(i, j ) [t] + Al(i , j) ,

1 t~(i,j)[t + At] = 1 + e - I ( i ' j ) [ t + A t ] '

- DE Al(i , j ) = ,---------7 At,

)j~v( i,

l(i, j ) [t] = In{v(/, j ) [t]} - ln{1 - o(i, j ) [t] }.

Step 5. If I Al( i , j ) l < A/crit three times in succession or a maximum number of updates has been reached, go to step 6 (in such a case, we view the system as having stabilized at or near a local minima). Otherwise, go to step 2.

Page 6: Using artificial neural networks to solve the orienteering problem

116 Q. Wang et al., Using artificial neural networks

Step 6.

Step 7.

Step 8.

Step 9.

Step 10.

For all i, j, if v(i, j ) > THRESHOLD, then set v(i, j ) to 1. If more than one o(i, j) > THRESHOLD in a column, then set only the largest one to 1. Set all other v(i, j) to 0.

Find the path that corresponds to the given state matrix. Apply the 2-opt heuristic (see Croes [2] and Lin [9] for details) to improve the path.

Examine the path. If the length is less than D units, we try to add nodes, one at a time, to the path via cheapest insertion. If the length is greater than D units, we drop the point from the path with the largest ratio of distance saved to score and repeat until the path length constraint is satisfied. Store the solution if it is the best obtained so far.

Adjust the state matrix to reflect the new path. Perturb the state matrix slightly. Increase the value of f if the solution before step 8 was feasible in order to focus on optimization. Otherwise, if the solution before step 8 was infeasible, decrease f in order to satisfy the total path length restriction. If the number of repetitions in the iteration is less than a prespecified limit, go to step 2.

If the iteration number is less than a prespecified limit, go to step 1 for reinitialization. Otherwise, stop.

5. Computational results

The neural network algorithm was coded in Turbo-C and implemented on an IBM-PC 486-DX33. We examined four sets of test problems. These sets involve 32, 21, 33, and 32 points and are derived from the problems studied first by Tsiligirides [15]. Taking into account the different values of D for each set, our neural network approach is tested on a total of 67 problems taken from the literature. Problem data and a careful computational comparison of traditional OR heuristics are provided by Chao [1].

Computational results are presented in tables 1-4 . In each table, the first column provides the values of D. In the second column, marked T, the scores from Tsiligirides' stochastic algorithm are given. The third column, C, records the scores from Chao's heuristic, which is currently the most effective heuristic for the OP and consistently generates optimal or near-optimal solutions. The neural network (NN) scores are shown in the fourth column and corresponding CPU times (in minutes) can be found in the fifth column.

For each of the 67 problems tested, we used the same set of parameter values, and ran 10 iterations (see step 10) of two repetitions (see step 9) each for a total of 20 passes through the algorithm. None of the problems required more than 2 minutes and 16 seconds of CPU time. We do not list CPU times for the other two heuristics due to the fact that different computers were used. In particular, Chao's heuristic was

Page 7: Using artificial neural networks to solve the orienteering problem

Q. Wang et al., Using artificial neural networks 117

Table 1

Comparison of results on problem set 1.

D T C NN CPU

5 10 10 10 0.23 I0 15 15 15 0.30 15 45 45 45 0.43 20 65 65 65 0.32 25 90 90 90 0.58 30 110 110 110 0.58 35 135 135 135 0.60 40 150 155 155 0.63 46 175 175 175 0.63 50 190 190 190 0.63 55 205 205 205 0.65 60 220 225 225 0,63 65 240 240 240 0.73 70 255 260 260 0.72 73 260 265 265 0.88 75 270 270 270 1.08 80 275 280 280 1.17 85 280 285 285 1.77

Table 2

Comparison of results on problem set 2.

D T C NN CPU

15 120 120 120 0.13 20 190 200 200 0.15 23 205 210 205 0.17 25 230 230 230 0.15 27 230 230 230 0.17 30 250 265 265 0.17 32 275 300 300 0.18 35 315 320 320 0.17 38 355 360 360 0.17 40 395 395 395 0.23 45 430 450 450 0.35

run on a SUN 4/370. However, rough comparisons are possible and they indicate that the neural network approach is faster than Chao's heuristic (at least insofar as both procedures are currently coded).

From tables 1 - 4, we see that the neural network approach clearly dominates Tsiligirides' stochastic algorithm. Furthermore, it generates the same solution values

Page 8: Using artificial neural networks to solve the orienteering problem

118 Q. Wang et al., Using artificial neural networks

Table 3

Comparison of results on problem set 3.

D T C NN CPU

15 100 170 170 0.47 20 140 200 200 0.57 25 190 260 250 0.62 30 240 320 320 0.65 35 290 390 390 0.72 40 330 430 420 0.67 45 370 470 470 0.70 50 410 520 520 0.70 55 450 550 550 0.70 60 500 580 580 0.70 65 530 610 610 0.70 70 560 640 640 0.70 75 590 670 670 0.83 80 640 710 700 1.02 85 670 740 740 1.12 90 690 770 770 1.53 95 720 790 790 2.25

100 760 800 800 2.20 105 770 800 800 2.28 110 790 800 800 2.27

Table 4

Comparison of results on problem set 4.

D T C NN CPU

5 10 10 I0 0.25 10 15 15 15 0.30 15 45 45 45 0.43 20 65 65 65 0.55 25 90 90 90 0.58 30 110 110 110 0.60 35 135 135 130 0.60 40 150 155 155 0.62 46 175 175 175 0.60 50 190 190 190 0.62 55 205 205 205 0.67 60 220 220 220 0.65 65 240 240 240 0.67 70 255 260 260 0.75 73 260 265 265 1.00 75 270 275 275 1.00 80 275 280 280 1.75 85 280 285 285 1.93

Page 9: Using artificial neural networks to solve the orienteering problem

Q. Wang et al., Using artificial neural networks 119

as Chao's heuristic in 62 of 67 cases. In the 5 cases (in bold) where it is outperformed by Chao's heuristic, the difference is small. On the test problems considered, the neural network approach never performs poorly.

6. Conclusions

As far as we know, this paper is the first one to propose a neural network algorithm for the orienteering problem. The algorithm is more or less competitive with the best known of the handful or so of traditional OR heuristics that have been suggested over the past decade, both with respect to accuracy and running time.

In our view, the success of the neural network approach stems from several sources. First, the notion of representing node i , j by a neuron is natural and the definition of each link is clear. Second, the energy function is more sophisticated than in a traditional Hopfield neural network. In particular, it seems to capture many of the key characteristics of the orienteering problem. Third, the model appears to be robust. Based on extensive experimentation, the only truly sensitive parameter is f (this is consistent with our previous experience [16]). Finally, the combination of a neural network model and traditional heuristics such as cheapest insertion and 2-opt is an essential factor in the success of the approach. In particular, the results would not have been competitive without the inclusion of 2-opt. We have embedded this combination of elements within a recurrent program structure in order to overcome the problem of having to guess key parameter values in advance.

Given the relative success of this specific application, we are hopeful that similar neural network models will be applied to other important combinatorial optimization problems in the future. In preliminary experiments, good solutions to traveling salesman problems have also been obtained using essentially the same energy function.

References

[1] I.M. Chao, Algorithms and solutions to multi-level vehicle routing problems, Ph.D. Dissertation, Applied Mathematics Program, University of Maryland, College Park, MD 0993).

[2] G.A. Crnes, A method for solving traveling-salesman problems, Operations Research 6(1958) 791-812.

[3] B. Golden, A. Assad and R. Dahl, Analysis of a large-scale vehicle routing problem with an inventory component, Large Scale Systems 7(1984) 181 - 190.

[4] B. Golden, L. Levy and R. Vohra, The orienteering problem, Naval Research Logistics 34(1987) 307-318.

[5] B. Golden, Q. Wang and L. Liu, A multifaceted heuristic for the odent~ering problem, Naval Research Logistics 35(1988)359-366.

[6] P.C. Keller, Algorithms to solve the orienteering problem: A comparison, Eurol~an Journal of Operational Research 41(1989)224-231.

[7] G. Laporte and S. Martello, The selective traveling salesman problem, Discrete Applied Mathematics 26(1990) 193-207.

Page 10: Using artificial neural networks to solve the orienteering problem

120 Q. Wang et al., Using artificial neural networks

[8] A.C. Leifer and M.S. Rosenwein, Strong linear programming relaxations for the orienteering problem, European Journal of Operational Research 73(1994)517-523.

[9] S. Lin, Computer solutions of the traveling salesman problem, Bell Systems Technical Journal 44 (1965 )2245 - 2269.

[10] R.S. Pillai, The traveling salesman subset-tour problem with one additional constraint (TSSP+I), Ph.D. Dissertation, The University of Tennessee, Knoxville, TN (1992).

[11] J.Y. Potvin, The traveling salesman problem: A neural network perspective, ORSA Journal on Computing 5(1993)328-348.

[12] R. Ramesh and K.M. Brown, An efficient four-phase heuristic for the generalized orienteering problem, Computers & Operations Research 18(1991)151-165.

[13] R. Ramesh, Y. Yoon and M. Karwan, An optimal algorithm for the orienteering tour problem, ORSA Journal on Computing 4(1992) 155-165.

[14] P.R. Sokkappa, The cost-constrained traveling salesman problem, Ph.D. Dissertation, The University of California, Livermore, CA (1990).

[15] T. Tsiligirides, Heuristic methods applied to orienteering, Journal of the Operational Research Society 35(1984)797-809.

[16] Q. Wang, X. Sun, and B. Golden, Neural networks as optimizers: A success story, in: Intelligent Engineering Systems Through Artificial Neural Networks: Volume 3, ed. C. Dagli, L. Burke, B. Fern¢mdez and J. Ghosh (ASME Press, 1993) pp. 649-656.