Integrating Frequency Setting, Timetabling, and Route Assignment to Synchronize Transit Lines

Synchronization of different transit lines is an important activity to increase the level of service in transportation systems. In particular, for passengers, transferring from one line to another, there may be low-frequency periods and transfer zones where walking is needed, or passengers are exposed to adverse weather conditions and uncomfortable infrastructure. In this study, we define the Bus Lines Synchronization Problem that determines the frequency for each line (regarding the even headway), the timetable (including holding times for buses at transfer stops), and passenger-route assignments to minimize the sum of passenger and operational costs. We propose a nonlinear mixed integer formulation with time-indexed variables which allow representing the route choice for passengers and different types of costs. We implement an iterative heuristic algorithm based on fixing variables and solving a simplified formulation with a commercial solver. We implement our proposed heuristic on the transit network in Santiago, Chile. Numerical results indicate that our approach is capable of reducing operating costs and increasing the level of service for large scenarios.


Introduction
In transport systems in big cities, the passengers demand varies in space and time. As the provision of direct lines between every origin and destination would be costly, passengers frequently need to transfer from one bus to another while making their trips. Public transport systems are increasingly multimodal and shifting towards fare integration which increases the need of transfer coordination for passengers since they look for the most convenient way to reach their destination. Passengers tend to accept these transfers; however, they require them to be as quick and comfortable as possible. Thus, better transfer conditions should increase demand and influence passenger route choices within the system.
Indeed, it is desirable to schedule and synchronize buses to optimize transfers, particularly under three conditions: low frequencies, low travel time variability, and undesirable waiting circumstances. These three conditions are commonly present during night services, so we will have this period in mind when defining our optimization problem. In these circumstances, vehicles will travel with few passengers so that we can assume no capacity issues during the whole planning period. Finally, we consider even headways for all transit lines since we focus on a frequency-based operation; that is, passengers do not have access to the timetables. Moreover, the case study considers a night period where the frequency is determined based on a minimal level of service instead of the passengers' demand. The latter characteristic will not only reduce the complexity of our model but will also be easier for passengers to remember the schedule. In urban contexts, transfers often require some walking between the stop where the passenger alights and the stop where he/she will board the next vehicle. This walking time should be considered in the scheduling process so that passengers can reach the next vehicle they would board before it departs from the stop.
Usually, line frequencies (trips per hour) are determined before determining the timetable (departure time for each planned trip). Once these frequencies are obtained, the level of synchronization that can be achieved among different lines strongly depends on how much flexibility is available to determine the departure time of each bus from each stop. For 2 Journal of Advanced Transportation example, if services must operate under an even headway for each line synchronization is much more limited than if depot departure times or headways can be accommodated within certain intervals as it can be addressed in [1]. As it can be seen in the study of Sivakumaran et al. [2], the set of frequencies of the network lines affect the level of synchronization that can be achieved. Thus, it seems reasonable to optimize timetables and frequencies simultaneously.
Synchronization can not only be improved by adjusting line frequency and timetable. We can also plan some holding time for certain buses at specific stops. Holding has been proposed as a real-time decision to improve successful transfers. For example, the studies of Delgado et al. [3] and Hall et al. [4] define optimization problems to determine holding time of buses at different stops with the objective of minimizing waiting time at transfer stops among other criteria. Those problems must be solved in a real-time framework using monitoring tools such as Geographical Positioning Systems (GPS) and Automatic Passengers Counting (APC) systems to define the input. Moreover, holdings could be implemented at the planning stage to guarantee that all transferring passengers can board their next bus or reduce waiting times of boarding the first bus. The drawback of adding these holding times is the increment of in-vehicle waiting times, longer cycle times, and therefore a larger fleet size needed to provide the service. Thus, there is a clear trade-off between transferring passengers experience, in-vehicle passengers experience, and operational costs. The waiting time subjective value at stops is much higher compared to the in-vehicle waiting time. Under poor waiting time conditions (e.g., during the night, poor weather conditions, or a threatening urban context), this difference increases significantly, while under low-frequency operation, the expected waiting after a missed bus is high as it can be seen in Boardman et al. [5].
Finally, once timetables of a bus network have been changed to improve transferring experience, affecting service frequencies, and holding times have been added, passengers may change the routes they use to reach their destinations. This problem is known as passenger assignment problem (see the review of Desaulniers et al. [6]) and should be considered in the bus scheduling process.
In this paper, we deal with the Bus Lines Synchronization Problem which determines the frequency of each line, the timetable (considering holding times) to foster synchronization at transfer stops, and it assigns each passenger to his/her more convenient route to reach his/her destination. In this process, the goal is to minimize the weighted sum of user and operator costs. The rest of this paper proceeds as follows. First, we review related studies present in the literature. Next, we introduce our optimization problem and proposed mathematical formulation. Then, we present details of our solution approach. Finally, we show the numerical results of implementing our approach in a case study based on the transit network of Santiago in Chile.

Related Literature
Synchronizing buses in large networks can be extremely difficult. Passengers often transfer in all directions and between every pair of intersecting lines. Thus, synchronizing transfers at each stop would become an endless process since improving the performance on one synchronization point necessarily will affect the conditions on another. Additionally, improved transfer conditions should affect passengers route choice so, under networks where more than one route is available for some origin-destination pairs, passenger assignment should not be considered as given. Thus, improving transfer conditions will not only benefit current users of this transfer but also attract passengers from alternative routes lacking this coordination. Bookbinder and Désilets [7] present two approaches for the problem of synchronizing different transit lines: (i) trying to minimize passenger waiting times at transfer zones and (ii) trying to maximize the number of synchronization events at transfer zones. After that, several investigations have been conducted following both directions mainly by solving frequency setting and timetabling problems, as it can be seen in literature reviews of Desaulniers et al. [6], Guihaire and Hao [8], and Ibarra-Rojas, et al. [9].
The synchronization of different lines at a single stop has been addressed by Chakroborty et al. [10], wherein the authors define a mixed integer nonlinear program to schedule trips minimizing the total travel time and solve the proposed optimization problem through genetic algorithms. In the latter work, the authors assume deterministic travel times, random passenger arrivals, and a trunk and feeder network to determine a periodic timetable; that is, there are evenly spaced arrivals for each line at the transfer stop (holding buses is allowed) leading to cyclic timetables with respect to a period of T minutes. To maximize the number of pairwise simultaneous arrivals at multiple synchronization stops, Ceder et al. [11] define an aperiodic timetabling problem (i.e., there are heterogeneous headways) considering a given number of trips per period (frequency) that must be scheduled and bounds for headways of each line. The authors define an integer linear formulation that becomes intractable by commercial solvers. Then, the authors design a heuristic procedure to generate timetables and this method is tested on several example networks. The latter study is enhanced by Liu et al. [12] using a synchronization measure that comprises the ratio of the number of lines where vehicles are arriving simultaneously at a connection stop to the number of all lines passing through the same stop. Then, a nesting tabu search that implements Ceder's heuristic is designed to obtain feasible solutions for small instances (up to eight lines and three synchronization nodes). Eranki [13] also redefines the model in [11] by redefining synchronization as the event of two trips belonging to different lines that are arriving at a common stop with a separation time within a specific time interval. Then, the algorithm proposed in [11] is adapted to solve the proposed model.
More recently, Ibarra-Rojas and Rios-Solis [1] enhance the aperiodic timetabling problem proposed in [13], considering oriented transfers; that is, passengers may transfer from one line i to a line j but not necessarily vice versa. Synchronization events are also used to reduce the congestion of buses belonging to different lines at common route segments. The authors indicate that the problem is intractable by commercial solvers and prove that their synchronization timetabling problem for more than three lines at common stops is NP-hard (by defining a polynomial reduction to the Not All Equal 3-Satisfiability problem, NAE-3SAT)Ò. Moreover, they develop a preprocessing stage and an Iterated Local Search to generate feasible solutions for large instances. Later, Ibarra-Rojas et al. [14] extend the previous study considering multiple planning periods (which may be different for each line) to define synchronization events between trips belonging to different periods and be able to determine a timetable for the entire day. The size of the problem increases considerably when an entire day is optimized. Thus, the authors implement metaheuristics, such as Multi-start Iterated Local Searches and Variable Neighborhood Searches. Indeed, the synchronization events between trips belonging to different planning periods are relevant as it is stated by the study of Ning et al. [15] which addresses an optimization problem to reduce transfer waiting time and transfer availability with respect to the first or last train. Finally, Wu et al. [16] enhance the problem of [1] to a biobjective version that optimizes the number of passengers benefited with synchronization and the deviation from an initial timetable. The authors implement a BRKGA II to approximate the Pareto frontier. Although previous studies are flexible enough to consider walking times and the proposed approaches are capable of solving large instances, the authors consider neither the passenger assignment decisions nor holding times.
Integration of timetabling and frequency setting has been addressed in the works of Bookbinder and Désilets [7] and Klemt and Stemme [17]. These studies focus on the minimization of transfer costs optimizing the first departure time and the even headway for each line. Based on these two decisions, the remaining departure times are computed. Bookbinder and Désilets [7] consider variability in bus travel times; thus, there are evenly spaced departures at the origin point but heterogeneous headways at stops (due to travel time variability). The synchronization impact of each timetable is evaluated through simulation. Numerical results indicate that the higher the headway times and the lower the travel time variability, the higher the synchronization benefits. Ting and Schonfeld [18] consider a transit network with multiple lines and transfer stops. Although walking times are ignored, holding times at certain stops are considered. The authors determine an optimal even headway for each line in which headways must be multiple of a given reference. The authors use a stochastic model in which travel times and passenger arrivals are recognized as random inputs.
The synchronization is also of interest in railway-based transit systems to optimize the transfer conditions for passengers. For example, Gou et al. [19] address a synchronization timetabling problem in metro systems with particular emphasis in transitional periods (from peak to off-peak hours or vice versa) during which train headway changes and passenger travel demand varies significantly. In the case of intermodal transport systems, Li et al. [20] study the transit scheduling problem to optimize the interaction of different services at an intermodal transport network considering demand variability and therefore variable headways. More recently, Guo et al. [21] focus on synchronization between train lines and bus services to minimize the total connection time, in particular, for passengers transferring from the first train service to bus lines.
As it can be seen, the synchronization of different lines in transport systems has been addressed through mathematical programming, heuristics, and meta-heuristics for bus-based and railway-based transit systems (see a literature review in [9]). However, to the best of our knowledge, none of these approaches simultaneously consider a time-dependent origin-destination matrix, a transit network composed of several lines, passengers choosing the fastest route to reach their destination, and walking/waiting time needed to transfer from one line to another at transfer points. In this paper, we present an optimization problem that considers all these characteristics. Our significant contributions are the following: (i) an integrated optimization problem for frequency setting, timetabling, and passenger assignment problem to minimize sum of passenger and operation costs; (ii) a mathematical formulation for the proposed optimization problem based on time-indexed variables which avoid differential/integral calculus; and (iii) a heuristic approach to obtain solutions for real-size instances defining a tool for the decision-making process in transit network planning.

Materials and Methods
Our methodology consists of the following three stages: (i) defining an optimization problem based on the context of the decision-making process, (ii) designing a mathematical formulation for the proposed problem in order to test commercial solvers, and, finally, (iii) designing and implementing a solution algorithm which is validated in an experimental stage using different scenarios for the problem. The mentioned steps of our approach are detailed in the following sections.

Problem Definition.
To define our problem, we assume a given fixed demand on the transit network for each origindestination pair in a matrix OD. Moreover, we assume known passengers' arrival rates and that passengers choose their routes based on the total cost in terms of the walking distance, in-vehicle waiting time, transfer waiting time, and the number of transfers.
For the transit network operation, we consider the following assumptions. There is a specific planning period in which trips with even headways must be provided for each line; we consider single-directed lines that start and end in different (but near) points; travel times between stops and boarding and alighting times at stops are assumed to be deterministic and known during the planning period, and there is a fleet of homogeneous vehicles where each vehicle can be assigned to only one line. Since we consider homogeneous fleet and no effects of drivers on travel times, the turnaround times for all trips of the same line are equal. These characteristics lead to evenly spaced departures and arrivals for each line at all stops. Thus, the fleet size for each line is estimated regarding its turnaround time and headway. Finally, no capacity constraints on the buses are considered; that is, all the passengers can board a bus at each stop. Notice that these assumptions can also be made in multimodal transit networks, but we refer to bus systems since we develop our approach based on the bus transit network in Santiago, Chile.
Based on the above considerations, the Bus Lines Synchronization Problem, called BLSP, determines for a single planning period the frequency for each line (in terms of the even headway), the passenger assignment, and the timetable (in terms of departure time of the first trip of each line and holding times at each stop). The objective is to minimize the total cost based on the walking distance, waiting times to take the first bus and to perform a transfer, the in-vehicle waiting time, a penalization for the number of trip-legs, and operational costs.
Next, we introduce the necessary elements to define our mathematical formulation which is based on time-indexed events to represent arrivals/departures of buses/passengers and to compute the costs based on travel time, waiting time at first stops, waiting time at transfer stops, walking time, and in-vehicle waiting time.

Mathematical Formulation
Sets and Parameters. To design our mathematical formulation for the BLSP, we consider the following sets regarding the routes in the transit network and a discretization of the planning period.  We highlight that the main elements of our formulation are the routes that can be computed with a preprocessing stage, but their cost will depend on the timetable and the frequencies, and those costs affect the route choice for passengers. As we mentioned before, a route consists of a sequence of stops (boarding/alighting) and a set of transit lines covering those stops. Figure 1 shows an example of a route p in to travel from stop to stop . The sets of stops and lines covered by route p are { , , , , , } and { , }, respectively. Notice that route p consists of two trip-legs: a trip-leg from i to c (using line l) and a trip-leg from d to j (using line ). Hence, route p leads to passengers walking from alighting stop c to boarding stop d in order to transfer from l to (we represent all transfers events by using two stops). Now, we present notation for parameters based on demand, different kind of costs, and travel times (without loss of generality, times are in minutes).

(i)
: the number of passengers for the origindestination pair ( , ) entering the system at instant t.
: the travel time of line l in arc a which includes an average dwell time at the stops in that arc.
(iii) ℎ : the deadhead travel time of line l from its final stop to its initial stop. We recall that we consider single-directed lines starting and ending in different points; thus, a bus should perform a repositioning action to get ready to start a new trip. : Total fixed cost per passenger that chooses route p. This cost depends on the number of transfers, the walking cost, and the total travel cost. It can be defined as follows.
where is the cost ($) for the required transfer events in route ∈ , is the cost ($/min) of transfer walking for each passenger, and is the cost ($/min) of travel time per passenger. Moreover, subindex in parameter represents the previous stop of boarding stop ∈ + in route p, and subindex l in parameter is the line that covers the trip-leg that starts at boarding stop ∈ + .
Decision Variables. The decisions of our optimization problem are related to the departure time of the first trip for each line, the even separation between consecutive departures at the starting point for each line (called even headway), the holding time for each line at each stop, and the number of passengers traveling by each route. We propose the following decision variables: (iv) : the number of passengers entering the system at time t and choosing route p.
As we mentioned before, the main elements of our formulation are the routes and the waiting times can be computed if arrival times of passengers and buses at the beginning of trip-legs can be computed. Then, we introduce the following time-indexed auxiliary variables in order to represent arrival/departures, operational costs, and passenger costs considering the time discretization.
(i) V : the arrival time at stop ∈ + for passengers entering the system at time t and choosing route . (v) OC: the total operational cost.
(vi) : the total cost of waiting time at boarding stop ∈ + for passengers entering the system at time t and choosing route .

(vii)
: the total cost of in-vehicle waiting time for all passengers entering the system at time t and choosing route .
In the following, we detail the modeling of constraints, objective function, and the entire proposed mathematical formulation.
Modeling Arrivals and Departures at Stops. Passengers enter the system at discrete instants of time and choose a specific route p. To compute the costs, we only need to track passengers' arrivals at the beginning of trip-legs in the same route. In particular, if stop ∈ + is the first stop of the first trip-leg of route p, the arrival time V is given by t but if stop i is the beginning of a different trip-leg, V is defined as the arrival time at the last stop of the previous trip-leg plus the walking time from to i. The latter is represented by the following equality where is the previous stop of i in route p ( is known by definition of route p).
Arrival times depend on the departure time of the first trip, the even headway , and the number of trip . The latter dependence is modeled by (3) where is the first stop of line l and is the stop before i of line l (which is known by definition of route p). Notice that the departure time of is given by ( + ( −1) ), and the rest of the summation represents the travel time of line l from its origin to the stop before . Moreover, one assumption of our optimization problem is that all passenger can board a bus at stops representing the beginning of trip-legs. Thus, we define constraints (4) to guarantee that a trip departure from stop i occurs after arrivals of passengers at the same stop .
Notice that the departure time of a bus from stop i is given by its arrival time plus the holding time at that stop. These two constraints guarantee that variables are properly defined so all passengers can board a bus and guarantee time continuity of the route. For example, if V = 210, = 5, = 10, ∑ ∈ + ∑ = = 45, and = 0, we have that ≥ 16 but at the optimal solution, will take the value of 16 since we minimize the sum of total cost based on waiting times and the fleet size. Now, we present the constraints related to the costs.

Modeling Operational Costs and Passengers' Costs.
To model operational costs, we first define equality (5) for each line l to represent the turnaround time of line l which depends on the travel times of arcs , holding times at stops, and deadhead time from the last stop to the starting point. Moreover, the estimated fleet size of line depends on the turnaround time and the even headway , and it can be approximated as / (which can be rounded up to the closest integer with slight modifications of our proposed formulation). Thus, the total operating cost is given by equality (6) which denotes the product of the estimated fleet size, the vehicle cost per unit time, and the length of the planning period.
In order to define the waiting time costs for passengers entering the system at t and choosing route p, we recall that the waiting time at stop i is 0 if passengers arrive when buses are held, while it should take the value of ( -V ) for passengers arriving at transfer stops before the next trip arrival, that is, V ≤ . Then, is defined by equality (7). The latter equality is nonlinear, and we can use inequalities (8) and (9) ≥ ( − V ) ∀ ∈ , ∈ , ∈ + (8) ≥ 0 ∀ ∈ , ∈ , ∈ + Finally, we define in-vehicle waiting time for passengers entering the system at time t and choosing route p. Notice that if passengers arrive at first stop ∈ + of a trip-leg before the arrival of the next bus, the expression ( + )-V − max{0, ( − V )} takes the value of the holding time at stop . Otherwise, it takes the value of ( + )-V which denotes the difference between the departure of the bus from stop i and the arrival time of passengers at stop . Then, we define by equality (10) where is the second stop of the trip-leg of p starting at i and is the last stop of that trip-leg.
Notice that the nonlinear term max{0, ( − V )} can be replaced by / to define a linear constraint.

Mixed-Integer Nonlinear Program.
Since passengers entering the systems must choose a route p, we define constraints (11) to guarantee that all passengers reach their destinations, that is, the passenger assignment decisions for each origindestination pair.
Our objective function is the total operational cost plus the passengers' costs among all routes leading to the mathematical formulation subject to (1) -(5) , (7) -(10) , the rest of variables non-negative (18) Constraints (14) guarantee that the even headway for each line is bounded by the maximum headway time. Inequalities (15) and (16) bound the first departure time and the holding time at each stop by the even headway for each line, respectively. Finally, constraints (17) and (18) define the domain of the decision variables. Notice that the value of variables depends only on the objective function since we assume that passengers choose a route based only on costs of the travel and waiting times with no capacity issues. The latter characteristic guarantees that the route choice yielded by the model will be consistent with a user equilibrium, in which each passenger selects his/her route with minimum generalized cost. Our mathematical formulation is a mixed-integer nonlinear program that considers among other things discrete instants of time for arrivals of passengers to the system. Through this assumption, it was possible to formulate a model that includes neither differential (or integral) calculus nor complex transfer variables with several indexes representing ascending and descending buses and stops. This characteristic will allow us to define a simple sequential algorithm which may be impossible to define if the timetabling formulation was intractable (e.g., [1]). We highlight that the problem size strongly depends on time discretization and the design of transit networks which can be entirely different. The latter characteristics are handicaps to estimate typical sizes for the problem accurately. However, we present details of a case study in the transit network Transantiago in Santiago, Chile.

Solution Approach
We define a nonlinear formulation for the BLSP. Thus, it is not possible to guarantee global optimality when implementing a commercial solver. Moreover, we use integer variables which makes the problem more intractable. However, if frequency setting and passenger assignment decisions are fixed, our formulation becomes a mixed-integer linear problem considering only timetabling decisions for each line, that is, departure time of the first trip and holding time at each stop. Moreover, we focus on low-frequency periods where there are few passengers. Thus, frequencies are determined based mainly on the level of service rather than passengers' affluence; let say, the frequencies should be within a reference set.
On the basis of the above, we propose an iterative heuristic that first implements a frequency rule to determine the even headway subject to a feasible frequency set. Then, it fixes passenger-route assignments and solves the resulting (reduced) formulation for the timetabling problem with a commercial solver. This algorithm is illustrated in Figure 2, and we detail its steps in the following.
Step 1 (implement frequency rule). At the beginning of the algorithm frequencies are fixed as the ones used during system operation. If Step 6 was already performed, we propose a rule to compute the optimal headway for each line given the current state of the system, that is, subject to the computed timetable and passenger-route assignments. First, recall that we aim to minimize the total cost for line l considering a given headway which can be expressed as follows: where represents the total demand that is served by line l in the current state of the system, is the total cost ($) of walking between stops for passengers boarding line l, represents the travel cost ($) for passengers using line l, and is the penalty ($) based on the number of triplegs associated with line l. Thus, the optimal even headway for line l can be obtained from the following derivative: Therefore, we obtain a generalization of the well-known square root formula of Welding [22] and Newell [23]. * = √ 2 (21) Thus, frequencies obtained by taking 60/ * are rounded to the closest value in a set of feasible frequencies based on the level of service. The study of Knoppers and Müller [1] states that using frequencies which are multiples of the minimum frequency leads to the best improvements regarding passenger transfers. In some scenarios, we evaluated the benefits of implementing the latter rule.
Step 2 (compute initial timetable). The first trip departs at the beginning of the planning period and holding times are set to zero. Therefore, the departure time of the k-th trip of a line l is given as ( − 1) where is the even headway of line l obtained in Step 1.
Step 3 (solve passenger assignment). For each origindestination pair ( , ) and an instant of time t, all passengers entering the system at t and traveling from origin i to destination j are assigned to the route ∈ with minimum total travel cost.
Step 4 (solve timetabling problem). Once previous steps fix the passenger assignments and frequencies, the mathematical formulation is solved implementing the solver of CPLEX to obtain new holding times and departure time for the first trip for all lines.
Step 5 (optimal passenger assignment?). A new timetable is obtained by defining departure, arrival, and holding times at the optimization phase. Thus, it is possible to compute a new optimal passenger assignment. If the new optimal passenger assignment does not change compared with the previous one, the algorithm continues; otherwise, take the new passenger assignment solution and return to Step 4. We highlight that we decrease the total cost after each iteration in this step compared with the total cost computed in Step 3 because operational costs remain while we reduce users costs by defining an optimal passenger assignment considering the new timetable.
Step 6 (optimal frequency?). In this final step, the frequency rule defined in Step 1 is implemented. If it is not possible to generate a new set of frequencies for the lines, the algorithm stops; otherwise, take the new set of frequencies and go to Step 2. Since the new frequencies are computed based on the passengers' demand fixed by previous steps, there is not a guarantee of improvement implementing the new frequency. Then, we propose to stop our algorithm if a maximum computational time or number of iterations is reached.
The previous algorithm was implemented in a transit network during the night period since relatively low frequencies define an ideal case wherein passenger transfers are needed. Moreover, assumptions of deterministic travel times and a feasible set of frequencies are also acceptable in that night period.

Results and Discussion
Step 4 of our proposed algorithm was coded in AMPL and solved using CPLEX on a Linux server with 16 GB RAM. Although we consider common characteristics of transit networks, we implemented our approach at instances based on the Transantiago transit network in Santiago, Chile. The next section provides the details of this case study.

Scenarios Based on a Case Study.
Transantiago operated in 2012 on an area of 680 km 2 with 6,298 buses. It provides service with 374 lines covering 2,766 kilometers and 11,165 stops (with an average separation of 0.4 kilometers for consecutive stop). 1,685 million transactions were performed in 2012, wherein 596 million were trips with more than one leg; that is, transfers were performed. The average number of triplegs per business day was 3,184,289. Regarding operational infrastructure, there are many exclusive lanes.
During the night period, the system operates a subset of 60 lines with low/medium frequencies, covering 4987 stops. There is significantly lower demand, and fare evasion is common at this period leading to capturing only a part of the real OD pairs by using monitoring tools. We study night period to optimize passenger transfers through lines synchronization. Since feeder lines usually share only one or few stops with trunk lines, feeder lines may be synchronized in the system once the operation of the trunk lines is given. Then, we consider the 26 trunk lines of Transantiago covering 2855 stops (see Figure 3) with an average bus speed of 31 km/h (computed by Coordinación General de Transportes de Santiago [24]) and an average walking speed of 5 km/h. For simplicity, to estimate the costs related to passengers, we use a uniform distribution for passenger arrivals in a set of periods of 30 minutes. In a coordinated and informed service network, we expect passenger arrivals at the stops to bunch few minutes before the scheduled bus arrival times. However, in such a case, since the desired departure time will probably not coincide with the bus departure time, there is some waiting time happening at the origin of the trip. Thus, =CL$0 for all route p (since there is not a monetary cost for transfer events), and ℎ =30 min for each line ∈ (corresponding to the minimum frequency of two trips per hour). These values are based on the current operation of the system and the social evaluation of MIDEPLAN [25] which is used by the Chilean Government in all transportation projects and INE [26]. Notice that these parameters can be changed to model the subjective values of the different stages of a trip which penalizes transfers. In that case, the results should be similar but with slightly more direct trips (during the night travelers often have few alternative routes, and if there are multiple routes, they often have the same number of trip-legs).
Indeed, the number of routes increases exponentially regarding the size of the transit network. However, it is possible to reduce the set of feasible routes for a specific origin-destination pair by making reasonable assumptions such as limited length (or time) for each route, a limited number of transfers evens, avoiding particular zones of the network, among others. In this study, we consider the following assumptions to define the set of feasible routes.
(i) Origin-destination points consist of groups of stops near each other.
(ii) Routes are limited to three trip-legs (maximum number of transfer events with no monetary cost due to the integrated payment system).
(iii) Passengers do not transfer to lines previously used in the route.
(iv) There is a reasonable walking distance for transfer events (which is obtained from data of transfer events collected by the Automatic Fare Collection (AFC)).
To perform our experimental stage, we define three instances sizes based on the number of passengers and the number of origin-destination pairs (see Table 1). We use the estimation of the OD matrix of Transantiago obtained by Munizaga and Palma [27] in order to define different scenarios. Instances type A considers the origin-destination matrix in the latenight period from 2:00 hrs to 4:30 hrs (period length of 150 minutes). We augmented by 1,000 times the demand in the latter period, because the demand obtained from the Automatic Fare Collection system is very low since there is a significant amount of fare evasion in Transantiago, which increases during the night. In particular, there are only 83 OD pairs with trips, mostly connected by direct services (very few transfers). Therefore, we also consider instances type B using the 414 OD pairs in the period between 21:30 hrs and 23:00 hrs (period length of 90 minutes) leading to 43081198 routes. For most of these OD pairs, transfers are needed, and we use 30 times the demand of a typical late-night period. Notice that scenarios A and B are not comparable, since the set of routes are different due to different OD matrices and the planning periods have different lengths. Finally, instances type C are similar to type B but with 30 times the demand of B in order to consider a more significant number of passengers. For each one of these instance types in Table 1, we consider a combination of the different decisions of the BLSP in order to study the impact of integrating such decisions. For example, we use notation A | r | h|{2, 4, 6} to represent the scenario of solving instance A with our optimization problem considering integrated decisions of routing, timetabling allowing holding decisions, and choosing a frequency within the set {2, 4, 6}. On the other hand, notation A | r | -| {2, 4, 6} represents the same scenario but with no holding allowed in the timetabling decisions; thus, only the departure time of the first trip is determined. Notations A| -|, B| -|, and C| -| represent the base scenarios where no optimization process was performed and the minimal frequency of 2 trips per hour is considered. In some scenarios, we use multiples of the minimum frequency proposed by Knoppers and Müller [28] since they state that it is the best policy to reduce transfer waiting times.

Analysis of Numerical
Results. All instances were solved in minutes of computational time by implementing our proposed methodology and it was not possible to obtain information about the global optimality due to limitations with the original formulation and the commercial solver. However, we mainly focus on the analysis of the different costs included in the objective function of BLSP compared with base scenarios in order to present the potential improvements of implementing our proposed approach. The notation is as follows: "Operation" represents the costs related to the fleet size. "Trips" indicate the in-vehicle costs for passengers during their trips. "Walk" exhibits the cost of walking in transfer events. "Holding" represents the costs for passengers caused by holding vehicles. "First" indicates the cost of waiting times to board the first bus. Finally, "Transfer wait" exhibits the costs of waiting at transfer stops. Table 2 shows the results for scenarios of type A highlighting the best results for each type of cost. Besides, Figure 4 plots the saving regarding the base scenario A | -|. Notice that operating costs represent more than 90% of the total costs in scenarios A.       [14] where it is shown that optimizing passenger transfers increases the operating costs and vice versa. Table 3 indicates numerical results for scenarios B where no frequency optimization was performed, while Figure 5 plots the saving regarding the base scenario B | -|. For these scenarios, operating costs represent nearly 30% of the total costs. Scenario B | r | h |leads to the highest saving of 22.46% for the total cost compared with the reference scenario B | -|. Notice that column B | r | -|indicates that even with no holding times and no frequency optimization, all costs except walking and in-vehicle travel costs are diminished compared with the reference scenario. Then, significant savings can be achieved only by determining the departure time of the first trip of each line and the passenger assignment decisions which represents slight modifications of the current operation of the system. We highlight that we define a time discretization and the computed "first wait" costs are based on this assumption. Then, scenario B | -| -|yields a significant improvement over B | -| in first wait costs by coordinating the arrival time of buses considering the discrete arrival times of passengers.
Finally, Table 4 indicates the results for scenarios of type C and Figure 6 plots the savings regarding those scenarios. Notice that scenario C | r | h | {2, 4, 6} yields the highest saving (30.87%) in total cost compared with the reference scenario C | -|. Regarding frequency and timetabling optimization, results for scenario C | -| h | {2, 4, 6} indicate cost savings for both passengers and operators. Moreover, a significant result is that we verify the hypothesis  We highlight that parameter values are critical in the optimization process. For example, in scenarios A using holding times does not provide benefits since there are few trips with transfers. While in scenarios B, the percentage of trips doing transfers is bigger which exhibits that holding buses could be advantageous. To study the trade-off between operating cost and the level of service, multicriteria approaches could be implemented, or parameter tuning strategies should be used in order to represent the subjective value of different measures in different travel conditions.

Conclusions and Further Research
We have introduced the Bus Lines Synchronization Problem (BLSP), which integrates the frequency setting, demand assignment, and timetabling problems considering synchronization at transfer stops to reduce the weighted sum of passenger and operational costs. We formulated this problem as a mixed-integer nonlinear deterministic program. The proposed problem is suitable to study scenarios of low-frequency services and low travel time variability, for example, the night time where also there is often a reduction of the network size. However, our approach could be implemented to synchronize day time services if we prioritize the transfer zones based on the affluence of passengers (so we could choose only a subset of those zones) and if we only consider zones or planning periods with low variability in travel times or services operating in corridors without congestions.
Since the BLSP is challenging to solve, we develop an iterative solution algorithm that fixes frequencies and passenger routes at each iteration and then the simplified formulation is solved using a commercial solver. We implement our proposed approach on the transit network in Santiago, Chile, and numerical results show significant reductions in operating costs and improvement in the level of service of night services. Besides, our results suggest that using frequencies which are multiples of a common denominator is a good strategy to synchronize services at transfer stops to reduce waiting times.
Step 4 of our sequential methodology solves a linear formulation for the timetabling problem. Then, a further research area is to solve the robust version of the timetabling problem considering variability in some parameters. This is possible, because if the mathematical formulation of an optimization problem is tractable by commercial solvers, the robust version of the problem is also tractable by those solvers (see Bertsimas and Sim [29]). Moreover, we would like to include nonlinear cost functions for waiting times and to consider vehicles capacity. Furthermore, it would be interesting to study the benefits of operating services with different headway times within each line. However, this requires developing a more complex model that would allow defining different holding times for different buses at the same stop. Such an operation would result in variable headways which should be handled by publishing detailed timetables at each stop.

Data Availability
Previously reported data of costs and origin-destination matrix were used to support this study and are available at [https://doi.org/10.1016/j.trc.2012.01.007]. These prior studies (and datasets) are cited at relevant places within the text as references [9,10,17,28].

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.