On the Hierarchical Chinese Postman Problem with linear ordered classes

On the Hierarchical Chinese Postman Problem with linear ordered classes

European Journal of Operational Research 169 (2006) 41–52 www.elsevier.com/locate/ejor Discrete Optimization On the Hierarchical Chinese Postman Pro...

640KB Sizes 0 Downloads 116 Views

European Journal of Operational Research 169 (2006) 41–52 www.elsevier.com/locate/ejor

Discrete Optimization

On the Hierarchical Chinese Postman Problem with linear ordered classes Peter Korteweg a, Ton Volgenant

b,*

a

b

Department of Mathematics and Computing Science, Eindhoven University of Technology, P.O. Box 513, 5600 MB Eindhoven, The Netherlands Operations Research Group, Faculty of Economics and Econometrics, University of Amsterdam, Roetersstraat 11, 1018 WB Amsterdam, The Netherlands Received 28 May 2003; accepted 4 June 2004 Available online 19 August 2004

Abstract The Hierarchical Chinese Postman Problem (HCPP) is a Chinese Postman Problem with the arcs partitioned into priority classes ordered by a precedence relation. The problem under the sum criterion is polynomially solvable if the ordering is linear and each class is connected. For a known HCPP algorithm we give an O(n) improvement (n the number of nodes) leading to O(kn4) with k the number of classes. The same complexity appears to hold for the lexicographic criterion which minimises the costs of the first priority class, then the costs of the second class, etc. The notions of servicing and traversing related to arcs, allow for more real life models of arc routing problems. We show how to incorporate these notions in known algorithms, without increasing the complexity.  2004 Elsevier B.V. All rights reserved. Keywords: Routing; Chinese postman problem; Lexicographic objective; Matching; Post-optimality

1. Introduction The Hierarchical Chinese Postman Problem (HCPP) was introduced by Dror et al. (1987) as a Chinese Postman Problem with the arcs partitioned into priority classes ordered by a *

Corresponding author. Tel.: +31 20 525 4219; fax: +31 20 525 4349. E-mail address: [email protected] (T. Volgenant).

precedence relation. Thus the problem is to determine a tour from a depot that traverses all arcs obeying the mentioned precedence relation. They proved that in general the problem is NP-hard. Authors as Alfa and Liu (1988) or Letchford and Eglese (1998) formulated a different objective to distinguish between the notions servicing and traversing. Eiselt et al. (1995a) restated the HCPP more generally, introducing these notions, such that arcs can be traversed at any time, though they

0377-2217/$ - see front matter  2004 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2004.06.003

42

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

can be serviced only according to the given order; thus the aim of the HCPP is to determine a minimum cost walk from a source to a destination, servicing all arcs while preserving the order. This distinction is natural as in practice different costs (times) can be associated with both activities. Eiselt et al. (1995b) point out that in general a lower cost will be associated with traversing. Bodin and Kursh (1978) give a factor of about 2 between service- and traversal speed of street sweepers. Variants of the HCPP are suited to model reallife applications such as snow plowing, where streets are partitioned according to importance, winter gritting and street sweeping (see Bodin and Kursh, 1978; Haslam and Wright, 1991; Lemieux and Campagna, 1984). For the problem without a linear precedence order, Cabral et al. (2004) give exact and heuristic results. As notation we use G = (N, A), a connected graph without loops, N = {1, 2, . . . , n} is the node set with n nodes containing a source r and a sink s; if r = s we have a depot (d). The arc set A = {(i, j): i, j 2 N and i5j} has m arcs. Each arc (i, j) has a cost cij, that can represent, e.g., time or distance; cij = 1 if (i, j) 62 A. In the undirected case cij = cji and (i, j) is an edge, with the set of all the edges denoted by E. The standard Chinese Postman Problem can be formulated mathematically as follows (see, e.g., Eiselt et al., 1995a): Let xij be an integer variable indicating how many times the arc (i, j) is traversed from i to j, d(i) the set of arcs incident to node i and A(S) the set of arcs (i, j) with i 2 S, j 2 S and S  V. Then the model is X min ðcij xij þ cji xji Þ ði;jÞ2A

subject to xij þ xji P 1; P ði;jÞ2dðiÞ ðxij  xji Þ ¼ 0; xij ; xji 2 N [ f0g;

ði; jÞ 2 A; i2V; ði; jÞ 2 A:

In the HCPP the arc set A is partitioned into priority classes A1, A2, . . . , Ak with Ai \ Aj = B for i 5 j, [ki¼1 Ai ¼ A; the classes obey a linear order («), without loss of generality numbered as A1«A2«    «Ak with k > 1.

We use the notion of a c-graph defined as a graph with the property that each two nodes are directly connected by at most c arcs. Dror et al. (1987) presented an algorithm of O(kn5) for the HCPP if G is undirected and all sub-graphs induced by the classes Ai are connected. We improve the HCPP algorithm (Section 2) to a complexity of O(kn4). Ghiani and Improta (2000) described an alternative algorithm of O(k3n3). In Section 3 we consider the lexicographic criterion for the HCPP which minimises the costs of the first priority class, then the costs of the second class, etc.; we show how to solve this problem in a complexity O(kn4). Section 4 treats the notions of servicing and traversing. In Section 5 we show how to incorporate these notions in known algorithms, without increasing the complexity, for problems with traversal costs in combination with the linear order relation. In Section 6 this relation is restricted to servicing of the arcs. Finally conclusions and some remarks are given.

2. The improved algorithm We improve the HCPP algorithm of Dror et al. (1987) reducing the complexity O(kn5) to O(kn4). First we briefly describe this algorithm, denoted as the layer algorithm. Given an undirected 1-graph without loops, G = (N, E) with costs cij, and a linear order « which partitions E into priority classes E1, E2, . . . , Ek with [ki¼1 Ei ¼ E and Ei \ Ej = B for i 5 j. Let Gi be the sub-graph induced by the set of edges in Ei (the edges in Ei and their incident nodes) and let each Gi be connected. Define Yi as the set of entry nodes of Gi, where an entry node of Gi is a node that is incident to an edge from the set [i1 q¼1 Eq . The nodes of a pair of {(u, v): u 2 Yi, v 2 Yi+1; i = 1, . . . , k} that are connected by an arc are called adjacent entry nodes. Graph Fi is the sub-graph induced by [iq¼1 Gq . We assume the source r to be incident to E1 and each Fi to be connected, as otherwise no feasible tour exists; we refer to this condition as the existence condition of Dror et al. (1987). In general, without this condition, the problem is NP-hard, just as the RPP (see Lenstra and

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

Rinnooy Kan, 1976). The condition is not always fulfilled, e.g., for gritting applications where the sets Ei are sets of roads of decreasing importance. It may be valid only for the roads of the highest importance. In such applications, however, the graphs Fi are connected if the major roads link the roads of lesser priority. The following sub-problem is essential in the layer algorithm (Fig. 1): For a connected graph G = (N, E) with E partitioned into a connected set of required edges E* and a set of nonrequired edges E the problem Puv(E) is to find an open Chinese Postman tour over the set E* starting from node u incident to an edge in E* and ending at node v not necessarily incident to E*. The open Chinese Postman tour problem is a special case of the Rural Postman Problem (RPP), where the required edge set is connected. Orloff (1976) pointed out, that the RPP can be solved by an algorithm that is only exponential in the number of disconnected components in the required edge set. Dror et al. (1987) demonstrated that the problem is equivalent to a matching problem, thus it can be solved in O(n3). The layer algorithm constructs an auxiliary graph G00 where each arc (u, v) between a pair of adjacent entry nodes consists of a path in the original graph G, covering all edges in layer i. A shortest path on G00 identifies an optimal HCPP tour in G. The complexity O(kn5) of the layer algorithm is caused by the dominating step 2 in which an open

43

Chinese Postman tour problem has to be solved. Ghiani and Improta (2000) introduced an alternative graph G00 , to obtain an algorithm of O(k3n3), while we exploit the relation between successive matchings in step 2 to reduce the complexity. For each layer Puv(Ei) is solved for the O(n2) adjacent entry nodes (u,v) by determining a minimum cost perfect matching (MPM) on the set of odd-degree nodes of the graph spanned by E(u, v) = Ei[{(v, u)}, where (v, u) has cost cvu if (v, u) 2 A and 1 otherwise. From now on, a matching is implicitly understood to be a MPM; we denote the pair of end nodes of an edge in a matching as a pairing. Let G(u, v) be the graph spanned by E(u, v) for a pair (u, v). For simplicity denote Gi as G*, i.e., G* is spanned by Ei. Let N(u, v) be the set of odd-degree nodes that span G(u, v) and N* the set of odd-degree nodes that span G*. For each pair (u, v) the layer algorithm determines a MPM on N(u, v). Each N(u, v) is likely to differ only slightly from N* as only one edge (v, u) is added to the edge set. Therefore we solve a matching problem on N* and apply post-optimality procedures to obtain an optimal matching on each N(u, v). We show that this approach reduces the complexity of step 2 of the layer algorithm to O(kn4). First, we identify the differences between G* and G(u, v) for each (u, v) and between the corresponding sets N* and N (u, v). There are four cases for G*; as u is an entry node of layer i, u is an end node of an edge in Ei (notation: u 2 Ei).

Fig. 1. The layer algorithm for HCPP, Dror et al. (1987).

44

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

Table 1 The cases of the pair (u, v) in G*; (v) the node is even or is no part of the graph Case

Degrees of u and v

1. 2. 3. 4.

u u u u

G* Add u and add v Replace u with v Replace v(2Ei) with u Remove u and v (2Ei)

even odd even odd

Set of odd-degree nodes G(u, v)

(v) even (v) even v odd v odd

Each case is determined by whether v is also an end node of Ei and the degrees of u and v; as usual a node is odd (even) if it has odd (even) degree. The cases––see Table 1––correspond one-to-one to situations in G(u, v), e.g., in case 1, by adding (v, u) to the edge set, u becomes an odd node in G(u, v) and v is added to G(u, v) as an odd node; thus both u and v are added to N(u, v). So in case 1 two nodes are added to the original set N* in the cases 2 and 3 a node in N* is replaced by a new one, and in case 4 two nodes are removed from N*. Columns 4 and 5 provide the degrees of u and v in G(u, v); the set N* (column 6) is distinct for each (u, v). The last column presents the set N(u, v) in terms of a (small) modification to N*. Now consider the matching on N* and let G(N*, A) be the associated graph. Each edge (i, j) in A represents the shortest path between i and j in graph Fq on layer q. As Fq is connected, G(N*, A) is complete. Among the known matching algorithms (see, e.g., Gerards, 1995), the best strongly polynomial complexity is O(nm + n2log n) and for complete graphs O(n3). We exploit postoptimality procedures for matching in the complete case, together with the Shortest Augmenting Path algorithm of Ball and Derigs (1983). Suppose the MPM has been calculated and let set U  N be such, that edge costs are only altered for (i, j) 2 d(U) with d(U) the set of edges having at least one end in U. Then we can reoptimize MPM in O(jUjn2). Thus, with jUj constant related to n, post-optimality procedures compare favourably to optimising each matching from scratch. We exploit this observation in the Improved Matching algorithm, to be presented below. First we have to introduce the auxiliary weighted graph C* with node set N* = {1, 2, . . . , n} and edge set A* = {(i, j):i, j 2 N*, i 5 j}.

u u u u

odd even odd even

v v v v

odd odd even even

G*

G(u, v)

N* N* N* N*

N* [ {u, v} N* [ {v}n{u} N* [ {u}n{v} N*n{u}n{v}

Let C* be the graph associated with a matching on N* plus two extra nodes h1 and h2. Let l = 1 + max{cij:(i, j) 2 A}. Edge costs cij are defined by 8 cij ; ði; jÞ 2 N   N  ; > > > < l; ði; jÞ 2 fðh1 ; jÞ; ðh2 ; jÞ : j ¼ 1; . . . ; ng cij ¼ > [fði; h1 Þ; ði; h2 Þ : i ¼ 1; . . . ; ng; > > : 0; ði; jÞ ¼ ðh1 ; h2 Þ: So a representation of graph C* would consist of all the arcs of graph G plus two more arcs. We can use C* to solve MPM on G(N*, A), to be proven now. Theorem. A MPM of C* with cost c is also a MPM on G(N*, A) with cost c. Proof. It is sufficient to show that nodes h1 and h2 are paired in the MPM of C*, because this reduces graph C* to G(N*, A). Suppose h1 and h2 are not paired in a solution M of the MPM on C*. Then h1 is paired to a node i 2 N* and h2 to a node j 2 N* with a total cost of (ch1i + ch2j) = 2l. However, the pairings (i, j) and (h1, h2) have a lower cost of (cij + ch1h2) = cij, as cij
P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

necessary matchings and post-optimality changes on graph C* rather than on G(N*, A). As their numbers of nodes only differ by a constant, matchings on them can be found in the same complexity. The Improved Matching algorithm (Fig. 2) works as follows: in step 1 we calculate the edge costs cij on the set of all nodes in C* before and after an update; this set consists of all nodes in N(u, v) and all entry nodes of the layers i and i + 1. Step 2 constructs graph C* with the costs of step 1; then the matching on N(u, v) is solved with C*. Step 3 performs a post-optimality change on C* for each (u, v). In the four cases of Table 1, we alter the edge costs for at most 2 nodes from the set {u, v, h1, h2}; the costs are calculated in step 1. In step 3b post-optimality techniques solve the new matching problem. Finally, the original graph C* is restored and another post-optimality change is performed. The complexity of the steps 1 and 2 is O(n3); step 3a requires O(n) just as step 3c that reverses step 1; step 3b requires O(n2) as U  {u, v, h1, h2}. Step 3, to be calculated for each (u, v), determines the total O(n4) time. Using the Improved Matching algorithm in step 2 of the layer algorithm for k layers, the complexity to solve HCPP becomes O(kn4). It is preferable, unless k  n, as then the

45

O(k3n3) algorithm of Ghiani and Improta (2000) is a better choice.

3. The lexicographic objective For the HCPP considered so far, edges with higher priority have to be traversed before all the edges of lower priority. As mentioned, the snow plowing problem is an example where certain streets have to be serviced sooner than others. However, if streets of higher priority are really strictly preferred, then we would prefer to service these streets as soon as possible even if this requires a higher overall cost. Therefore we consider now the lexicographic objective (LO), suiting this case. The original HCPP objective can be seen, as we explain further on, as an objective that is in between the CPP and the LO. Formally, let P be the set of feasible paths in G and associate with each path p 2 P a vector f(p) = (f1, f2, . . . , fk) where fi is the completion cost of priority class i. We say p is lexicographically less than (preferred to) p 0 denoted f(p)
Fig. 2. The improved matching algorithm.

46

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

and p 0 are viewed as equally good. A solution p* is a lexicographic optimum if f(p*)
(f1, f2, . . . , fi1) with fj = fj(vi) the completion cost of layer j in a sub-path r ! vi, while (vi) refers to the node in layer (i  1) on r ! vi. The pointer can retrace all nodes on r ! vi; the vectors f(.) establish an ordering based on the LO. The LO algorithm performs two steps at each layer i to achieve a lexicographic optimal sub-path s ! vi for each vi in layer i. In step 1 it determines the lexicographic optimal set L of entry nodes of the previous layer; to find all lexicographic optima out of n k-tuples requires O(kn) time. Step 2 determines for each node vi in layer i the predecessor vi1 from set L, requiring O(n); this predecessor uniquely identifies the LO-optimal sub-path s ! vi, as it identifies the path s ! vi1 and the arc ðvi1 ; vi Þ. If jLj = 1, then all the nodes in layer i have the same predecessor, otherwise the node is determined by the path length (cvi1 vi ) in layer i; this is equal to a lexicographic comparison of the lowest priority class. In step 2b the necessary data is passed to node vi. The ÔcopyÕ operation simply assigns the completion costs of the first i  2 layers of vi1 to vi and the completion cost of layer i  1 is determined by cvi1 vi . The data consists of the i-tuple with the completion costs and the pointer, which refers to the node in layer i  1 and thus to the optimal sub-path r ! vi. Step 2b requires O(k) time for each node and over all nodes O(kn). In step 4 we trace back the predecessor of s until r to find an optimal LO path r ! s in G00 in O(n) time. This

Fig. 3. The LO algorithm for graph G00 .

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

path is feasible for the HCPP and optimal as follows by induction on a sub-path r ! vi. The corresponding tour in G is constructed as in step 4 of the layer algorithm. The complexity of the LO algorithm is O(kn2), as the steps 1 and 2 are performed for each layer. Thus the complexity of the algorithm is still dominated by the construction of G00 and the HCPP under LO is O(kn4), too. In practice, however, we expect LO to perform faster than the original HCPP objective as it is likely that at each layer one or a small number of edges yield the minimum cost. Because of the definition of the LO, if a node in layer i  1 is not a lexicographic optimum at layer i, it cannot become one at a following layer. Thus constructing G00 one layer at a time, can save significantly on the number of nodes and arcs to be built. For example, if each layer has only one lexicographic optimum, this leads to a reduction of O(n) edges. Table 2 gives the objectives and their complexities. We illustrate the LO objective with an example (Fig. 4); graph G = (N, E) with node 1 the depot Table 2 Complexity of the objectives Criterion to minimise

Priority

Complexity

CPP HCPP LO

Total cost Total cost Cost according to priority class

None Strict on order Strict on order

O(n3) O(kn4) O(kn4)

3

5 4

1

3

3

2

5

5

4 5

4

has the edge set E partitioned into three classes E1«E2«E3. We construct the graph G00 with the layer algorithm (Fig. 2) and we identify the paths according to the HCPP- and the LO objective. The tours can be constructed with respect to the original graph G. For HCPP the tour is (cost of 67): 1232425646754  1  3  5  2  1: The entry nodes (bold) of the layers 1 to 4 correspond to the nodes of the path in G00 . The resulting tour under the LO is (cost of 70): 1232524676541  3  5  7  6  4  1: We compare these tours with the CPP tour on G; where such a tour consists of one or more cycles there can exist more postman tours which only differ in the ranking of the cycles in the resulting tour. We choose to rank the cycles based on the LO, e.g., such as to minimise highest priority first. Here the postman tour is (cost of 61, = denotes doubled edge): 124523¼14675¼6

Problem

4

47

4

Table 3 summarises the results. Clearly, CPP gives the overall lowest cost and LO the highest cost, while LO completes higher priorities faster than HCPP. In this example it completes all priority classes in less time; only the time to the depot makes the overall tour more expensive. The lower bound on the total cost would have been achieved if G were an Euler graph. The lower bounds on the completion times of each priority class are the sum of all edge costs in that class, and all of higher priority. Table 3 Costs and bounds for example graph G

7 6

3

¼ 5  3 ¼ 1:

7

Objective

Total cost

Completion cost Class 1

Class 2

Class 3

CPP HCPP LO Lower bound

55.5 67 70 50

19 22 21 14

43 38 37 27

55.5 61 60 50

3

E1 = {(1, 2), (2, 3), (2, 4), (2, 5)} E2 = {(4, 6), (5, 6), (6, 7)} E3 = {(1, 3), (1, 4), (3, 5), (4, 5), (5, 7)}

Fig. 4. Graph G of the example.

48

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

The postman tour has lowest cost on the highest priority class as well, due to the use of the lower class edge (4,5) in the tour. In general there is no guarantee that the CPP tour finishes the highest priority class at least cost; it does not even have to complete this class first. The example shows, that one should be careful in applying strict priority classes to a CPP problem. Ordinary CPP without any priority classes completes the solution at least total cost and with smallest completion time of the highest priority class. Applying the HCPP- or LO objective would only yield inferior solutions. It also demonstrates the advantage of using lower class edges for traversal, as we will focus on now.

4. Servicing and traversing We consider the notions servicing and traversing of an arc and the consequences of applying them to a CPP. Just as Dror et al. (1987) we consider undirected 1-graphs without loops for which all sub-graphs Gi are connected. First we state the definitions: • Servicing an arc (i, j) means to traverse it, whilst performing a certain operation, at a service cost cij; examples for this operation are delivering the mail or cleaning the street. • Traversing an arc (i, j) means to traverse it, without performing any specific operation, at a traversal cost tij. We assume that 0 6 tij < cij and that the time to switch from servicing to traversing and vice versa is negligible. Arcs can be traversed without servicing them; this is called deadheading. We introduce a ÔsumÕ operation : for subsets say, S1, S2  E the sum S1  S2 creates a set containing the edges in S1 [ S2 and duplicates of the edges in S1 \ S2; the associated graph is represented as GT = (N, ET) with cost functions cij and tij and can be constructed from graph G = (N, E), associated with a standard CPP as follows: duplicate each edge in the required edge set E into E and assign a traversal cost tij to it. Let ET  E  E; now GT is an undirected 2-graph without loops.

We have to demonstrate the effects of servicing and traversing for CPP before we can do so for HCPP. First we state the complexity for CPP. Theorem. An optimal path for a CPP on an undirected 1-graph G = (N, E) with costs cij and traversal costs tij can be found in O(n3). Proof. Let GT ¼ ðN ; E  E) be the undirected 2graph constructed from G with r the source and s the sink. The problem can be viewed as an RPP on GT with E the required edge set. In general this problem is NP-hard. However r is incident to E, which is connected. The problem now reduces to Prs(E), that can be solved in O(n3). h In the proof a graph GT is constructed where each edge from the required (nonrequired) edge set is associated with servicing (traversing). The problem now reduces to a RPP. By adding the nonrequired edges the original problem remains consistent. Clearly each required edge in the CPP solution is visited: • at least once, because it is a required edge in the RPP as well; • at most once, because otherwise a better solution can be obtained by replacing this edge all but the first time with its duplicate with the lower t cost. In an optimal solution edges may be traversed before servicing them. If this is technically impossible (snow plowers should probably service each street the first time they traverse it) the order can be changed in the polynomial time to scan all edges in the path. Cabral et al. (2004) have different costs for traversal before and after servicing an edge. This refinement can be incorporated in the described approach by defining tij as the minimum of the traversal cost before or after service.

5. HCPP with traversal costs An HCPP with traversal costs (HCPPt) seeks a tour of minimum cost in the graph GT which services each required edge at least once with respect to

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

the order («), while the same order applies to traversal. We consider the differences with the standard HCPP for proportional traversal costs as in Bodin and Kursh (1978) and for general traversal costs with 0 6 tij 6 cij. Proportional traversal costs: tij ¼ scij ð0 < s 6 1Þ: Theorem. Let p be a path of graph G with proportional traversal costs which services every required edge once; if p is an optimal path of G, then p is also an optimal path with respect to graph G T. Proof. Assume p is an optimal path of G and there exists a path p 0 5 p with lower total cost with respect to graph GT. This path consists of all required edges E and possibly some nonrequired edges from E. The total cost of the required edges is the same for each feasible path, so if p 0 has lower costs it means that the cost sum of the nonrequired edges is lower: X X X X tij < tij ! cij < cij ði;jÞ2p0 \E

ði;jÞ2p\E

ði;jÞ2p0 \E

ði;jÞ2p\E

because tij = scij and this means that p 0 also has a lower total cost of the nonrequired edges in the original problem and thus p cannot be optimal to G. h Thus the optimal HCPPt path is the same as for HCPP. We just have to update the costs of the nonrequired edges in path p to obtain the cost of an optimal HCPP path with respect to the new graph GT. The optimal paths for LO and CPP also remain the same. General traversal costs: 0 6 tij 6 cij : Now, in general, p is not an optimal path of GT. We demonstrate how to find an optimal solution in the same time bound as for the standard HCPP. We use the same HCPP algorithm as a point of reference; the costs cij only play a role in solving the sub-problem Puv(Ei) on the graph Fi between each pair of nodes (u, v) in two successive layers. For layer i, the required edge set is Ei, the nonrequired edge set E is [i1 Thus F i ¼ q¼1 E q . ðV i ; Ei [ EÞ with service costs cij ; V i  Ei [ E.

49

To incorporate the t costs, we only have to duplicate all edges in Ei and to associate with it a cost tij. With the edges in E we also associate a cost tij, as these edges have already been serviced. Now F Ti ¼ ðV i ; ðEi  Ei Þ [ E) with service costs cij on edges of Ei and traversing costs tij on the duplicates of Ei and the set E. We can now solve Puv(Ei) on F Ti . This does not alter the problem in any way, because it is still solved on a graph where u is incident to Ei. As the number of edges remains of the same order, HCPPt can be solved in O(kn4) too. We illustrate the traversal costs on the example of Section 3 (Fig. 4); Table 4 gives the corresponding costs. Within this more realistic model the total costs of the three objectives become closer to each other and all total costs are smaller than in normal HCPP. Of course completion costs tend to their respective lower bounds for tij ! 0. The path constructed with the LO has lowest cost on the highest priority class. This is only revealed, because for the optimal tour the LO has to deadhead two streets ((2,3) and (2,5)) at this stage, whereas the postman tour must service all the edges. Traversal costs lower the completion cost of the highest priority class for LO from 21 to 17.5, while they remain 19 for CPP. The example demonstrates the importance of traversal costs in decision making based on the considered objectives. The original HCPP and HCPPt still have the shortcoming that the order relation is too strict as it forbids the service or traversal of edges of a class in any of the classes of higher priority. This ignores that this action can reduce the completion cost of this class and/or the total cost. Clearly, adding a nonrequired edge cannot increase total cost, but may generate tours with a lower cost. This exactly resembles the primary, or desired,

Table 4 Costs and bounds for the example; proportional traversal costs (s = 0.5) Objective

CPP HCPP LO Lower bound

Total cost

55.5 58.5 59 50

Completion cost Class 1

Class 2

Class 3

19 18 17.5 14

43 32.5 32 27

55.5 55.5 55 50

50

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

objective of the real-life problems and therefore this feature should be embedded in any real world model. To overcome this discrepancy between the objective of the HCPP model and the desired objective we remove the order relation on traversal in the next section.

6. Traversal costs and order on service only Now we consider servicing and traversing in the general case of HCPPt. Definition. A HCPP with traversal costs and order on service only (HCPPts) seeks a tour of minimum cost in the graph GT which services each required edge from the set E at least once with respect to the order («), while there is no order on traversal. In contrast to HCPPt, arcs in HCPPts can be traversed at any time at cost tij, and there is no order on the nonrequired edge set E. Yet, the HCPPts can be solved in O(kn4) just as HCPPt, as we will derive now. Consider the graph F Ti . HCPP is solved by the problem Puv(Ei) on the graph F Ti ¼ ðV i ; ðEi  Ei Þ [ EÞ for each (u, v) in layer i. Graph F Ti is spanned by the required edge set Ei and the nonrequired edge set (E) which consists of all arcs already serviced (i.e., of this layer and previous layers). For HCPPts we solve Puv(Ei) on the graph  F T i  E i Þ [ E Þ where the nonrequired i ¼ ðV i ; ðE  edge set (E ) now contains duplicates of all arcs. As Puv(Ei) is still solved on a graph with a connected required edge set, the same algorithm applies. Even though HCPPts is more realistic than the standard HCPP––it distinguishes between servicing and traversing––it is also a less stringent prob-

lem as the existence condition of Dror et al. (1987) is weakened. Where for HCPP both F Ti and Gi have to be connected for all i, for HCPPts only Gi needs to be connected, ensuring that at each iteration a path (of required and nonrequired edges) exists. That is, class j does not need to be connected with any of the prior classes (i = 1, . . . , j  1) as in the standard HCPP. F T i is always a connected graph as it consists of all arcs in G. Thus we can solve a wider class of problems, even a specific class of hierarchical RPPs, with as the only specific requirement a connected set of required edges. This allows us to model specific traversal roads, which connect the source and the sink with the roads that require service, according to a proposal of Eiselt et al. (1995a). Note, however, that s still needs to be connected to E1 If, in the spirit of Eiselt et al., we want to embed s in a graph where s may not be connected to E1, this causes an extra complexity of O(n) by the calculation of the shortest paths between r and all v 2 E1. A tour is then composed of a shortest path r ! v and an open HCCP tour v ! s. The assumption that roads can be traversed before receiving service, narrows the scope of problem instances that can be modelled through HCPPts. (Now it is not possible to change the ranking of the edges as we did with CPP because this can violate the order relation). For example, with street sweeping, winter gritting and garbage collection the assumption holds. In the case of snow plowing the assumption is violated, as the service is required to make the street available for traversal. This case can be modelled as a HCPPt. Table 5 summarises the features of the considered variants. HCPPts overcomes the main drawback of HCPP and HCPPt as stated in the previous para-

Table 5 Characteristics of HCPP and extensions Problem

Priority

Traversal costs

Application

Condition

HCPP

Strict on all edges

No

Traversing before servicing not allowed

HCPPt HCPPts

Idem Strict on servicing, not on traversing

Yes Yes

Idem Traversing before servicing allowed

All Gi connected all Fi connected Idem All Gi connected

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

graph, as it allows edges to be used for traversal at any time, i.e., in each class. It does not model the service of edges in a higher class in order to reduce the completion cost. We give for the example introduced in Section 3 (with tij = 0.5cij) the optimal tours for HCPP with traversal costs and order on service only. The optimal tour (cost 59) with respect to LO becomes (in bold the entry nodes of the layers 1–4) 1235246765413  5  7  6  4  1: For HCPP, an alternative for the optimal tour of the previous paragraph is 1231425646754  1  3  5  2  1: Table 6 summarises the results. We see that the completion cost of the highest priority class is reduced from 17.5 to 16.5, achieved by using the edge (3,5) for traversal at this class. The HCPP- and LO-tour both represent a tour for the Chinese Postman Problem obeying a strict priority on servicing, no priority on traversing and traversal costs. This is the most realistic setting for a HCPP where traversal before service is allowed. The third tour, the Postman Tour, is without any kind of priority rule, but it does account for traversal costs as well. For the example we find that the CPP objective has the lowest overall cost and the LO the highest one. But LO has the lowest costs on the highest priority class. The HCPP objective seems to average out both extremes. We think that by presenting all three objectives a better choice of the optimal tour can be made; the ultimate choice depends on the importance Table 6 Results for the example with proportional traversal costs (s = 0.5) Order on service only Objective

Total cost

CPP HCPP LO Lower bound

55.5 58.5 59 50

Completion cost

51

given to the priority classes. How strict the classes turn out to be for the real-life application determines which tour should be chosen in practice. 7. Conclusions and final remarks We have improved an existing algorithm that solves the HCPP with linear ordered classes; the complexity of the original algorithm can be reduced to O(kn4) by post-optimality techniques on the matching. We have considered a more stringent lexicographic objective, which may represent a better interpretation of the desired objective. Overall cost is then worse than under the standard criterion, as it puts more emphasis on the higher priority classes. An example has illustrated that both models, still, fail to properly model the desired objective. The strict priority rule as proposed by Dror et al. can be too stringent; it does not allow for traversal or service of edges in a higher class even if this reduces cost of this class and/or total cost. We have suggested an alternative for this objective, considering servicing and traversing of arcs as different operations which we can assign different order relations. It depends on the nature of the practical problem which objective is most suited. The given analysis is valid under the assumption that all priority classes are connected edge sets. Further research on this subject is required, as unconnected edge sets lead to an RPP; we assume that this research has to be carried out in the field of heuristics. Acknowledgement We are grateful to an anonymous referee who gave helpful comments that have led to an improved presentation of this paper. References

Class 1

Class 2

Class 3

19 18 16.5 14

43 32.5 31 27

55.5 55.5 54 50

Alfa, A.S., Liu, D.Q., 1988. Postman routing problem in a hierarchical network. Engineering Optimization 14, 127–138. Ball, M.O., Derigs, U., 1983. An analysis of alternative strategies for implementing matching algorithms. Networks 13, 517–549.

52

P. Korteweg, T. Volgenant / European Journal of Operational Research 169 (2006) 41–52

Bodin, L.D., Kursh, S.J., 1978. A computer-assisted system for the routing and scheduling of street sweepers. Operations Research 26, 525–537. Cabral, E.A., Gendreau, M., Ghiani, G., Laporte, G., 2004. Solving the hierarchical Chinese postman problem as a rural postman problem. European Journal of Operational Research 155, 44–50. Dror, M., Stern, H., Trudeau, P., 1987. Postman tour on a graph with precedence relation on arcs. Networks 17, 283– 294. Eiselt, H.A., Gendreau, M., Laporte, G., 1995a. Arc routing problems part I: The Chinese postman problem. Operations Research 43, 231–242. Eiselt, H.A., Gendreau, M., Laporte, G., 1995b. Arc routing problems part II: The rural postman problem. Operations Research 43, 399–414. Gerards, A.M.H., 1995. Matching. In: Ball, M.O., Magnanti, C.L., Monma, C.L., Nemhauser, G.L. (Eds.), Network Models. Elsevier, North-Holland.

Ghiani, G., Improta, G., 2000. An algorithm for the hierarchical Chinese Postman problem. Operations Research Letters 26, 27–32. Haslam, E., Wright, J.R., 1991. Application of routing technologies to rural snow and ice control. Transportation Research Record No. 1304, 202–211. Lemieux, P.F., Campagna, L., 1984. The snow ploughing problem solved by a graph theory algorithm. Civil Engineering Systems 1, 337–341. Lenstra, J.K., Rinnooy Kan, A.H.G., 1976. On general routing problems. Networks 6, 273–280. Letchford, A.N., Eglese, R.W., 1998. Rural postman problem with deadline classes. European Journal of Operational Research 105, 390–400. Orloff, C.S., 1976. A fundamental problem in vehicle routing. Networks 4, 35–64. Sokkalingam, P.T., Aneja, Y.P., 1998. Lexicographic bottleneck combinatorial problems. Operations Research Letters 23, 27–33.