A LP-based heuristic for a time-constrained routing problem

A LP-based heuristic for a time-constrained routing problem

European Journal of Operational Research 173 (2006) 120–124 www.elsevier.com/locate/ejor Discrete Optimization A LP-based heuristic for a time-const...

116KB Sizes 4 Downloads 150 Views

European Journal of Operational Research 173 (2006) 120–124 www.elsevier.com/locate/ejor

Discrete Optimization

A LP-based heuristic for a time-constrained routing problem Pasquale Avella

a,*

, Bernardo DÕAuria b, Saverio Salerno

c

a

b

Departimento di Ingegneria, Research Center on Software Technology, Universita` del Sannio, Corso Garibaldi 107, 82100 Benevento, Italy Dipartimento di Ingegneria dell’Informazione e Matematica Applicata, Universita` di Salerno, Via Buonarroti 12, 00185 Roma, Italy c Centro di Ricerca in Matematica Pura e Applicata, Universita` di Salerno, Via Ponte Don Melillo, 84084 Fisciano (SA), Italy Received 4 August 2000; accepted 14 September 2004 Available online 23 March 2005

Abstract In this paper we present a LP-based heuristic for the solution of a Time Constrained Routing problem arising from innovative services accessible via World Wide Web. The problem consists of scheduling the visit of a tourist to a given geographical area in order to maximize his satisfaction degree whilst respecting time windows restrictions. We refer to this problem as the Intelligent Tourist Problem (ITP). ITP is formulated as a Set Packing problem with side constraints. Due to the huge number of variables in the formulation, the LP-relaxation is solved by a ‘‘column-and-row generation’’ approach. Then we run a MIP solver over the active columns to get a feasible solution. Computational experience on real-world instances is reported showing the effectiveness of the proposed approach. Ó 2005 Published by Elsevier B.V. Keywords: Time constrained routing; Set packing; Column-and-row generation

1. Introduction We present a LP-based heuristic for the solution of a Time Constrained Routing Problem arising from innovative services accessible via World Wide Web. The problem consists of adding ‘‘intelligent’’ functionalities onto a geographical data*

Corresponding author. E-mail address: [email protected] (P. Avella).

0377-2217/$ - see front matter Ó 2005 Published by Elsevier B.V. doi:10.1016/j.ejor.2004.09.055

base: starting from a user profile built by Artificial Intelligence techniques, it suggests how to design a tour that maximizes the satisfaction degree of the tourist. Given a geographic area, let I be a set of sites that can be visited by a tourist in a vacation period T. A ‘‘rating’’ vi is associated with each site i 2 I, measuring the ‘‘satisfaction’’ the tourist yields by visiting it. The rating is computed through Artificial Intelligence user profiling techniques.

P. Avella et al. / European Journal of Operational Research 173 (2006) 120–124

Other attributes associated with a site are the expected time of the visit, also computed on the base of the user profile, the time windows (date and time) the site can be visited within and the time windows for lunch, dinner and relaxation. A daily tour is a sequence of sites of I that can be visited in the same day, while respecting time restrictions for the visits of the sites, lunch, dinner and relaxation. We assume that every tour starts and terminates in the same base-station. Let J = {1, 2, . . . , n} be a family of daily tours. For any tour j 2 J, we denote by E(j)  I the sites visited in the tour and by rj the rating of the tour, defined as the sum of the ratings of the sites visited in the tour. A vacation period T is a set of days to be spent in tourism. We define a subset of tours Y  J feasible iff: (i) the same site is contained in no more than one tour of Y, i.e. jE(j) \ Ij 6 1, for each j 2 Y; (ii) jYj = jTj; (iii) a perfect matching exists between Y and T, i.e. each tour of Y can be assigned to a day of T and vice-versa.

121

tour to be selected for each day of the vacation period and vice-versa. The formulation of routing problems as Set Packing/Covering/Partitioning problems has been proposed in several papers [1,4,6,10]. Since the response time is a major issue in our application, we study an efficient LP-based heuristic for ITP. In fact, as the number of sites and the number of days of the vacation period increase, the formulation may become huge (about 100.000 columns for an instance with 50 nodes and 200.000 columns for an instance with 100 nodes) and the LP-relaxations cannot be solved by commercial LP packages. We propose a simple and effective alternative approach, based on column-and-row generation, for the solution of large-scale instances of ITP. The remainder of the paper is organized as follows. In Section 2 we describe the Set Packing formulation of the problem. In Section 3 we outline the solution algorithm. Finally in Section 4 we report computational experience on real-world instances.

2. Problem formulation For any feasible setPof tours Y we can compute a total rating rðY Þ ¼ j2Y rj . Given a set of daily tours J, the Intelligent Tourist Problem (ITP) consists of choosing a feasible set of tours Y  J maximizing r(Y). Due to the presence of time windows, ITP can be considered as a Time-Constrained Routing problem and, more precisely, as a special k-Traveling Salesman problem with Time Windows (k-ATSPTW). Time Constrained Routing Problems have been widely addressed in the literature. For detailed and exhaustive surveys we refer the reader to Desrosiers et al. [8] and to the comprehensive book by Toth and Vigo [13]. Local search heuristics for ATSPTW and kATSPTW have been proposed by Kindervater et al. [11] and by Saverlbergh [12]. For the exact algorithms, a cutting plane algorithm for ATSPTW has been proposed by Aschauer et al. [2]. We formulate ITP as a Set Packing problem, with additional constraints that force exactly one

Let J = {1, 2, . . . , n} be a set of daily tours. For any j 2 J, let rj be the rating of tour. We associate with each tour j a binary variable yj, that is 1 if the tour j is selected, 0 otherwise. The variable xjt assigns the tour j to the day t of the vacation period T (xjt = 1 if the tour j 2 J is assigned to the day t 2 T, xjt = 0 otherwise). For each tour j 2 J, let S(j)  T denote the set of the days of T when the tour j can be performed. For each site i 2 I, let D(i)  J denote the subset of the tours containing the site i. For each day t 2 T, let F(t)  J denote the subset of the tours than can occur in t. Let yj = 1 if the tour j 2 J is selected and let xtj = 1 if the tour j 2 J, is assigned to the day t, 0 otherwise. We formulate ITP as a Set Packing problem, with side constraints enforcing the condition that exactly one tour is selected for each day of the vacation period T and viceversa:

122

max

P. Avella et al. / European Journal of Operational Research 173 (2006) 120–124

X

rj y j ;

j2J

X

j2DðiÞ

yj ¼ X

i2V;

ð1Þ

xtj ;

j 2 J;

ð2Þ

xtj ¼ 1;

t 2 T;

ð3Þ

y j 6 1; X t2SðjÞ

j2F ðtÞ

y j 2 f0; 1g;

j 2 J;

xtj 2 f0; 1g;

t 2 T ; j 2 J:

Inequality (1) impose that each site is visited in at most one tour. Equality (2) impose that if tour j is selected, it must be assigned to one of the days t 2 S(j) where it is feasible. Equality (3) impose that exactly one tour must be selected for each day of the vacation period T. A preliminary computational experience on small-medium size ITP instances showed that the lower bound produced by the formulation (1)–(3) was always near-optimal and that few Branchand-Cut tree nodes were needed to yield the integer optimal solution. A main feature of our problem is that there is a natural restriction on the number of the sites that can be visited in the same day, determining that every tour is not too long, so that feasible tours can be enumerated. It follows that the bottleneck is the huge size of the LP-relaxation (50.000 columns for a problem with 50 sites and 100.000 for an instance with 100 sites) that, due to memory occupancy, cannot be solved in reasonable computation times by commercial LP-solvers on standard workstations.

LP-relaxations of the problem, followed by a Branch-and-Cut algorithm to yield a feasible solution. The overall solution approach consists of four steps: (i) tour generation, (ii) selection of an initial subset of columns (selection of the initial core problem), (iii) column-and-row generation to solve the LP-relaxation, and (iv) Branch-andCut on the final core problem to get a feasible solution. 3.1. Tour generation Tour generation consists of enumerating all the feasible tours, that are stored into a data-base. We enumerate the h-tuples of sites, with h 6 k. For every h-tuple we check whether its total rating is greater than a threshold value g. If the test is successful, we enumerate the sequences of the sites in each j. For each sequence that respects the time windows constraints we compute the total travel time. Simple dominance rules are used to speedup tour enumeration. A daily tour j is said feasible if and only if it satisfies the following properties: (a) the time windows for the visit of each site in the tour, and for lunch, dinner and relaxation are compatible with travel times among the sites and with the user time windows computed by AI techniques on the basis of his profile; (b) at least one of the days of the vacation period exists where it is feasible; (c) the rating of j, rj, is greater than a threshold value g, selected on the base of the values of the site ratings; (d) the total travel time does not exceed a threshold value h, selected according to the user profile. 3.2. Selecting an initial subset of columns

3. The algorithm The above considerations suggest that a LPbased solution approach would be effective to solve ITP. Unfortunately, as the number of potential sites and the size of the vacation period increase, the number of columns grows exponentially, and the LP-relaxation cannot be solved by commercial LP-solvers. To overcome this drawback we propose a column generation approach to solve large-scale

To define an initial subset of columns (initial core) H we select a subset of sites S  I with the best ratings and then, by a tour generation procedure, we build all the tours related to the sites on S. This procedure guarantees that a feasible solution exists. 3.3. Column-and-row generation step Given the initial set of columns H, some external columns yj, j 62 H have to be added in order to

P. Avella et al. / European Journal of Operational Research 173 (2006) 120–124

solve the LP-relaxation. The peculiarity is that for each column yi we also add the related xjt variables appearing in constraint (2) and hence we term the approach as ‘‘column-and-row generation’’ [5]. Let S be the set of the sites the core is defined on, and let H be the set of the k sites with best ratings external to S. The ‘‘column-and-row generation’’ step consists of generating the set L of the daily tours involving the sites in S  H. Then we add to the core problem all the yj, j 2 L, columns related to the tours in L joint with the columns xjt, t 2 S(j), j 2 L, associated with the days the tour j can be performed in, and the equality constraints. The following theorem, whose proof is straightforward, shows optimality conditions for the solution of the LP-relaxation. Theorem 3.1. Let (y, x) be the optimal solution of the current core problem and let p and k be the optimal dual variables associated, respectively, with the constraints (1) and (3). Solution (y, x) is optimal for the P P global LP-relaxation if rj ¼ rj  i:j2DðiÞ pi  t:j2F ðtÞ kt P 0, for each t 2 T and j 2 D(t). Choosing a good column generation strategy is crucial to make the approach efficient. We adopt the following strategy. For each j 62 S we compute the total reduced cost rj and we add to the master problem the k tours with the best total reduced cost and all the related xtj variables as from constraints (2). In our computational experience we set k = 1, that means that we add the column corresponding to the yj with the most positive reduced cost. 3.4. Strengthening the LP-relaxation To strengthen the formulation of the core problem, we build a conflict graph G(V, E), as suggested in [3], by associating a node v 2 V to each variable yj or xtj. The pair (u, v) defines an edge of G if the variables associated with u and v appear in the same constraint in the formulation (1)–(3). Clique Inequalities defined on the conflict graph are useful to improve the upper bound at the root node. Separation of Clique Inequalities is NP-hard but we use the effective greedy heuristic described in [9] to identify violated Clique Inequalities.

123

3.5. Getting a feasible solution After the LP-relaxation has been solved by column-and-row generation, we run Branch-and-Cut over the final core problem to yield a feasible solution providing a lower bound. The node selection strategy is the standard provided by the solver. Roughly speaking, it can be defined as a best-first strategy combined with occasional ‘‘diving’’ looking for feasible solutions. The variable selection strategy is ‘‘strong branching’’, as it is provided by the MIP solver. Branch-and-Cut enumeration is truncated as long as the gap between the upper bound and the current lower bound becomes 61%. In Section 4 we report computational experience showing that the quality of the lower bound is good and that only few Branch-and-Cut tree nodes are needed to prove 1% optimality.

4. Computational results The algorithm ran on a Pentium Xeon 2.8 GHz Personal Computer with 1 Gb RAM. The LP and MIP solver was the Cplex 9.0 [7]. The test-bed consists of three real-world networks drawn from the system TourismOnline developed at the University of Salerno. The geographical area is the region of Salerno, which contains internationally wellknown tourist sites. For each network we randomly generate five instances with ratings in U[1, 100]. The vacation period is 5 days. We set k = 4 as the maximum number of sites that can be visited during a single daily tour. In Table 1 we report computational results. Columns ‘‘Name’’, ‘‘# of sites’’ and ‘‘# of days’’ report the name of the instance, the number of candidate sites and the number of days of the vacation period, respectively. ‘‘Tours’’ is the total number of tours. ‘‘Colgen Time’’ reports on the CPU time spent in column-and-row generation. ‘‘Initial Columns’’ is the number of columns selected in the initial subset and ‘‘Added Columns’’ is the number of columns added in the column-and-row generation step. Finally, columns ‘‘B&C Nodes’’ and B&C time’’ report, respectively, on the number of Branch-and-Cut nodes and on the CPU time

124

P. Avella et al. / European Journal of Operational Research 173 (2006) 120–124

Table 1 Computational results Name

Sites

Events

Days

Tours

Colgen time (seconds)

Initial columns

Added columns

B&C nodes

B&B time

N50_1 N50_2 N50_3 N50_4 N50_5 N100_1 N100_2 N100_3 N100_4 N100_5 N150_1 N150_2 N150_3 N150_4 N150_5

50 50 50 50 50 100 100 100 100 100 150 150 150 150 150

76 73 75 78 78 140 146 154 147 153 215 219 227 214 218

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

25 785 10 838 13 811 20 297 19 893 69 188 102 289 172 271 47 341 203 470 241 074 649 006 923 859 794 169 804 293

2.52 0.93 0.98 1.63 3.05 10.44 26.72 39.23 15.13 42.39 94.28 126.45 191.69 118.73 108.86

5489 2346 1852 3919 3647 9634 15 141 21 303 7132 19 924 25 314 49 977 68 740 47 625 39 467

310 36 0 265 11 154 482 512 20 0 236 1469 369 1837 84

53 1 31 1 4 1 55 1 9 1 5 29 36 8 1

9.69 1.5 2.64 3.27 4.42 12.86 21.31 29.77 14.3 51.17 85.97 172.19 204.58 130.65 149.46

(secs.) spent to solve to 1% optimality the core problem. We observe that column-and-row generation allows to solve the LP-relaxation by using only a subset of the total number of the variables. This can explained by the following two reasons: (i) the initial core has been carefully chosen and (ii) column-and-row generation is effective for this problem. Finally, we observe that the gap is usually less than 1%—more than acceptable for this application—and that response time is short, even on the largest instances of the test-bed, that we introduce to give an idea of the behaviour of the algorithm.

References [1] Y. Agarwal, K. Mathur, H.M. Salkin, A set-partitioningbased exact algorithm for the vehicle routing problem, Networks 19 (1989) 731–749. [2] N. Ascheuer, M. Fischetti, M. Grotschel, Solving the asymmetric travelling salesman problem with time windows by branch-and-cut, Mathematical Programming A 90 (3) (2001) 475–506. [3] A. Atamturk, G.L. Nemhauser, M.W.P. Saverlsbergh, Conflict graphs in solving integer programming problems, European Journal of Operational Research 121 (2000) 40–55.

[4] P. Avella, M. Boccia, A. Sforza, Solving a fuel delivery problem by heuristic and exact approaches, European Journal of Operations Research 152 (1) (2004) 170–179. [5] P. Avella, A. Sassano, I. VasilÕEv, Computational experience with large scale p-Median problems, Technical Report 20/02 DIS—Universita´ di Roma ‘‘La Sapienza’’, 2003, electronic version available at www.optimization-online. org. [6] J. Bramel, D. Simchi-Levi, On the effectiveness of set partitioning formulations for the vehicle routing problem, Operations Research 45 (1997) 295–301. [7] Cplex Reference Manual, Release 9.0, ILOG, 2004. [8] J. Desrosiers, Y. Dumas, M.M. Solomon, F. Soumis, Time constrained routing and scheduling in network routing, in: M.O. Ball, T.L. Magnanti, C.L. Monma, G.L. Nemhauser (Eds.), Handbooks in OR&MS, vol. 8, Elsevier, 1995, pp. 35–139. [9] K.L. Hoffman, M. Padberg, Solving airline crew scheduling problems by branch-and-cut, Management Science 39 (6) (1993) 657–682. [10] J.P. Kelly, J. Xu, A set-partitioning-based heuristic for the vehicle routing problem, INFORMS Journal on Computing 11 (1999) 161–172. [11] G. Kindervater, J.K. Lenstra, M.W.P. Saverlsbergh, Parallel local search for the time-constrained traveling salesman, European Journal of Operational Research 33 (1988) 65–81. [12] M.W.P. Saverlsbergh, Local search in routing problems with time windows, Annals of Operations Research 4 (1985) 285–305. [13] P. Toth, D. Vigo, The vehicle routing problem, SIAM Monographs on Discrete Mathematics and Applications, Philadelphia, 2002.