Mixed-integer programming model and branch-and-price-and-cut algorithm for urban bus network design and timetabling James C. Chu
∗
Abstract This study solves the simultaneous planning problem of network design and timetabling for urban bus systems. An innovative mixed-integer programming (MIP) model is formulated and a parallel branch-and-price-and-cut (BPC) algorithm is proposed to solve the problem. The key idea of the model formulation and the solution algorithm is to represent a bus timetable with a route and a dispatch pattern. An aggregation and greedy algorithm is developed to efficiently solve the pricing subproblem. The cuts of disaggregate coupling inequalities are dynamically added to strengthen the lower bound. A computational study is conducted to evaluate the performance of the proposed methodology. The comparison with alternative solution approaches indicates that the parallel BPC algorithm is superior to solving the MIP formulations with the off-the-shelf MIP solver. Different values of model parameters are also tested, and various statistics of operators and passengers are reported for the cases. Keywords: public transit, network design, timetable, branch-and-price-and-cut (BPC), mixedinteger programming (MIP), algorithm
1
Introduction
A transit network problem (TNP) deals with the design of a transit system and involves three major planning activities: network design, frequency setting, and timetabling (Guihaire and Hao, 2008). According to Guihaire and Hao (2008), TNP can be categorized into six types. Each of the first three types corresponds to one of the three major activities: transit network design problem (TNDP), transit network frequency setting problem (TNFSP), and transit network timetabling problem (TNTP). Most past studies on TNP belong to one of these three types (Desaulniers and Hickman, 2007; Guihaire and Hao, 2008; Ibarra-Rojas et al., 2015). One of the limitations of these problems is that they consider only one of the aforementioned planning activities, and thus, the solution is unlikely to be globally optimal for the entire TNP. For example, the network design problem does not consider timetabling. Thus, finding an effective or even feasible timetable later in the timetabling problem may be difficult given the optimal routes in the network design problem (Cordeau et al., 1998). The timetabling problem focuses on coordinating timetables to ∗
Corresponding author, Associate Professor, Department of Civil Engineering, National Taiwan University, Taiwan, Tel: +886 2 33664235, Fax : +886 2 23639990,
[email protected]
1
optimize passenger transfers at bus stops given predetermined bus routes, frequencies, and transfer demands (Shrivastava and Dhingra, 2002; Quak, 2003; Chakroborty, 2003). Without the flexibility of route adjustment and the reassignment of transit demand, the coordinated timetables may not be globally optimal. The other three types of TNP are integration problems, which are the transit network design and frequency setting problem (TNDFSP = TNDP+TNFSP), the transit network frequency setting and timetabling problem (TNFSTP = TNFSP+TNTP), and the transit network design and timetabling problem (TNDTP = TNDP+TNFSP+TNTP). These three types of models are expected to improve the quality of TNP solutions given the simultaneous planning of multiple activities. Among these problems, TNDTP is more useful than TNSP and TNDFSP because it generates complete routes and timetables for operations, whereas the other two cannot. Motivated by the aforementioned reasons, TNDTP is investigated in this study. Formulating and solving TNDTP are cumbersome because TNDTP combines all three major planning activities of TNP into a single problem. Therefore, the TNDTP considered in the literature is frequently size-limited and highly simplified (Guihaire and Hao, 2008). The first few models developed in related studies are solved in a sequential manner rather than as a single problem, e.g., the two-paper series of Shrivastav and Dhingra (2001) and Shrivastava and Dhingra (2002), as well as Quak (2003). Heuristics were developed for route construction in Shrivastav and Dhingra (2001), and the genetic algorithm was utilized for timetable synchronization in Shrivastava and Dhingra (2002). Quak (2003) adopted heuristic methods for routing and timetabling problems separately. The integration of network design and timetabling is not achieved in these studies. Zhao and Zeng (2008) proposed a simplified model for optimizing transit routes, headways, and timetables simultaneously. The model did not have a linear formulation, and thus, a method that combined simulated annealing, tabu search, and greedy algorithms was developed to solve the problem heuristically. For intercity bus systems, Yan and Chen (2002), Yan et al. (2006), and Yan and Tang (2008) also proposed integrated models for routing and timetabling, which were formulated as mixed-integer programming (MIP) models. One of the main differences between intercity and urban bus systems is that the former has greater freedom for timetabling, whereas the latter typically has specific restrictions for timetable patterns (Yan and Chen, 2002). For example, urban buses usually have constant headways because they are easy to remember and utilize for passengers. For intercity buses, passengers are accustomed to looking up the timetable before they travel, and thus, a rough service frequency will be sufficient. The second major difference is that the route design for intercity buses is flexible, whereas that for urban buses is not. For example, urban buses are generally required to return to the same depot for the convenience of vehicle management. On the contrary, this requirement does not always apply to intercity buses because their travel distances can be too long to enable them to return to the same depot in one day. Therefore, TNDSP for intercity bus systems is inappropriate for urban bus systems without significant modification. With regard to problem solving, the model in Yan and Chen (2002) was solved using an algorithm based on Lagrangian relaxation, whereas the models in Yan et al. (2006) and Yan and Tang (2008) were solved using heuristics algorithms. Yan et al. (2006) and Yan and Tang (2008) considered stochastic demand and stochastic travel time, respectively, and essentially belonged to a different class of problems. The preceding discussion indicates that the related TNDTP models are all solved using heuristic and relaxation approaches given the high complexity of the problem. Exact solution algorithms have not yet been successfully developed for TNDTP. This study proposes an innovative model for urban TNDTP that focuses on urban bus systems with multi-depot round-trip routes. It is the first to propose a mixed-integer (linear) program2
1: Depot
Dispatch Z=1
1
2, 3: Intermediate Route X=1
4: Return
3
2
4 Node
t=1
Timetable Y=1
t=2 t=3
t=4 (Td)
Time, t Figure 1: Concept of route, dispatching pattern, and timetable
ming model for such a problem, which is the first major contribution of this work. To solve the aforementioned problem, a parallel branch-and-price-and-cut (BPC) algorithm is developed. This algorithm is the first exact solution approach for such a problem, which is the second major contribution of this study. The proposed model includes multi-objectives for operator and passenger, unsatisfied demand, bus depot, route pattern, route length, frequency bound, headway structure, bus capacity, fleet size, and transit assignment—all of which have never been considered in a single model in the literature. The model formulation for TNDTP and its solution algorithm have three noteworthy features. First, the transit routes are round-trip. In practice, round-trip routes are widely adopted in urban bus systems. They are attractive to both operators and passengers. For operators, round-trip buses return to the same depot after service, which simplifies the management of vehicles. Round-trip routes are also convenient for passengers because they can take the same route for both directions of their daily trips. Second, timetables can be either constant or variable headways, both of which are common practices in urban bus systems. MIP formulations for both constant and variable headways are developed. Third, the model formulation and solution algorithm apply the observation that a timetable of a bus line can be uniquely represented by its bus route and dispatch pattern. As illustrated in Fig. 1, the route for a bus line is the node sequence of 1-2-3-4-3-2-1, which forms a round-trip route. A complete timetable for the bus line can be derived without ambiguity given the dispatch pattern at the depot and the (deterministic) link travel times. MIP formulations that generate a timetable according to the bus route and dispatch pattern can then be developed based on this observation. The observation is also beneficial for the solution algorithm. Instead of pricing out a complete timetable during column generation, only a combination of bus route and dispatching pattern should be priced out, which significantly improves the efficiency of the solution algorithm. The remainder of this paper is organized as follows. Section 2 proposes the MIP model for 3
TNDTP in urban bus systems. Section 3 describes the BPC solution algorithm. Section 4 presents a computational study to validate the methodology. Finally, Section 5 provides the conclusions and future research directions of the study.
2
Mathematical model
This section describes the problem statement, formulation, and accompanying procedures for the proposed model. An illustrative example is provided in the appendix as a supplementary material of this section.
2.1
Problem statement
The statement for the urban TNDTP is defined as follows. Given a graph representing the road network, a bus route is defined as a sequence of network nodes along which a bus travels. The bus routes are round-trip and restricted by the maximum route length. A bus dispatch pattern is defined as a collection of times during which buses are dispatched from the depot. Two types of dispatch patterns exist. One is constant headway, and the other is variable headway. In either type, the headways of a dispatch pattern must follow the requirements for minimum headway (or equivalently maximum frequency). The outcome of buses following the route and dispatch pattern forms a timetable. A bus line is a combination of a bus route, a dispatch pattern, and a timetable, which must satisfy the requirements for the fleet size of a bus line. Multiple depots can be considered. The number of lines for each depot is given, but a bus line could either be operational or unused. Passenger demands are grouped into time-dependent OD pairs. An OD pair is a group of passengers with the same origin and destination (OD) pair and share a common target departure time at the origin or arrival time at the destination. The transit assignment adopted in this study follows the multi-commodity flow formulation of Carraresi et al. (1996). A path between an OD pair is feasible if it satisfies certain criteria, such as generalized travel cost, total travel time, total waiting time, and total number of transfers. A procedure to generate feasible paths for passengers is developed and described in Section 2.3. Passenger demands are assigned to feasible passenger paths in a manner that satisfies the constraints of bus capacity for each link in all periods and flow conservation for each OD pair. The objective in solving the problem is to minimize the weighted sum of operator cost, passenger generalized cost, and penalty for unsatisfied demand. The three major assumptions for the problem are presented as follows. 1. All roads are two-way streets. By definition, a round-trip route is impossible on a one-way street. Thus, if one-way streets exist, then other types of routes must be considered. All roads are limited to two-way roads to focus on round-trip routes. In real-world cases wherein one-way streets exist, the problem can be solved by first assuming that all streets are two-way ones. The bus routes and timetables can then be modified to adapt to the one-way streets. 2. Travel times for each link are deterministic and known in advance. 3. Bus routes stop at all network nodes for boarding and alighting. The boarding and alighting times are constant and counted in the link travel times.
4
2.2
Model formulation
The mathematical model for TNDTP is represented by a discrete-time time-expanded network (also called a time-space network). Time-expanded networks are commonly used in schedulebased modeling and have been adopted to schedule airlines, railways, and buses (Ahuja et al., 1993; Br¨annlund et al., 1998; Nuzzolo and Crisalli, 2009). When the actual road network and the time-expanded network should be distinguished, the terminologies of physical network/links/nodes and time-expanded network/links/nodes are used. The notations for the model are defined as follows. Sets: • N : set of physical network nodes, indexed by i, j, and k. • D: set of depots, indexed by d, D ⊆ N . • A: set of physical network links, indexed by a tuple of two nodes. • L: set of candidate bus lines, indexed by l. • G: set of all origin-destination pairs, indexed by g. • Pg : set of passenger paths of OD pair g ∈ G, indexed by p. Parameters: • T : number of periods. • T d : number of periods that a bus can be dispatched from the depot. • wb ,wg ,wp : weights for bus-operating cost, passenger generalized cost, and penalty for unsatisfied demand, where wb + wg + wp = 1. 1 : bus-operating cost from node i to node j. • αij 2 : generalized cost for passenger path p of OD pair g. • αgp
• αg3 : penalty for each unsatisfied passenger of OD pair g. • qg : travel demand of OD pair g. • dl : depot for line l. • distij : travel distance from node i to node j. • timeijt : travel time from node i to node j departing at time t. The travel times are restricted to integers. • maxd : maximum travel distance allowed for a bus route. • minh , maxf : minimum headway and corresponding (maximum) frequency for a bus line, Td where maxf = d min h e. • maxt : maximum travel time allowed for a bus route. 5
• k: capacity of a bus. • δgpijt : indicator parameter that shows whether passenger path p of OD pair g passes link (i, j) at time t. • f : fleet size of a bus line. Integer variables: • Xijl : route variables, 1 if route for line l traverses link (i,j) and 0 otherwise. • Y˜ij t˜l : “template” timetable variables, 1 if the template timetable of line l traverses link (i,j) departing at time t˜ and 0 otherwise. • Yijtl : timetable variables, 1 if the timetable of line l traverses link (i,j) departing at time t and 0 otherwise. • Ztl : dispatch variables, 1 if a bus is dispatched from depot at time t for line l and 0 otherwise. • ∆ijtt˜l : auxiliary variables used in Eqs. (32)-(35). 1 if a bus passing link (i, j) exists at time t˜ in the template timetable and a bus is dispatched at time t − (t˜ − 1) and 0 otherwise. • Ril : route node variables, 1 if node i is on bus route l and 0 otherwise. • Iil : intermediate node variables, 1 if node i is an intermediate node of bus route l and 0 otherwise. • Hl : constant headway of bus line l. • Fl : dispatch time of first bus for bus line l. Continuous variables: • Etl : time elapsed since the previous dispatch for bus line l at time t. • Ug : portion of demand for OD pair g that is unsatisfied. • Wgp : portion of demand for OD pair g that takes passenger path p. The proposed model is formulated as a MIP problem. The objective function of the model is given in Eq. (1). The function minimizes the weighted sum of bus operating cost, passenger generalized cost, and penalty for unsatisfied demand. The constraints of the model are introduced in the following subsections.
min w
b
T X X X (i,j)∈A t=1 l∈L
1 αij Yijtl + wg
XX g∈G p∈Pg
6
2 αgp qg Wgp + wp
X g∈G
αg3 qg Ug
(1)
2.2.1
Route
Eqs. (2)-(6) are the route constraints that ensure that the route variables will form a round-trip route. Eq. (2) states that each route must leave its depot exactly once. Let the nodes on the route be route nodes, the node at which the route turns around and returns to the depot be the return node, and the route nodes other than the depot and the return node be intermediate nodes. Eq. (3) states that the out degrees for non-depot nodes are less than 2 (1 for the return node and 2 for intermediate nodes). Eq. (4) states that if a round-trip route passes a link, then it must also pass the link in the reverse direction. Eq. (5) is the flow conservation constraint, and Eq. (6) is the constraint for the distance limitation of a route. Similar to the vehicle routing problem, subtours that are disconnected from the depot can be generated given only Eqs. (2)-(6). However, no additional constraint is applied directly to route variables to eliminate subtours in this study. Instead, the problem of subtours will be resolved later when the constraints for timetables are incorporated into the model, as explained in detail in Section 2.2.3. X
Xdl jl = 1, ∀l ∈ L
(2)
(dl ,j)∈A
X
Xijl ≤ 2, ∀i ∈ N, i 6= dl , l ∈ L
(3)
Xijl = Xjil , ∀(i, j) ∈ A, l ∈ L X Xijl = Xjkl , ∀j ∈ N, l ∈ L
(4)
(i,j)∈A
X (i,j)∈A
X
(5)
(j,k)∈A
distij Xijl ≤ maxd , ∀l ∈ L
(6)
(i,j)∈A
2.2.2
Headway
The headway constraints govern the dispatch variables of a bus line. Depending on the requirement for the bus headway, two sets of constraints are proposed. Note that in both sets of constraints, the last period for bus dispatches is T d instead of T . The periods after T d are reserved to allow all buses to return to the depot by the end of the planning horizon (T ). Variable headways If constant headways are not required for a bus line, the variable-headway constraint, Eq. (7), is adopted. The constraint simply states that the frequency of bus line l, PT d t=1 Ztl , does not exceed the maximum frequency of the bus line. There is no constraint on the lower bound of the frequency because a bus line can be unused. Alternatively, if all lines must be used, a constraint to ensure the minimum frequency of bus lines can be added. d
T X
Ztl ≤ maxf , ∀l ∈ L
(7)
t=1
Constant headways If the headway between bus dispatches must be constant, which is common is urban bus systems, the following constant-headway constraints should be adopted. Eqs. (8) and (9) set the bounds for the headway of a bus line. The lower bound of a headway is minh , whereas 7
its upper bound is T d + 1. Eq. (10) simply states that the dispatch time of the first bus cannot be greater than the headway. When Eqs. (9) and (10) are combined, the largest value for the first bus dispatch time Fl is T d + 1, which is greater than the last period for bus dispatch. When Fl is equal to T d + 1, no bus is dispatched for that line, thereby implying that the line is unused. Alternatively, the upper bound of Hl can be set to T d in Eq. (9) to compel the first bus to be dispatched by the end of the dispatch period and to ensure that the bus line is used. Eq. (11) initializes the elapsed time since the previous dispatch based on the headway and the dispatch time of the first bus. The next six constraints, Eqs. (12)-(17), require that the intervals between two bus dispatches are equal to the headway. Eqs. (12)-(15) state that if Ztl = 1, then Et+1,l = 1; else, Et+1,l = Etl + 1. That is, if a bus is dispatched in a certain period, then the time elapsed since the previous dispatch in the next period is reset to 1. On the contrary, if no bus is dispatched in this period, then the time elapsed since the previous dispatch in the next period increases by 1. Eqs. (16) and (17) state that Ztl = 1 if and only if Etl ≥ Hl . That is, a bus is dispatched if and only if the time elapsed since the previous dispatch reaches (greater than or equal to) the headway. Because Etl will be reset after reaching Hl and will never be greater than Hl given Eqs. (12)-(15), Eqs. (16) and (17) are equivalent to Ztl = 1 if and only if Etl = Hl . The dispatch pattern shown in Fig. 1 is used as an example to explain the relationship among the variables. In this example, the headway of bus line l is 2, so Hl = 2; the first bus is dispatched in period 2, and thus, Fl = 2. Eq. (11) indicates that E1l = 1. It follows that E2l , E3l , and E4l are 2, 1, and 2, respectively, which are equivalent to two bus dispatches in periods 2 and 4 (Z2l = 1 and Z4l = 1). Hl Hl Fl E1l Et+1,l Et+1,l Et+1,l Et+1,l Etl Etl 2.2.3
≥ ≤ ≤ = ≥ ≤ ≤ ≥ ≥ ≤
minh , ∀l ∈ L T d + 1, ∀l ∈ L Hl , ∀l ∈ L Hl − Fl + 1, ∀l ∈ L 1 − T d (1 − Ztl ), ∀t ∈ {1, · · · , T d − 1}, l ∈ L 1 + T d (1 − Ztl ), ∀t ∈ {1, · · · , T d − 1}, l ∈ L (Etl + 1) + T d Ztl , ∀t ∈ {1, · · · , T d − 1}, l ∈ L (Etl + 1) − T d Ztl , ∀t ∈ {1, · · · , T d − 1}, l ∈ L Hl + (−T d )(1 − Ztl ), ∀t ∈ {1, · · · , T d }, l ∈ L Hl + (T d + 1)Ztl − 1, ∀t ∈ {1, · · · , T d }, l ∈ L
(8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
Timetable
The timetabling constraints govern the timetable variables and ensure that the bus timetable is formed in correspondence to the route and the dispatch pattern. We first introduce a formulation that applies to the situation where link travel times vary over time, i.e., dynamic or time-dependent. The formulation is rather complicated and a model containing such a formulation is inefficient to solve. Next, in the situations where link travel times do not change over time, i.e., static or timeindependent, we propose an efficient formulation for timetabling by duplicating the timetable of a single bus to form the complete timetable for all buses of a line. Later in Section 3, a solution algorithm that applies to both static and dynamic link travel times will be proposed. Dynamic travel times We first connect the timetable variables with the route variables and make sure the requirement for bus dispatching frequency is satisfied. The frequency of bus line 8
P d l can be represented by Tt=1 Ztl . It follows that the number of buses of line l passing link (i, j) P P d is Tt=1 Yijtl = Xijl Tt=1 Ztl . That is, the number of buses passing a link is the line frequency if the route passes the link or 0 if the route does not pass the link. The nonlinear constraint can be linearized to Eqs. (18)-(20). Eq. (21) states that buses of a line leave depot according to the bus route and given dispatch times. Eq. (22) is the constraint for flow conservation of bus timetables. Yijtl ≤ Xijl , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, l ∈ L T X
X
Yijtl ≤
X
t=1
t=1
T X
T X
t=1
Ztl , ∀(i, j) ∈ A, l ∈ L
(19)
Ztl − maxf (1 − Xijl ), ∀(i, j) ∈ A, l ∈ L
(20)
d
Yijtl ≥
t=1
Xdl jl + Ztl ≤ Ydl jtl + 1, ∀t ∈ {1, · · · , T d }, l ∈ L, (dl , j) ∈ A. X Yijt0 l = Yjktl , ∀j 6= dl , t ∈ {1, · · · , T }, l ∈ L
{(i,j)∈A,t0 ∈{1,··· ,t−1}|t0 +timeijt0 =t}
(18)
Td
(21) (22)
(j,k)∈A
Next, we restrict that individual bus trips in the timetable follow the route. For example, given a round-trip route following the node sequence of 1-2-3-2-1 with frequency of 2, the feasible timetable would be two bus trips both following the same node sequence. However, an infeasible timetable containing a bus trip following the sequence of 1-2-3-2-3-2-1 and another following the sequence of 1-2-1 would also satisfy Eqs. (18)-(22), as shown in Fig. 2. It can be observed that the first bus trip is not consistent with the bus route in the way that it turns around more than once in the trip. Thus, we restrict that a bus turns around exactly once at the return node in a trip in Eqs. (23)-(28). First of all, the return node must be identified based on the values of route variables. Eqs. (23)-(24) identify all the nodes along a route, i.e., route nodes. The definition of a route node is the node with an out-degree between 1 and 2. Eqs. (25)-(26) identify all the intermediate nodes of a route. The definition of an intermediate node is the node with an out-degree of 2. The return node can then be found by identifying the route node that is neither an intermediate node nor a the depot. Eq. (27) states that a bus must move forward following the route (and thus cannot turn around) if it is at an intermediate node. Eq. (28) states that a bus must turn around if it is at the return node.
9
1: Depot
1
2: Intermediate 3: Return Route X=1
3
2
4
Node Dispatch Z=1
Timetable Y=1
Time, t Figure 2: Example of infeasible timetables
Ril ≤
X
Xijl , ∀i ∈ N, l ∈ L
(23)
Xijl , ∀i ∈ N, l ∈ L
(24)
Xijl , ∀i ∈ N, l ∈ L
(25)
Xijl − 1, ∀i ∈ N, l ∈ L
(26)
(i,j)∈A
2Ril ≥
X (i,j)∈A
2Iil ≤
X (i,j)∈A
Iil ≥
X (i,j)∈A
+ Xjkl ≤ Yjktl + 3 (27) ∀j ∈ N, j 6= dl , (i, j) ∈ A, (j, k) ∈ A, i 6= k, t ∈ {1, · · · , T }, t0 ∈ {1, · · · , t − 1}, t0 + timeijt0 = t, l ∈ L Rjl + (1 − Ijl ) + Yijt0 l ≤ Yjitl + 2 (28) ∀j ∈ N, j 6= dl , (i, j) ∈ A, t ∈ {1, · · · , T }, t0 ∈ {1, · · · , t − 1}, t0 + timeijt0 = t, l ∈ L
Ijl + Xijl + Y
ijt0 l
Static travel times An efficient formulation for timetable generation can be developed if the link travel times are limited to static. The concept of the formulation is illustrated in Fig. 3. A “template” timetable, which describes the movement of a single bus, is essentially generated based on the bus route and the link travel times. The template timetable is duplicated by following the dispatch pattern to form the complete timetable for all the buses of the line. Eqs. (29)-(31) state the constraints for the template timetable. The duplication of the template timetable is achieved using Eqs. (32)-(35). To distinguish a template timetable from a complete timetable, a different 10
Route X=1
1
3
2
1 2 3 4 5 6 7 8 9 maxt=10
4 Node
1
Dispatch Z=1
2
3
4 Node
2 Timetable Y=1 Template Timetable
7
7
1
10 12
Time, ̃
Time, t
Time, t
Figure 3: Complete timetable generation with a template timetable
index of time periods, t˜, is used for a template timetable in the following constraints. A template timetable has two requirements. First, it should be consistent with the route and link travel times. Eq. (29) compels the bus to leave the depot at time 1 in the template timetable. Eq. (30) states that the sequence of links must be consistent with the route, i.e., a bus passing a link exists in the template timetable only if the route passes the link. As the equation shows, the range of periods of the template timetable is from time 1 to maxt . In this case, maxt is an upper bound for the duration of the template timetable. An approximation based on the maximum route distance and travel speed is sufficient. The second requirement for a template timetable is that it must be connected. Eq. (31) maintains the connectivity of a template timetable. The route variables and template timetable variables are linked by these constraints. The route must also be connected given that the template timetable is always connected. Consequently, the potential subtours discussed in Section 2.2.1 can be eliminated. X
Y˜ij1l = 1, ∀l ∈ L
(29)
Y˜ij t˜l = Xijl , ∀(i, j) ∈ A, ∀l ∈ L
(30)
(dl ,j)∈A t max X
t˜=1
X {(i,j)∈A|t˜−timeij t˜≥1}
Y˜ij t˜l =
X
Y˜jkt˜l , ∀j 6= dl , t˜ ∈ {1, · · · , maxt }, l ∈ L
(31)
(j,k)∈A
After a template timetable is generated, the complete timetable in the entire planning horizon 11
for all buses can then be generated by duplicating the template timetable based on the dispatch pattern obtained in Section 2.2.2. The duplication of the template timetable is achieved by X
Yijtl =
Y˜ij t˜l Zt−(t˜−1),l , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, l ∈ L.
t˜∈{1,··· ,maxt |t−(t˜−1)≥1}
The constraint states that a bus passing link (i, j) will exist at time t if and only if for any t˜ ∈ {1, · · · , maxt |t − (t˜ − 1) ≥ 1}, (1) a bus passing link (i, j) exists at time t˜ in the template timetable (i.e., Y˜ij t˜l = 1) and (2) a bus is dispatched at time t − (t˜ − 1) (i.e., Zt−(t˜−1),l = 1). The meaning of the constraint is as follows. If a bus passes link (i,j) at t˜ in the template timetable or (t˜ − 1) periods after the departure of the template bus at time 1 (condition (1)) and a bus is dispatched in the complete timetable in period t − (t˜ − 1) (condition (2)), then a bus must also pass link (i,j) in the complete timetable (t˜ − 1) periods after the bus departs at t − (t˜ − 1) or simply t. Otherwise, no bus will pass link (i,j) at time t. For example, in Fig. 3, the template timetable passes link (3, 2) in period t˜ = 4 (or three periods after the departure at time 1), and a bus is dispatched in the complete timetable at period 7. In the complete timetable, a bus will pass link (3, 2) three periods after its departure at period 7, which is period 10. The constraint is quadratic, which makes the problem quadratically constrained. The problem can be linearized into a linear problem, as shown in Eqs. (32)-(35). The linearization requires additional variables, namely, ∆ijtt˜l , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, t˜ ∈ {1, · · · , maxt }, t − (t˜ − 1) ≥ 1, l ∈ L.
Zt−(t˜−1),l
≥
∆ijtt˜l , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, t˜ ∈ {1, · · · , maxt }, t − (t˜ − 1) ≥ 1, l ∈ L
Y˜ij t˜l
≥
∆ijtt˜l , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, t˜ ∈ {1, · · · , maxt }, t − (t˜ − 1) ≥ 1, l ∈ L
Zt−(t˜−1),l + Y˜ij t˜l Yijtl
(32)
≤
∆ijtt˜l + 1,
=
∀(i, j) ∈ A, t ∈ {1, · · · , T }, t˜ ∈ {1, · · · , maxt }, t − (t˜ − 1) ≥ 1, l ∈ L X ∆ijtt˜l , ∀(i, j) ∈ A, t ∈ {1, · · · , T }, l ∈ L
(33) (34) (35)
t˜∈{1,··· ,maxt |t−(t˜−1)≥1}
2.2.4
Fleet size
Eq. (36) is the fleet size constraint. The constraint ensures that the total number of running buses of a line does not exceed the given fleet size at any time period. X {(i,j)∈A,t0 ∈{1,··· ,t}|t0 +time
2.2.5
Yijt0 l ≤ f, ∀t ∈ {1, · · · , T }, l ∈ L
(36)
ijt0 =t}
Transit assignment
Two sets of transit assignment constraints exist. Eq. (37) states that for each OD pair, the portion of passengers taking feasible paths plus the portion of unserved passengers must equal to 1. Eq. (38) states that the total number of passengers passing a link at a certain period cannot exceed 12
the bus capacity for the same link at the same period.
X
Wgp + Ug = 1, ∀g ∈ G
(37)
p∈Pg
XX
δgpijt qg Wgp − k
g∈G p∈Pg
Xijl Yijtl Ztl Hl Fl Ril Iil Etl 1 ≥ Ug 1 ≥ Wgp
2.3
X
Yijtl ≤ 0, ∀(i, j) ∈ A, t ∈ {1, · · · , T }
(38)
l∈L
∈ ∈ ∈ ∈ ∈ = = ≥ ≥ ≥
{0, 1}, ∀(i, j) ∈ A, l ∈ L {0, 1}, ∀(i, j) ∈ A, t ∈ {1, · · · , T }, l ∈ L {0, 1}, ∀t ∈ {1, · · · , T d }, l ∈ L {1, 2, 3, · · · }, ∀l ∈ L {1, 2, 3, · · · }, ∀l ∈ L {0, 1}, ∀i ∈ N, l ∈ L {0, 1}, ∀i ∈ N, l ∈ L 0, ∀t ∈ {1, · · · , T d }, l ∈ L 0, ∀g ∈ G 0, ∀p ∈ Pg , g ∈ G
(39) (40) (41) (42) (43) (44) (45) (46) (47) (48)
Passenger path generation
A procedure based on the breadth-first search (BFS) and path enumeration algorithms in graph theory is developed to generate all feasible paths for OD pairs given the time-expanded network. To simplify path generation, passengers for an OD pair are assumed to share only a common departure time at the origin and not a common arrival time at the destination. Similar to that in the BFS algorithm, the search for the feasible paths of an OD pair starts at the time-expanded node that corresponds to the origin and departure time of that OD pair. A search tree is maintained to record the search progress and to store all currently found paths. The time-expanded network for passengers includes waiting, which indicates that initial waiting (i.e., waiting at the origin) and transfer waiting can both be considered in the feasible paths. Unlike in the BFS algorithm, the search continues until no path can be generated. Two situations occur in which a branch of the search tree can be bounded to eliminate the search space. First, when the destination is reached (at any period), the branch is bounded because a feasible path is found. Second, when any of the conditions for infeasible paths is satisfied, the branch is also bounded because further search along the branch will not generate any feasible path. The conditions for infeasible passenger paths considered in this study include the following: 1. Travel time exceeds the maximum total travel time. 2. The number of waiting transfer exceeds the maximum number of total waiting transfer. 3. Transfer waiting time exceeds the maximum transfer waiting time. 4. Initial waiting time exceeds the maximum initial waiting time. 13
5. Passengers cannot reach their destination at the end of the planning horizon. For the first condition that limits the total travel time of a path, two types of limit are considered to generate reasonable passenger paths. First, travel time cannot exceed a multiple of the shortest possible travel time between the OD pair. This shortest possible travel time represents in-vehicle time on the most direct path, which can be assumed as the travel time required using an automobile. However, the shortest possible travel time can be too restricted for extremely short bus trips. In such trips, the in-vehicle time can be relatively short compared with the waiting time, and a multiple of the shortest possible travel time can be still too short for any waiting. Therefore, a second time limit is used, which is the maximum initial waiting time plus the shortest possible travel time between OD. The second limit allows a passenger to spend more time waiting for extremely short trips. A path is infeasible if its total travel time is greater than both types of travel time limit. The second and the third conditions are related to the major limitation of the path generation approach proposed in this study. A passenger path involves only passenger movements on the time-expanded network and is independent from bus timetables. Hence, a transfer from one bus to another can only be identified if explicit waiting occurs in a path. By contrast, if a transfer requires no waiting, then explicit waiting will not occur in the path, thereby making such transfer unidentifiable. Accordingly, only the number of waiting transfers is used to determine the infeasibility of a path. The implication of this limitation is that the total number of transfers in a passenger path and the inconvenience for transfers can be underestimated. To address this issue, the underestimation of the number of transfers is calculated after TNDTP is solved, as discussed in Section 2.4. Currently, the maximum initial and transfer waiting times are identical for all passengers at all nodes/stations. The possible waiting times can vary between nodes; thus, their values can be station specific and OD pair specific for realistic results. The fifth condition is self-explanatory and, thus, is not discussed further. After the passenger paths are generated, two sets of model parameters can be determined. The first set is the incidence parameters for passenger path and time-expanded links, δgpijt . The second 2 = α(1) × set is the generalized cost for a passenger path, which can be calculated based on αgp in-vehicle time+α(2) × transfer time+α(3) × initial waiting time +α(4) × travel distance, where α(1) , α(2) , and α(3) are the generalized costs for one period of in-vehicle, transfer waiting, and initial waiting times, respectively, and α(4) is the monetary cost per unit distance.
2.4
Post-processing submodel for bus assignment and identification of no-waiting transfers
Eq. (38) requires that for each time-expanded link at a specific time, the demand for all paths of all OD pairs cannot exceed the total capacity of all passing buses combined. Consequently, the actual bus taken by each passenger is unknown from the optimal solution of the aforementioned model. The only exception is that when each time-expanded link is passed by only one bus for all the links used by passengers, the possible bus assignment for passengers is unique. A post-processing submodel is developed to assign each passenger to a specific bus. To do so, the bus timetables of a line are first separated into individual bus trips. The following new sets and variables for the submodel are then introduced based on the solution of the original model. 14
B denotes the set of all bus trips. ATgp is the set of time-expanded links that passenger path p of OD g passes, ATb is the set of time-expanded links that bus b passes, and ATgpb is the set of time-expanded links that passenger path p of OD g and bus b both pass. Defining new sets of time-expanded links is beneficial for reducing submodel size. The new parameter of the sub∗ model is Wgp , which is the optimal values for Wgp from the original model. Non-negative variables Wgpbijt represent the portion of demand for OD pair g that takes path p and ride on bus b on time-expanded link (i, j, t). Binary variables Bgpb indicate whether bus b is taken by passenger path p of OD g. The common assumption for the passenger behavior is that the individual passengers will minimize P their own numbers of transfers. Eq. (49) minimizes the sum of the numbers of buses taken ( b Bgpb ) for all paths of all OD pairs. In the case wherein the bus capacity significantly exceeds the transfer demand, the passengers can make path choices freely without considering the choices of other passengers. Minimizing the total number of transfers for all passengers is identical to each passenger minimizing his or her number of transfers. If the case is false, then minimizing the total numbers of transfers for all passengers and individual passengers minimizing their own numbers of transfers can differ. Then, Eq. (49) only produces an approximation of the real passenger behavior. Eq. (50) is the constraint for flow conservation at the level of time-expanded links. Eq. (51) states that the number of passengers taking a bus cannot exceed its bus capacity. Eq. (52) ensures that when bus b is used by passenger path p of OD g at any time-expanded link, the bus is used by that path, i.e., Bgpb = 1. Assuming that the length of each link is at least one unit of distance, the dimensionality of ATgpb cannot exceed maxd . Therefore, maxd is used to construct the big-M constraint. If the assumption is violated, then a larger value can be used. After the submodel is solved, the number of buses taken by passenger path p of OD g is P obtained, i.e., b Bgpb . By definition, the number of buses taken is the sum of the number of transfers (waiting and no-waiting) plus 1. Therefore, the number of no-waiting transfers can be identified by subtracting the known number of waiting transfers and 1 from the total number of buses taken, which can be used to calculate the underestimation of the number of transfers and partially addressthe limitation for identifying no-waiting transfers discussed in Section 2.3.
min
X
X
Bgpb
(49)
g∈G,p∈Pg b∈B
X
∗ Wgpbijt = Wgp , ∀g ∈ G, p ∈ Pg , (i, j, t) ∈ ATgp
(50)
b∈B
X
qg Wgpbijt ≤ k, ∀b ∈ B, (i, j, t) ∈ ATb
(51)
g∈G,p∈Pg
X
Wgpbijt ≤ maxd Bgpb , ∀g ∈ G, p ∈ Pg , b ∈ B
(52)
(i,j,t)∈ATgpb
Bgpb = {0, 1}, ∀g ∈ G, p ∈ Pg , b ∈ B 1 ≥ Wgpbijt ≥ 0, ∀g ∈ G, p ∈ Pg , b ∈ B, (i, j) ∈ A, t ∈ {1, · · · , T }
15
(53) (54)
3
Parallel BPC method
A parallel BPC algorithm is developed to solve the proposed TNDTP for urban bus systems, which applies to both static and dynamic travel times. BPC is an integration of branch-and-price and branch-and-cut algorithms. The branch-and-price algorithm is a variant of branch-and-bound (B&B) with linear programming (LP) relaxations. When column generation is used to solve the LP relaxation in each node of a B&B tree, the algorithm is called branch-and-price. Branching is necessary when no columns price out and the integrality conditions are not satisfied. The branch-and-cut algorithm is another variant of B&B with LP relaxation. When valid inequalities (or cuts) are added throughout the B&B tree to strengthen the relaxation, the algorithm is called branch-and-cut (Barnhart et al., 2000; Desaulniers, 2010). The general methodology of the BPC algorithm and its examples can be found in related literature, such as Barnhart et al. (2000) and Desaulniers (2010). The design of the parallel BPC algorithm can be categorized as the classical centralized control strategy for B&B as described in Crainic et al. (2006). The master process covers tree management, node selection, and bound calculation. The worker processes perform problem solving and variable selection. This section focuses on components that are unique for solving the problem, which include model reformulation, column and row generation, branching rules, and integer solution. In the appendix, the essential parts of the solution algorithm are illustrated using a hypothetical example, which serves as a supplementary material of this section.
3.1
Restricted master problem (RMP)
This section describes the reformulation of the original model and RMP. The pricing subproblem (SP) and its solution method will be introduced after row generation and branching are explained. As shown in Eqs. (2)-(36), the original model for TNDTP has a block diagonal structure by bus lines; thus, Dantzig-Wolfe decomposition can be applied. The requirements for all lines from the same depot are identical, which is called “identical machines” in Barnhart et al. (1998). To avoid the symmetry problem in the case of identical machines, the model is transformed from line-specific to depot-specific. Such transformation is beneficial because the number of depots is typically much smaller than the number of candidate bus lines in urban bus systems, and thus, the number of SPs to solve can be significantly reduced. The variables are transformed by replacing the variables and constraints indexed by l ∈ L with those indexed by d ∈ D. That is, Xijl , Yijtl , Ztl , Fl , and Etl are replaced with Xijd , Yijtd , Ztd , Fd , and Etd , respectively. The constraints, i.e., Eqs. (2)-(36), are also transformed by replacing ∀l ∈ L with ∀d ∈ D, which are not displayed explicitly because of space limitation. The variables and constraints in the reformulated model will simply be referred to as the “depot-indexed” version of variables and constraints. After decomposition and reindexing, the RMP at any BPC node can be formulated as follows:
16
(RM P ) min
wb
X X
(
T X X
1 Yijtdm )λdm + wg αij
d∈D m∈Md (i,j)∈A t=1
XX g∈G p∈Pg
X
δgpijt qg Wgp − k
XX
2 qg Wgp + wp αgp
g∈G p∈Pg
X X
X
αp3 qg Ug
(55)
g∈G
Yijtdm λdm ≤ 0, ∀(i, j) ∈ A, t ∈ {1, . . . , T }, (θijt )(56)
d∈D m∈Md
λdm = nd , ∀d ∈ D, (πd )
(57)
m∈Md
nd ≥ λdm ≥ 0, ∀d ∈ D, m ∈ Md Eqs. (37),(47),(48)
(58)
In RMP, a column for a depot represents a complete timetable that satisfies a subset of Eqs. (2)-(36) for that depot, depending on the setting of the TNDTP. The elements of column m of depot d are denoted in the model by {Xijdm , ∀(i, j); Yijtdm , ∀(i, j), t; Ztdm , ∀t}, the definitions of which can be derived from those of the route, timetable, and dispatch variables defined earlier. The λ-variable is denoted by λdm . A column can also be partially defined because timetable elements (Yijtdm ) can be determined given route and dispatch elements (Xijdm and Ztdm ), and vice versa. The RMP is solved given the column pools associated with the current BPC node, which is denoted by Md for depot d. The objective of the model can be formulated as Eq. (55). Given that a column represents a complete the column cost is the bus operation cost for the P bus P timetable, 1 corresponding timetable, i.e., ij t αij Yijtdm for column m of depot d. The capacity constraint is formulated as Eq. (56), and the associated dual values are denoted by θijt , where θijt ≤ 0. Eq. (57) is the constraint for convexity of λ-variables, and the associated dual values are denoted by πd . Eq. (58) sets the bounds for λ-variables. As shown in the equation, the upper bound for λdm is nd , where nd is the number of candidate lines for depot d. Therefore, a column/timetable can be selected up to the number of candidate lines for the depot. This condition is consistent with the original model because no restriction that bus lines should be different exists. The flow conservation constraint for passengers (Eq. (37)) and the definitions for Ug and Wgp (Eqs. (47)) and (48)) are unchanged from the original model. To solve RMP at the root node, where no columns are yet available, initial columns must be included in the column pool to start the process. The following initial columns are adopted in this study. Yijtd0 = 0, ∀(i, j) ∈ A, t ∈ {1, · · · , T }, d ∈ D The initial columns are attractive because they represent empty timetables, which are feasible for the original problem. Selecting an initial column in the final solution does not make RMP infeasible but simply indicates that one or more bus lines is unnecessary, and thus, unused. Alternatively, if all bus lines must be used, a constraint should be added to ensure that the initial columns are not selected in the final solution.
17
3.2
Row generation
The capacity constraint of Eq. (38) or (56) indicates that the proposed model can be considered one of the classes of capacitated network design problems and shares many similarities to other network design problems, such as those introduced in Magnanti and Wong (1984); Yang and Bell (1998); Hewitt et al. (2010, 2013). One of the issues for the related problems is that their dual bounds are typically extremely weak. Among the cuts that have been adopted to strengthen the dual bound, the cuts of “disaggregate coupling inequalities” adopted in Hewitt et al. (2010, 2013) are also effective for this problem. In particular, the capacity constraint of Eq. (56) can be disaggregated to tighten the lower bound. If any passenger takes any path that passes time-expanded link (i, j, t), then a bus passing that link must exist. The cut can bePdescribed mathematically as P follows: for all g ∈ G, p ∈ Pg , (i, j, t), such that δgpijt = 1, Wgp ≤ d m Yijtdm λdm . The cut is valid because Wgp is a portion, which would not exceed 1. The number of cuts is large, and thus, the cut is added only if necessary. P P When no column can be generated at each node in the BPC tree, the condition of Wgp > d m Yijtdm λdm is checked for all g ∈ G, p ∈ Pg , (i, j, t), such that δgpijt = 1. If the condition is violated, then the following cut is added to RMP: XX Yijtdm λdm ≤ 0, (ωgpijt ) (59) Wgp − d
m
When the coupling cut for passenger path p of OD g and time-expanded link (i, j, t) is added, (g, p, i, j, t) is also recorded in CP , which is the pool of cuts for the current node of the BPC tree and will be passed to its child nodes. CP is empty initially at the root node. If any cut is added, then the LP is re-optimized and ωgpijt is the dual value associated with the cut. The pricing SPs are solved to determine if any column with a negative reduced cost can be found. The column and row generation are repeated until no column and cut can be generated. Other classical cuts related to the demand, e.g., cover-based inequalities (Hewitt et al., 2010, 2013) and cutsets (Kim et al., 1999), are implemented and tested. The results show that they have insignificant or no effect on strengthening the lower bound for the proposed problem in this study. The reason can be attributed to bus timetables being constant headways and cannot be adjusted freely according to demand. Consequently, the total bus capacity in any duration is frequently much larger than the demand in the same duration, thereby making these cuts useless.
3.3
Branching rules
It is well known that branching on λ-variables is inefficient (Vanderbeck, 2000). In this study, branching on the total bus P flow from a depot passing a time-expanded link (i.e., Yijtl or Yijtd in the original model and m Yijtdm λdm in RMP) is adopted. If the total bus flow from depot d passing time-expanded link (i, j, t) is a fractional value K, then two branching constraints can be generated; each is added to one of the two branched nodes as follows: X
≤ Yijtdm λdm ≤ bKc, (γijtdbKc )
(60)
≥ Yijtdm λdm ≥ dKe, (γijtddKe )
(61)
m∈Md
X m∈Md
18
For Eq. (60), (i, j, t, d, bKc) is recorded in KS ≤ , which is the set of upper-bound branching constraints at the current node of the BPC tree. For Eq. (61), (i, j, t, d, dKe) is recorded in KS ≥ , which is the set of the lower-bound branching constraints. The dual values of Eqs. (60) and (61) ≤ ≥ are denoted by γijtdbKc and γijtddKe , respectively. Imposing branching constraints in the subproblem is preferred to imposing them in RMS because it generates a tight dual bound (Desrosiers and L¨ ubbecke, 2011). Therefore, when bKc = 0 in Eq. (60), time-expanded link (i, j, t) cannot be used in the timetables of depot d. Instead of imposing the constraint in RMP, effective steps can be considered in the subproblem. In particular, all the timetables/columns of depot d that pass time-expanded link (i, j, t) are removed from the column pool of the current node of the BPC tree. In the pricing subproblem, timetables/columns of depot d passing time-expanded link (i, j, t) are prohibited. Similarly, when dKe = nd in Eq. (61), time-expanded link (i, j, t) must be used in the timetables of depot d. Thus, all the timetables/columns of depot d that do not pass time-expanded link (i, j, t) are removed from the current column pool. In the pricing subproblem, timetables/columns of depot d not passing time-expanded link (i, j, t) are prohibited. For other cases, the branching constraints can only be added to RMP. SP modification resulting from branching constraints is discussed in Section 3.4. Several variable selection strategies are tested, and branching on the most fractional variable is selected because of its efficiency.
3.4
Pricing SP
A special algorithm is developed to solve pricing SP given the dual values of RMP and generate columns with a negative reduced cost efficiently. The algorithm can be applied to both static and dynamic link travel times. As defined in Section 3.1, a column is a feasible timetable that satisfies the depot version of a subset of Eqs. (2)-(36), depending on the setting of the TNDTP. In the remaining part of the section, the terminologies of timetable and column will be used interchangeably. The MIP formulation of the SP is first derived to understand its properties. (SP) ∀d ∈ D : min Z
SP
Yijtd
= w
b
T X X
1 αij Yijtd + k
t=1 (i,j)∈A
+
X (g,p,i,j,t)∈CP
s.t.
ωgpijt Yijtd −
X
θijt Yijtd
(i,j)∈A,t∈{1,..,T }
X
≤ γijtdK Yijtd +
(i,j,t,K)∈KS ≤ ,K6=0
X
≥ γijtdK Yijtd (62)
(i,j,t,K)∈KS ≥ ,K6=nd
depot-indexed version of a subset of Eqs. (2)-(36)
The solution algorithm for pricing SP is based on two important observations. The first observation is from the objective function of SP, i.e., Z SP in Eq. (62). Z SP indicates that each of the dual values from RMP can be distributed to one of the time-expanded links; that is, each time-expanded link has a potential contribution to Z SP . The implication of this observation is that solving SP for a depot in the MIP formulation is equivalent to finding a feasible, minimalcost timetable for that depot on a time-expanded network, in which the cost of passing a link is the potential contribution of the link to Z SP . The second observation, which has been mentioned previously, is that a timetable can be represented by a route and a dispatch pattern. Therefore, instead of pricing out a timetable, pricing out a combination of route and dispatch pattern is 19
sufficient. The aggregation and greedy strategies are adopted in the solution algorithm based on the two observations. First, a more aggregate unit, i.e., a bus trip is used to replace time-expanded links to construct timetables in the algorithm. A bus trip for a route and a dispatch time contains the time-expanded links that a bus traverses following the route and dispatch time. The potential contribution to Z SP of the bus trip can be easily evaluated as the sum of the potential contributions of all the links that it traverses. Consequently, the search space of the timetables can be simplified by aggregating time-expanded links into bus trips. Second, a greedy approach is adopted to identify a timetable with a negative reduced cost early in the search. This approach is achieved by starting the search with timetables that contain bus trips with the most negative contributions to Z SP . The details of the solution algorithm are as follows. Before the execution of the algorithm, several one-time data preparation tasks are conducted to facilitate the algorithm. First, all feasible round-trip routes for all depots are enumerated. Let F Rd be the set of routes for depot d that satisfy the depot version of route constraints (Eqs. (2)-(6)) and that have no subtour. Then, for each route and for each dispatch time, a bus trip is defined and the time-expanded links that the bus trip traverses are recorded. Let Ωrt¯ be the time-expanded links traversed by a bus trip of route r ∈ F Rd and dispatch time t¯ ∈ {1, · · · , T d }. The calculation of Ωrt¯ assumes that T is large enough that all buses can return to the depot by the end of the planning horizon (t + timeijt ≤ T for any (i, j, t) ∈ Ωrt¯). Ωrt¯ is compatible with both static and dynamic link travel times and thus the consequent solution algorithm applies to both types of link travel times as mentioned before. The procedures for these data preparation tasks are trivial, and thus, are not discussed in detail. When a set of dual values is available after RMP is solved, the potential contribution to Z SP of a bus trip (a pair of route r and dispatch time t¯), denoted by Zrt¯, can be derived from Eq. (62) as Zrt¯ = wb
X (i,j,t)∈Ωrt¯
+
X
1 αij +k
X
θijt
(i,j,t)∈Ωrt¯
ωgpijt
{(g,p,i,j,t)∈CP |(i,j,t)∈Ωrt¯}
−
X
X
≤ γijtdK +
{(i,j,t,K)∈KS ≤ |K6=0,(i,j,t)∈Ωrt¯}
≥ γijtdK .
(63)
{(i,j,t,K)∈KS ≥ |K6=nd ,(i,j,t)∈Ωrt¯}
Zrt¯ will be updated frequently, and thus, the efficient calculation of Eq. (63) is crucial. In the algorithm, the calculation of Zrt¯ is conducted in matrix form, which is highly efficient in utilizing existing linear algebra libraries. As observed from the feasible case of Eq. (63), the potential contribution to Z SP for each bus trip has two parts: a constant part and a variable part. The P constant1 part for a bus trip is its total weighted bus operation cost, which is simply wb (i,j,t)∈Ωrt¯ αij and can be calculated in advance. For the different dispatch times of aProute, their potentialPcontributions to Z SP can be arranged into a 1-by-T d vector, Cr = P 1 1 1 [wb (i,j,t)∈Ωr1 αij , · · · , wb (i,j,t)∈Ωrt αij , · · · , wb (i,j,t)∈Ω d αij ]. rT
The calculation of the variable part is more complex. First, the potential contribution to Z SP of an individual link (i, j, t) is derived from Eq. (62) as 20
kθijt +
X
ωgpijt
{(g,p,i0 ,j 0 ,t0 )∈CP |(i,j,t)=(i0 ,j 0 ,t0 )}
−
X
≤ γijtdK +
{(i0 ,j 0 ,t0 ,K)∈KS ≤ |K6=0,(i,j,t)=(i0 ,j 0 ,t0 )}
X
≥ γijtdK . (64)
{(i0 ,j 0 ,t0 ,K)∈KS ≥ |K6=nd ,(i,j,t)=(i0 ,j 0 ,t0 )}
The values for all time-expanded links can be calculated and collected into a 1-by-|A| × |T | vector, denoted by Vr . Given the potential contribution for all time-expanded links, the next step is to calculate the potential contribution of bus trips according to those of time-expanded links. To efficiently perform the calculation, Ωrt¯ for route r is arranged as a 0-1 incidence matrix that is denoted by ∆r . The dimensions of the matrix are |A| × T by T d , with the rows representing time-expanded links and the columns representing dispatch times. An element in ∆r is 1 if a bus of route r with a dispatch time that corresponds to its column will pass the time-expanded link that corresponds to its row, and 0 otherwise. The variable parts of the potential contribution to Z SP can then be calculated in matrix form as Vr · ∆r . When the constant and variable parts are combined, the potential contributions to Z SP for all the dispatch times of route r, Zr = [Zr1 , · · · , Zrt¯, · · · , ZrT d ] can be calculated using Zr = Cr + Vr · ∆r , which involves only basic matrix operations, and thus, can be conducted efficiently. Let Γ be a |F Rd | × T d matrix that collects Zr vectors for all routes of depot d. Each row represents a route, and each column represents a dispatch time. That is, Z1 Z11 ··· Z1t ··· Z1T d .. .. .. .. . . . . ··· Zrt¯ ··· ZrT d . Γ = Zr = Zr1 .. .. .. .. . . . . Z|FRd | Z|F Rd |,1 · · · Z|F Rd |,t · · · Z|F Rd |,T d Given Γ, algorithm 1 can be used to search for a feasible timetable with a negative reduced cost for depot d. The algorithm is efficient for two reasons. First, it is designed in a greedy manner by starting the search with the routes and bus trips with the most negative potential contribution to Z SP . Second, most of the steps in the algorithm are standard matrix operations, such as matrix inner product and sorting, which can be performed using existing linear algebra libraries. An empty timetable is also feasible for SP, but already exists in RMP as initial columns; therefore, the algorithm only considers timetables with at least one bus dispatch.
21
1 2
3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40
INPUT: Γ, where Γrt¯ denotes the element of the rth row and the t¯th column of the matrix. indicates the ith row and Γsort A copy of Γ is made and denoted by Γsort , where Γsort ij i indicates the element of the ith row and the jth column of the matrix. for i = 1, · · · , |F Rd | do are sorted in increasing order. All elements in Γsort i sort All rows of Γ are sorted based on their first elements in increasing order. Z best ← 0 for i = 1, · · · , |F Rd | do Lower bound for the route Z LB ← Γsort i1 for j = 2, · · · , maxf do if Γsort < 0 then ij Z LB ← Z LB + Γsort ij else Goto line 14 LB if Z − πd < 0 then r ← route−1 (i), where route−1 () is a function for mapping a row in Γsort back to its corresponding route if headways are constant then for j base = 1, · · · , T d do tbase ← disptime−1 (Γsort ), where disptime−1 () is a function for mapping an ij base element in Γsort back to its corresponding dispatch time. CT for h = max(minh , b minf r c), · · · , max(T d − tbase + 1, tbase ) do Z←0 Dispatch pattern DP ← {} for t = · · · , tbase − 2h, tbase − h, tbase , tbase + h, tbase + 2h, · · · do Z ← Z + Γrt DP ∪ t if Z − πd < 0 then CT if h > d maxf r e or the fleet size (Eq. (36)) is satisfied then if (i, j, t) 6∈ ∪t¯∈DP Ωrt¯, ∀(i, j, t, K) ∈ KS ≤ , K = 0 then if (i, j, t) ∈ ∪t¯∈DP Ωrt¯, ∀(i, j, t, K) ∈ KS ≥ , K = nd then Z best ← Z − πd . route Rbest ← r and dispatch pattern DP best ← DP . Goto line 37. else if headways are variable then Find a dispatch pattern DP that contains between 1 and maxf dispatch times from Γr , satisfy the fleet size constraint (Eq. (36)), and minimizes total reduced cost Z by solving a MIP model (Eqs. (65)-(67)). if Z − πd < Z best then Z best ← Z − πd . route Rbest ← r and dispatch pattern DP best ← DP . if Z best < 0 then OUTPUT: route Rbest and dispatch pattern DP best . else No column with a negative reduced cost can be found. Algorithm 1: Algorithm for column/timetable pricing for depot d 22
Line 1 defines the input of the algorithm. In lines 3-4, each row (route) is sorted according to the potential contributions of bus trips. After sorting, the bus trip with the most negative potential contribution will be the first element. In line 5, all rows (route) are sorted according to their individual most negative potential contributions. Z best is initialized to store the best negative reduced cost so far in line 6) In the route loop (starting line 7), the routes are evaluated following the order of the most negative potential contributions. The concept is that the route with a bus trip with a highly negative contribution is likely to generate a timetable with a negative reduced cost. Before any timetable is constructed for a route, a lower bound for the objective value of that route is calculated by ignoring the requirements for headway and frequency in a timetable. The potential contributions are sorted because between 1 and minf bus trips can be present in a timetable. A lower bound of Z SP for the route can be calculated by accumulating the potential contributions of bus trips from the beginning until the next potential contribution that should be added is non-negative or maxf bus trips have been added, as shown in lines 8-13. As stated in line 14, if Z LB − πd is not negative, then the entire route can be discarded because generating a column with a negative reduced cost will be impossible for the route; otherwise, timetables are constructed for that route to determine if a column with a negative reduced cost can be found. The remaining steps of the algorithms differ for constant and variable headways. We first discuss the case of generating columns with constant headways. In the loop for dispatch times (starting line 17), a bus trip is selected as the base to construct timetables. In line 18, the order of the bus trip is converted to its dispatch time via a mapping function. The bus trips with more negative contributions are first selected. In the headway loop (starting at line 19), a timetable that contains the selected base bus trip is constructed with the current headway (lines 20-24). In CT is the line 19, b minf r c is the lower bound of the feasible headway given the fleet size, where minCT r minimum possible cycle time for route r. Line 22 guarantees that the constant headway constraints are satisfied (the depot version of Eqs. (8)-(11)). By definition, the superposition of these bus trips automatically satisfies the timetable generation constraints of Eqs. (18)- (28) (dynamic link travel times) or Eqs. (29)-(35) (static link travel times), which constitutes a feasible timetable. It is known that any column with a negative reduced cost can be added to RMP to improve its objective function. Thus, if the timetable has a negative reduced cost and the fleet size constraint (Eq. (36)) is satisfied, then a column is recorded and the algorithm skips to the end (lines 25-31). CT Line 26 implies that there is no need to verify the fleet size constraint (Eq. (36)) if h > d maxf r e because the fleet size is always sufficient, where maxCT is the maxmimum possible cycle time for r route r. Lines 27-28 check whether the column satisfies the branching constraints imposed in the subproblem. The worst-case complexity of the algorithm for the case of constant headways is O(|F Rd |(T d )2 log(T d )), which is a polynomial-time complexity. For each h in the headway loop (line 19), only T d /h bus trips are added to construct a timetable in the loop of t (line 22). Therefore, the maximum number of operations for both loops is T d (1 + 1/2 + 1/3 + · · · + 1/T d ), which has a complexity of O(T d log(T d )). This complexity multiplied by the number of routes and the number of possible base bus trips provides the worst-case complexity of the algorithm. The algorithm performs efficiently in practice. In most of the cases, the algorithm terminates at a very early stage when one of the columns with a negative reduced cost is found. The worse cases occur near the end of column 23
generation when columns with a negative reduced cost are difficult to find. In this scenario, many routes are discarded at the beginning by checking their lower bound. We next discuss the generation of columns with variable headways. In line 33, the following MIP model is solved to find the column with the minimal reduced cost for route r: min
S1 ,··· ,ST d
s.t.
X
St¯Γrt¯
(65)
1(r, t¯, t)St¯ ≤ f, ∀t¯ ∈ {1, · · · , T }
(66)
t¯∈{1,··· ,T d }
X t¯∈{1,··· ,T d }
1≤
X
St¯ ≤ maxf
(67)
t¯∈{1,··· ,T d }
St¯ = 0, ∀t¯ ∈ {1, · · · , T d }s.t.(i, j, t) ∈ Ωrt¯, ∀(i, j, t, K) ∈ KS ≤ , K = 0 X St¯ ≥ 1, ∀(i, j, t, K) ∈ KS ≥ , K = nd
(68) (69)
t¯∈{1,··· ,T d }s.t.(i,j,t)∈Ωrt¯
In the model, St¯ is a binary variable indicating whether dispatch time t¯ is selected in the column or not. 1 if dispatch time t¯ is selected and 0 if not. 1(r, t¯, t) is an indicator function that returns 1 if a bus following route r and departing from the depot at time t¯ is running at time t and 0 if not. Given the reduced cost of each dispatch time (Γrt¯, ∀t¯), Eq. (65) minimizes the sum of the reduced cost for all selected dispatch times. Eq. (66) checks the fleet size and Eq. (67) ensures the total number of selected dispatch times is between 1 and maxf . Eqs. (68)-(69) make sure that the branching constraints imposed in the subproblem are satisfied. In line 33, DP contains the dispatch times that are selected in the solution of the MIP model. Different from the case of constant headways, the algorithm does not terminate when a column with a negative reduced cost is found, as shown in lines 34-36. Because variable headways are less restricted than constant headways, there would be more columns with a negative reduced cost in the case of variable headways than in the case of constant headways. To avoid adding a large number of columns to the RMP and slowing down the convergence, the SP is solved to optimality to find the optimal column with the most negative reduced cost. The worst-case complexity of the algorithm for variable headways is O(|F Rd |) multiplied by the complexity of solving the MIP models, which is difficult to define. In practice, the MIP models are easy to solve with a commercial solver due to their small sizes and the algorithm is efficient for generating columns with variable headways. For both cases, the outputs of the algorithm are a route Rbest and a dispatch pattern DP best . best Given Rbest and S DP , the column for depot d is constructed and added to RMP, where Yijtd = 1, ∀(i, j, t) ∈ t∈DP best ΩRbest t , and Yijtd = 0 otherwise (line 38). If no column with a negative reduced cost is found after all routes are explored, then the algorithm ends without a generated column (line 40).
3.5
Integer solution at root node
A common way to find an integer solution in the framework of column generation is to solve an integer programming problem with the generated columns (Vanderbeck, 2005). A similar approach is adopted in this study. After the root node is solved, an integer solution is generated by solving a binary programming problem using the columns found at the root node. Several steps are 24
adopted to speed up the solution for the integer solution. First, the nonbasic columns in the final solution of RMP at the root node are discarded. Second, the basic columns with small λ values are also removed. (In the computational study, theP basic columns with the smallest 60% of λ values are dropped). Third, Eq. (57) is reduced to m λdm = 1, ∀d, and the problem is solved as a binary programming where λdm ∈ {0, 1}, ∀d, m. Evidently, the three steps make the problem more restricted than the original integer programming problem. Therefore, the integer solution found with the binary programming is still an upper bound of the optimal solution of the original problem. As explained in Section 3.1, the initial columns are feasible for the original problem. Therefore, a feasible integer solution is always found when initial columns exist.
4
Computational study
A computational study is conducted to evaluate the performance of the proposed BPC algorithm and to understand the effect of important parameters on the model solution and results. The hardware and software environments for the computational study are as follows. The parallel BPC algorithm is written in Python programming language. The multiprocessing module in Python language is adopted for implementing the parallel algorithm. To speed up code execution, the aheadof-time compilation technology for Python is adopted (Cython, http://cython.org). The LP and MIP solver is Gurobi 7.0 (http://www.gurobi.com). The NumPy library (http://www.numpy.org/) is adopted for the linear algebra operations. All the problem instances of the example are solved using a single desktop PC with Intel Core i7 3.40 GHz CPU with 32 GB RAM. Eight threads are available for both Gurobi and the parallel BPC algorithm. The test cases used in the computational study are modified from the classical example presented in Mandl (1979). The example has been adopted in many studies on TNPs (Baaj and Mahmassani, 1991; Chakroborty, 2003; Fan and Mumford, 2010; Nayeem et al., 2014). As shown in Fig. 4a, the physical network includes 15 nodes and 42 directed links. The value in the circle denotes the node number, and the value beside each link is the travel time (in minutes). Fig. 5 shows the daily transit demand matrix of each OD pair. The total demand in the matrix is 15570 persons. Among the 15 nodes, 14 are demand nodes (nodes 0 through 13) and node 14 has no demand generation and attraction. Considering the travel times between nodes (between 2 min and 10 min), the length of a period is set to 3 min to reduce optimization complexity. The basic settings for the computational study are summarized. The parameters for the operator are defined as follows. • The operating speed of each bus is 40 km/h. The travel distance for each link is estimated with its travel time and assumed speed. • Considering the structure of the network, the maximum travel distance for a route is estimated via a round-trip route across the network. The route 0-1-3-5-7-9-13-9-7-5-3-1-0 is used, and its travel distance is 46. The corresponding travel time is 72 min (24 periods). • No bus is dispatched in the last 24 periods (the maximum travel time for a route) to allow buses to return to the depot by the end of the planning horizon. • Following Taipei City Government (2013), the bus operating cost is NT$ 54.6 per km. 25
The link travel times are in minutes.
0 8 2
1 6 4
4
3
3
5 2
10
8
14 2
7
6
8 5
10
8
2 7 9
8 10
5
13 2
12
8
The link travel times are in minutes.
1’ 1 2 2’ 6 6 8 3 3 3 4 3 5’ 4 4 3 14’ 4 3’ 4 2 2 2 10 10 7’ 6’ 8 11 7 10 10 5 9’ 5 10’ 10 5 5 8 10 10 13’ 13 12 2 2
3 4
2
8’
10 11
8
2
3
0
(a) Mandl’s network (Cases 1-13)(adapted from Mandl (1979))
O\D
0
1
2
3
4
5
6
7
8
9
10
11
12
13
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
0 400 200 60 80 150 75 75 30 160 30 25 35 0 0
400 0 50 120 20 180 90 90 15 130 20 10 10 5 0
200 50 0 40 60 180 90 90 15 45 20 10 10 5 0
60 120 40 0 50 100 50 50 15 240 40 25 10 5 0
80 20 60 50 0 50 25 25 10 120 20 15 5 0 0
150 180 180 100 50 0 100 100 30 880 60 15 15 10 0
75 90 90 50 25 100 0 50 15 440 35 10 10 5 0
75 90 90 50 25 100 50 0 15 440 35 10 10 5 0
30 15 15 15 10 30 15 15 0 140 20 5 0 0 0
160 130 45 240 120 880 440 440 140 0 600 250 500 200 0
30 20 20 40 20 60 35 35 20 600 0 75 95 15 0
25 10 10 25 15 15 10 10 5 250 75 0 70 0 0
35 10 10 10 5 15 10 10 0 500 95 70 0 45 0
0 5 5 5 0 10 5 5 0 200 15 0 45 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Figure 5: Daily transit demand matrix (Mandl, 1979)
8
8 3 3 5 14 2 2 2 7 6 8 7 9 8
(b) Double-sized network (Case 14)
Figure 4: Networks for the computational study
26
2
• Following Baaj and Mahmassani (1991), the capacity of each bus is 50 persons. • The fleet size is 24. • Ticket price is not considered, i.e., α4 = 0. The parameters for the passengers are as follows. • The daily demand displayed in Fig. 5 is assumed to be distributed uniformly within a 12-h period or 240 time periods, which contains 11910 time-dependent OD pairs. • The first 18 min (6 periods) is reserved for bus operations, and no passenger demand occurs during this duration, thereby allowing the operator to serve early passengers whose origins are far from any depot. • The maximum waiting time (initial and transfer combined) is set to 9 min (3 periods). • The maximum number of waiting transfer is 1. • The cost for in-vehicle time and out-of-vehicle time is estimated based on the value of time of bus users. The in-vehicle time cost is set to NT$ 1.75 per minute, and the out-of-vehicle time (including initial and transfer waiting times) is set to NT$ 2.47 per minute (Chen and Lin, 2009)). The generalized cost for each feasible path is calculated using these values. • The penalty for the unsatisfied demand of an OD pair (αg3 ) is set to 1.05 times of the largest generalized costs for all passenger paths of that OD pair. • The first type of maximum travel time for an OD pair is double the shortest possible travel time between the OD pair (defined in Section 2.3). The problem instances with different levels of supply and demand are tested to evaluate the performance of the solution algorithm. The total length of the planning horizon is limited to 70 periods (210 min), including 6 periods or 18 min for preparation (periods 1 to 6), 40 periods or 120 min for passenger demand (periods 7 to 46), and 24 periods or 72 min for depot returning (periods 47 to 70), as defined earlier. The minimum headway is set to 6 min (2 periods). Four levels of demand in terms of the number of OD pairs are tested. The first level contains 2614 passengers and 2004 OD pairs and is converted from the 12 h demand matrix in Figure 5. To generate different numbers of OD pairs, the 14 demand nodes are aggregated in three ways. Notably, node 0 is connected to node 1 only and node 8 is connected to node 14 only. The second level of the number of OD pairs is generated by aggregating the demand of node 0 to node 1 and the demand of node 8 to node 14. As a result, the number of demand nodes is reduced to 13, and 2004 OD pairs are reduced to 1860 OD pairs. The third level is obtained by reducing the number of demand nodes to 8 on the basis of their topological relationships. Specifically, the demands of nodes 0 and 2 are aggregated to node 1, the demands of nodes 5, 6, 7, and 8 are aggregated to node 14, and the demand of node 13 is aggregated to node 12. Consequently, 8 demand nodes and 1076 OD pairs are derived. The fourth level is obtained by reducing the number of demand nodes to four (nodes 1, 9, 11, and 14). In accordance with the network topology, the demands of nodes 0, 2, 3, and 4 are aggregated to node 1, the demands of nodes 5, 6, 7, and 8 are aggregated to node 14, the demand of node 10 is aggregated to node 11, and the demands of nodes 12 and 13 are aggregated to node 9. Consequently, 4 demand nodes and 503 OD pairs are obtained. Three levels of supply 27
in terms of the numbers of depots and lines are also tested; these levels are 1 depot and 4 lines, 4 depots and 4 lines (one bus line assigned to each depot), and 4 depots and 8 lines (two lines assigned to each depot). In the case of 4 depots, the depots are located at nodes 0, 4, 11, and 12. The selection is based on the network structure and the routes found in Mandl (1979); Baaj and Mahmassani (1991). In the case of 1 depot, the depot is located at node 9, which is the main source of demand generation and attraction. The four levels of demand (numbers of OD pairs) and three levels of supply (numbers of depots and bus lines) result in 12 problem instances. The results for the 12 problem instances are summarized in Table 1. In the table, the time for solving the root node and the upper bound, lower bound, and optimality gap at the root node and after branching are reported. The solution time at the root node includes two parts: time for column generation and time for integer solution. The total solution time including the root node and the branching is limited to 4 h. The effect of the numbers of OD pairs is discussed first. Clearly, optimality gap and solution time increase as the number of OD pairs increases. When the numbers of OD pairs are relatively low (503 and 1076), the problem instances can be solved to a small optimality gap at the root node (0.4% to 3.2%) in a very short time; they can also be solved to optimality (0.01% within the optimal solution or exploring all nodes) after branching. Moreover, better feasible solutions or optimal solutions can be found with branching in these instances. The above-mentioned results verify the correctness and convergence of the proposed BPC algorithm. For the relatively large numbers of OD pairs, good feasible solutions can be found at the root node in a short time and the optimality gaps can still be further reduced with branching. Next, the effect of numbers of depots and lines are discussed. As mentioned in Section 3.1, the depot-indexed formulation is advantageous in that its problem size depends on the number of depots but not on the number of candidate lines. As a result, the solution time of the problems with 4 depots is larger than that of the ones with 1 depot because the model size of problems with 4 depots is larger than that of the problems with 1 depot. Meanwhile, the 8-line instances do not have larger solution times than the 4-line instances do given the same number of depots as they have similar problem sizes. Another interesting observation is that the final optimality gaps decrease as the numbers of depots and lines increase. The reason is that large numbers of depots and lines provide freedom to serve passengers, thereby resulting in improved solution quality. Therefore, the solution time and optimality gap of a problem using the proposed BPC algorithm depend more on the ease of serving passengers than on the problem size. Next, the effect of other important parameters on the model results is tested. The case of 4 depots and 8 lines with the original 14 demand nodes (i.e., no aggregation for demand nodes) is selected as a base model for the remainder of the computational study due to its good solution quality. First, the base case (Case 1) is solved with different solution approaches to compare their performances. Then, 12 additional cases are created by modifying Case 1 to evaluate the effect of the important parameters on the model results. The parameters being analyzed include weights on the passenger and the operator, numbers of depots, numbers of lines per depot, values of maximum headway, lengths of planning horizon, and sizes of the network. The cases and their parameters are summarized in Table 2. In Case 1, the total generalized cost for the passengers and the penalty for unsatisfied demand are minimized, and the cost for the operators is ignored in the objective function. In particular, the weights of passenger generalized cost (ω g ) and penalty for unsatisfied demand (ω p ) are both 0.5. The weight of operator cost is zero. The bus operations are restricted by the parameters, such as maximum route length and minimum headway. This setting is consistent with many studies on TNPs (Szeto and Wu, 2011; Fan and Mumford, 2010; Szeto 28
demand nodes
4
8
13
14
503
1076
1860
2004
1 depot 4 lines
22238.2
23317.7
24242.8
29181.1
4 depot 4 lines
22250.8
22463.0
23045.6
27675.8
4 depot 8 lines
21954.5
21468.1
21511.0
25569.9
1 depot 4 lines
22318.1
23882.0
26280.1
32926.6
4 depot 4 lines
22481.1
23214.4
24273.9
29688.4
4 depot 8 lines
22236.1
21496.7
21822.4
26085.1
1 depot 4 lines
0.4%
2.4%
7.8%
11.4%
OD pairs LB
Root
UB
optimality gap 4 depot 4 lines
1.0%
3.2%
5.1%
6.8%
4 depot 8 lines
1.3%
0.1%
1.4%
2.0%
1 depot 4 lines
19+1
57+5
77+61
126+220
solution time (s)* 4 depot 4 lines
100+1
130+21
158+36
186+295
4 depot 8 lines
21+1
88+4
123+14
162+60
1 depot 4 lines
22258.8
23672.2
25014.2
30436.4
LB
UB Branching
4 depot 4 lines
22429.3
22852.0
23618.6
28423.9
4 depot 8 lines
21954.5
21490.2
21564.9
25655.2
1 depot 4 lines
22258.8
23672.2
26280.1
32926.6
4 depot 4 lines
22431.5
22853.4
24273.9
29688.4
4 depot 8 lines
21954.5
21492.0
21822.4
26085.1
1 depot 4 lines
0.0%
0.0%
4.8%
7.6%
optimality gap** 4 depot 4 lines
0.0097%
0.0059%
2.7%
4.3%
4 depot 8 lines
0.0%
0.0%
1.2%
1.6%
1 depot 4 lines
11
695
14301
14055
solution time (s) 4 depot 4 lines
649
4918
14207
13963
4 depot 8 lines
55
1460
14274
14191
* Solution time for column generation + solution time for integer solution. ** The branching terminates when all nodes have been explored or an integer feasible solution is within 0.01% of optimality.
Table 1: Computational results for supply and demand
and Jiang, 2012). The results are presented in Tables 2 and 3. Table 2 mainly reports the solution time and bounds. The statistics for the operators and passengers are summarized in Table 3. Case 1 adopting the MIP with static link travel times and constant headways (Eqs. (1)-(11) and (29)-(48)), denoted by MIP (constant/static), is solved by Gurobi, one of the mostly widely used MIP solvers. After presolve, the MIP model has 763862 constraints and 433157 variables, in which 164892 are continuous and 268265 are integer (268249 binary). The results are summarized in Tables 2 and 3. When MIP (constant/static) is used in Case 1, the gap between the lower and upper bounds of the optimal value was 50.1% after 72 h of solution time. Next, the formulation of MIP with dynamic link travel times are tested (although the travel times in Case 1 do not change over time). After presolve, the MIP model has 80204 constraints and 186368 variables, in which 164892 are continuous and 21476 are integer (21460 binary). After 72 h, the gap is 59.7%. The results show that the MIP formulations of Case 1 are inefficient to solve due to the large problem scales. Table 3 shows the statistics for solving the two cases for 72 h. In both cases, some of the lines are unused and the average headways are large for the used lines. The statistics for the operator and the 29
passengers are also poor. Subsequently, the performance of the BPC algorithm is tested. In Table 2, two sets of results are recorded for the cases solved using the proposed BPC algorithm. The first set is the results of the root node and the second set is the results of a total solution time of 4 h. The solution time for the root node includes two parts: time for column generation and time for integer solution. If column generation at the root node does not converge within 4 h, column generation is terminated and the binary programming for the integer solution is solved up to 1 h. This situation occurs in Cases 2, 3, and 4 and Case 1 (variable-headway). Case 1 is solved using the proposed BPC algorithm, which is recorded as Case 1 (BPC). For Case 1 (BPC), the optimality gap was only 2.0% after the root node is solved in 222 s (162+60 s). For a total solution time of 4 h, the gap is further reduced to 1.6%. Comparing the statistics for the proposed solution approach and the MIP formulations, Case 1 (BPC) performs better in all statistics for passengers by running longer bus routes, which is consistent with the weights selected for Case 1. Case 1 (BPC) also has lower unsatisfied demand. The number of no-waiting transfers is larger than those of the other two approaches, which indicates that Case 1 (BPC) takes advantage of the underestimation of transfer inconvenience to provide a better solution. Overall, the proposed BPC algorithm is superior to solving the MIP formulations with the off-the-shelf solver. As an example, the routes and headways in Case 1 (BPC) are illustrated in Fig. 6a. All the nodes in the network are covered. 6 out of 8 routes go through node 9, which is the largest demand source. This result is reasonable. The timetables for the routes are not displayed because of space limitation. We also tested the BPC algorithm for variable headways. The results are listed in the bottom of the two tables of results. The minimum headway of 2 time periods is converted to the maximum frequency of 23 (46 periods for bus dispatches divided by the minimum headway of 2). Because there are significantly more possibilities for timetables with variable headways, the solution time and the optimality gap for variable headways are both larger than those for constant headways for the solution time of 4 h. In this case, the column generation does not converge within 4 h. Despite of the slow convergence, the statistics for the operator and the passenger assuming variable headways present similar patterns to those of the constant-headway case. This finding is reasonable considering the small headway and corresponding high frequency in Case 1. Different weights are tested in Cases 2-4 to understand the nature of the multi-objective problem. In Case 2, the weights for the operator and the passengers are equal. The weights in Cases 1 and 2 are different, and thus, their objective values cannot be directly compared. Nevertheless, according to the statistics reported in Table 3, the solution for Case 2 is clearly unacceptable for the passengers. Only six lines with large headways are used by the operator to save cost because the weight for the operator is relatively high. Consequently, 2510 of the 2614 passengers are not served. Table 2 indicates that the case is also difficult to solve. The root node cannot be solved within 4 h, and the gap is as large as 20.7% when the algorithm is terminated. The main source of difficulty is the conflicting objectives for the operator and the passenger. Because the objectives are conflicting, each iteration of the solution of RMP using the LP solver is considerably more time-consuming than that in Case 1 that minimizes the passenger cost and the penalty and ignores the operator cost. In Case 3, the weight for the operator is significantly reduced, and a more reasonable solution than that for Case 2 is obtained. For Case 3, The root node cannot be solved within 4 h because 30
of the introduction of the operator weight as explained in Case 2. The final optimality gap for the case is 11.3%, which is between Case 1 and 2. The objective value of the case cannot be compared with that of Case 1, but the comparison of the unweighted costs can be informative. The unweighted cost for the operator in Case 3 is less than half of that in Case 1, which provides considerable saving from the operator perspective. The reduction results from the decrease in average route length decreasing with the side effect of the increase in total travel time and passengers with transfers. The unsatisfied demand for Case 3 is only 118, thereby indicating that the solution is still effective to satisfy passenger demand. On the basis of Cases 2 and 3, adding operator cost complicates the problem and significantly increases solution time, particularly when its weight is relatively high. If operator cost reduction is one of the priorities for bus system planning, then its weight should still be dominated by the weights of the passengers and the penalty in Case 3 to obtain reasonable results. In Case 4, the weight for passenger cost is transferred to unsatisfied demand penalty. The objective of this case is to serve as many passengers as possible without considering how they are served. Similar to Case 2, the RMP for this case is extremely difficult to solve, and the root node cannot be solved within 4 h. Although the objectives of Cases 1 and 4 are incomparable, the gap between the cases is extremely large because of the weak lower bound. Passenger demand is easily satisfied by fractional buses and the penalty for unsatisfied demand is reduced to zero because integrality is relaxed in RMP. Given zero weight for user cost and low weight for operator cost, the lower bound calculated in RMP reaches as low as 989.9. However, when integrality is imposed on the integer solution, a large number of passengers cannot be served, which results in a high cost for the penalty of unsatisfied demand. The high unsatisfied demand clearly contradicts the original idea of the case. Another issue in this case is the poor level of service for passengers. Table 3 shows that the average headway in Case 4 is larger than those in Cases 1 and 3. Consequently, the average total travel time and the average initial waiting time all increase. Considering the large optimality gap, poor level of service for the passengers, and high unsatisfied demand, the weight combination is apparently not useful. A trivial case for weights that is not tested is removing penalty for unsatisfied demand from Case 1 or 2. The case is not useful because the optimal solution will simply be empty timetables with no passenger served, which leads to the objective value of zero. A conclusion can then be drawn that both passenger cost and penalty for unsatisfied demand should always be included in the objective function. Different numbers of depots and lines are tested in Cases 5 and 6. The computational results of both cases have been discussed earlier in this section. Now the discussion focuses on the statistics for the operator and passengers. In Case 5, the number of candidate bus lines is reduced to four and the number of depots is reduced to one. Node 9, which has the highest demand generation and attraction, is selected as the only depot and all four lines are based on this depot. With a decrease in the number of depots, the bus network is more restricted in serving passengers, and thus, its objective is worse than that in Case 1, with increased passenger cost and unsatisfied demand penalty. The number of direct passengers is also significantly fewer than that in Case 1. The routes and headways in Case 5 are illustrated in Fig. 6b. In Case 6, the number of depots is the same as in Case 1, but the bus line for each depot is reduced from 2 to 1 (4 lines in total). Given the same number of depots, the model sizes in Cases 1 and 6 are similar. The routes and headways in Case 6 are illustrated in Fig. 6c. With fewer lines for each depot, the bus network has less freedom to serve passengers. Consequently, its objective and the optimality gap are worse than those in Case 1. The number of unsatisfied demands is increased to 56 persons. 31
An important conclusion from the preceding results is that the complexity for solving the problem using the proposed solution algorithm depends more on the difficulty of serving passengers than on problem extent, which is promising for solving larger problems with more depots and lines. Different values for the minimum headway are tested in Cases 7 and 8. In Case 7, the minimum headway is reduced to one from two periods in Case 1. The results show that the solution time of the root node for the problem is extremely short (82 s), and the problem can be solved to optimality (0.001% with the optimal solution) after a total solution time of 3377 s. The case significantly underestimates the inconvenience of passenger transfers because nearly all transfers are no-waiting transfers in this case. Passengers freely move from one bus to another without considering the limitation of the number of waiting transfers, which is evident from the large number of no-waiting transfers (580+65). Consequently, the level of service is particularly high in this case. In particular, the number of unsatisfied demands and the average waiting time are extremely low. In Case 8, the minimum headway is increased to three periods. In this case, the problem appears more difficult to solve. The solution time for the root node is 271+1388 s. As expected, the integer solution and the statistics for passengers are worse than those in Case 1. In particular, the initial waiting time increases from 0.07 s in Case 1 to 0.17 s in Case 8, and the number of waiting transfers increases from 66 or more in Case 1 to 122 or more in Case 8. Given the explicit consideration of timetables in the model, the increasing minimum headway, which makes transfers between buses more difficult, significantly affected solution time. However, by more accurately determining the possibility and time required for passenger transfers, the model results are expected to be more realistic than those of past studies of transit network design problems. The effects of planning horizon length and network size are also studied. In Cases 9-11, three portions of the total 12 h demand other than the 2 h demand in Case 1 are considered to evaluate the performance of the BPC algorithm. In particular, Cases 9-11 contain 1, 4, and 12 h of demand, which are equivalent to 1314, 5192, and 15570 passengers, respectively. In addition, these cases include 1008, 3972, and 11910 OD pairs, respectively. Including the 12 periods at the beginning and the 18 periods at the end without passenger demand, the total length for the five cases are 50, 110, and 270 periods (150, 330, and 810 min). As expected, the objective value of the integer solution increases with the value of total demand and length. The results also indicate that the optimality gap and the statistics for the operator and the passengers do not change drastically between cases. This finding is reasonable because demand is assumed to be uniformly distributed within the day. A well-known disadvantage of the time-expanded network is that its size significantly increases as the number of periods extends. On the basis of the empirical results in this computational study, solution time increases moderately as planning length increases, which is promising for applying the proposed model and the solution algorithm to problems with a long planning horizon. In Case 12, the network size is approximately doubled (26 nodes and 84 links). Specifically, the original network is duplicated to generate a new network, and four depots are shared by both networks, as shown in Fig. 4b. Passenger demands are duplicated and the number of lines doubled along with the increase in network size to maintain the difficulty of serving passengers. The increase in network size has a clear impact on the time for generating passenger paths described in Section 2.3. The time for generating passenger paths is 5.4 s in Case 1, whereas it is 113.4 s in Case 12. On the contrary, the increase in network size causes only a slight increase in the time for enumerating all feasible round-trip bus routes described in Section 3.4. The time for generating bus routes is 0.8 s in Case 1 and 4.2 s in Case 12. In terms of solution time and quality, the time 32
for solving the root node is 222 (162+60) s in Case 1 and 2990 (2004+986) s in Case 12. The optimality gap after solving the root node is 3.1% in Case 12, which is slightly higher than that in Case 1. The parallel branching is inefficient for Case 12 because of the long solution time for each iteration of RMP and the large memory requirement for storing passenger paths. Thus, the gap can only be reduced slightly to 3.0% after 4 h. The analysis shows that the solution algorithm remains effective even when network size is doubled. However, solution time increases significantly as network size increases. Further improvements for the solution algorithm might be required for solving real-world large problems. Finally, the network design problem and the timetabling problem are solved sequentially to highlight the benefit of the simultaneous planning of network design and timetabling. Notably, P t∈{1,··· ,T d } Ztl is the frequency of bus line l. The separate network design model can be created by including Eqs. (2)-(6) for the round-trip route requirement, Eqs. (29)-(31) for avoiding subtours, Eq. (37) for passenger flow conservation, Eq. (70) that is modified from Eq. (38) for bus capacity, and the objective of Eq. (71) that is modified optimal P from Eq. (1). The output of the model is the ˜ values of routes (Xijl ), the frequencies ( t∈{1,··· ,T d } Ztl ), and the template timetables (Yij t˜l ) for all lines. Using the parameters of Case 1 as example, the objective of the separate network design problem is 25021.5, which is 4.1% lower than the objective of Case 1 (26085.1). Only seven routes are generated with frequencies between 1 and 5, and one route is unused. The level of service for the passengers is particularly high, and all demands are satisfied. Compared with the results from the integrated model, the required line frequencies are seriously underestimated when the timetabling is ignored. XX
X
δgpijt qg Wgp − k
g∈G p∈Pg t∈{1,··· ,T }
min wb
X X (i,j)∈A l∈L
1 αij
X
X
Ztl Xijl ≤ 0, ∀(i, j) ∈ A
(70)
l∈L t∈{1,··· ,T d }
X
Ztl Xijl + wg
XX g∈G p∈Pg
t∈{1,··· ,T d }
2 αgp qg Wgp + wp
X
αg3 qg Ug
(71)
g∈G
P The separate timetabling problem can be created by fixing Xijl , t∈{1,··· ,T d } Ztl , and Y˜ij t˜l to the optimal values from the separate network design model in the MIP formulations, or by reducing F Rd to the optimal routes from the separate network design model in the BPC algorithm. Two sets of constant-headway timetables are solved using the BPC algorithm. One is to impose the frequencies from the separate network design model. For simplicity, the largest frequency among the seven optimal routes from the separate network design model is selected, i.e., maxf = 5 or minh = 8. The objective is 34139.3, which is 30.9% higher than the objective of Case 1. The unsatisfied demand is 386, which is significantly larger than the number in Case 1 (BPC). The other is to ignore the frequencies from the network design model and adopt the frequencies of Case 1, i.e., minh = 2. The objective is 27868.7, which is still 6.8% higher than the objective of Case 1. The unsatisfied demand is 63 passengers, which is also higher than that from the integrated model. The results show that integrating network design and timetabling is useful for improving passenger service and reducing the number of unsatisfied demand. Notably, the example assumes uniformly distributed demand within a day. The improvement from integrating network design and timetabling planning is expected to be high if the variability in the demand distribution is large. 33
LB Case
Solution approach
Operator weight
User cost weight
Penalty weight
UB
Min Total Depot/l Total headway time ine demand (period) (period)
Gap (%)
Time (s)*
LB
Root node
UB
Gap (%)
Time (s)
Branching
Constant-headway 1 MIP (static)
0.500
0.500
4/8
2
70
2614
25063.5
50233.4
50.1
259200
1 MIP (dynamic)
0.500
0.500
4/8
2
70
2614
25082.7
62306.2
59.7
259200
1 BPC
0.500
0.500
4/8
2
70
2614
25569.9
26085.1
2.0
25655.2
26085.1
1.6
14191
162+60
2 BPC
0.500
0.250
0.250
4/8
2
70
2614
26411.3
33317.0
20.7
14411+1180**
3 BPC
0.050
0.475
0.475
4/8
2
70
2614
33241.6
37459.8
11.3
14405+3610**
4 BPC
0.050
0.950
4/8
2
70
2614
989.9
57391.4
98.3
14402+3607**
34
5 BPC
0.500
0.500
1/4
2
70
2614
29181.1
32926.6
11.4
126+220
30436.4
32926.6
7.6
14055
6 BPC
0.500
0.500
4/4
2
70
2614
27675.8
29688.4
6.8
186+295
28423.9
29688.4
4.3
13963
7 BPC
0.500
0.500
4/8
1
70
2614
25054.1
25261.7
0.8
74+8
25064.1
25065.3
0.0
3377
8 BPC
0.500
0.500
4/8
3
70
2614
26450.6
27887.0
5.2
271+1388
26615.0
27887.0
4.6
12749
9 BPC
0.500
0.500
4/8
2
50
1314
13179.9
13589.2
3.0
56+22
13251.0
13589.2
2.5
14327
10 BPC
0.500
0.500
4/8
2
110
5192
50024.8
50930.7
1.8
666+99
50107.7
50930.7
1.6
13637
11 BPC
0.500
0.500
4/8
2
270
15570
148892.0
151031.2
1.4
8691+374
148911.3
151031.2
1.4
5337
12 BPC
0.500
0.500
4/8
2
70
5150
49718.8
51290.1
3.1
2004+986
49746.6
51290.1
3.0
11413
0.500
0.500
4/8
2
70
2614
25065.1
26087.0
3.9
13176+3622
Variable-headway 1 BPC *
Solution time for column generation + solution time for integer solution.
**
Convergence cannot be achieved after 14400 s. Column generation is terminated and an integer solution is solved for up to 3600 s.
Table 2: Computational results for important parameters
Unweighted cost Case
Operator
User
Penalty
Bus line Average Average Line route length headway used (km) (period)
Passenger average (min) Total time
In-veh
Transfer type (waiting/no-waiting) (person)
Init. waiting
Transfer waiting
0/0
1/0
0/2+ or Unsatisfied 1/1+ demand
0/1
Constant-headway 1(MIP, static)
85132.5
1(MIP, dynamic)
8852.0
1(BPC)
402166.6
31068.2
69398.5
7
26.6
22.6
4.40
3.69
0.68
0.03
1156
64
40
3
5196.7 119415.7
6
19.7
35.7
4.37
2.95
1.42
0.00
194
2
4
0
52000.9
1351 2414
169.2
8
40.0
2.0
3.76
3.68
0.07
0.01
1948
66
518
79
3
2578.4 123039.8
6
10.7
30.7
4.19
2.90
1.29
0.00
104
0
0
0
2510
5952.6
8
24.8
3.0
4.20
3.89
0.28
0.04
1344
133
457
562
118
57323.2
8
29.3
9.0
5.15
3.59
1.44
0.12
1332
146
31
6
1099
2
3825.0
3
153326.0
56770.6
4
58685.7
46059.3
35
5
160866.6
60087.4
5765.9
4
32.0
2.0
4.38
3.94
0.41
0.03
1399
332
390
387
106
6
203596.8
56705.4
2671.4
4
40.5
2.0
4.13
3.89
0.23
0.01
1916
126
474
42
56
7
663574.9
50318.4
204.9
8
33.0
1.0
3.67
3.66
0.01
0.00
1958
6
580
65
5
8
280095.9
55518.2
255.8
8
41.3
3.0
3.98
3.79
0.17
0.02
1915
122
453
118
6
9
206001.1
27178.4
0.0
8
36.3
2.0
3.89
3.77
0.11
0.01
938
37
283
56
0
10
695485.9 101554.7
306.7
8
37.0
2.0
3.71
3.67
0.04
0.00
3460
67
1305
353
7
11
2110391.0 301960.6
101.8
8
39.3
2.0
3.68
3.65
0.03
0.00
10921
51
4009
587
2
12
839522.8 101738.4
841.7
16
41.8
2.0
3.75
3.67
0.07
0.01
3456
84
1218
372
20
417247.8
273.3
8
41.5
2
3.77
3.73
0.04
0.00
2053
26
457
72
6
Variable-headway 1(BPC)
51900.7
Table 3: Statistics for the operator and the passengers
5
Conclusions and future research
This study proposes a model for the simultaneous planning of route design and timetabling for urban bus systems with multi-depot round-trip routes. Both variable-headway and constantheadway timetables can be considered. The key concept of the model formulation is to represent a bus timetable with a route and a dispatch pattern. An innovative MIP model is formulated based on this idea, which is the first major contribution of this study. Important factors in the operation of urban bus systems are incorporated into the model, including multi-objectives for the operator and the passenger, unsatisfied demand, bus depot, route pattern, route length, frequency bounds, headway structure, bus capacity, fleet size, and transit assignment—all of which have not yet been addressed in a single model in the previous literature. The major limitation for the model is that transfers without waiting cannot be identified. Consequently, the inconvenience of transfers can be underestimated for passengers. A parallel BPC algorithm is developed to solve the proposed model. This algorithm is the first exact solution method for similar problems in the literature, which is another major contribution of the study. An algorithm based on aggregation and greedy strategies is developed to solve the pricing SP of column generation. The algorithm is efficient because most of the operations in the algorithm are conducted in matrix form with existing linear algebra libraries. By applying the same concept that a timetable can be constructed with a route and a dispatch pattern, the algorithm prices out a pair of route and dispatch pattern instead of a timetable, which further reduces the difficulty of solving the SP. The cuts of disaggregate coupling inequalities are dynamically added to strengthen the lower bound. The algorithm also guarantees a feasible integer solution after the root node is solved. A computational study is conducted to evaluate the performance of the proposed methodology and to understand the effects of model parameters on the results. Different values of number of OD pairs, objective weights, number of depots, number of candidate lines, minimum headway, planning duration, and network size are tested. The outcomes of the routes and timetables as well as the statistics of operators and passengers are reasonable, which shows that the proposed model and the solution algorithm are useful tools for simultaneously planning bus network design and timetabling. The comparison of the solution approaches using the same case clearly demonstrates that the proposed BPC algorithm is superior to solving the MIP formulations with the off-the-shelf solver. Using BPC, a good quality solution can be found at the root node within a short period and the branching can further reduce the optimality gap with the potential of finding improved feasible solutions, except for the problems with non-zero weight for the operator and the problems with variable headways. The solution time and optimality gap of a problem using the proposed BPC algorithm depend more on the ease of serving passengers than on the problem scales. The weight of the operator should be significantly smaller than the weight for the passengers to generate reasonable bus routes and timetables. By definition, the size of a time-expanded network increases with the number of periods. Consequently, problems formulated in a time-expanded network with a long duration are sometimes unsolvable. Benefiting from the Dantzig-Wolfe decomposition and the efficient algorithm for SP, the time for finding solutions does not increase drastically as the length of planning duration increases. However, the solution time increases significantly as the network size increases. Further improvements for the solution algorithm might be required for applying the methodology to real-world large problems. To highlight the advantage of the simultaneous planning of network design and timetabling, the results from the integrated model are compared with the results from solving the network design and timetabling sequentially with two separate models.
36
:Routes 1&2 (H=2) :Routes 3&4 (H=2) :Routes 5&6 (H=2) :Routes 7&8 (H=2) :No service
0
4
1
2
3
5
14
8
7 11
6
10
9 13 12
(a) Case 1 :Route 1 (H=2) :Route 2 (H=2) :Route 3 (H=2) :Route 4 (H=2) :No service
0
4
1
2
3
5
14
8
7 11
6
10
9 13 12
(b) Case 5 :Route 1 (H=2) :Route 2 (H=2) :Route 3 (H=2) :Route 4 (H=2) :No service
0
4
1
2
3
5
14
8
7 11
10
6 9 13 12
(c) Case 6
Figure 6: Routes for Cases 1, 5, and 6 (BPC) 37
In the future, the model can be extended to consider uncertainties in the operations of urban bus systems, such as link travel time, passenger demand, and vehicle breakdowns. The reliability of an urban bus system can be improved by including uncertainties in the planning of bus network design and timetabling. The transit assignment can also be extended to include more realistic passenger behaviors that are considered in the related studies such as transit user equilibrium and discomfort due to crowdedness (Gao et al., 2004; Hamdouch and Lawphongpanich, 2008; Nuzzolo et al., 2012; Liu and Zhou, 2016; Hamdouch et al., 2014; Jiang and Szeto, 2016; Szeto and Jiang, 2014).
Acknowledgments The work is supported by the Minister of Science and Technology of Taiwan through research grant 105-2628-E-002-004-MY3.
A
Illustrative example
The road network for the illustrative example is shown in Fig. 7a. The number of periods (T ) is assumed to be 10. The time-expanded network can be constructed as shown in Fig. 7b. Six time-dependent OD pairs are considered. The origin, destination, and departure time of OD 1 are 1, 4, and 1; those of OD 2 are 1, 4, and 3; those of OD 3 are 2, 1, and 2; those of OD 4 are 2, 1, and 4; those of OD 5 are 4, 2, and 1; and those of OD 6 are 4, 2, and 3, respectively. Each of the OD pair has 40 passengers. The maximum total travel time is set as 4. The maximum number of waiting transfer and the maximum initial or transfer waiting time is let as 1, following the definition in Section 2.3. Given the time-expanded network and the above-mentioned conditions, the feasible passenger paths for the six OD pairs can be generated as shown in Figs. 7c-7e. 3, 3, 2, 2, 3, and 3 paths are generated for OD 1, 2, 3, 4, 5, and 6, respectively. The passenger cost for one unit of in-vehicle time is set as 1, and that for one unit of initial or waiting transfer time is 2. The costs for the feasible passenger paths can also be calculated. Fig. 7a shows the two depots for the bus lines, namely, nodes 1 and 4. Based on the distribution of passenger demands, bus lines are assigned to the depots: two lines to the depot at node 1 and one line to the depot at node 4. As discussed in Section 3.4, data preparation should be conducted to facilitate the solution algorithm for SP. Let the maximum travel distance (maxd ) be 4, and the feasible round-trip bus routes can be enumerated, i.e., F R1 = {[(1, 2), (2, 3), (3, 2), (2, 1)], [(1, 2), (2, 1)]} and F R4 = {[(4, 3), (3, 2), (2, 3), (3, 4)], [(4, 3), (3, 4)]}. Let the number of periods that a bus can be dispatched from the depot (T d ) be 4. The time-expanded links traversed by a bus trip following route r and dispatched in period t¯ (Ωrt¯) can be generated for all routes and dispatch times. Ωrt¯ for two routes dispatched from the depot at node 1 in all dispatch times are displayed for demonstration purposes.
• Ω11 = {(1, 2, 1), (2, 3, 2), (3, 2, 3), (2, 1, 4)} • Ω12 = {(1, 2, 2), (2, 3, 3), (3, 2, 4), (2, 1, 5)} • Ω13 = {(1, 2, 3), (2, 3, 4), (3, 2, 5), (2, 1, 6)} 38
• Ω14 = {(1, 2, 4), (2, 3, 5), (3, 2, 6), (2, 1, 7)} • Ω21 = {(1, 2, 1), (2, 1, 2)} • Ω22 = {(1, 2, 2), (2, 1, 3)} • Ω23 = {(1, 2, 3), (2, 1, 4)} • Ω24 = {(1, 2, 4), (2, 1, 5)}. The solution algorithm of SP for constant headways is demonstrated for the depot at node 1 for one iteration. Given the initial columns (which are empty timetables with zero bus operating cost), the RMP formulated in Section 3.1 can be solved, and the dual values for the first iteration are available. The dual values of the capacity constraints (Eq. (56)), θijt , are displayed in Fig. 7f. The dual values for the convexity constraints (πd ) are zero, and so are the other dual values ≤ ≥ (ωgpijt , γijtdK Yijtd , γijtdK Yijtd = 0) because no rows are added and no branching is imposed. These dual values can be used to calculate the potential contribution to the objective value of the SP (Z SP ) of an individual time-expanded link (i, j, k). Let ω b be zero as in Case 1 of the computational study. The constant part of the potential contribution to Z SP would be all zero. According to Eq. (64), the variable part of the potential contribution to Z SP would be kθijt = 50θijt , given k = 50 as in Case 1 of the computational study. The values of potential contribution to Z SP are consistent with the paths of OD pairs. In other words, operating buses on the links with negative dual values improves Z SP because passenger demands will be satisfied. The potential contribution to Z SP for a bus trip can be calculated by aggregating the potential contribution to Z SP of the links traversed by that bus trip (Ωrt¯). The potential contributions to Z SP for all bus trips dispatched in all periods for all routes from the depot at node 1 are displayed below for demonstration. Γ=
Z11 Z12 Z13 Z14 Z21 Z22 Z23 Z24
−65 −65 −11.25 −6.25 −60 −10 −60 −10
=
.
In Algorithm 1, Γ is sorted to conduct the greedy search for a timetable/column with a negative reduced cost. First, the routes are compared with their most negative bus trips. As shown below, the most negative bus trip of Route 1 (-65) is more negative than that of Route 2 (-60), and hence, Route 1 is more promising for generating a timetable/column with a negative reduced cost and is considered first. For the selected route, timetables are constructed based on the most negative bus trip under all feasible headways. minh and the fleet size are assumed to be 2. The headway ranges from 2 to 4. The constant-headway dispatch patterns that include the base bus trip dispatched in period 1 are three. If headway h = 2, then dispatch times are 1 and 3 and Z = Z11 +Z13 = −76.25. If h = 3, then dispatch times are 1 and 4 and Z = Z11 + Z14 = −71.25. If h = 4, then dispatch time is 1 and Z = Z11 = −65. All of these patterns have negative reduced cost, i.e., Z − πd < 0, and the dispatch pattern with the most negative value is selected. Algorithm 1 for the depot is completed after a timetable with a negative reduced cost is found.
Γ
sort
=
Z11 Z12 Z13 Z14 Z21 Z23 Z22 Z24
=
39
−65 −65 −11.25 −6.25 −60 −60 −10 −10
.
In this example, the problem is solved to optimality with seven iterations of column and row generation. Integrality is achieved without any branching. The optimal solution is shown in Fig. (7f). Timetables 1 and 2 overlap on the time-expanded link (1,2,1). Eq. (56) only requires that the total passenger demand cannot exceed the total bus capacity for the link. As a result, the total bus cost is sufficient for the passenger demands of Path 1 of OD 1 on link (1,2,1); however, how they are served by the two timetables on that link is not defined. They could be served by Timetable 1 without a transfer later or by Timetable 2 and then by Timetable 1 with a (no-waiting) transfer. The post-processing submodel described in Section 2.4 minimizes the total number of buses taken by passengers. Thus, passengers of Path 1 of OD 1 would be assigned to Timetable 1 on link (1,2,1) instead of Timetable 2 to avoid a transfer later, which fits the expectations on the behavior of passengers. Another purpose of the submodel is the identification of no-waiting transfers. As explained in Section 2.3, transfers without explicit waiting cannot be identified in the path. Path 3 of OD 5 does not involve any waiting transfers. However, the submodel will assign these passengers to two different bus trips because passengers taking Path 3 of OD 5 must transfer from Timetable 3 to Timetable 1 at node 3 in period 3. One no-waiting transfer in the path must be taken by passengers who take two buses but have no waiting transfers.
References Ahuja, R. K., Magnanti, T. L., Orlin, J. B., 1993. Network Flow: Theory, Algorithms, and Applications. Prentice-Hall, Inc. Baaj, M. H., Mahmassani, H. S., 1991. An AI-based approach for transit route system planning and design. Journal of advanced transportation 25 (2), 187–209. Barnhart, C., Hane, C. A., Vance, P. H., 2000. Using branch-and-price-and-cut to solve origindestination integer multicommodity flow problems. Operations Research 48 (2), 318–326. Barnhart, C., Johnson, E. L., Nemhauser, G. L., Savelsbergh, M. W., Vance, P. H., 1998. Branchand-price: Column generation for solving huge integer programs. Operations research 46 (3), 316–329. Br¨annlund, U., Lindberg, P. O., N˜ou, A., Nilsson, J.-E., 1998. Railway timetabling using lagrangian relaxation. Transportation science 32 (4), 358–369. Carraresi, P., Malucelli, F., Pallottino, S., 1996. Regional mass transit assignment with resource constraints. Transportation Research Part B: Methodological 30 (2), 81–98. Chakroborty, P., 2003. Genetic algorithms for optimal urban transit network design. ComputerAided Civil and Infrastructure Engineering 18 (3), 184–200. Chen, Y.-C., Lin, K.-S., 2009. Theoretical analysis and empirical estimates of the hourly value of travel time saving for intercity and urban transportation in Taiwan (in Chinese). In: 2009 Conference and Annual Meeting of the Chinese Institute of Transportation. Cordeau, J.-F., Toth, P., Vigo, D., 1998. A survey of optimization models for train routing and scheduling. Transportation science 32 (4), 380–404. 40
1
2
3
4
t=1
Node
t=2 The value besides each link is both the travel time and distance.
Network 1
1
Depot (1)
1
1
2
1
1
3
1
4
t=3 t=4 (Td)
Depot (4)
t=5
Enumeration of feasible round-trip bus routes Route 1, Depot (1)
2
1
3
Route 2, Depot (1)
2
3
4
t=8 (T)
3
4
(a) Network and route enumeration
1
t=7
Route 2, Depot (4)
2
1
t=6
Route 1, Depot (4)
2
3
Time (b) Time-expanded network and dual values for the first iteration 1 1
4 Node
t=1
2
3
t=2
t=2
t=3
t=3
t=4 (Td)
t=4 (Td)
t=5
t=5
t=6
t=6
t=7
t=7
t=8 (T)
t=8 (T) Time
Time
(c) Passenger paths for OD 1 and OD 2
(d) Passenger paths for OD 3 and OD 4
1
2
3
1
4
Node
t=1
2
3
t=2
t=3
t=3
t=4 (Td)
t=4 (Td)
t=5
t=5
t=6
t=6
t=7
t=7
t=8 (T)
t=8 (T)
Time
Time
(e) Passenger paths for OD 5 and OD 6
(f) Optimal solution
Figure 7: Illustrative example 41
4 Node
t=1
t=2
4
Node
t=1
Crainic, T. G., Le Cun, B., Roucairol, C., 2006. Parallel branch-and-bound algorithms. In: Talbi, E.-G. (Ed.), Parallel combinatorial optimization. John Wiley & Sons. Desaulniers, G., 2010. Branch-and-price-and-cut for the split-delivery vehicle routing problem with time windows. Operations research 58 (1), 179–192. Desaulniers, G., Hickman, M. D., 2007. Public transit. Handbooks in operations research and management science 14, 69–127. Desrosiers, J., L¨ ubbecke, M. E., 2011. Branch-price-and-cut algorithms. Wiley encyclopedia of operations research and management science. Fan, L., Mumford, C. L., 2010. A metaheuristic approach to the urban transit routing problem. Journal of Heuristics 16 (3), 353–372. Gao, Z., Sun, H., Shan, L. L., 2004. A continuous equilibrium network design model and algorithm for transit systems. Transportation Research Part B: Methodological 38 (3), 235–250. Guihaire, V., Hao, J.-K., 2008. Transit network design and scheduling: A global review. Transportation Research Part A: Policy and Practice 42 (10), 1251–1273. Hamdouch, Y., Lawphongpanich, S., 2008. Schedule-based transit assignment model with travel strategies and capacity constraints. Transportation Research Part B: Methodological 42 (7), 663–684. Hamdouch, Y., Szeto, W., Jiang, Y., 2014. A new schedule-based transit assignment model with travel strategies and supply uncertainties. Transportation Research Part B: Methodological 67, 35–67. Hewitt, M., Nemhauser, G., Savelsbergh, M. W., 2013. Branch-and-price guided search for integer programs with an application to the multicommodity fixed-charge network flow problem. INFORMS Journal on Computing 25 (2), 302–316. Hewitt, M., Nemhauser, G. L., Savelsbergh, M. W., 2010. Combining exact and heuristic approaches for the capacitated fixed-charge network flow problem. INFORMS Journal on Computing 22 (2), 314–325. Ibarra-Rojas, O., Delgado, F., Giesen, R., Mu˜ noz, J., 2015. Planning, operation, and control of bus transport systems: A literature review. Transportation Research Part B: Methodological 77, 38–75. Jiang, Y., Szeto, W., 2016. Reliability-based stochastic transit assignment: Formulations and capacity paradox. Transportation Research Part B: Methodological 93, 181–206. Kim, D., Barnhart, C., Ware, K., Reinhardt, G., 1999. Multimodal express package delivery: A service network design application. Transportation Science 33 (4), 391–407. Liu, J., Zhou, X., 2016. Capacitated transit service network design with boundedly rational agents. Transportation Research Part B: Methodological 93, 225–250. Magnanti, T. L., Wong, R. T., 1984. Network design and transportation planning: Models and algorithms. Transportation science 18 (1), 1–55. 42
Mandl, C., 1979. Applied network optimization. Academic Press, London, UK. Nayeem, M. A., Rahman, M. K., Rahman, M. S., 2014. Transit network design by genetic algorithm with elitism. Transportation Research Part C: Emerging Technologies 46, 30–45. Nuzzolo, A., Crisalli, U., 2009. The schedule-based modeling of transportation systems: recent developments. In: Schedule-Based Modeling of Transportation Networks. Springer, pp. 1–26. Nuzzolo, A., Crisalli, U., Rosati, L., 2012. A schedule-based assignment model with explicit capacity constraints for congested transit networks. Transportation Research Part C: Emerging Technologies 20 (1), 16–33. Quak, C., 2003. Bus line planning. Master’s thesis, TU Delft. Shrivastav, P., Dhingra, S., 2001. Development of feeder routes for suburban railway stations using heuristic approach. Journal of Transportation Engineering 127 (4), 334–341. Shrivastava, P., Dhingra, S., 2002. Development of coordinated schedules using genetic algorithms. Journal of Transportation Engineering 128 (1), 89–96. Szeto, W., Jiang, Y., 2012. Hybrid artificial bee colony algorithm for transit network design. Transportation Research Record: Journal of the Transportation Research Board (2284), 47–56. Szeto, W., Jiang, Y., 2014. Transit assignment: Approach-based formulation, extragradient method, and paradox. Transportation Research Part B: Methodological 62, 51–76. Szeto, W., Wu, Y., 2011. A simultaneous bus route design and frequency setting problem for Tin Shui Wai, Hong Kong. European Journal of Operational Research 209 (2), 141–155. Taipei City Government, 2013. Report for adjustment of bus fare calculation formula (in Chinese). Vanderbeck, F., 2000. On Dantzig-Wolfe decomposition in integer programming and ways to perform branching in a branch-and-price algorithm. Operations Research 48 (1), 111–128. Vanderbeck, F., 2005. Implementing mixed integer column generation. In: Column generation. Springer, pp. 331–358. Yan, S., Chen, H.-L., 2002. A scheduling model and a solution algorithm for inter-city bus carriers. Transportation Research Part A: Policy and Practice 36 (9), 805–825. Yan, S., Chi, C.-J., Tang, C.-H., 2006. Inter-city bus routing and timetable setting under stochastic demands. Transportation Research Part A: Policy and Practice 40 (7), 572–586. Yan, S., Tang, C.-H., 2008. An integrated framework for intercity bus scheduling under stochastic bus travel times. Transportation Science 42 (3), 318–335. Yang, H., Bell, M. G. H., 1998. Models and algorithms for road network design: a review and some new developments. Transport Reviews 18 (3), 257–278. Zhao, F., Zeng, X., 2008. Optimization of transit route network, vehicle headways and timetables for large-scale transit networks. European Journal of Operational Research 186 (2), 841–855.
43