Vous êtes sur la page 1sur 13

A practical model for transfer optimization in a transit network:

Model formulations and solutions


Yousef Shafahi
*
, Alireza Khani
Sharif University of Technology, Department of Civil Engineering, P.O. Box 11365-9313, Azadi Avenue, Tehran, Iran
a r t i c l e i n f o
Article history:
Received 23 April 2009
Received in revised form 24 January 2010
Accepted 6 March 2010
Keywords:
Public transportation
Transit scheduling
Transfer coordination
Genetic algorithm
a b s t r a c t
This paper studies the transit network scheduling problem and aims to minimize the wait-
ing time at transfer stations. First, the problem is formulated as a mixed integer program-
ming model that gives the departure times of vehicles in lines so that passengers can
transfer between lines at transfer stations with minimum waiting times. Then, the model
is expanded to a second model by considering the extra stopping time of vehicles at trans-
fer stations as a new variable set. By calculating the optimal values for these variables,
transfers can be better performed. The sizes of the models, compared with the existing
models, are small enough that the models can be solved for small- and medium-sized net-
works using regular MIP solvers, such as CPLEX. Moreover, a genetic algorithm approach is
represented to more easily solve larger networks. A simple network is used to describe the
models, and a medium-sized, real-life network is used to compare the proposed models
with another existing model in the literature. The results demonstrate signicant improve-
ment. Finally, a large-scale, real-life network is used as a case study to evaluate the pro-
posed models and the genetic algorithm approach.
2010 Elsevier Ltd. All rights reserved.
1. Introduction
A transit system is an important part of every urban transportation system. Since the construction of transit systems in
large cities requires a great investment, the use of a currently operating transit system can help transportation authorities to
better manage existing demands. Transit scheduling is one approach that transportation experts can use to better improve
the existing system. To do this, the acts of setting headways (or frequencies) and creating timetables are two important tasks.
In general, the transit operational planning process includes ve basic steps, as follows (Haghani and Shafahi, 2002; Haghani
et al., 2003; Haghani and Banihashemi, 2002):
1. Transit network design.
2. Timetable design.
3. Vehicle scheduling.
4. Crew (drivers) assignment.
5. Fleet maintenance scheduling.
Step 1 is related to land use, transportation demand, etc. After assessing a transit network and its properties, such as eet
size, operating cost and public transportation demand, the design of a timetable for servicing the related demand is the aim
0965-8564/$ - see front matter 2010 Elsevier Ltd. All rights reserved.
doi:10.1016/j.tra.2010.03.007
* Corresponding author. Tel.: +98 21 66005818; fax: +98 21 66004828.
E-mail addresses: shafahi@sharif.edu (Y. Shafahi), akhani@alum.sharif.edu (A. Khani).
Transportation Research Part A 44 (2010) 377389
Contents lists available at ScienceDirect
Transportation Research Part A
j our nal homepage: www. el sevi er . com/ l ocat e/ t r a
of step 2. The creation of a timetable that can be implemented and that satises constraints, even optimizing the objective
function, is considered in this step. In step 3, assignments of vehicles to trips are made, and a schedule is created for each
vehicle. Crew assignment is performed in step 4. In this step, drivers are assigned to vehicles, with the vehicle scheduling
from step 3, and the number of drivers and their work times are calculated. Given the vehicles operating schedules, their
maintenance and inspection requirements and the availability of maintenance resources and crews, in step 5, vehicles are
scheduled for maintenance and assigned to limited existing facilities such that each vehicle is maintained in a timely man-
ner, while the amount of time that the vehicles are pulled out of their scheduled services for maintenance is minimized. Due
to the complexity of the problems, transit planning is performed in a sequential manner in which the outcome of one step is
fed as an input to the next step.
As a part of step 2, in this research, we offer mathematical models for creating a timetable to minimize the total trans-
fer waiting time in a transit network. Steps 35 are investigated after the timetable creation in step 2. Thus, this study is
completely independent of steps 35, and the results of the models are used as input for these tasks. The papers major
contribution is in proposing two new mathematical models for transfer optimization in transit networks, which can be
used for any kind of transit network. The objective of the models are to minimize total transfer waiting time, which is
more reasonable than objectives such as maximizing the number of simultaneous arrivals. Herein, mathematical tech-
niques are used to optimize the size of the models so that the models are small enough, compared with existing models,
to solve small- and medium-sized networks using regular MIP solvers like as CPLEX. Moreover, a genetic algorithm ap-
proach is used to more easily solve the problem for larger networks. The models are implemented on a large-scale,
real-life bus network, and the results showed satisfactory improvements. To this end, a review of previous studies is dem-
onstrated in Section 2. In Section 3, the two mixed integer programming models are presented. Two networks are used in
Section 4 to explain the models and their practicality. The genetic algorithm, for use in large transit networks, is described
in Section 5. To evaluate the models and the genetic algorithm, a case study of a large urban bus network is performed,
and the process and results are explained in Section 6. Finally, conclusions and suggestions for future studies in the eld
are presented in Section 7.
2. Literature review
Recent studies in transfer optimization have been reviewed, and their outlines are described here. Ceder et al. (2000) pre-
sented a MIP model to maximize the number of simultaneous arrivals of buses from different lines to transfer stations. In this
model, the headways are not xed, but a range [Hmin
k
, Hmax
k
] is considered for the headways in each line. The decision
variable, X
ik
, is dened as the departure time of the ith vehicle in line k, and the difference between X
ik
and X
(i+1)k
should
not be smaller than Hmin
k
or greater than Hmax
k
. The frequency of departures in the planning duration is determined
for the headway for each line. The complexity of the model represented by Ceder et al. (2000) is so great that only simple
networks can be solved directly. Thus, a heuristic algorithm was created that can be used to solve larger networks. The algo-
rithm consists of three operators. In the rst operator, a timetable is created with constant headways for each line, so that a
simultaneous arrival is made and repeated between each pair of lines at each transfer station. Thus, the rst try of the algo-
rithm is the use of constant headways. If the timetable explained above cannot be created according to the possible head-
ways in each line, a different timetable is created in which headways are not constant in each line. This timetable is the result
of the second operator. The third operator is used to change the label of the lines with incomplete timetables and to assign a
departure time to vehicles that are not considered in the previous steps. The most noticeable feature is that the algorithm
resulted in constant headways in the case study used by Ceder et al. (2000).
Yan and Chen (2002) and Yan et al. (2006) presented a model for intercity bus routing and scheduling. The model used
timespace networks that consist of two types of networks, eet ow timespace networks and passenger ow timespace
networks for each OD pair. The objective of the model is to minimize the total cost, consisting of operating cost, waiting
cost, etc. By decomposing the model, the vehicle schedule can also be set.
Zhao and Zeng (2008) used a heuristic method for optimizing transit network planning, including route network design,
vehicle headway setting and timetable creation. The goal of the model is to minimize passenger cost. In their research, the
transfer cost is separated into walking time between stops, waiting time at transfer stations and transfer penalty time.
Cevallos and Zhao (2006) used the genetic algorithm to change an existing timetable in order to have more coordination
between lines. In their research, a shift in the timetable is used to reduce the transfer time. Although the genetic algorithm
was used for a medium-sized network with 40 routes as a case study, the mathematical model was not considered for solv-
ing the problem. The results for the case study showed that the genetic algorithm can be a useful method in such scheduling
problems.
Castelli et al. (2004) studied multimodal transportation system scheduling and presented a Lagrangian-based heuristic
procedure. The goal of the study was to reduce total cost, while still serving the passengers with an acceptable level of ser-
vice. It seems that their models are most useful for ofces and school services that have an opening and ending time and
where passenger demand is concentrated in a small duration.
A practical and applicable scheduling model for transfer optimization in transit networks that can be easily solved has not
been addressed in the literature. This research attempts to deal with this issue and presents a mathematical formulation and
an efcient solution procedure for transit networks of every size.
378 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
3. Transfer optimization models
The proposed models for coordinated schedules of public transportation in this research have been formulated as two
mixed integer programming (MIP) models. The objective function of the models is the total waiting time at transfer stations.
The departure time of vehicles fromthe rst station of each line is the output of the rst model. In the second model, which is
based on the rst one, the optimal extra stopping times of vehicles at transfer stations are considered for better passenger
transfer.
3.1. Model assumptions
The main assumptions considered in the models are:
The transit network is given as an input.
Headways are given in each transit line and are assumed to be uniform in each line during the planning duration. This
assumption is not only acceptable for a time period (e.g., peak hour), but is also implemented in most urban transit net-
works. Whenever passenger demand is reasonably stable, uniform (constant) headways provide the most efcient oper-
ation (even for vehicle loading and schedule stability), and they are most attractive to passengers (Vochic, 2004).
According to transit planning principles, constant headways are not only more attractive to passengers, but are also more
practical for implementation. The use of variable headways for a transit line may result in passenger confusion, unequal
load factors for different vehicles and even longer waiting times for passengers. In addition, constant headways may
result in more coordination in transfer stations, and a good transfer can be easily repeated.
The travel times of vehicles are given in each part of the network.
The transit demand and the number of passengers transferring between pairs of lines are given.
The primary stopping time of vehicles is a preplanned constant value at each transfer station. This is the time during
which a vehicle is stopped at a station and is used for passengers getting on and off the vehicles.
The second model in this study considers the extra stopping time for vehicles at transfer stations as a variable set. This var-
iable set is used to compute the time when a vehicle should stop more than its primary stopping time in order to produce a
better possible transfer between buses in another transit line. Thus, the optimal value of the extra stopping time is calcu-
lated in the model. As mentioned above, constant headways are used for each line in the rst model. The use of the extra
stopping time is a relaxation of this assumption. By including the extra stopping time for vehicles at some stations, the arri-
val time of the vehicle changes at other stations, which can be interpreted as a variation of headway. However, by limiting
the value of the extra stopping time for each vehicle of each line at each transfer station, this variation does not signicantly
change the round trip time (RTT) in the line, and the frequency of vehicle departure remains constant in each line.
The transfer time (walking time) between vehicles in two lines at a transfer station is known. This value is the time that a
passenger spends getting off a vehicle, walking to another vehicle and getting on it, provided that a vehicle is present
when the passenger arrives at the stop. Thus, the waiting time that a passenger may experience is not a part of the trans-
fer time denition.
In each transfer station, transferring passengers select the rst vehicle of the target line for transferring in order to reduce
their transfer waiting time.
3.2. Variables and input parameters
The input parameters of the models are:
R: set of all lines in the transit network; i, j and k are line indices.
S: set of all transfer stations in the transit network; s is the transfer station index.
S
j
: set of all transfer stations in transit network in line j.
h
i
: headway of line i (in minutes).
g
ij
: greatest common divisor of h
i
and h
j
.
t
s
i
: travel time of vehicles from starting point of line i to transfer station s.
dt
s
i
: stopping time of vehicles in line i at transfer station s.
p
s
ij
: number of passengers transferring from line i to line j at transfer station s.
p
s
i
: number of passengers in line i not transferring at transfer station s (staying aboard).
tt
s
ij
: needed transfer time for passengers transferring from line i to line j at transfer station s. This value is the time needed
for a passenger to walk from the vehicle in line i to the vehicle in line j.
To create a timetable for a transit network with the input parameters dened above, the decision variables of the pro-
posed model are:
X
i
: departure time of the rst vehicle in line i, which should not exceed h
i
.
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 379
Other variables used in the model are:
WT
s
ij
: minimum waiting time for passengers transferring from line i to line j at transfer station s. Transfer waiting times
can differ in a period according to the different headways of different lines. Thus, the minimum value is dened as WT
s
ij
and can be found in the model.
AWT
s
ij
: average waiting time for passengers transferring from line i to line j at transfer station s. According to different
transfer waiting times, the average of transfer waiting times in a period is calculated and used in the model. In the case
that the headways are equal in lines i and j, the average transfer waiting time, AWT
s
ij
, is equal to the minimum transfer
waiting time, WT
s
ij
.
Y1
s
ij
and Y2
s
ij
: integer variables.
W
s
ij
: binary variable.
Z: objective function; consisting of a summation of the total waiting time at all transfer stations of the transit network.
3.3. Problem formulation
Now, let us consider a group of passengers transferring from line i to line j at transfer station s. The waiting time for these
passengers is:
WT
s
ij
X
j
t
s
j
dt
s
j
h
j
Y2
s
ij
_ _
X
i
t
s
i
tt
s
ij
h
i
Y1
s
ij
_ _
1
The rst group of passengers transferring from line i arrives at a vehicle in line j at transfer station s at time
X
i
t
s
i
tt
s
ij
, and the rst vehicle in line j will depart from the station at time X
j
t
s
j
dt
s
j
. Since X
i
and X
j
are the departure
times of the rst vehicles in lines i and j, respectively, the passengers of the rst vehicle in line i may not catch the rst
vehicle in line j. Two possible situations should be considered: rst, the passengers of the rst vehicle in line i may miss
the rst vehicle of line j when they arrive at station s, and they must wait until the next vehicle arrives. Thus, the term
h
j
Y2
s
ij
is added to the departure time of the vehicle in line j so that other vehicles in line j can be considered for the trans-
fer. The second situation is that the waiting time is greater than h
i
. Since WT
s
ij
was dened as the minimum transfer wait-
ing time, it should not exceed h
i
, and the term h
i
Y1
s
ij
is added to the arrival time of the passengers so that passengers from
other vehicles in line i that have shorter waiting times can be considered for transfer, and the minimum transfer time is
found.
Y1
s
ij
and Y2
s
ij
are calculated in the model so that the minimum value for WT
s
ij
can be calculated. To minimize the total wait-
ing time in the network, the average waiting time for all transfer states in a period should be considered for each transfer
station. Fig. 1 shows the transfer states from line i to line j at a transfer station s as an example.
Lemma 1. Having g
ij
as the greater common divisor of h
i
and h
j
, the average transfer waiting time for passengers transferring from
line i to line j at transfer station s is equal to:
AWT
s
ij
WT
s
ij

h
j
g
ij
2
_ _
2
The average transfer waiting time is equal to the minimumwaiting time for lines i and j with equal headways. In this case,
passengers transferring from any vehicles in line i to vehicles in line j will have the same transfer state and the same waiting
times.
Proof. First, we know that the amount of waiting time for the passenger transferring from line i to line j at transfer station s
is similar in each period (see Fig. 1). If we dene a period as the least common multiple of h
i
and h
j
and if we have n transfer
groups from line i to line j at station s, the average waiting time for the transfer groups is calculated as:
1 3 7 5
h
i
=6 h
i
=6
Line i:
Line j:
time
time
Period k Period k+1
h
i
=6
h
i
=6 h
i
=6 h
i
=6 h
i
=6
h
j
h 8 =
j
=8 h
j
=8 h
j
h 8 =
j
=8
1 3 5

Fig. 1. Different transfer waiting times between lines i and j in a period.
380 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
AWT
s
ij

WT
s
ij
WT
s
ij
g
ij
WT
s
ij
2g
ij
WT
s
ij
n 1g
ij

n
n
h
i
g
ij
AWT
s
ij

h
j
g
ij
k1
WT
s
ij
k 1g
ij

h
j
g
ij
k1
1
AWT
s
ij

h
j
g
ij
WT
s
ij
h
j
g
ij

h
j
g
ij
h
j
g
ij
1
_ _
2
_
_
_
_
g
ij
h
j
g
ij
AWT
s
ij
WT
s
ij

h
j
g
ij
2
_ _

The difference between WT
s
ij
and AWT
s
ij
is explained as an example in Fig. 1. In this gure, WT
s
12
is equal to 1 min, and
AWT
s
12
is equal to 4 min
AWT
s
12

1 3 5 7
4
1
82
2
_ _
4 3
The total transfer waiting time in the network is calculated by summing the transfer waiting times for all passengers. The
average waiting time for all passengers transferring from line i to line j at station s is multiplied by the number of passengers
transferring between the two lines and the number of vehicles arriving at the transfer station, which is equal to
D
h
i
. The result
is the total transfer waiting time for passengers transferring from line i to line j at transfer station s. The objective function of
the model is the summation of the transfer waiting time for all pairs of lines and all stations. Now, we can propose the rst
model as follows:
min z

ij
D
h
i
p
s
ij
AWT
s
ij
_ _
4
s:t:WT
s
ij
X
j
t
s
j
dt
s
j
h
j
Y2
s
ij
X
i
t
s
i
tt
s
ij
h
1
Y1
s
ij
; 8 i 2 R; j 2 R; s 2 S 5
AWT
s
ij
WT
s
ij

h
j
g
ij
2
_ _
; 8 i 2 R; j 2 R; s 2 S 6
WT
s
ij
P0; 8 i 2 R; j 2 R; s 2 S 7
WT
s
ij
< g
ij
; 8 i 2 R; j 2 R; s 2 S 8
AWT
s
ij
< h
j
; 8 i 2 R; j 2 R; s 2 S
j
9
X
k
< h
k
; 8 k 2 R 10
X
k
P0; 8 k 2 R 11
Y1
s
ij
; Y2
s
ij
Integer; 8 i 2 R; j 2 R; s 2 S 12
As described before, the objective function of the model is the total transfer waiting time in the network. Constraint (5)
gives the denition of the minimum waiting time for passengers transferring from line i to line j at transfer station s, and
constraint (6) gives the denition of the average waiting time for the transfer passengers. Constraints (7) and (8) guarantee
that the calculated waiting time is positive and that the minimum possible waiting time is obtained for the transfer, respec-
tively. Constraints (9) and (10) are used to guarantee the practicality of the results. The complexity of the model (the number
of integer variables) is on the order of NK
2
, where N is the number of transfer stations and K is the number of lines in the
network. Even in real networks, the complexity of the model is on the order of NK. Hence, the model can be solved by com-
mon MIP solver packages for medium-sized networks. Experience has shown that the model for networks with fewer than
50 lines can be solved by general solvers like CPLEX. To further reduce the solving time, upper bounds are applied to the
integer variables Y1
s
ij
and Y2
s
ij
. These bounds signicantly reduce the time needed to solve the model.
Lemma 2. The upper bounds for the variables Y1
s
ij
and Y2
s
ij
are:
Y1
s
ij
up
t
s
j
t
s
i
h
i

h
j
g
ij
_ _ _ _
13
Y2
s
ij
up
t
s
j
t
s
i
h
j

h
i
g
ij
_ _ _ _
14
where | | indicates the absolute value of the argument, and [ ] indicates the integer portion of the argument.
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 381
Proof. Since Y1
s
ij
and Y2
s
ij
originate from the difference between arrival times of vehicles in lines i and j at transfer station s
and also from the difference between t
s
j
and t
s
i
, the minimum values needed for these variables, in order to ensure a feasible
value for WT
s
ij
, are
t
s
j
t
s
i
h
i

and
t
s
j
t
s
i
h
j

, respectively. A feasible value for WT


s
ij
must be a positive value that is less than h
j
. In addi-
tion to these values, all waiting times in a period according to Fig. 1 (least common multiple of h
i
and h
j
) must be checked to
nd the minimum value for the transfer waiting time. The values of Y1
s
ij
and Y2
s
ij
needed for this part are
h
i
h
j
g
ij
=h
i
and
h
i
h
j
g
ij
=h
j
or
h
j
g
ij
and
h
i
g
ij
_ _
, respectively. The nal values for the upper bounds of variables Y1 and Y2 are demonstrated in 13 and 14. h
Since h
j
Y2
s
ij
_ _
h
i
Y1
s
ij
_ _
is always a multiple of g
ij
, constraint (5) can be replaced by constraints (16)(18) such that one of
the integer variables Y1
s
ij
or Y2
s
ij
has a non-zero value while the other remains zero. In this way, the model changes as shown
below:
min Z

ij
D
h
i
p
s
ij
AWT
s
ij
_ _
15
s:t: WT
s
ij
X
j
t
s
j
dt
s
j
g
ij
Y2
s
ij
X
i
t
s
i
tt
s
ij
g
ij
Y1
s
ij
; 8 i 2 R; j 2 R; s 2 S 16
Y1
s
ij
< MW
s
ij
; 8 i 2 R; j 2 R; s 2 S 17
Y2
s
ij
< M1 W
s
ij
; 8 i 2 R; j 2 R; s 2 S 18
Constraints 1117
By changing the denition of the variables Y1
s
ij
and Y2
s
ij
, the upper bounds of the variables are multiplied by
h
i
g
ij
and
h
j
g
ij
,
respectively. Thus, the new upper bounds will be:
Y1
s
ij
up jt
s
j
t
s
i
j
h
i
h
j
g
ij
_ __ _ _
g
ij
19
Y2
s
ij
up jt
s
j
t
s
i
j
h
i
h
j
g
ij
_ __ _ _
g
ij
20
4. Discussion
Here we consider two example problems. Example 1 explains how the model works, and Example 2 compares its perfor-
mance with another approach to solve the same problem.
Example 1. To explain the model, we consider a simple network with four lines and two transfer stations. This network is
shown in Fig. 2. The headways and travel times from the start points of the lines to the transfer stations are shown in Table 1.
The number of passengers transferring between each pair of lines is shown in Table 2. The mean transfer time and stopping
time are assumed to be 0.5 and 1 min, respectively, for all transfers.
Using CPLEX, the model can be solved quickly; the network in Fig. 2 was solved in less than one second. The results for a
planning duration of 1 h show that the objective function improves by 58%, from 11,670 to 4860 min, in comparison with
that obtained without scheduling. Similarly, the average waiting time improves from 4.52 to 1.88 min in the system. Table
Line 3
Line 2
Station 1 Station 2
Line 4
Line 1
Fig. 2. A simple transit network (Example 1).
382 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
3 shows the timetable produced by the model for the sample network. As previously described, the rst departure times, X
i
,
are gained from the model, and the other departure times are calculated by adding h
i
to X
i
. In addition, the minimum waiting
times, WT
s
ij
, and the average waiting times, AWT
s
ij
, for all transfers are shown in Table 4.
In the rst proposed model, the stopping time of vehicles at each transfer station is given as a constant value, and it is
appropriate for passengers to get on and off the vehicles. A vehicle can stop at a transfer station until a vehicle in another
line arrives and its passengers make a successful transfer. This extra stopping time is usually very small in comparison with
the headway, but may reduce the transfer time. By allowing an extra stopping time for vehicles at transfer stations, more
passengers may transfer and will not miss a vehicle for a small time. This extra stopping time can be entered into the model
as a new variable set, and its optimal value can be calculated. We dene the variable edt
s
i
for each line i and station s, which
corresponds to how long a vehicle in line i should stop more at transfer station s, as compared to dt
s
i
.
By entering new variables into the model, some changes are made. First, the denition of the minimum waiting time
changes according to:
WT
s
ij
X
j
t
0s
j
dt
s
j
edt
s
j
g
ij
Y2
s
ij
_ _
X
i
t
0s
1
tt
s
ij
g
ij
Y1
s
ij
_ _
21
Next, the travel time to each transfer station in each line will vary according to the extra stopping times at previous sta-
tions. Eq. (22) shows how these values are adjusted according to edt
s
i
:
t
0s
1
t
s
i

bs
n2S
i
edt
n
i
22
where S
bs
i
is the set of all transfer stations in the transit network placed in line i before station s.
Table 1
Headways and travel times of network illustrated in Fig. 2.
Line Headway Travel time to station 1 Travel time to station 2
1 10 4
2 10 7
3 5 3 11
4 5 21 11
Table 2
Transfer passengers of network illustrated in Fig. 2.
Station From line To line
1 2 3 4
1 1 50 40
1 3 40
1 4 50
2 2 30 90
2 3 10
2 4 10
Table 3
Timetable created for network illustrated in Fig. 2.
Departure number Line
1 2 3 4
1 0 6 1.5 2.5
2 10 16 6.5 7.5
3 20 26 11.5 12.5
4 30 36 16.5 17.5
5 40 46 21.5 22.5
6 50 56 26.5 27.5
7 31.5 32.5
8 36.5 37.5
9 41.5 42.5
10 46.5 47.5
11 51.5 52.5
12 56.5 57.5
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 383
The last item to be considered is the time that non-transfer passengers spend when a vehicle stops for longer than the
regular time at a transfer station. This time is added to the objective function of the model, and the new model (model 2)
is represented as shown below:
min Z

ij
D
h
i
p
s
ij
AWT
s
ij
_ _

i
D
h
i
p
s
i
edt
s
i
_ _
23
s:t: edt
s
i
6 max: edt
s
i
; 8 i 2 R; s 2 S 24

s2S
j
edt
s
j
6 max: tedt
j
; 8 j 2 R 25
Constraints 1117
Constraints 2122
Constraints 2627
Table 4
Minimum and average transfer waiting time for network illustrated in Fig. 2.
From line Minimum transfer waiting time Average transfer waiting time
To line
1 2 3 4 1 2 3 4
1 1 0 1 0
2 0 1 0 1
3 0 1 2.5 3.5
4 1 0 3.5 2.5
Table 5
Average non-transfer passengers of network illustrated in Fig. 2.
Station Line
1 2 3 4
1 80 20 70
2 90 50 80
Fig. 3. The reference bus network of Ceder et al. (2000).
384 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
Constraint (24) in this model shows the maximum acceptable extra stopping time of vehicles at a station. In addition, the
summation of all stopping times for a vehicle in its route should not exceed a maximum value. This condition is considered
in constraint (25). It should be noted that the extra stopping time is not a large amount and does not signicantly change the
round trip time of the vehicles. The change in round trip time can be retrieved from the dwell times that vehicles spend at
the head or tail of lines or at depots. Its maximum value can be dened according to the headway of the line, so that the
headway is not changed.
By solving Example 1 with model 2, the objective function is reduced to 4620 min. In this case, parameter p
s
i
is considered
according to Table 5. In addition, the maximum acceptable waiting time is considered to be 5 min. Therefore, the total trans-
fer time is reduced in comparison with the results from the rst model.
Example 2. In order to compare the models with an existing model reported in the literature, the example used in Ceders
research (Ceder et al., 2000) was chosen as the second example. The reference network is the Tel Aviv City urban bus
network, which consists of 14 lines (7 two-ways line) and three transfer stations (Fig. 3). The parameters used are taken from
Ceders research, except for transfer times, stopping times and the number of transfer passengers. Although these parameters
can be measured and used in the model, we used the values that follow to compare the proposed model with Ceders
model.
Stopping times are set to be zero, and transfer times are also assumed to be zero. With this assumption, any simultaneous
arrivals result in a zero waiting time for passengers transferring in either direction (from line i to line j and vice versa). In
addition, a waiting time of zero indicates a simultaneous arrival.
The number of transfer passengers is not reported in Ceders research, and we set it to be 1 for all pairs of lines that have
transfers. However, having a number of transfer passengers can make the result more efcient. This assumption also aids
in comparison with Ceders model.
Using the CPLEX solver, an optimal solution was produced in less than 1 s. The results are shown in Table 6. Table 6 also
shows the results of Ceders model and of the No Planning scenario for this example. In the No Planning scenario, a time-
table is created with a constant headway of 14 min, and the rst departure times are set at time 0 for all lines. By comparing
results for the three scenarios, we observed that the proposed model gave the best result in both total waiting time and the
number of simultaneous arrivals. The improvement in the number of simultaneous arrivals is the result of nding the optimal
solution. This means that, in Ceders algorithm, the nal solution is not the optimal solution, and thus, a better solution can be
obtained. In the optimal solution for the proposed model, the total transfer time is reduced by a large amount in comparison
with that of the No Planning scenario and the existing model. Additionally, in Ceders model, a maximization of the number
of simultaneous arrivals was used as the objective function. The results show that the use of this objective function may not
signicantly reduce the total transfer waiting time. Since the waiting time is the term that passengers expect to be reduced, a
minimization of the transfer waiting time is a better objective function for transfer optimization in transit networks.
5. Genetic algorithm approach
The model described in the previous section is sufciently efcient to be used for any medium-sized urban or intercity
transit network. Although different network structures affect the time required to solve the model, tests have generally
shown that the model for networks with fewer than 50 lines can be easily solved by MIP solvers like CPLEX. However,
the goal of this research was to solve very large networks, such as a metropolitan bus network. Hence, a genetic algorithm
approach (GA) was created in order to solve models for large networks. In this section, this algorithm will be briey
reviewed.
Since the decision variables of the rst proposed model are X
i
, they are used as genes for any chromosome in the GA. The
tness function was selected to be the total transfer waiting time of whole network, which is the same as the objective func-
tion of the proposed model. The variables X
i
are dened as integer variables in the range of [0, h
i
1], and the rst population
was created randomly. For example, for the network shown in Fig. 2, some sample chromosomes are shown in Fig. 4.
The most common operators used in a genetic algorithm are (Reeves, 1997):
Crossover.
Mutation.
Table 6
Results for Example 2.
Criterion No planning Ceders model Proposed model
Total transfer waiting time (min) 6696 5340 1176
Average transfer waiting time (min) 5.58 4.45 0.98
Simultaneous arrivals 82 240 257
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 385
Both operators are used in the algorithm in this research. Crossover is divided into linear crossover and nonlinear cross-
over. In linear crossover, a gene value is replaced by the value of the same gene in another chromosome (Fig. 5). The type of
crossover that is used here is linear crossover. It is clear that linear crossover will result in no conicts according to the
bounds of the variables X
i
, which is the reason behind this decision.
The crossover operation usually results in local optimum solutions. Thus, a mutation operation is used to escape local
optimums. In many genetic algorithms, the variables are binary, and mutations indicate the change of a variable from 0
to 1 or vice versa. However, here, we have general integer variables. For a gene X
i
with any possible value, a random number
is generated between 0 and h
i
1. By replacing this number with X
i
, a new value for the variable is created.
The selection process is another basic issue in any genetic algorithm. Some popular selection processes are (Reeves,
1997):
Roulette wheel.
Elitistism.
In this research, we have selected both the roulette wheel and elitistism. In each generation, the chromosome with the
best tness function directly transfers to the next population. This process is elitistism.
We used three criteria for termination of the algorithm. These criteria are:
The best solution does not change after a given number of iterations.
The difference between the best and worst solutions in a population is less than a given value, i.e., 1%.
A maximum number of iterations is reached.
If both the rst and second conditions are met, the algorithm terminates. Otherwise, it continues until the maximum
number of iterations is reached.
After solving some examples with different sizes, values were found for the basic parameters. The parameters used in the
algorithms are:
Crossovermutation rate.
Population size.
Parameters for termination conditions, such as the maximum number of iterations, number of iterations with no change
in tness function.
The rst parameter is the proportion of crossover to mutation. Since the variables are not binary, it is essential that muta-
tion be performed with a high proportion in order to search all parts of the feasible region of a problem. Thus, higher values
like 0.9 are good for the proportion parameter.
The next parameter is population size, which is related to the size of the problem, and experience shows that 100 chro-
mosomes can be a good population size for medium-sized networks. This parameter can differ in smaller or larger networks
according to the solving time and the efciency of the algorithm. The gap and the number of iterations with no change in the
tness function used for termination can be set to 0.01 and 20, respectively, according to tests that were done. However, the
algorithm is completely transformative, and its parameters can be adjusted for different cases.
The algorithm can be applied to the second model as well. We used the vector (X
1
, X
2
, X
3
, . . .) as a chromosome in the ge-
netic algorithm to solve the rst proposed model. For the second model, the variable set edt
s
i
was added to the chromosome.
To do so, the variables that are meaningful were selected and replaced with a new variable set {U
i
}. Therefore, a vector
containing {X
i
} and {U
i
} together (X
1
, X
2
, . . . , U
1
, U
2
, . . .), formed the genes of a chromosome in the algorithm for the second
, , ,
Fig. 4. Sample chromosomes for Example 1.
Fig. 5. Examples of crossover operation for the sample chromosomes of Example 1.
386 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
proposed model. The tness function was the objective function of the second model in which the waiting time for non-
transfer passengers was also considered.
In the algorithm for the second model, crossover and mutation were performed in a manner similar to that of the algo-
rithm for the rst model. However, in the algorithm for the second model, one crossover was performed on X
i
variables and
one on U
i
variables in each iteration. The mutation was performed on both X
i
and U
i
. The selection and termination condi-
tions were the same as those used for the algorithm for the rst model.
After the algorithm was tested on several examples to calibrate its parameters, it was used to solve Examples 1 and 2. The
results for Example 1 show that the algorithm reached the optimal solution found with CPLEX. By solving the model using
the genetic algorithmfor Example 2, the optimal solution was obtained as well. To reach the optimal solution of 1176 min for
the objective function, 148 iterations were performed by the genetic algorithm. The time required for this result was very
short as well (less than 2 s).
6. A real case study: city of Mashhad
To evaluate the model and the genetic algorithm, we used a real-life transit network with a large number of lines and
stations. The network is the Mashhad City bus network, which consists of 139 two-way bus lines, or 278 one-way lines.
There are 3618 bus stops in the network, of which 841 stops are transfer stations with a mean number of transfer passengers
of about 6.6 for each line pair. To estimate the model parameters, we performed transit assignment using Optimal Strategy in
TransCAD software. Fig. 6 shows the transit network in Mashhad City. The minimum and maximum headways in the net-
work are 2 and 165, respectively. The large headways correspond to lines that are located in suburban areas. Solution results
obtained using CPLEX as well as the proposed GA algorithm for the case study in three studies, the No Planning scenario,
the rst model and the second model, are shown in Table 7.
The rst model was rst implemented using CPLEX (branch and bound). Using a 2 2.5 MHz CPU and 2 GB of RAM, the
problem was solved by a 6.4% relative gap after 30 min. The objective function for this solution was 71,179 min. A better
solution was not possible due to the tree size of the problem, which increases with time. However, the solution found
showed an 11.5% improvement in the objective function, as compared to the No Planning scenario, which had
80,460 min as the objective function. The second model was implemented using CPLEX as well, and the best solution found,
according to the memory constraint, was 73,197 min, which was an improvement in the objective function of 9.0% in
comparison with the No Planning scenario. This solution has a relative gap of 9.0%, and according to the model size, it
was not expected to be solved better than model 1.
Fig. 6. Mashhad City bus network.
Table 7
Mashhad bus network scheduling results.
Scenario Objective function value Objective function improvement
Branch and bound
a
Genetic algorithm
b
Branch and bound (%) Genetic algorithm (%)
No planning 80,460 80,460 0.0 0.0
First model 71,779 68,875 11/5 14.4
Second model 73,197 68,760 9.0 14.6
a
The solutions are obtained in 30 min according to the memory constraint and are not optimal solutions.
b
The solutions are obtained in about 150 min according to maximum iterations, and there is no evidence for optimality of the solutions.
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 387
Next, the genetic algorithm was used to solve the problem. First, some tests were carried out to obtain a good population
size and crossovermutation rate. To do so, the GA was run with a population size of 20 and crossovermutation rates of
0.80, 0.70, 0.60, 0.50, 0.40, 0.30 and 0.20 for 200 iterations. This showed that 0.50 is the best proportion for performing cross-
over and mutation. Then, the GA was run with population sizes of 10, 20, 30 and 50 for 1000 iterations. This demonstrated
that a population size equal to 20 will result in a lower processing time and more efciency. Then, 5000 iterations were per-
formed with a population size of 20 and a crossovermutation rate of 0.50. Fig. 7 shows the trend of objective function
improvement as a function of iteration in solving the rst model. The second model was solved by GA using the same
settings.
We can see in Fig. 7 that the GA reaches the value of 71,179 min for the objective function, the best solution gained using
CPLEX, with fewer than 600 iterations. In comparison with the No Planning scenario, by solving the rst model for the
Mashhad City bus network with the GA, the objective function improved by about 14.4%.
The trend of objective function improvement in solving the second model is not very different fromthat of the rst model,
which is shown in Fig. 7. However, the nal solution is 68,769 min, which is an improvement in the objective function of
about 14.6%, 0.2% more than that found with the rst model.
In another evaluation, the best objective function gained in 30 min was compared with that gained by solving the model
with CPLEX. The GA performed 1023 iterations in 30 min, and the best objective function gained for the rst model was
70,225 min, which is better than 71,179 min. Additionally, the GA was run for the second model. In this case, the best objec-
tive function found, according to a 30-min run constraint, was 70,153 min. This value was the best value after performing
995 iterations. Thus, the GA is more efcient than the branch and bound in solving the proposed models according to mem-
ory constraints.
Finally, it can be seen that both models and the genetic algorithm demonstrate good efciency for real transit networks,
but the GA approach is a better tool for solving the model for large transit networks. The reason is that the GA does not have
any limitations in memory size and can be run for a long time to reach the best possible solution.
7. Conclusion
In this paper, two models are represented with the aim of minimizing the transfer waiting time in transit networks. The
models can be used for real-life networks. To solve very large networks, a genetic algorithm approach is presented. Both the
models and the GA are practical for all types of networks, and the results can be implemented for any transit network. Some
positive aspects of the proposed models are:
A uniform (constant) headway is used for each transit line. This results in a reduction of the complexity of the model, and
the timetable created is practical and suitable for both authorities and passengers.
The transfer waiting time is considered in the objective function instead of simultaneous arrivals.
Transfers with more importance can be weighed in the objective function by considering the number of transfer
passengers.
The vehicle stopping time and transfer time needed are considered in the model to guarantee a complete transfer process
between pairs of lines at transfer stations.
Fig. 7. Trend of objective function improvement by number of iterations and time for Mashhad City transit network using the genetic algorithm.
388 Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389
Extra stopping time for vehicles at transfer stations can be considered to reduce the total transfer waiting time. These
variables are used in the second model.
A simple comparison of a medium-sized transit network and a case study of a large-sized transit network showed that:
An optimal solution can be gained by the models using MIP solvers for small and medium transit networks.
The GA approach can be used for large networks that cannot be solved with MIP solvers.
The total transfer waiting time is signicantly reduced by using the proposed models.
Finally, some extension is suggested for future research. Initially, headways that are compatible with demand can be cal-
culated along with the transfer coordination in the model to optimize transfers. Next, the non-deterministic travel time of
vehicles is a good subject for a wide area of research of transfer optimization in transit networks. In considering this issue, a
tolerance should be considered for vehicle arrival times, and a policy should be used to ensure successful transfers. Simula-
tion techniques may be useful for dealing with this case. Finally, other metaheuristic approaches can be used to nd good
solutions more quickly.
References
Castelli, L., Pesenti, R., Ukovich, W., 2004. Scheduling multimodal transportation systems. European Journal of Operation Research 155, 603615.
Ceder, A., Golany, B., Tal, O., 2000. Creating bus timetables with maximal synchronization. Transportation Research Part A 35, 913928.
Cevallos, F., Zhao, F., 2006. Minimizing transfer times in public transit network with genetic algorithm. Transportation Research Record 1971, 7479.
Haghani, A., Banihashemi, M., 2002. Heuristic approaches for solving large-scale bus transit vehicle scheduling problem with time route constraints.
Transportation Research Part A 36, 913928.
Haghani, A., Shafahi, Y., 2002. Bus maintenance systems and maintenance scheduling: model formulations and solutions. Transportation Research Part A
36, 453482.
Haghani, A., Banihashemi, M., Chiang, K.H., 2003. A comparative analysis of bus transit vehicle scheduling models. Transportation Research Part B 37, 301
322.
Reeves, C.R., 1997. Genetic algorithms for the operation researcher. INFORMS Journal on Computing 9, 231250.
Vochic, V.R., 2004. Urban Transit: Operations, Planning, and Economics. John Wiley.
Yan, S., Chen, H., 2002. A scheduling model and a solution algorithm for inter-city bus carriers. Transportation Research Part A 36, 805825.
Yan, S., Chi, C., Tang, C., 2006. Inter-city bus routing and timetable setting under stochastic demands. Transportation Research Part A 40, 572586.
Zhao, F., Zeng, X., 2008. Optimization of transit route network, vehicle headways and timetables for large-scale transit networks. European Journal of
Operation Research 186, 841855.
Y. Shafahi, A. Khani / Transportation Research Part A 44 (2010) 377389 389

Vous aimerez peut-être aussi