Alternatives to Dial's logit assignment algorithm

Alternatives to Dial's logit assignment algorithm

Transpn. Res:B. Vol. 298, No. 4, pp. 287-295, 1995 Copyright 0 1995 Elsevier Science Ltd Primed in Great Britain. All rights reserved 0191-2615/95$9...

597KB Sizes 8 Downloads 119 Views

Transpn.

Res:B. Vol. 298, No. 4, pp. 287-295, 1995 Copyright 0 1995 Elsevier Science Ltd

Primed in Great Britain. All rights reserved 0191-2615/95$9.50 + .OCI

Pergamon 0191-2615(95)00005-4

ALTERNATIVES ASSIGNMENT

TO DIAL’S LOGIT ALGORITHM

MICHAEL G. H. BELL ’ Transport Operations Research Group, Department of Civil Engineering, University of Newcastle, Newcastle Upon Tyne NE1 7RU U.K. (Received 23 August 1994; in revised form 22 January 1995 ) Abstract -Two

logit assignment methods for transportation networks are proposed as alternatives to Dial’s algorithm. While retaining the absence of a need for the enumeration of paths, they dispense with both forward and backward passes. They, therefore, do not require minimum node-to-node cost information beforehand. Both methods admit loops and paths that are otherwise inefficient in the Dial sense, which can arise in practice as a result of driver searching behaviour. The first method considers a finite number of paths and the second method an infinite number of paths in the presence of loops. The absence of any efficiency constraint on the set of feasible paths makes the algorithms attractive for use in stochastic user equilibrium methods or in the approximation of a user equilibrium assignment through stochastic user equilibrium methods. The similarity of the structure of one of the proposed algorithms with that of the Floyd-Warshall shortest path algorithm would allow the two to be combined.

1. INTRODUCTION

For networks with fixed costs, the algorithm of Dial (1971) has remained the generally used procedure for finding the assignment of traffic according to the logit model. In networks where congestion plays a role, Dial’s algorithm forms part of the method proposed by Powell and Sheffi (1982) for finding a stochastic user equilibrium (SUE) assignment. More recently, Davis (1993) has used a version of Dial’s algorithm for solving the network design problem (NDP) under the assumption of SUE. A characteristic of Dial’s method is that there is a forwardpass through the network, moving from node to node according to increasing minimum cost from the origin, assigning weights to all the links. On the backward pass, the traffic is assigned to the links according to the weights. There is no requirement for path enumeration. However, the sequence with which the nodes need to be processed in the forward pass implies that consideration is restricted to only those paths which lead away from the origin, in the sense that each link in the path must increase the minimum cost from the origin. Out of this necessity a virtue is made by introducing the concept of efficiency; all efficient paths must lead away from the origin. Dial added a further condition, namely, that all efficient paths should lead toward the destination, in the sense that each link should reduce the minimum cost to the destination. This further condition slows Dial’s method but reduces the number of feasible paths. Dial’s method requires that minimum costs be calculated beforehand. Using the less restrictive definition of efficiency, the minimum cost from each origin to any node is required; with the more restrictive definition the minimum cost from any node to each destination is also required. A problem arising in congested networks is that the efficiency or otherwise of a path will depend on the level and distribution of congestion. This may lead to problems of stability with iterative SUE assignment methods that incorporate Dial’s algorithm, such as the method of successive averages proposed by Powell and Sheffi (1982). This article proposes two methods for finding a logit assignment that dispense with the need for either a forward or a backward pass. As with Dial’s method, path enumeration is not required. There is no efficiency constraint on feasible paths and therefore no ‘Written while on leave at the Department of Transportation Engineering, Kyoto University. 287

M. G. H. BELL

288

need to know minimum costs beforehand. The first method considers a finite number of paths including all those without loops and some with. The second, and arguably more interesting, method considers all paths, which will be an infinite number in the presence of loops. In reality, inefficiency in the Dial sense (including loops) can arise as drivers search for best routes or indeed for their destinations. However, as the size of the dispersion parameter (defined later) is increased, drivers become more cost sensitive, the likelihood of inefficiency or loops is reduced and the assignment approaches a solution where only minimum cost paths are used. The first method is similar in structure to the shortest path algorithm of Floyd ( 1962) and Warshall (1962), offering the possibility of simultaneously determining minimum cost paths. Before describing the methods, the basis of Dial’s algorithm is examined and the Floyd-Warshall shortest path algorithm is described. 2. BASIS FOR DIAL’S METHOD

Let = the cost of link k akpij = the number of times link k is included on path p between i andj cpij = the cost of path p from i to j ck

Because the link costs add to give the path costs cpil

=

(1)

Ckakpijck

According to the logit model for path choice, the probability that path p is chosen for a trip from i to j is given by Prob(p chosen 1ij ) = exp( - CV+,,)n;,

exp (

-

CXC~~ )

(2)

)

(3)

By the substitution of ( 1) in (2) Prob(p chosen 1ij ) = fl exp( -a&&?&k where (4) Hence

PrWp chosenIij ) = P exp(-

cyalp~cI

)exp( - oa2pijc2) . . . exp ( - uaKpijcK)

(5 )

where K is the number of links. The implication of (5) is that, when loops are excluded, one can pass through the network assigning each link k a weight equal to exp( - (Yck).The product of these weights along any path is then proportional to the probability that the path is chosen, the constant of proportionality being calculated so that the sum of the probabilities across the set of all feasible alternative paths connecting a particular origin and destination is one. This is the basis of the forward pass of Dial’s algorithm; the backward pass assigns the flow to the links in a way that conforms to the multinomial logit model set out earlier. A prior path enumeration is not required. The algorithms described in Sections 4 and 5 are concerned with processing these weights. 3. FLOYD-WARSHALL

ALGORITHM

Most shortest path algorithms operate on a connections matrix and a backnode matrix. Let N be the number of nodes and 2 the number of centroids (sources and sinks). The connections matrix is a (N + Z)*(N + Z) matrix with elements c,,. Before

Alternatives to Dial’s Iogit assignment

289

processing by a shortest path algorithm, the connections matrix is initialized as follows. Where there is a link or centroid connector from node or centroid m to node or centroid n, c,,, is assigned its cost; where no such link or centroid connector exists, c,,,, is assigned a large value. After processing by the algorithm, the connections matrix gives the minimum cost of travelling from any node or centroid to any other node or centroid; where c,, remains a large value, node or centroid n is not reachable from node or centroid m. The backnode matrix has the same size as the connections matrix. Element qmn of this matrix gives the penultimate node on the path from node or centroid m to node or centroid n. After processing, the backnode matrix enables the optimal path to be retraced. Suppose that qmn = k, then the node before k on the same path is given by qmk, etc. A method that is simple to program is that due to Floyd (1962) and Warshall (1962). The algorithm is efficient for highly connected networks but in general not so efficient for transportation networks. Van Vliet (1978) suggested that the ratio of links to nodes lies around 3 for road networks and that the Floyd-Warshall algorithm is not applicable in this case. The Floyd-Warshall algorithm can be stated as follows, using a BASIC-like language. Floyd- Warshall shortest path algorithm Step 1 (initialization

of the connections and backnode matrices) for all nodes and centroids m and n q mn + m if a link joins m to n then c,, +- link cost otherwise c,,,, +- m

Step 2 (obtain shortest paths)

for all nodes k for all nodes and centroids m not equal to k for all nodes and centroids n not equal to k or m if cmk + Ckn < cm, then cm, + %k + ckn and CL

+

qkn

As iterations progress, paths are formed, and when parallel paths emerge, the lower of the two costs is retained in the connections matrix. The complexity of the algorithm is O(N(N + Z)‘). Consider the network in Fig. 1 and assume that the connections matrix before processing is as given in Table 1. The entry 99999 indicates that there is no link from the given nodeicentroid to the given nodeicentroid. The corresponding backnode matrix is as given in Table 2. After processing, the connections matrix is as shown in Table 3. It gives the shortest distance between any pair of zones. An entry 99999 indicates that the

A

-, B

A

‘C

A 0

Centroid Node Fig. 1. First example network.

290

M. G. H. BELL Table 1. The connections From nodeicentroid: 2 1

To: 1 2 3 4 A B C

99999 99999 99999 99999 15 99999 99999

10 99999 99999 99999 99999 99999 99999

Table 2. The backnode From node/centroid: 1 2

To: 1 2 3 4 A B C

1 2 3 4 5 6 7

1 2 3 4 5 6 I

Table 3. The connections From node/centroid: 2 1

To: 1 2 3 4 A B C

99999 99999 99999 99999 15 99999 99999

10 99999 99999 99999 25 99999 99999

Table 4. The backnode From nodelcentroid: 2 1

To: 1 2 3 4 A B c

1 2 3 4 5 6 7

1 2 3 4 1 6 7

matrix before processing

3 99999 30 99999 10 99999 99999 99999

4 30 10 99999 99999 99999 99999 99999

A

B

99999 99999 99999 99999 99999 99999 99999

99999 99999 15 99999 99999 99999 99999

matrix before processing

3

1)

(Example

4

(Example

C

1)

A

B

C

1 2 3 4 5 6 I

2 3 4 5 6 7

I

1

1

2 3 4 5 6 -I

2 3 4 5 6 7

2 3 4 5 6 1

matrix after processing

(Example

I

1)

3

4

A

B

30 20 99999 10 45 99999 99999

20 10 99999 99999 35 99999 99999

99999 99999 99999 99999 99999 99999 99999

45 35 15 25 60 99999 99999

matrix after processing

99999 99999 99999 15 99999 99999 99999

(Example

C 35 25 99999 15 50 99999 99999

1)

3

4

A

B

C

4 4 3 4 4 6 7

2 2 3 4 2 6 I

1 2 3 4 5 6 7

3 3 3 3 3 6 7

4 4 3 4 4 6 7

291

Alternatives to Dial’s logit assignment Table 5. The weights matrix before processing (Example 1) From node/centroid: 1 2

To: 1 2 3 4 A B C

0.0000 0.0000 0.0000 0.0000 0.2231 0.0000 0.0000

0.3679 0.0000 o.OOOa 0.0000 0.0000 o.OOoO 0.0000

3 0.0000 0.0498 0.0000 0.3679 0.0000 o.OOoO 0.0000

4

A

B

C

0.0498 0.3679 0.0000 0.0000 0.0000 o.OoOo 0.0000

0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

0.0000 0.0000 0.2231 0.0000 0.0000 0.0000 0.0000

0.0000 0.0000 0.0000 0.2231 0.0000 0.0000 0.0000

given destination nodeicentroid is not reachable from the given origin node/centroid. The corresponding backnode matrix after processing, given in Table 4, allows the corresponding shortest paths to be traced. For example, the backnode to B on the shortest path from A to B is 3, the backnode to 3 is 4, the backnode to 4 is 2, and finally the backnode to 2 is 1. 4. FIRST LOGIT ASSIGNMENT METHOD

Inspired by the Floyd-Warshall is proposed.

algorithm, the following logit assignment algorithm

First logit assignment algorithm Step 1 (initialization

of weights matrix) for all nodes and centroids m and n if a link joins m to n then w,, +- exp( - ff cost ) otherwise w,, +- 0

Step 2 (process

matrix of weights) for all nodes k for all nodes and centroids m not equal to k for all nodes and centroids n not equal to k or m W mn +

Wm

+

Wmk

Wkn

Step 1 initializes the matrix of weights. For each link or connector present in the network the exponential of minus a times its cost is entered; all other elements of the matrix are assigned the value zero. In Step 2, each node is processed once. When a connection is found between any node or centroid and another node or centroid via the node being processed, the existing weight for the connection (which will be zero if the connection is new) is increased by the product of the weights for the connections m to k and k to n. After completion of Step 2, the probability that a trip from i toj chooses link k can be calculated using the Van Vliet ( 198 1) method, namely, Pijk

=

wir em

( - ack

) wsj/wiJ

(6)

where link k connects node or centroid r to node or centroid s and where wii is assigned the value 1 for all nodes and centroids i (an alternative would be to set wii equal to 1 for all nodes and centroids during the initialization stage of the algorithm). Turning proportions may be evaluated in a similar way. For example, the proportion of traffic from i to j using link k followed by link k’ is w, exp( -ack) exp( -QIC~~) wsi/wii, where r is the in-node for link k and s is the out-node for link k' . The structure of the algorithm is similar to that of Floyd (1962) and Warshall (1962). Paths are built up with each iteration and when parallel paths emerge, the weights

M. G. H. BELL

292

Table 6. The weights matrix after processing From node/centroid: 1 2

To: 1 2 3 4 A B C

0.0000 0.0000 0.0000 0.0000 0.2231 0.0000 0.0000

0.3679 0.0000 0.0000 0.0000 0.0821 0.0000 o.OOOo

(Example

1)

3

4

A

B

C

0.0864 0.1851 0.0000 0.3679 0.0193 o.OOOo 0.0000

0.1851 0.3679 0.0000 O.oooO 0.0413 0.0000 0.0000

0.0000 0.0000 O.oooO 0.0000 0.0000 0.0000 0.0000

0.0193 0.0413 0.223 1 0.0821 0.0043 0.0000 0.0000

0.0413 0.0821 0.0000 0.223 1 0.0092 0.0000 0.0000

for the two paths are summed. All paths and sub-paths without loops, and some with, are generated (if this were not so, the Floyd-Warshall algorithm would not be guaranteed to find the shortest paths). As in the case of the Floyd-Warshall algorithm, the complexity of this algorithm is O(N( N + 2)‘). Referring once again to the network in Fig. 1 and using the link costs given in Table 1 together with a value for cy of 0.1, the weights matrix before processing is as given in Table 5. After processing, the weights matrix is as given in Table 6. From Table 6, the link choice probabilities given in Table 7 are obtained. Note than in Dial assignment, link 4 would have been unused if the cost of link 1 exceeded that of link 2. Traffic assignment is achieved by the following conservation relationship

The network in Fig. 1 contains no loops, in which case the results are independent of the order of choosing node k. When the method is applied to a second example network which contains a loop, shown in Fig. 2, the results shown in Table 9 were obtained for the link choice proportions. The costs assumed, shown in Table 8, are symmetrical about a horizontal axis suggesting that drivers should be indifferent as to whether to use link 1 or link 2. However, there is an asymmetry in the results, reflecting the fact that this method does not generate all paths with loops. Clearly, if node 3 had been chosen before node 2 in Step 2 of the algorithm, the choice probabilities for links 1 and 2 would have been reversed, as would those for links 4 and 6, illustrating the fact that the result does in this case depend on the order of choice of node k. A method that generates all paths with loops is described in the next section.

5. SECOND

LOGIT

ASSIGNMENT

METHOD

This method proceeds from the observation that, if w,, are the elements of the matrix of initial weights, the following Step P produces a new weights matrix containing the combined weight of all paths consisting of two links connecting each pair of nodes or centroids.

Table 7. The link choice proportions Origin destination flow A to B A to C

(Example

1)

Link 1 0.7881 0.7311

2 0.2119 0.2689

3 0.2119 0

4 0.5761 0.7311

5 0.7881 0

Alternatives

293

to Dial’s logit assignment

Fig. 2. Second example

network

Step P (matrix product of weights) for all nodes and centroids m for all nodes and centroids n not equal to m Wlnm + 0 for all nodes k not equal to either m or n w’,, +- W‘mn+ WinkWkn The element w ‘mnis the combined weight of all paths between m and n with exactly two links and is proportional to the probability of choosing to travel from m to n by a path of two links. If W is the initial matrix of weights, then Step P generates W’. When the procedure is reapplied in the following way: Step P ’ (matrix product of weights)

for all nodes and centroids m for all nodes and centroids n not equal to m WN,, + 0 for all nodes k not equal to either m or n I, w mn ,- W”mn + W’mkWkn a new weights matrix is generated for all paths of three links. The element w”,,, is the combined weight of all paths between m and n with exactly three links and is proportional to the probability of choosing to travel from m to n on a path of three links. Step P’ coincidentally yields W 3. The required weights matrix for paths of any number of links, whose elements are proportional to the choice probabilities irrespective of the number of links used, is then given by (I -

W)_’

-

I = w + w2 + w3 +

. . .

(8)

where I is an identity matrix of appropriate dimension, provided the geometric series on the right hand side is convergent. This will be the case, if W” + 0 as n + ~0, namely when the probability of travelling between any pair of nodes by a path with an infinite number of links is infinitesimally small. This is the case for the networks considered here but not for all networks. Implementation of (8) leads to the following algorithm. Table 8. The connections

matrix before processing

From node/centroid: 1 2

To: 1

2 3 4 A B

99999 99999 99999 99999 15 99999

5 99999 2 99999 99999 99999

3 5 2 99999 99999 99999 99999

4 99999 5 5 99999 99999 99999

(Example

2)

A

B

99999 99999 99999 99999 99999 99999

99999 99999 99999 15 99999 99999

294

M. G. H. BELL Table 9. The link choice proportions

(Example

2; First Method)

Link Value of 01 0.1

0.2 0.5 1.0

1 0.5778 0.5593 0.5236 0.5040

2 0.4222 0.4407 0.4764 0.4960

4

3

0.5778 0.5593 0.5236 0.5040

0.8604 0.6262 0.2635 0.0774

5 0.8604 0.6262 0.2635 0.0774

6 0.4222 0.4407 0.4764 0.4960

Second Iogit assignment algorithm Step 1 (initialization

of weights matrix) for all nodes and centroids m and n if a link joins m to n then w,, + exp( --Q! cost) otherwise w,, + 0

Step 2 (process matrix of weights) w +- (I - W))’ - I

Step 1 is as before, leading to the initial matrix of weights W. This is then processed in Step 2 using matrix inversion to yield the final matrix of weights. The link choice probabilities are given as before by (6) and assignment of flows to links by (7). The complexity of this algorithm is comparable with that of the first algorithm. When the above algorithm is applied to the first example network without loops (Fig. 1) the same results are yielded as for the first method. In the case of the second example network with loops (Fig. 2), the results given in Table 10 were obtained. The symmetry as regards preference for links 1 and 2 reflects the fact that all paths are implicitly considered. The proportions using links 3 and 5 decreases with increasing CX,as drivers are squeezed off loops and the longer paths using links 3 and 5. 6. CONCLUSIONS

Two alternatives to Dial’s logit assignment algorithm are proposed. They dispense with the need for either a forward or a backward pass, and therefore with the need to know minimum costs from each origin to any node (needed to sequence the nodes in the forward pass). However, loops are included. The first method considers a finite set of paths, including all those without loops and some of those with. The second method considers all paths which will be an infinite number in the presence of loops. As there is no need for an efficiency criterion, the proposed algorithms may be suitable for use in SUE assignment methods, or in the approximation of UE through SUE, using the method of successive averages as proposed by Powell and Sheffi (1982). The structure of the first algorithm makes it suitable for combination with the FloydWarshall algorithm, leading to the following combined algorithm.

Table 10. The link choice proportions

(Example

2; Second Method)

Link Value of (Y 0.1 0.2 0.5 1.0

1 0.5000 0.5000 0.5000 0.5000

2 0.5000 0.5000 0.5000 0.5000

3 2.2583 1.0166 0.2910 0.0783

4 0.5000 0.5000 0.5000 0.5000

5 2.2583 1.0166 0.2910 0.0783

6 0.5000 0.5000 0.5000 0.5000

Alternatives to Dial’s logit assignment

295

Combined algorithm Step 1 (initialization of matrices) for all nodes and centroids rn and n 4 mn + m if a link joins m to n then c,, + link cost, and w,, +- exp( - CYlink cost ) otherwise c,,,, + 03 and w,,,, + 0 Step 2 (processing of matrices) for all nodes k for all nodes and centroids m not equal to k for all nodes and centroids n not equal to k or m if c,, + c,, < c,,, then c,,,, + cmk + c,, and 4 I??”+ qkn and wmn + wmn + wmkwkn Acknowledgements-l am indebted to William Lam, Mike Maher, Domenico lnaudi, Yasunori lida, Ryuichi Kitamura, and colleagues in the Department of Transportation Engineering at the University of Kyoto for providing a supportive atmosphere and stimulating discussions while the work behind this article was performed.

REFERENCES Davis, G. A. (1993). Exact local solution of the continuous network design problem via stochastic user equilibrium assignment. Transportation Research, 27B, 61-15. Dial, R. B. (1971). A probabilistic multipath traffic assignment model which obviates the need for path enumeration. Transportation Research, 5, 83-111. Floyd, R. W. (1962). Algorithm 97, shortest path. Comm. ACM, 5, 345. Powell, W. B., & Sheffi, Y. (1982). The convergence of equilibrium algorithms with predetermined step sizes. Transportation Science, 16, 45-55. Van Vliet, D. (1978). Improved shortest path algorithms for transport networks. Transportation Research, 12, 7-20. Van Vliet, D. ( 1981). Selected node-pair analysis in Dial’s assignment algorithm. Transportation Research, I5B, 65-68. Warshall, S. (1962). A theorem on Boolean matrices. J. ACM, 9, 1l-12.