Development of an Algorithm for Optimal Demand Responsive Relocatable Feeder Transit Networks Serving Multiple Trains and Stations

Although demand responsive feeder bus operation is possible with human-driven vehicles, it has not been very popular and is mostly available as a special service because of its high operating costs due to intensive labor costs as well as requirement for advanced real-time information technology and complicated operation. However, once automated vehicles become available, small-sized flexible door-to-door feeder bus operation will become more realistic, so preparing for such automated flexible feeder services is necessary to take advantage of the rapid improvement of automated vehicle technology. Therefore, in this research, an algorithm for optimal flexible feeder bus routing, which considers relocation of buses for multiple stations and trains, was developed using a simulated annealing algorithm for future automated vehicle operation. An example was developed and tested to demonstrate the developed algorithm. The algorithm successfully handled relocation of buses when the optimal bus routings were not feasible using the buses available at certain stations. Furthermore, the developed algorithm limited the maximum degree of circuity for each passenger while minimizing the total cost, including total vehicle operating costs and total passenger in-vehicle travel time costs.


Introduction
In the past, automated transit was regarded as personal rapid transit or automated rail transit. However, it is now referred to as autonomous vehicle technology, which for public transit means autonomous bus transit, ridesharing, and carsharing. Transportation network companies (TNCs), such as Uber, and many car manufacturers, including General Motors, have recently reported that fully automated vehicles will be available by 2020-2030 [1]. This means that carsharing and ridesharing using autonomous vehicles will become a reality within a decade. While car manufacturing and technology companies are developing and improving technologies for automated vehicles, it seems that policy, planning, and other essential elements for effective implementation of automated vehicles for transit services still lag behind the technology [2].
Autonomous and connected vehicles (CVs) will change the paradigm for transportation users and industries, as well as for public transportation (including mass transit, ridesharing, and carsharing). Not only can they improve travel safety (e.g., reducing crashes), but they also will change our lives and travel patterns. When autonomous vehicles become available, users' travel behaviors and modal choices will become completely different. Autonomous vehicles will likely result in reductions in car ownership and increases in carsharing and ridesharing [3]. Also, small automated transit vehicles could be utilized to pick up passengers as a feeder for mass transit-such as bus, light rail transit (LRT), and metro-because of their lower operational costs due to no labor costs.
Although demand responsive feeder bus operation is possible even with human-driven vehicles, it is not very popular and is mostly available as a special service because of its high operating costs due to intensive labor costs as well as requirement for advanced real-time information technology and complicated operation. However, once automated vehicles become available, small-sized flexible door-to-door feeder bus operation will become more realistic, thanks to recent technological advances and business innovations by transportation network companies (TNCs). So, preparing for such automated flexible feeder services is necessary to take advantage of the rapid improvement of automated vehicle technology.
Before procuring and operating automated transit vehicles, it is extremely important to determine what future transit customers will want and expect from them; For example, depending on whether transit customers prefer a traditional type of transit service (e.g., fixed route) with an automated small-sized feeder transit or a more flexible service, similar to that provided by TNCs, transit agencies should prepare their future transit service accordingly while considering recent improvements in the availability of multisource and heterogeneous traffic data. These technologies will also open new opportunities for TNCs to implement automated feeder transit systems as well [4].
Although various research efforts have focused on optimization of feeder bus routes and operation, to the best knowledge of the authors, no study has considered the dynamic nature of feeder bus operation, such as the relocation of buses for multiple stations and trains. In the work presented herein, an algorithm for optimal flexible operation of small-sized automated feeder transit vehicles was developed to minimize the total costs, including agency operating costs and passenger travel costs, while guaranteeing a certain level of maximum individual travel time when handling multistation multitrain situations, with possible relocations of feeder buses if necessary. Then, in order to solve the problem, a metaheuristic algorithm was constructed for a hypothetical network.
This study serves as a basis for the evaluation of the efficiency of such automated feeder services, which can then be compared with automated ridesharing and carsharing services in the future. Eventually, these studies will help predict users' travel behaviors and modal choices between automated ridesharing/carsharing operation and automated feeder services for mass transit.

Literature Review
Dantzig and Ramser [5] introduced the vehicle routing problem (VRP), for which various applications, modeling approaches, and solution methods have since been considered and widely developed. The demand responsive feeder bus routing problem stems from the vehicle routing problem with simultaneous pickup and delivery (VRPSPD), which is an extension of the VRP that considers the situation in which feeder buses can alight and board passengers simultaneously. Min [6] first proposed the VRPSPD-inspired by a distribution problem for public libraries-and applied a heuristic method to solve this reallife problem. Thereafter, many researchers have tried to solve this problem using various methods. Angelelli and Mansini [7] could solve this problem using an exact algorithm. Other studies tried to solve the problem using heuristic and metaheuristic algorithms. Since VRPSPD is an NP-hard combinatorial optimization problem, very few studies have used exact approaches, and most recent studies have focused on metaheuristic algorithms [6]. Metaheuristic approaches used in recent years to solve the VRPSPD include the genetic algorithm (GA) [8], tabu search (TS) [9], greedy particle swarm optimization [10], ant colony optimization (ACO) [11], iterated local search algorithm [12], and simulated annealing (SA) [13]. The most recent studies related to the VRPSPD are summarized in the study by Montoya-Torres et al. [14]. This section mentions only a few of the most influential studies that are most relevant to demand responsive feeder transit systems.

Trunk Service and Its Feeder Bus System
Last-mile transportation systems (LMTSs) and trunk transit services have been addressed in many studies. The pioneering study by Kuah and Perl [15] introduced an integrated feeder bus network design problem in the presence of a rail system, although this study failed to consider coordination of the feeder buses to the rail system. Chowdhury and Chien [16] first introduced a coordinated feeder bus-rail system. Thereafter, many researches tried to address this problem by minimizing total passenger and operator costs and considering various decision variables such as bus frequency, train headway, and feeder bus capacity [17][18][19][20]. In recent years, studies have focused on the development of more realistic models and the use of new solution methods. Some researchers have developed models by adding passenger wait times at trunk and feeder stops as well as transfer wait times [21,22]. Wang [23] considered routing and scheduling in a Last Mile Transit (LMT) service and proposed a mixed-integer programming model. Mahéo et al. [24] proposed a Benders decomposition model to solve the problem by considering routing aspects of the multimodal network design problem. Recently, a new discrete space-time network-based modeling framework was proposed to optimize multimodal transportation network design, especially for urban rail transit [25]. Finally, Dou et al. [26] developed an optimization model to minimize passenger and operator costs by optimization of the schedules of a coordinated feeder bus transit (CFBT) with a rail system.

The Pickup and Delivery Problem with Time Windows (PDPTW)
The pickup and delivery problem with time windows (PDPTW) is a generalized version of the vehicle routing problem with time windows (VRPTW) that focuses on finding optimal routing solutions under capacity and time window constraints [27]. The objective function of the standard PDPTW is to minimize transportation costs while generating routes that serve all demands [28]. At first, Dumas et al. [29] solved the PDPTW using a branch-andprice algorithm and found an exact solution to the problem. After that, when introducing new objectives and constraints, the PDPTW turned out to be an NP-hard problem, and new heuristic and metaheuristic methods have been implemented for solving such problems. Recent studies implemented two-stage metaheuristic approaches by minimizing the number of routes and total travel distance. These approaches include TS [30], SA [31], large neighborhood search (LNS) [32], and guided ejection search (GES) [33]. Recently, Zhou et al. [34] developed an opensource lightweight approach to solve the vehicle routing problem pickup and delivery with time windows (VRPPDTW) using complex space-time-state network models, especially from a time-and state-dependent shortest-path perspective.

The Dial-a-Ride Problem (DARP) and Demand Responsive Transit (DRT)
Flexible demand responsive transit (DRT) services have been considered both theoretically and practically. Shuttle vans, ring-and-ride services, and dial-up buses are examples of shared demand response transport services that can serve travelers in urban and suburban areas. Past studies have proven that such systems have the potential to improve mobility efficiency in urban and suburban areas, not only for travelers in general but also for travelers with special issues, e.g., the elderly or disabled [35]. The dial-a-ride problem (DARP) is an extension of the VRPPD for transporting passengers in transit systems with a set of requests for pick-up and delivery from passengers served by transit fleets of limited size [36]. The objective functions of the DARP generally include minimization of the total routing distance of the fleet, minimization of the travel and wait times of passengers, and maximization of demand [37]. The DARP is an NP-hard problems, since the transit system is obliged to schedule vehicles to serve passengers in a determined time range, making it a dial-a-ride problem with time windows (DARPTW), which is more complex. The structure of the DARPTW is very similar to that of the PDPTW, but it is more complicated and highly sensitive to constraints.
To find near-optimal solutions to the DARPTW, past studies have implemented a range of metaheuristic methods, including ACO [38], GA [39], SA [40], and TS [41]. For further details and a comprehensive review of DARP and DARPTW models, refer to the literature review by Molenbruch et al. [42]. Although these studies have provided useful results that can minimize passenger or operator costs, there are still limitations in the implementation of these approaches in suburban and rural areas. First, most of these studies tried to increase operator revenues by scheduling vehicles on optimal routes even though individual passenger travel times and traveler preferences are important variables that can change traveler behavior. Second, these approaches did not consider relocation of the fleet service, despite the fact that, in high-demand conditions, such relocation might be required. Finally, none of these studies considered visualization tools to show optimal solutions. Although many studies have investigated demand responsive feeder transit problems, very little knowledge is available to solve these problems and design optimal transit networks and carsharing systems while considering the relocation of vehicles.
The current study offers two main innovations over the models reviewed above. First, it considers individual passenger travel times, which means that the feeder transit system can ensure that the travel time of each passenger will not exceed a maximum acceptable value. Second, the proposed model can relocate vehicles among stations (destinations) when there is higher demand at certain stations while still considering time window constraints. Table 1 presents a summary of selected studies related to demand responsive transit (DRT) systems.

Methodology
This optimal routing algorithm was specifically developed for automated demand responsive feeder transit services. The algorithm minimizes total costs, including vehicle operating and passenger travel time costs, while maximum travel times for individual passengers are limited within given maximum travel times. These features differentiate this algorithm from usual delivery-pickup algorithms, which do not consider the travel times of individual packages (in this case, passengers). Moreover, the other innovations of this study are the consideration of the relocation of buses with capacity constraint and the dynamic nature of the operation with time windows, which involves multiple stations and trains. Also, this algorithm applies the simulated annealing (SA) algorithm to solve the proposed model. Generally, the SA algorithm works effectively in permutation-based problems such as VRP [51] because this local search algorithm uses random transformations from the neighborhood of all solutions by considering the total costs in VRP problems, which are the total dispatching and travel costs of possible solutions [52,53]. Among metaheuristics that have provided better solutions, TS and SA are effective algorithms (especially for small-scale problems) due to their approach of finding an appropriate neighborhood [54][55][56]. The SA algorithm has been widely used as an efficient approach for solving problems similar in structure to the model developed herein [57][58][59].

Algorithm
This section presents an efficient algorithm for optimal routing of autonomous feeder transit services. To solve the problem in the model, we applied the SA algorithm, one of the most efficient metaheuristic approaches for solving the vehicle routing problem with time windows [13,14,54], because the local search strategy of the SA is more robust for finding high-quality solutions in VRP problems [60]. The SA algorithm uses a probabilistic acceptance strategy which includes many iteration stages to find the global optimum using a temperature-changing schedule [61]. The advantage of SA over other, similar metaheuristics is that it can easily escape from local minima and jump in the solution space to find a global optimum solution because it even accepts worse answers with a specific probability [13].
The first step of this algorithm is the clustering of passengers; it is assumed that all passengers have their own preferred stations and are assigned to certain stations. First, the algorithm creates a random series of integers to create the initial solution (a random permutation of integers from 1 to the number of passengers for the related station plus the number of feeder buses minus one). The algorithm first allocates feeder buses to passengers depending on the location of higher integers in the generated permutation, then, based on the order of integers in the generated permutation, the routes of vehicles are determined; For instance, in the presence of 2 vehicles and 10 passengers, a permutation of integers from 1 to 11 is produced. Suppose that the permutation generated is Path = (10,1,3,4,8,11,2,9,5,7,6). Then, the route of the first vehicle would be generated to serve passengers 10, 1, 3, 4, and 8, while the second vehicle route would serving passengers 2, 9, 5, 7, and 6. After generating an initial feasible solution (x initial ), the SA algorithm tries to create a neighboring solution by perturbing the initial solution according to the cost of the neighboring solution (the value of a hypothesized objective function which includes penalties corresponding to modeling constraints). If this cost (x new ) is less than that of the initial solution, then this new cost will be accepted; otherwise, it will be accepted with probability P = e À Df T , where Df is the change in cost between the new and previous solution and T is the initial temperature. The SA algorithm decreases the temperature during the iteration process towards the optimal solution at a controlled ratio of (a ¼ 0:98). In each iteration, the algorithm tries to improve the solution by searching its neighborhood using common swap, insertion, and reversion methods randomly. The algorithm attempts to reduce the value of the hypothesized objective function. The original and hypothetical objective functions are calculated as follows: where C O is the unit operating cost of each vehicle kilometer and C T is the time value of each passenger per hour. Basically, the SA algorithm improves the solution by using two transformation methods (move and replace highest average) to explore the solution space. The move transformation explores groups of passengers who have the shortest distances closest to each other, including their destinations. It then selects a random route and allocates passengers randomly to it according to the constraints. The replace highest average transformation is based on the average distance of every group of passengers; therefore, the algorithm selects random routes and allocates selected passengers to them in order to minimize the cost. This permutation process (cooling schedule) ends when the temperature reaches below 0.001 and the final solution does not change in iterations. Finally, the best feasible solution found during the total iterations is presented as the final solution proposed by the algorithm. If the algorithm fails to find a feasible solution for a certain station, relocations of vehicles are considered. In this case, the proportion of the number of passengers to the number of feeder buses for adjacent stations is computed, and the algorithm chooses the station with lower proportion to compensate for the deficiency.
To consider the acceptable travel times and routing circuity for individual passengers, the degree of circuity (DOC) and maximum degree of circuity (Max DOC) are introduced, as shown in Eqs. (1) and (2) [62,63]. The Max DOC and computed shortest travel times are used to define the maximum acceptable travel time for each passenger. Using those maximum acceptable travel times for passengers as constraints, optimal routings are developed for each station using the SA algorithm.

Degree of circuity DOC
Maximum degree of circuity Max DOC ð where i is an individual passenger. The buses at each station serve the passengers who use that particular station. We developed the optimal routings and found the optimal number of buses for that operation. So, for each station and for each train, we calculate the number of buses for the operation and compare them with the available buses. If we have more buses than needed, then the surplus will be calculated, and the bus operation will be feasible. If the more buses are needed than are available, the deficiency will be calculated, and it is necessary to examine whether there are surpluses at adjacent stations for relocation.
If the total number of buses available at all stations is more than the number needed at all stations, the entire service may be made feasible by multiple relocations. Figure 1 shows the flowchart of the algorithm, including the process for relocation of buses. In this algorithm, the relocated buses first serve alighting passengers at the station to deliver them to their destinations, then pick up passengers to take them to the goal station to minimize costs. In the algorithm of Fig. 1, s is the index for stations and S is the index for the last station. Each route must start at the initial station 0 and finish at the final station (which can be the same or another station), serve all passengers and time windows of the served passengers, and never violate the vehicle capacity constraint. The mathematical formulation is presented below: Variables Constraints   set T = alpha*T 0 (0<alpha<1) Step 4.9: set It2=It2+1 and go to step 4 Step 5: Set It1=It1+1 and go to step 3 Step 6: IF feasible_bestsol is empty, THEN min vehicle (s)= vehicle (s)+1 and go to step 7, otherwise go to step 14 END IF Step 7: Calculate the following proportion for stations s-1 and s+1: number of passengers (s)/vehicle(s) Step 8: IF s-1 exists and vehicle (s-1)> min vehicle (s-1), THEN go to step 9, otherwise go to step 11 END IF Step 9: IF proportion for station s is ≤ the proportion for station s+1 or vehicle (s+1) ≤ min vehicle (s+1) go to step 10, otherwise go to step 11 END IF Step 10: Set previous station help (s)= previous station help (s)+1 and vehicle (s-1)=vehicle (s-1)-1, s=s-1, and go to step 2 Step 11: IF s+1 exists and vehicle (s+1)> min vehicle (s+1) THEN go to step 12, otherwise go to step 13 END IF Step 12: Set next station help (s)= next station help(s)+1 and vehicle (s+1)=vehicle (s+1)-1 and go to step 2 Step 13: Show "The problem is not feasible; more vehicles is needed" Step 14: IF s<S, THEN set s=s+1 and go to step 2, otherwise go to step 15

END IF Step 15: Show results
Step 16: END where I is the number of passengers, K is the number of available vehicles, d ij is the direct distance between passengers i and j, d i0 is the direct distance between passenger i and station, C T is the value per passenger hour, C O is the unit operating cost of vehicle per kilometer, Speed is the vehicles' speed, DOC is the degree of circuity, cycle time is 20 min, C is the vehicles' capacity, and M is a sufficiently large number for modeling the expression. Formula (3) is the objective function of the problem. Constraint (4) specifies that each passenger is served by exactly one vehicle. Constraint (5) ensures that, if a passenger is assigned to a vehicle, it is considered as a used vehicle. Equation (6) ensures that the total number of vehicles used does not exceed the total number of vehicles available. Equation (7) defines that each path belongs to a single vehicle. Equations (8) and (9) ensure that each passenger is assigned to a path. In these equations, a i0k represents how vehicle k goes to a station after serving at the location of passenger i, and a 0jk means that vehicle k leaves from the station to the location of passenger j. In particular, Eq. (8) ensures that the vehicle must serve another passenger after serving a passenger or must go to the station, and Eq. (9) ensures that the new route must be constructed from the location of the last served passenger or from the station. Equations (10), (11), and (12) define the arrival time of vehicles to passengers. Equation (13) calculates waiting time for passengers, and Eq. (14) is an   additional time ratio constraint. Constraint (15) is the cycle time constraint. Equations (16), (17), and (18) are capacity constraints. The total distance traveled is defined by Eq. (19). Equations (20) and (21) ensure that every route starts and ends at the station. The developed model was coded in MATLAB. Because it contains several binary variables, the model becomes an NP-hard problem; however, the main challenges in the modeling are the constraints for the relocation of vehicles and the consideration of the DOC for each passenger. The pseudocode shown in Fig. 2 describes the steps in the SA algorithm as applied to solve the proposed model.

Hypothetical Network
A hypothetical rail transit line with four stations was created to test the developed algorithm and demonstrate its efficiency. Also, we tested four trains to test and demonstrate the relocation of buses, as shown in Fig. 3, which shows a conceptual time-distance diagram with four trains going through four stations. In this figure, blue lines are the regular routes of each bus, which means that the buses will return to the origin stations; however, red lines represent routes for relocated buses that start from the assigned station but end their trip at another station. Figure 4 shows a simplified version of Fig. 3 with the time components removed for easier understanding. In this figure, each set of feeder buses leaves the station when the train arrives with alighting passengers, then comes back to the station after delivering alighting passengers and picking up boarding passengers for the next train; For instance, at station 2 for the first bus set, the blue highlighted bus leaves the station at 10:05 and, after serving passengers, heads back to the assigned station, while the red highlighted bus leaves the station 2 at 10:05 but goes to station 3 instead of station 2, because station 3 needs more buses for the second bus set.
In this example, the headway of the train is assumed to be 20 min and the travel time between two stations is assumed to be 2 min. The capacity of each bus is assumed to be eight passengers. We also neglect the boarding and alighting times of the passengers at the nodes and stations. Table 2 presents the number of boarding and alighting (B/ L) passengers for each station and each train; For example, for train 1 at station 1, 16 passengers must be picked up and get on, while 24 passengers get off and need to be at station 1 for train 1. We also assume that the average speed is 30 km/h for the feeder buses and 60 km/h for the trains, while the distance between stations is 2 km. The monetary value of travel time for each passenger is set at $20 per hour, while the operating cost of vehicles is set at $0.3 per kilometer. The origins and destinations of the boarding and alighting passengers are randomly generated around the rail line for the four trains. Four different bus sets are defined according to each time window, such that bus set 1 carries passengers arriving on the first train and those departing on the next train. Figure 5 shows the boarding (blue points) and alighting passengers (red points) around the four stations for the four trains (yellow points).

Analysis and Results
The proposed SA starts by initializing the inputs and clustering the passengers. The inputs are the passenger demands (times and locations), bus and train speeds, train schedules, and station locations. In the next step, the algorithm finds the optimal solution. In this algorithm, the cost calculation process includes three scenarios: without a relocated bus, with a relocated bus from the previous station, and with a relocated bus from the next station. Finally, the outputs are the passengers' travel times, vehicles' traveled distances, buses assigned to each station in each time window, relocated buses, and bus routes.
As mentioned above, one aspect that can be distinguished in this research is the consideration of the maximum degree of circuity (Max DOC) of individual passengers. Unlike package delivery and pickup, passengers are likely to consider their travel time in the feeder bus when choosing this service. So, we calculate each individual passenger's shortest direct travel time from the origin to the station (or to the destination from the station) and compute the maximum acceptable travel time in the feeder bus as a constraint for the algorithm. Those acceptable additional times are calculated and used as a ratio (travel time in the feeder bus/direct travel time to the origin or to the station). A Max DOC of 2.5 is applied in the algorithm algorithm, and the results are shown in Fig. 6 and Table 3. Figure 6 shows the results of the feeder bus routings, including relocation of buses. For train 3, two buses are relocated, as shown by dashed lines. One bus was relocated from station 2 to station 1, and one from station 2 to station 3. The calculation times for running the algorithm in MATLAB for bus set 1 to bus set 4 were 1229.32 s, 1746.24 s, 2394.56 s, and 1374.12 s, respectively, on a computer equipped with an Intel Core i5 1.9 GHz (8 GB RAM) processor.

Conclusions
Although demand responsive feeder bus operation is possible even with human-driven vehicles, it is not very popular and is mostly available as a special service because of its high operating costs due to the intensive labor costs. However, once automated vehicles become available, small-sized flexible door-to-door feeder bus operation may became more realistic, and preparing for this eventuality is necessary to take advantage of the rapid improvement of automated vehicle technology. So, in this research, an algorithm for optimal flexible feeder bus routing, considering the relocation of buses for multiple stations and trains, was developed using an SA algorithm for future automated vehicle operation.
An example was developed and tested to demonstrate the developed algorithm. The algorithm successfully handled the relocation of buses when the optimal bus routings were not feasible using the buses available at certain stations. The developed algorithm also considers the maximum acceptable degree of circuity (DOC) for each passenger's trip while minimizing the total costs including total passenger travel time and vehicle traveled distance. Unlike package delivery and pickup problems, each individual considers his/her travel time in the feeder bus, while the transit agency considers the vehicle operating costs.
This study also provides a mechanism for future evaluations of how efficient automated feeder services are and how they will compare with fast-approaching automated ridesharing and carsharing services. Eventually, these studies will help predict users' travel behavior and modal choices between automated ridesharing/carsharing systems and automated feeder services for mass transit.
For future research, three directions could be considered. First, a feeder bus routing algorithm for trains with much shorter headways is being developed, which requires a passenger-feeder bus-train matching process in the algorithm. Second, an algorithm using smarter metaheuristics, incorporating composite heuristics for larger and real networks, will be developed and adopted. Third, temporary feeder stops [64] could be considered in the model.