Bus Trajectory Optimization With Holding, Speed and Traffic Signal Actuation in Controlled Transit Systems

We propose an optimal actuation of operational commands for regularizing bus headways. Assuming that a transit headway control system manages the bus operation by issuing reference arrival times at the next station for a bus, the problem is how to implement the control decisions for the bus in terms of three nonexclusive alternative actions: holding the bus at stops; varying bus speeds; and controlling traffic lights. Mathematical programming provides the basis of the approach. The constraints specify the bus trajectory model and the operator objectives are formulated as a multi-objective cost function solved by a lexicographic method. Results for a bus run on a single segment between two stops highlight the properties of the solution. A simulation study of an entire transit corridor in Quebec City, Canada, shows the advantage of the method over both headway control based on pure holding at stops and on one that combines holding and absolute transit signal priority.


I. INTRODUCTION
We present a method for generating optimal trajectories for transit systems operating under real-time control. Although also applicable to timetable-based systems, the discussion centers on headway control of high-frequency lines. The problem is how to apply higher-level headway controller decisions for every bus considering three nonexclusive alternative actions: holding the bus at stations; varying bus speeds; and controlling traffic signals. The main objective is reliability while also optimizing for secondary operator requirements among the multiple solutions that satisfy the former.
The need to control transit systems arises from the inherent instability in their operation. It has been shown that buses tend to bunch when the operation is subject to ordinary The associate editor coordinating the review of this manuscript and approving it for publication was Zhe Xiao . disturbances, such as variable dwell times. Bus bunching quickly causes deterioration of service reflected in irregular headways, uncertain expected arrival times, unbalanced passenger load distributions, and unreliable travel times [1].
In order to regularize headways, control actions seek to delay early buses or to advance late ones. The commonly used method of holding early buses at stations regularizes the headway times by allowing late buses to catch up [2], at the expense of bad perceived service by the onboard passengers [3]. Headway control can also be achieved by controlling the speed of the buses [4] or by Transit Signal Priority (TSP) [5] which allows advancing the buses.
Typical solutions to regularize headways provide a regulation time for each bus on certain control points. In holding methods, regulation takes place as an extra time that the bus must wait at pre-defined control points [6]- [9], usually stations along the route. In the case of speed guidance, the regulation imposes a difference in time that must be compensated along the segment until the next control point [4].
The performance of those methods can be disturbed if signalized intersections along the itinerary are not jointly managed with the control of headways. Signalized intersections can be used to control the regularity of headways through Conditional Signal Priority (CSP) [10]- [12], which only uses the traffic signal to advance late buses rather than granting green light for all buses, resulting in greater regularity [5]. Moreover, headway-based CSP results in a substantially lower delay to other vehicles compared to prioritizing all buses [13].
The combination of these actuation methods has been explored to a limited extent in previous works. A previous work on bus holding [14] was extended to include CSP control [7]. The resulting controller is of the model predictive type and uses holding at stations and green extensions as decision variables of an optimization problem to minimize passengers' average delay. Another approach consists of a CSP control for isolated intersections that can be combined with any holding strategy [12]. However, the resulting approach does not manage holding and signal times simultaneously. In both proposed solutions, CSP loses controllability due to the lack of speed guidance, especially if more than one signal exists between two stations.
In another work, an adaptation of a holding method for CSP [10] was conducted to combine bus speed guidance and CSP [15]. In this case, the stations are the control points where headways are measured, and the actual control action is applied in the segment from the current to the next control point, adjusting speeds to regularize headways. CSP is applied independently from speed guidance every time a bus reaches a traffic signal. Another approach combining speed guidance and CSP uses a model that considers a headway correction from one station to the next, taking into account the influence of all traffic signals in between [16]. The actuation takes place in order to minimize headway deviations and traffic signal adjustments.
The combination of holding at stations, speed guidance, and the information of traffic signal states was previously proposed in order to minimize bus delays, stops and fuel consumption, but did not apply any form of signal control [17]. Another approach for the combination of holding at stations, speed guidance, and CSP sought to minimize a balance of bus delays and signal adjustments [18]. Both works considered only one traffic signal between stations and did not aim at regularizing headways. Another work [19] combined holding at stations, speed guidance, and CSP to regularize headways and did it with a rule-based method that decides control actions sequentially instead of considering all possible actions in an integrated way to find the optimally combined actuation as done in our work.
In this paper, we consider the problem of implementing predetermined target arrival times at the next station delivered by a headway controller through the integration of holding, speed guidance, and traffic signal controls for a bus line operating on a dedicated bus lane. We call our signal actuation as Transit Signal Control (TSC) instead of TSP or CSP [12], since the signal control is able to prioritize or delay buses conceding green or red light phases accordingly.
It is assumed that the target arrival time for a bus at the next station has been calculated by a transit headway control system using any available technique (e.g., [6]- [8], [20]- [23]). These techniques provide a holding time for a bus in a control point, which can be readily expressed as a target arrival time at the next control point. Our problem, then, is how to implement the regulation implied by the holding time with more flexibility than simply holding the buses so that extra requirements defined by the operator can be satisfied while maintaining regularity.
We consider that operators may wish to perform the control actions to (i) achieve the target arrival time with minimal deviation; (ii) improve user experience with less holding at stations; (iii) mitigate negative effects of TSC on traffic; (iv) avoid long waiting times during red light phases; and (v) maintain constant speed along the itinerary. These objectives are sometimes conflicting, so the solution method should provide the operator with a systematic way to balance them in realizing this multi-objective task. A lexicographic method [24] is adopted, guaranteeing the accomplishment of the most relevant objective with minimum cost.
The main contributions of the work reported in the paper are (i) integrated optimization of holding, speed guidance, and multiple traffic signals; (ii) operator choice to prioritize five performance criteria of the multi-objective approach; (iii) straight integration with any headway control method providing an implicit or explicit target arrival time; and (iv) results of case study scenario simulation of a trunk line in Quebec City, Canada.
In Section II, the trajectory generation problem and the model for the bus trajectory between consecutive bus stations are presented, followed by the formulation of the multi-objective lexicographic optimization problem. In Section III, a numerical analysis is performed for a single segment between two stations comprising three traffic signals, which provides insights about the resulting trajectories. In Section IV, a simulation analysis of a large operational bus line of Quebec City, Canada, is presented, comprising 59 stations over 25 km with 91 controlled intersections. The results indicate that the combined actuation on holding, speed guidance, and TSC successfully improves many metrics important for the operator, bus users, and surrounding traffic.

II. TRAJECTORY OPTIMIZATION PROBLEM
We first present the problem statement and how it fits into a transit headway control system. Then, the model for the bus trajectory between two consecutive bus stations is presented. Finally, the desired criteria for the objective function are presented along with the mathematical formulation of the trajectory optimization problem. VOLUME 9, 2021 FIGURE 1. Schematic of the bus control system, in which: ''Trajectory Optimizer'' refers to the methods presented in this paper; ''Headway Controller'' is the decision maker regarding intervals between buses; ''Bus'' represents all buses in the system which are embedded with speed guidance and holding actuator; ''Traffic Signal Controller'' are the traffic signals at intersections.

A. CONTROL STRUCTURE AND PROBLEM STATEMENT
The structure of the control system under consideration is depicted in Fig. 1. We assume that the Headway Controller block decides on a target arrival time for each bus at its next station, either explicitly or implicitly, through desired delay (e.g., holding) and advancing times. Our focus is on the Trajectory Optimizer block, which transforms the target arrival time of each bus into actuations in the form of (i) holding time (Holding Actuator block), (ii) cruise times in a segment (Speed Guidance block), and (iii) traffic signal adjustments (Traffic Signal Controller block).
We consider a single bus line operating on a dedicated bus lane for which a headway control system is available. The bus line comprises several stations, possibly with traffic signals in between. Without loss of generality, all stations are considered as control points with the possibility of bus holding, all traffic signals are bus-actuated, and the speed of the buses can be controlled. We assume that every time the process of boarding and alighting of bus i at station k is finished (see label ''Ready to Depart'' in Fig. 1), the control system provides a target arrival timeâ i,k+1 for bus i at the next station k +1. Our problem consists of, givenâ i,k+1 , obtaining the optimal holding time, bus speed, and traffic signal times for bus i in the segment between stations k and k + 1 to optimize some performance criteria. Therefore, our goal is to define the optimal distribution of control actions among three possible actuation methods, thus optimizing the trajectory of a bus in a segment between two consecutive stations. The procedure can be applied to each bus under control in the system.
The Trajectory Optimizer block does not need all the information required by the Headway Controller. The only information it receives is the target arrival time,â i,k+1 , which can be readily obtained from any headway controller designed to regularize through holding. Note that the Headway Controller block in Fig. 1 can be replaced by a Timetable Controller as long as it provides the Trajectory Optimizer with a target arrival time for a bus at the next station.

B. BUS TRAJECTORY MODEL
Since we consider a single bus line operating on a dedicated lane, there are no queues involved and a deterministic model can be built without misrepresenting the real problem. Also, the variables that are most subject to uncertainty in an uncontrolled scenario, travel time and bus delay at intersections, are regulated by the control system by means of bus speed and the traffic signals, hence reducing variability which, in turn, strengthens the accuracy of the deterministic model.

1) BASIC MODELLING ELEMENTS
A given bus line with K stations for passenger boarding and alighting can be divided into K − 1 segments, each connecting two consecutive stations as depicted in Fig. 2(a). In the segment between station k and station k + 1 there are |S k | traffic signals, defined by set S k . This segment is divided into |Y k | sections, with Y k the set of sections: one section from station k to the first intersection, one section between every two consecutive intersections, and one section from the last intersection to station k +1; thus, |S k | = |Y k |−1. Each section contains only one intersection, always at its end except for the last one, which has no intersection. Now consider the space-time diagram of Fig. 2(b) for the same segment between k and k + 1 in Fig. 2(a). Bus i arrives at station k at time a i,k . In the bus trajectory in the figure, s i,k is the time bus i spent at station k for boarding and alighting. Following this process, there is the possibility of holding the bus for a time h i,k at this station. After departure, for each section y, the bus takes a time τ i,y to traverse this section, which can be influenced by the bus speed on the section.
We define a ''phase'' as the interval between state changes of the traffic signals on the busway only. The cycle time at each intersection is divided into green time and red time, which includes the yellow time. The phases are sequentially indexed by x. Thus, if phase x is green, phase x + 1 will be red and so on. We define φ y,x as the preset time instant at which phase x starts at the intersection of section y. Because the time plans are bus-actuated, all values of φ y,x are known. The set of x-indices of phases belonging to the intersection of section y is defined as i,y , and R i,y is the subset of i,y with the indices x of red phases belonging to the intersection of section y.
Whenever bus i stops at an intersection at section y due to a red light, it is subject to a delay σ i,y . The experienced delay depends on the bus arrival time α i,y at the intersection and can be affected by the actuation of the traffic signal. In our case, δ y,x is the actuation on signal phases, given in seconds; it affects the starting time of phase x in section y, for which positive values indicate a postponement (consequently an extension of the previous phase) and negative values indicate an anticipation (consequently a truncation of the previous phase).
The arrival time α i,y at the intersection of section y for bus i is given by the summation of the bus departure time d i,k from station k, the delay times in all previous sections, and the travel time of all previous and the current section: in which the bus departure time is obtained from:

2) DELAY AT INTERSECTIONS
The delay at an intersection can be expressed in terms of the current traffic signal state, the phase duration, and the arrival time at the intersection: The first condition occurs if the bus arrives at the intersection during a red phase, so the value of σ i,y is the time interval between the arrival time at the intersection, α i,y , and the time when the phase changes to green. In the second condition, σ i,y is zero because the bus arrives during a green phase and crosses the intersection without stopping.
As noted before, the delay at an intersection can be affected by actuation on the phases start times. Thus, we rewrite (3) so as to incorporate δ y,x for bus i: in which b i,y,x ∈ {0, 1} has value one when x is the index of the phase used by bus i to cross the intersection of section y, and M is a number greater than any possible value of α i,y . Equation (4) expresses both conditions of (3). Indeed, for the intersection of section y, if ∃ x ∈ R i,y | b i,y,x = 1 (bus arrives during a red phase), equation (4) becomes (bus arrives during a green phase), then (4) yields σ i,y = 0. Inequalities (6) and (7) define the phase at which bus i arrives with respect to α i,y , while constraints (5) impose that a bus must arrive in only one phase at each intersection.

3) BOUNDARY CONSTRAINTS
Bus travel times are bounded: with τ min y and τ max y the minimum and maximum travel times, respectively, obtained by considering that bus i travels through section y within given minimum and maximum speeds.
The magnitudes of the anticipation and postponement of phases start are also bounded: The parameters δ ant y , δ pst y are the maximum anticipation time and maximum postponement time in section y, respectively.
A maximum holding time h max k at station k is imposed: The model for the bus trajectory is then defined by (1), (2), and (4)-(10).

C. OPTIMIZATION OBJECTIVES
The bus trajectory model in Section II-B describes the feasible region of the trajectory generation problem. Assuming that the system can actuate on the traffic signals, on the section travel times indirectly via bus speeds, and on the bus holding times, then δ y,x , τ i,y , and h i,k become decision variables in our optimization problem. Next, we propose a series of objectives involving these variables that should be minimized and can be combined in a multi-objective approach. These objectives can then be employed to exploit the actuation freedom in trajectory design to accomplish the main objective, i.e., the target arrival timeâ i,k+1 prescribed by the headway controller.

1) TARGET ARRIVAL TIME
The arrival of bus i at the end of the segment at the target arrival timeâ i,k+1 could be achieved by adding the constraint a i,k+1 =â i,k+1 . However, if we impose such a restrictive constraint, the problem may become infeasible due to street-level operational conditions. Therefore, we formulate the following error function to be minimized: (11) VOLUME 9, 2021 Note that the time instant a i,k+1 when the bus arrives at station k +1 does not appear explicitly in the model presented in Section II-B. In fact, it is equal to α i,|Y k | , the arrival time of bus i at the end of the last section of the segment, which is station k + 1 by definition (see Fig. 2 The problem is always feasible with the proposed formulation since there is always a trajectory that takes the bus from station k to station k + 1. Errors in achieving the target arrival time are common disturbances in bus operation due to street-level effects ignored (appropriately) by headway controllers. Such disturbances are treated by the upper-level control at the next iteration, i.e., the next station at which a new reference arrival time for the downstream station is issued.

2) PHASES START TIMES
The effect on general traffic is treated by minimizing the variations of the start times of the phases: We adopt the approach by which the lesser the variations around nominal traffic signal timings, the lesser the impacts on general traffic [12], [16]. Moreover, in our approach, requests for adjustments in traffic signals occur only if reliability is improved. In any case, a more elaborate objective could be devised if real-time data about surrounding traffic were available, thus minimizing the delay of the overall traffic. Even so, it may be a matter of policy to prioritize transit instead of cars, in which case our treatment suffices.
An operational concern arises in the case of frequent bus priority requests, particularly in bidirectional systems. On the application level, one can disable traffic signal actuation for one or more cycles either to avoid conflict with an ongoing request of another bus or to allow for a full recovery of the traffic system before granting priority again.

3) HOLDING TIME
Passengers may be annoyed by the absence of immediate departure of the bus from the station after boarding and alighting have finished, thus holding times of buses at stations are taken into account by the objective: If the bus system is equipped with Automatic Passenger Counters, this objective could be refined to include the number of onboard passengers as a weighting parameter [9]. The device would also be potentially beneficial for the Headway Controller block of the system [25], [26].

4) DELAY AT INTERSECTIONS
The time spent at intersections can be modeled by minimizing the delay as Given the right priority, objective f 4 also prevents buses from accelerating unnecessarily when heading towards a red light in the next intersection.

5) CONSTANT SPEED
For the comfort of passengers and to reduce fuel consumption, the bus should keep a constant speed within the segment whenever possible. This objective can be formulated with the minimization of the difference of the inverse of the speeds at each section: in which λ y is the length of section y. Objective f 5 should be given low priority to not impair the accomplishment of the target arrival time.
The speed guidance is delegated to a local controller in the bus responsible for handling disturbances that may affect the travel time, as well as the boundary constraints discussed in Section II-B3 that may result in saturation if for a given segment the bus is operating near or at maximum speed.

D. EFFECTS OF EACH OBJECTIVE IN THE SOLUTION
We now discuss how the different objectives shape the solution of the trajectory resulting from the actuation optimization problem. Our objective functions take a quadratic form to better guide the solution towards the intended operation and to break ties of solutions of similar value. Consider two possible cases for an instance with two sections. In the first case, the difference between the arrival time at the end of each section is of 1 minute. In the second case, the bus arrives at the end of the first section with exactly the prescribed time, but arrives at the end of the line with 2 minutes difference. With a linear objective the total cost would be 2 minutes for both cases. However, due to the quadratic shape of our functions, the first case yields a cost of 1 2 + 1 2 = 2, whereas the second one yields a cost of 0 2 + 2 2 = 4. Hence, our formulations tolerate small deviations and penalize large deviations, which is best for the operation. The same logic applies to all other objectives. The quadratic form also allows us to avoid taking the absolute values of the function.
The main objective is to accomplish the target arrival timê a i,k+1 prescribed by the headway controller, measured by f 1 .
However, objective f 1 alone is not sufficient for yielding a trajectory. Suppose the case in which the control is not saturated and the model achieves precisely the target, i.e., f 1 = 0. There are infinitely many solutions for achieving the target. For example, if the headway controller prescribes that the bus must be delayed by t seconds after boarding and alighting have finished at station k and before arriving at station k + 1, different ways to do so are: i) hold the bus t seconds at the departure station; or ii) delay the bus t seconds at a traffic signal; or iii) decrease the speed of the bus, increasing the travel time by t seconds; or iv) any combination of these previous measures.
Objectives (12)- (15) provide the operator various options to benefit from the many possible solutions. As formulated above, the objectives aim at decreasing traffic perturbation of traffic phase changes (f 2 ), decreasing holding at stations (f 3 ), decreasing delays at intersections (f 4 ), and avoiding variations of the bus speed (f 5 ). Since objectives f 2 to f 5 alone would create solutions with no control at all for the central objective f 1 , each objective f 2 -f 5 is now analyzed as complementary objectives to f 1 , i.e., we analyze f 1 + f z , z = 2, 3, 4, 5.
With objective f 2 we avoid changing the phases at the intersections, implying fewer disturbances to surrounding traffic and preserving traffic signal coordination in the corridor. In the example above, objective f 1 would still minimize deviations to the target. Meanwhile, f 2 would penalize changes in the phases, allowing the control to act freely on speed and holding while reducing the freedom of possible solutions without compromising the flexibility of the model. Due to the quadratic shape of f 2 , a phase change of t seconds in one intersection costs more (in the objective function) than two changes of t/2 seconds in two different intersections. This is in line with the desire to avoid disturbing surrounding traffic, which is achieved by smoothing phase changes throughout the corridor.
Objectives f 3 and f 4 also reduce the freedom of possible solutions by penalizing holding at stations and delays at red lights, respectively. These objectives should have different coefficients because passengers value their time differently during the trip, and their perception of delay due to holding can be different than due to a red light [3]. However, in combination with other objectives and due to the shape of our functions, small amounts of delay at stations or traffic signals, properly parameterized in terms of their costs, can be beneficial to the system. Objective f 4 also saves fuel by avoiding the buses to inadvertently rush for a red light.
Finally, objective f 5 plays a triple role: (i) it saves fuel by avoiding abrupt acceleration and deceleration; (ii) it increases the comfort of onboard passengers; and (iii) it reduces the freedom of possible solutions that could be obtained by adjusting the speed of a bus in order to achieve a given target.
Overall, combining the five objectives enables the shaping of better and more consistent bus trajectories than would be possible by simply satisfying the target arrival time in each segment, while increasing regularity and comfort for passengers and decreasing fuel consumption.

E. MULTI-OBJECTIVE FORMULATION
For the combination of the partial objectives, we propose a pure lexicographic form [24], further designated as MOX, that solves for each objective separately always respecting the set of solutions that optimizes higher hierarchical objectives: (MOX) lex min (f 1 , f 2 , f 3 , f 4 , f 5 ) subject to: (1), (2), and (4)- (10). (16) The hierarchical order prioritizes the arrival of the bus to the next station at the targeted time (f 1 ) over all other objectives and tries to do it while minimally changing signal times (f 2 ), the second most important objective. It also penalizes the holding at stations (f 3 ) more than delaying buses at intersections (f 4 ). Keeping constant speed (f 5 ) is put as the least important objective since it improves criteria out of focus of the presented model. Since the objective f 1 is optimized first, a zero-error solution for the arrival time is guaranteed by design if such a solution exists; otherwise, the solution is a minimum-error one with the nearest feasible travel time.
The task of adjusting the priority order of these objectives can be delegated to the bus system operator, who should take into account how passengers value their time under different delay situations such as low speed, stop at stations, and stop due to a red traffic phase.
Different approaches could be considered by combining all the objectives or subsets of objectives in a weighted sum, e.g., via scalarization [24]. This could be useful for situations where the operator cannot decide a hierarchy for the objectives or decidedly relaxes satisfying a higher hierarchical objective in favor of other objectives.

III. NUMERICAL ANALYSIS OF A SINGLE SEGMENT
To evaluate the characteristics of the actuations of the proposed approach, identified as MOX (16), a comparison is presented with the application of only holding at stations (HOL) for the trajectory of a single segment.

A. SETUP
A single 1165 meter-long segment of an arterial road provides the scenario for this numerical analysis. Between its two stations, with indices 1 and 2, there are three traffic signals, at 192 m, 557 m, and 899 m from station 1. The traffic signals of all intersections operate with a bus-actuated time plan with a preset cycle time of 150 s, 78 s of green, 66 s of red, and 6 s of yellow for all three busway phases. The offsets were designed to grant green waves for the busway at a cruise speed of 70 km/h and are +12 and +24 s, respectively, for the second and third traffic signals with respect to intersection 1. The average time to cross the segment,t i,1 , taking into account the presence of traffic signals and no bus control system, is 83 s. Maximum and minimum allowed speeds are 70 km/h and 30 km/h, respectively, when MOX is applied, and the speed is fixed at 70 km/h when HOL is applied. Parameters δ ant y,x and δ pst y,x are set to 20 s, and h max 1 to 50 s. Target arrival times are chosen arbitrarily for the sake of numerical comparisons. Two cases are analyzed, differing only by the target arrival time at station 2,â i,2 . In Experiment A, the buses are expected to arrive at station 2 83 s after departing from station 1, i.e., to cross the segment with timē t i,1 . In Experiment B, the buses are expected to arrive at station 2 133 s after departing from station 1, i.e., to cross the segment with a delay of 50 s overt i, 1 .
The effect of the traffic signals on the performance of the MOX method could influence the results since it depends on the time the bus is ready to depart from station 1.
To circumvent this, HOL and MOX are evaluated by executing 150 different simulations, each with a different value of time stopped at station 1. Thus, s i,1 is varied from 1 s to 150 s (the cycle time) in steps of 1 s, while a i,1 is kept as 0.
The solver Gurobi [27] was used to solve MOX. Since it requires the objective functions to be linear in the multiobjective approach, equations (11)- (15) were linearized [28] with no loss of precision. The time taken by the solver Gurobi to solve MOX using eight threads on a 3.6 GHz processor was similar for both cases: 0.2 s on average with a maximum of 0.6 s.
Due to the variable initial condition, the performance of the approaches on targeting the arrival time at station 2 will be assessed by analyzing t i,1 , i.e., the interval from the time the bus is ready to leave station k (end of dwell time) to the time the bus arrives at station k + 1, relative to a target travel timet i,1 , instead of a i,2 . The results are presented in Table 1, in which Mean abs is the mean of the absolute difference.

B. TARGET TRAVEL TIME EQUAL TO THE AVERAGE TRAVEL TIME
The results presented in Table 1 for Experiment A show that HOL does not apply holding and the buses arrive at station 2 after 83 s, on average. But the mean abs arrival errors in Table 1 show that the HOL method has arrivals more dispersed than MOX. It can also be seen that MOX did not use holding at the station for all simulations.
Note that HOL applies zero holding in this case because the target travel time is equal to the average travel time in the segment. Variations around the average are caused, in this example, by the traffic signals. If only green lights are met by the bus, then it traverses the segment in the shortest possible travel time, which is 60 s (see the bar in Fig. 3). On the other hand, if the bus meets red lights on the way, then the travel in the segment may take more time than the average. In these experiments, the longest travel time is around 136 s.
The existence of arrival errors with MOX, which minimizes this error as the most important objective, indicates that it was infeasible to accomplish the targeted arrival time for some instances. Such infeasibility can be addressed to the reference value oft i,1 for this analysis, 83 s, which is an average considering that buses travel with the maximum allowed speed. The histogram of Fig. 3 shows that MOX, in comparison with HOL, was able to delay trips that without trajectory control would be completed in less time thant i,1 . On the other hand, MOX did not have the same efficiency to anticipate trips that, without control, would be completed in greater time thant i,1 , due to speed and TSC limitations.

C. TARGET TRAVEL TIME 50 s LONGER THAN THE AVERAGE TRAVEL TIME
The results presented in Table 1 for Experiment B show that method HOL, which has no information over the segment ahead, fully corrects the headway (at station 1), applying 50 s of holding for all cases. Not surprisingly, its performance is the same as the previous case since the trajectories are equal   but delayed by 50 s. Over the complete range of s i,1 within a cycle, the delay effect on the criteria is cancelled.
On the other hand, the method MOX performs better than in the previous case (Table 1), presenting a smaller variation of travel times while using less TSC. Even with the required 50 s delay, MOX did not use holding at the station for any replications. Such actions are due to TSC and holding being infinitely more costly than delaying buses at intersections.

IV. CASE STUDY OF A COMPLETE TRANSIT CORRIDOR
To investigate the performance of the proposed model on improving bus systems reliability, a real bus line was modeled and simulated with the Aimsun microsimulation software [29]. Its application program interface (API) enables setting dwell times according to passenger activity (boarding/alighting), enforcing a trajectory for the buses in realtime, and the actuation on traffic signals.

A. SIMULATION SETUP
The bus line 800 towards Pointe-de-Sainte-Foy is part of the bus system of Quebec City, Canada (Fig. 5). It operates a 25 km-long route with 59 stations and 91 controlled intersections. The dispatch of buses from station 1 is scheduled as planned by the operating agency. The operation is simulated from 6 to 10 a.m., to include the morning peak time. Headway times during the studied period vary from 5 to 13 minutes, with an average headway of 7.8 minutes. Passenger demands are simulated according to real data obtained from the operating agency, after a calibration effort.
Passenger arrival rates per hour are the average of Poisson distributions, whereas the fraction of onboard passengers alighting is normally distributed with a standard deviation equal to half the average (Fig. 6).
Bus characteristics are defined in terms of acceleration, deceleration and speed acceptance, with mean (standard deviation) set to 1.0 (0.3) m/s 2 , 2.0 (0.3) m/s 2 and 1.0 (0.05), respectively. These values are the default for buses in Aimsun software. Speed acceptance represents the willingness of a driver to accept a given speed, e.g., if speed acceptance is 1.05, it means that the driver of that bus will ride 5% faster than the commanded speed. Overtaking is not allowed, and all stations have a bay for one vehicle. Passengers can board while the buses are being held.

B. CONTROL IMPLEMENTATION
This section presents the headway control system used in the simulations to test and demonstrate of the proposed trajectory optimizer. Details on how we perform the bus speed guidance and actuate on the traffic signals are also presented.

1) HEADWAY CONTROL
Buses are indexed in order of departure time (index i). The target arrival time for bus i at station k + 1,â i,k+1 , is an input for the trajectory optimization problem and is obtained from: with H i the planned headway for bus i and r i,k the regulation time delivered by a transit headway controller that intends to advance or delay bus i so as to follow its planned headway [9]: and K c a proportional gain. The first condition in (17) occurs if bus i−1 already arrived at station k +1. In this case bus i is targeted to arrive at station k + 1 H i seconds after bus i − 1. In the second condition, a classical headway control law is applied. The control law (18) is based on a feedback control method [6] that includes a threshold time that serves as a margin for advancing delayed buses by applying a holding time for buses that are on-time. Since our actuation is able to advance buses, we adapted (18) to disregard the threshold time. We chose (18) for its simplicity, but any other headway control system (e.g., [4], [7], [8]) could have been used. Equations (17) and (18) define the Headway Controller block in Fig. 1 for this case study.
Givenâ i,k+1 , an optimal actuation and the corresponding bus trajectory can be obtained by solving MOX. The outputs of the optimization problem for the simulation are the holding time at that station, the updated phases start times of each controlled intersection, and the instant the bus must arrive at the end of each section of that segment.

2) BUS SPEED GUIDANCE
The bus speed guidance is performed for every bus in every simulation step (0.8 s) simply by informing the desired speed for the bus given by: in which λ i,y is the remaining distance for bus i to the end of section y, and t o is the present simulation time. The desired speed is followed strictly unless V d i exceeds speed limits or the bus is in process of acceleration or deceleration, e.g., due to a traffic signal or to reach V d i .

3) TRAFFIC SIGNAL ACTUATION
The control of traffic signals is handled by the simulator based on the preset times. An interruption overrides the traffic signal controller at the modified phase start time when a phase adjustment results from the optimization problem.

C. SIMULATED SCENARIOS
To evaluate the performance of the proposed trajectory optimization applied to the decisions of the controller by the multi-objective lexicographic formulation (MOX), a scenario without control and two other control scenarios are also simulated. One control scenario applies only holding at the stations, and another applies both holding at the stations and TSP, but not speed guidance.
In the no control (NOC) scenario, buses run free, departing from stations as soon as the alighting/boarding process ends. No action is taken to prevent bunching or to grant signal priority. In the holding only (HOL) scenario, buses are only controlled at stations and held, if needed, after the alighting/boarding process. No TSP or speed guidance is applied. Holding time is directly obtained from (18), with all regulation time applied as holding, i.e., h i,k = r i,k . The constraint (10) on maximum holding time is applied. The holding plus TSP (H+P) scenario uses the same headway control method as HOL, but also grants green light at every controlled intersection for the first bus that arrives in each traffic signal cycle.
For NOC, HOL and H+P the desired speed V d i is set as the maximum allowed speed of the bus lane. For MOX,t i,k is limited byt k ± 40 s; for all scenarios h max k is set to 40 s; δ ant y and δ pst y are set to 20 s; and K c is set to 0.7. All other input variables presented in the problem formulation are obtained directly from the simulation.

D. SIMULATION RESULTS
Due to stochastic demand and bus characteristics, the results are based on the average of 10 replications. This resulted in 240 complete bus trips, which triggered 15340 headway control decisions (every time a bus stops at any station). Table 2 summarises the performance of all simulated scenarios.    The mean absolute headway deviation is obtained by the arithmetic mean of the absolute difference between the planned headway and the observed headway, always measured at the stations, before holding. MOX performed considerably better than the other controlled scenarios (HOL and H+P), and all of them performed better than the uncontrolled case (NOC). Histograms of all observed headway deviations are presented in Fig. 7. HOL and H+P presented approximately 50% of the arrivals on-time (deviated less than ± 15 s), whereas MOX presented 83% of the arrivals on-time. Remarkably, 95% of the arrivals are within 0.57 min of deviation in MOX, but within 2.28 min in HOL and within 1.44 min in H+P. Greater efficiency of HOL on preventing large delays could be achieved with a threshold time, typically applied to enlarge controllability. However, a threshold time would significantly deteriorate the commercial speed.
The mean abs signal change, presented in Table 2 for the two scenarios that use TSP and TSC, is the mean of signal adjustment times per intersection per cycle. MOX used almost twice the amount of signal change used by H+P, mainly because of speed guidance, which gives MOX a higher chance of reaching intersections within the limits of signal adjustments than H+P. Moreover, MOX also has permission to adjust phases to delay buses, although such actuation represents only 1% of all signal actuations. Figure 8 presents the complete composition of the average travel time at each segment between two stations. The bars for riding time are approximately equal for NOC, HOL, and H+P since no speed guidance is applied in these scenarios.  The bars for delay at red lights are approximately equal for NOC and HOL since no signal control is applied. Comparing these graph areas, the prevalence of orange color in MOX indicates that buses spent the majority of their travel time riding instead of stopped. Riding time is the highest for MOX, whereas delay at red lights is the lowest overall, and holding time is the lowest among controlled scenarios.
The amount of holding time per bus trip, presented in Table 2 for the three scenarios that use holding, highlights that MOX applied significantly less holding than HOL and H+P. This is due to the precedence of holding minimization at the stations over delay minimization at intersections in (16). Figure 8 also presents the average amount of holding applied at each station. Both MOX and HOL show a reduction in the need to apply holding as the buses progress along the route, despite having very different total holding values. This indicates that in these scenarios, a stable state of headway times is underway, whereas H+P does not show such a reduction.
The commercial speed in Table 2 is obtained by dividing the bus route length by the time a bus takes to complete it. Our MOX scenario presented the highest commercial speed, even higher than NOC, showing that its signal priority more than compensated for the delay caused by holding, speed guidance, and signal delay. The H+P scenario presented a similar commercial speed to NOC, whereas HOL, which can only delay buses, presented the lowest commercial speed. Figure 9 presents the histograms of observed speeds. It is clear that the buses had similar speeds while riding (speed greater than 0) in the NOC, HOL, and H+P scenarios, since bus speed guidance is not applied in all three. What explains the difference among these scenarios concerning commercial speed is the amount of time the buses spent stopped (first bar of each histogram). Due to bus speed guidance, the MOX scenario presented a different histogram, with lower speeds while riding and a significantly lower amount of stopped time. The histogram presented by MOX is probably the most desirable since it positively affects passengers' perception of time [3].
It becomes then clear that an optimized method actuating on holding, speed, and traffic signals has many desirable effects in reducing bunching, respecting headway and arrival times at stations, increased average speed, without much impact on surrounding traffic and passenger annoyance.

V. CONCLUSION
We presented an efficient solution for implementing the target arrival time at the next station for headway correction of transit systems. The solution was achieved by optimizing a bus trajectory model that considers three types of actions: holding at stations, speed guidance along the itinerary, and control of signal phase changes at traffic signals. Numerical results and simulation showed that the proposed solution resulted more efficient than the cases where only holding at stations or only holding and traffic signal priority were applied.
In applying the method in practice, the operator can decide on how to prioritize the types of action according to operational experience, itinerary features, and manifested passenger preferences. Having a well-tuned system will lead to increased bus regularity and comfort for passengers.
Future work with the method should address open questions, such as explicitly treating the concurrency for traffic signal priority with other lines, possibly from different directions; embedding the actuation decisions directly into the headway controller; and promoting the prevalence of holding actuation when buses are near-empty.