0% found this document useful (0 votes)
15 views5 pages

Algoritmo Antec Inter 4

Uploaded by

essanprieto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Algoritmo Antec Inter 4

Uploaded by

essanprieto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1st IFAC Workshop on Advances in Control and

Automation Theory for Transportation Applications


September 16-17, 2013. Istanbul, Turkey

A Public Transit Network Route


Generation Algorithm
Fatih Kılıç ∗ Mustafa Gök ∗∗

Adana Bilim ve Teknoloji University, Adana, Turkey


(Tel:90 322 3386868; e-mail: [email protected]).


∗∗
Cukurova University, Adana, Turkey (e-mail: [email protected])

Abstract: Route generation task in a public transit network is a complex combinatorial problem
which cannot be manually solved. This paper presents a computer algorithm for the solution
of this problem. The presented algorithm has a novel initialization procedure. The algorithm is
implemented and tested on Mandl’s Swiss Road network [Mandl, 1979]. Extensive test runs of
the proposed algorithm on this network show that the proposed algorithm has better average
travel times in all cases except one and offers up to 23% cost savings compared to the most
recent work [Fan and Mumford, 2010].

1. INTRODUCTION and Mumford, 2010]. In the previous work, the initial route
set is generated either randomly (under some constraints)
Efficient public transportation service is indispensable for or under the guidance of the shortest paths of the net-
the survival of the modern societies. The quality of this work. However, both of these strategies do not consider
service has a direct impact on economy, education, health, the usage statistics of the edges, which can provide ex-
environment and all aspects of the social life [Desaulniers cellent guidance for the construction of initial solution.
and Hickman, 2007]. Main stake holders of public trans- This paper presents a meteheuristic algorithm that uses
portation systems are the passengers, operators and lo- this property to construct an efficient initial route set.
cal authorities. The efficiency of a public transportation The proposed algorithm also uses an improved solution-
service can be measured by its cost, demand coverage modification procedure which prevents being stuck in a
capacity and transfer time. However, the stake holders local optimum. The proposed algorithm is implemented
evaluate the efficiency of the service from their point of and tested on Mandl’s network, [Mandl, 1979]. The results
view. For example, for a passenger this means low ticket obtained by extensive runs are compared with the most
prices and short transfer times, while for an operator it recent work in the literature [Fan and Mumford, 2010]. The
means low operating costs and high profits. To balance rest of the paper is organized as follows: The second section
these contradictory demands, local authorities need the describes the route generation problem. The third section
support of efficient computational tools in their decision explains the proposed algorithm. The fourth section shows
making processes. the results, and the last section presents conclusions.
A public transportation network is a complex network
which contains many nodes and links. Efficient route gen-
eration on such a network requires a complex combinato- 2. PROBLEM DEFINITION
rial search, which cannot be solved by using exact mathe-
matical procedures in a practically useful time. Recent pre- A public transportation network can be modeled by using
vious work use heuristic and metahueristic methods [Baaj an undirected graph. Figure 1 shows an example of such
and Mahmassani, 1995]-[Fan and Mumford, 2010]. Meta- a graph, which consists of five nodes and six edges. This
heuristic methods generate better solutions the heuristic graph can be expressed as G = (V, E), where V is the
methods but they are more complicated and abstract than set of vertexes v1 , v2 , v3 , v4 , v5 and E is the set of edges
them. Metaheuristic algorithms use low level local search e(1, 4), e(1, 2), (2, 3), e(3, 4), e(3, 5), e(4, 5). Each vertex vi
algorithms but often the search algorithm has little impact in V represents a stop or another type of demand node
on the quality of the solution. The efficiency of these meth- and each edge e(i, j) in set E represents a weighted
ods, in the context of transit network route generation edge between stops i and j. A weight may represent the
task, briefly depends on three factors as stated in [Fan and distance or the travel time between nodes or it may be
Mumford, 2010]: (1) Representation (2) The quality of the a function of these parameters. In Figure 1, each edge
initial solution set. (3) Suitable modification procedures is associated with a positive integer weight. The travel
in order to explore a solution space. The representation demands on a transportation network are expressed by
methodology is chosen based on the algorithm. For exam- using a matrix called demand matrix, D. Each (i, j)th
ple, methods that use Genetic Algorithm encodes routes element of D represents the number of passengers traveling
as a binary string [Pattnaik et al., 1998], [Tom and Mohan, from node i to node j. Though the transportation demands
2003], [Agrawal and Mathew, 2004]. However, a simple are dynamic by nature, the elements of D are calculated
node representation is also quite popular [Chakroborty for a specific period within a day. A demand matrix for
and Dwivedi, 2002], [Mauttone and Urquhart, 2009], [Fan the example given in Figure 1 is given as

978-3-902823-51-9/2013 © IFAC 162


IFAC ACATTA 2013
September 16-17, 2013. Istanbul, Turkey

X
N X
N X
O1 = A P Hij + B W Hij + C EHr (1)
i,j=1 i,j=1 r in R

where N is number of nodes; P Hij is the trip time from


i to j, W Hij is the waiting and transfer time, EHr is the
empty-seat hours, R is the route set, and A, B and C are
the weighting parameters assigned by the route planner.
Fig. 1. A Sample Graph with 5 Nodes and 6 Edges. Most of the previous work use an objective function similar
to this one. For example, the objective function presented
  in [Fan et al., 2009] does not include the empty seat-
1 2 3 4 5 hours but has more elaborate definition of trip time. That
1 0 15 0 20 0 function is given as
 
2 34 0 16 0 0
D=
0 X X
N N
3 0 8 0 33  O2 = A dij pij + B dij tij (2)
4 0 0 22 0 7
i,j=1 i,j=1
5 0 0 0 56 0
where dij is the number of passengers traveling from node i
This matrix has six rows and columns where the first row to j (demand); pij is the cost of the shortest path obtained
and the first column represent the nodes. D matrix and using current route set, tij is the number of transfers on
graph G are sufficient to describe the transit network route the shortest path using current route set. The first term
finding problem. A solution to this problem contains a in the O2 forces algorithms to select the shortest paths
set of routes on the transportation network model that for transfers, while the second term forces algorithms to
satisfy the travel demands. The routes in the solution set reduce the number of transfers. Both of these terms in
must cover all the nodes given in the D matrix, however, the objective function seems in favor of the passengers,
the solution route network is a sub graph of the transit since the passengers prefer to choose the shorter paths and
network, since it does not contain all the edges between minimum number of transfers to get to their destination.
nodes. However, since both terms are weighted by the demand
values, the paths and transfers associated with higher
Route finding algorithms search the solution space to find demand values are more likely to be chosen, which also
the best solutions according to some objectives that re- favors the operators interest. We also use O2 as objective
flect passengers’, operators’ or transportation authorities’ function in our proposed algorithm.
interests. As mentioned before, the interests of those stake
holders often contradict with each other. For example, re- 3. PROPOSED ALGORITHM
ducing average travel time may conflict with reducing total
route length objective, where the first objective serves the Algorithm 1 Main Algorithm
passengers’ interest while the second objective serves op-
Require: (in G, D, NumRot, MinNode, MaxNode, Tar-
erators’ interest. Obviously, contradicting objectives make
getScore out SolutionSet)
it more difficult to find a feasible solution.
1: CSS ← Initialize(G, D, N umRot, M inN ode, M axN ode)
A feasible solution set can be generated by setting well- ⊲ CSS: Current Solution Set
defined constraints. Three important constraints for route 2: sc ← Evaluate(N SS) ⊲ sc: score of CSS
feasibility are the following: 3: while sc 6= T argetScore do
4: N SS ← SolutionM odif ication(CSS)
(1) Each node of a route must be visited only once so ⊲ N SS: New Solution Set
that back tracking is prevented. 5: if IsProper(N SS)=True then
(2) Each route must connect with one or more routes in 6: sn ← Evaluate(N SS) ⊲ sn: score of N SS
the route set. This constraint guarantees that all the 7: end if
nodes in the route network are connected. 8: CSS ← HC(CSS, N SS)
(3) A lower and upper limit is set for the number of nodes 9: end while
in a route. This constraint restricts route length and
can be used to get balance between the demand of
a short trip and the demand of achieving maximum Algorithm 1 presents the structure of the proposed algo-
node coverage with fewer number of trips. rithm. The inputs of the algorithm are graph, G, trans-
portation demand matrix, D, required number of routes,
The quality of the solution set is measured by using NumRot, minimum and maximum node numbers, MinN-
an objective function. The objective function directly or ode, MaxNode, and a target score value, TargetScore,
indirectly formulates the interests of the stake holders. respectively. The output of the algorithm is a set of routes.
Algorithms target to generate a solution set that minimizes The algorithm has four main procedures, Initialize, Solu-
the value of objective function. A multi-objective function tion Modification, IsProper and Hill Climbing. The details
contains two or more objectives which may represent of the procedures are explained in the next subsections.
contradicting objectives of the stake holders. For example, The steps of the algorithm is summarized as follows: Ini-
a very general multi-objective function is presented in tialize procedure generates an initial solution set which
[Ceder and Israeli, 1998]. This function defines passengers’ is assigned as current solution set, CSS. The score, sc,
and operators’ interests as a weighted sum as for CSS is calculated using the objective function O2

163
IFAC ACATTA 2013
September 16-17, 2013. Istanbul, Turkey

Algorithm 2 Initialize operation adds a node to one of the ends of the route
and extends it. Delete node operation removes a node
Require: (in G, D, NumRot, MinNode, MaxNode, out
from one of the ends of the route and shortens it. Both
SolutionList)
operations are commonly used in the literature. Insert
SP List ← Find all shortest paths in the graph
node procedure is inspired by the pair insertion algorithm
2: T otDemand ← Calculate total demand
presented [Mauttone and Urquhart, 2009] which inserts a
EdgeU sage ← Calculate edge usage rates
pair of nodes in a route. This operation randomly picks a
4: U sageP rob ← Compute probability distribution based
node which does not exist in the route and adds this node
on EdgeU sage and edge length
to the route if it produces a better score. Algorithm 3 gives
while i 6= N umRot do
the details of the insert node procedure. Node insertion is
6: N ewRoute ← Pick a random edge using
a fast way of covering all nodes and but it may overextend
U sageP rob distribution.
the route, when this occurs the procedure uses delete
N odeN umber ← A random value between MixN-
operation to shorten the route. This procedure works
ode and MaxNode
faster than the pair insertion procedure because it contains
8: while j 6=NodeNumber do
less overhead. A last comment on this routine is that it
N ewRoute ← ExtendRoute(N ewRoute)
may significantly modify the route, which is good since it
10: end while
reduces the risk of getting stuck in a local optimum.
SolutionList ← N ewRoute
12: end while
3.3 Hill Climbing Procedure
presented in Section 2. Solution Modification procedure
modifies CSS. IsProper procedure tests if the modified CSS HC algorithm is a local search algorithm which checks for
satisfies the crucial constraints explained in Section 2, if a better solution by iteratively changing a single element
this test is passed modified CSS is assigned as new solution of a solution [Russell and Norvig, 2003]. This modified
set, NSS, and the score, sn for NSS is calculated also using solution is called the neighbor of the current solution. If
O2. A five minutes penalty is added for each transfer for the neighbor solution is better than the current solution it
both score computations. Hill Climbing (HC) procedure replaces the current solution, otherwise another neighbor
picks the solution that has better score and assigns as CSS. is checked.
The while loop is repeated till the TargetScore is reached.
4. RESULTS
3.1 Initialize Procedure
The proposed algorithm is implemented using C# and
Proposed algorithm generates an initial route set based on tested on Mandl’s Swiss Road network [Mandl, 1979]. This
the edge usage statistics. To the best of our knowledge, this network has 15 nodes and 20 edges and total demand for
method has not been used in the literature. Algorithm 2 the network is 15.720. Though this network is a fairly small
presents the Initialize procedure. The statistics is obtained network, it is preferred to test the proposed algorithm,
by computing all the shortest paths in the graph then since most of the previous work are also tested on this
calculating a edge usage score based on the total traffic network. We performed 10.000 runs on a PC that has
passing over a single edge. Each edge score is weighted Intel Core i5-2540M (2,60 GHz, 3 MB L3 ) chip with 4
by the inverse length of the edge and normalized. The GB memory. We generate solution sets that contain 4,
normalized value is set as the discrete probability for the 6, 7, and 8 routes and compared our best results with
edge. ExtendRoute() function extends the route by adding Fan and Mumford’s best results presented in [Fan and
a new edge at the beginning or the at the end of the Mumford, 2010]. For fair comparison, the terms of the
route. The edge with the highest usage statistics among objective function are weighted equally and a 5 minutes
the candidate edges is selected as the new edge. penalty is added for each transfer as done in [Fan and
For each edge, this procedure considers the demand on Mumford, 2010]. Table 1 presents the comparison results.
both directions, which can be important in making the In this table, for each solution set, the transfer rows show
decision whether to include a given edge in the route con- the percentages of the satisfied demand for 0, 1 and 2
struction. This can be observed from the D matrix given transfers, respectively; the ATT row shows the average
in Section 2. For example, in this matrix the demands travel time for a passenger in terms of minutes; and the
between nodes 4 and 5 in two directions are given as Algorithm 3 InsertVertex
d(4, 5) = 7 and d(5, 4) = 56, any algorithm that observes
only the demand from node 4 to 5 is very likely to discard Require: (in CurrentRoute, out ModifiedRoute)
this edge even though the demand on the reverse direction M odif iedRoute ← CurrentRoute
2: u ← A random node, n, such that n 6∈ CurrentRoute
is quite large. The proposed procedure does not fall in this
trap by computing the usage of the edges by adding the for all node ∈ CurrentRoute do
demands in both directions. 4: N ewRoute ← insert u after node
if cost(N ewRoute) < cost(M odif iedRoute) then
3.2 Solution Modification Procedure 6: M odif iedRoute ← N ewRoute
end if
8: end for
Solution Modification Procedure chooses a random route
from the solution set and then again randomly applies one while |M odif iedRoute| > M axN ode do
of three modification operations. These operations are add 10: r′ ← Delete(ModifiedRoute)
node, delete node and insert node operations. Add node end while

164
IFAC ACATTA 2013
September 16-17, 2013. Istanbul, Turkey

Table 1. Results Table 3. Results for Different A and B Values


Route Fan & Kılıç & Route A:0 B:1 A:1 B:0
Number Mumford Gok Number
0 93.26% 91.84% 0 92,74% 88,63%
4 Transfer 1 6.74% 8.16% 4 Transfer 1 7,26% 8,93%
2 0% 0% 2 0% 2,44%
AT T 11.37 10.71 AT T 12,86 10,75
Cost 147 129 Cost 136 137
0 91.52% 92.81% 0 95,95% 89,53%
6 Transfer 1 8.48% 6.87% 6 Transfer 1 3,98% 9,96%
2 0% 0.32% 2 0,07% 0,51%
AT T 10.48 10.45 AT T 10,67 10,55
Cost 215 190 Cost 206 171
0 93.32% 94.35% 0 95,50% 87,99%
7 Transfer 1 6.36% 5.14% 7 Transfer 1 04,50% 11,69%
2 0.32% 0.51% 2 0% 0,32%
AT T 10.42 10.36 AT T 10,49 10,66
Cost 231 223 Cost 225 204
0 94.54% 95.12% 0 96,60% 90,24%
8 Transfer 1 5.46% 4.56% 8 Transfer 1 3,40% 9,44%
2 0% 0.32% 2 0% 0,32%
AT T 10.36 10.96 AT T 10,31 10,54
Cost 283 217 Cost 263 238

Table 2. Routes in The Solution Sets the results of the test runs. The results show that the first
set of weights improves the transfer rate and ATT, but
Route Solution
Number List
significantly increases the total cost as expected, and the
second set of weights significantly worsens the transfer rate
4 12,10,9,7,5,2,1,0
and total cost but slightly improves ATT. The results for
1,4,3,5,7,9,10,11
9,6,14,5,2,1,3,4 the second set of weights are worse than the results for the
10,12,13,9,7,14,8 first set. This shows the necessity for a different objective
6 12,10,9,7,5,2,1,0
function. An objective function that aims more strongly on
12,13,9,7,5,3,11 decreasing transfer rates is more likely to generate better
6,14,7,5,2,1,4 results for the proposed algorithm.
8,14,5,3,11,10,12,13
11,10,9,7,5,3,1,2
12,10,9,6,14,5,3,4
5. CONCLUSION
7 0,1,3,5,7,9,10,11
12,13,9,10 This paper presented a route generation algorithm for
7,14,6,9,13,12,10,11 transit network design problem. The proposed algorithm
9,6,14,5,2,1,3,11 is tested on Mandl’s Swiss Road network to present the
8,14,6,9,7,5,2,1 effectiveness of our algorithm compared to the previous
12,10,9,7,5,2,1,0 work. We expect superior results in a larger network.
10,9,7,5,3,4,1,0 One advantage of the proposed algorithm is that the
8 13,12,10,9,6,14,8 solution set heavily depends on the most used roads in the
10,9,6 network. This information can help the decision makers
4,3,1,2,5,14,8 in planing tasks such as maintenance of the roads or the
10,9,6,14,5,3
control of the traffic in high demand links. The presented
12,10,9,7,5,3,11
13,9,6,14,7,5,2,1
initial route generation procedure generates efficient and
12,9,7,5,2,1,0 high quality solution set. The proposed algorithm can
6,9,7,5,3,4,1,0 give better results with different local search algorithms
such as simulated annealing and tabu search algorithms.
cost row shows the total cost of solution set in terms of Also, the procedures in the proposed algorithm can be
kilometres. The proposed algorithm has better ATT for 4, used to develop a Genetic Algorithm based version. The
6, and 7 route cases and offers up to 23% reduction in cost modification of the objective function used to evaluate our
while the 0 transfer percentages for both algorithms differ solutions may also improve results. Our future work will
in the range 0.58% to 1.42%. Table 2 presents routes sets focus on these issues.
generated by the proposed algorithm. Each route in the
table is shown as a sequence of nodes. For example, for the REFERENCES
8 route case, the first route in the solution starts with the
node 13 and stops at the node 8. To observe the effects of J. Agrawal and T.V. Mathew. Transit route network
changing weights of the terms in the objective function, we design using parallel genetic algorithm. Journal of
performed test runs for two extreme cases, where weights Computing in Civil Engineering, 18(3):248–256, 2004.
are set as A = 0, B = 1 and A = 1, B = 0. Table 3 presents cited By (since 1996)26.

165
IFAC ACATTA 2013
September 16-17, 2013. Istanbul, Turkey

M.H. Baaj and H.S. Mahmassani. Hybrid route generation


heuristic algorithm for the design of transit networks.
Transportation Research Part C, 3(1):31–50, 1995.
A. Ceder and Y. Israeli. User and operator perspectives in
transit network design. Transportation Research Record,
(1623):3–7, 1998.
P. Chakroborty and T. Dwivedi. Optimal route network
design for transit systems using genetic algorithms.
Engineering Optimization, 34(1):83–100, 2002.
G. Desaulniers and M.D. Hickman. Chapter 2 public tran-
sit. Handbooks in Operations Research and Management
Science, 14(C):69–127, 2007.
L. Fan and C.L. Mumford. A metaheuristic approach
to the urban transit routing problem. Journal of
Heuristics, 16(3):353–372, 2010.
L. Fan, C.L. Mumford, and D. Evans. A simple multi-
objective optimization algorithm for the urban transit
routing problem. pages 1–7, 2009.
C. Mandl. Applied Network Optimization, 1979. cited By
(since 1996)13.
A. Mauttone and M.E. Urquhart. A route set construc-
tion algorithm for the transit network design problem.
Computers and Operations Research, 36(8):2440–2449,
2009.
S.B. Pattnaik, S. Mohan, and V.M. Tom. Urban bus
transit route network design using genetic algorithm.
Journal of Transportation Engineering, 124(4):368–375,
1998.
Stuart J. Russell and Peter Norvig. Artificial Intelligence:
A Modern Approach. Pearson Education, Upper Saddle
River, NJ, 2003.
V.M. Tom and S. Mohan. Transit route network design
using frequency coded genetic algorithm. Journal of
Transportation Engineering, 129(2):186–195, 2003. cited
By (since 1996)36.

166

You might also like