Enabling In-Depot Automated Routing and Recharging Scheduling for Automated Electric Bus Transit Systems

)e bus transit system is promising to enable electric and autonomous vehicles for massive urban mobility, which relies on high-level automation and efficient resource management. Besides the on-road automation, the in-depot automated scheduling for battery recharging has not been adequately studied yet. )is paper presents an integrated in-depot routing and recharging scheduling (IDRRS) problem, which is modeled as a constraint programming (CP) problem with Boolean satisfiability conditions (SAT). )e model is converted to a flexible job-shop problem (FJSP) and is feasible to be solved by aCP-SATsolver for the optimal solution or feasible solutions with acceptable performance. )is paper also presents a case study in Shanghai and compares the results from the FJSP model and the first-come first-serve (FCFS)method.)e result demonstrates the allocation of routes and chargers undermultiple scenarioswith different numbers of chargers. )e results show that the FJSP model shortens the delay and increases the time conservation for future rounds of operation than FCFS, while FCFS presents the simplicity of programming and better computational efficiency.)emultiple random input test suggests that the proposed approach can decide the minimum number of chargers for stochastic charging requests. )e proposed method can conserve the investment by increasing the utilization of automated recharging devices, improving vehicles’ in-depot efficiency.


Introduction
Developing high-efficient, safe, clean, and sustainable public transportation is always one of the essential issues for improving urban mobility in the era of severe urbanization across different continents [1][2][3]. e application of new technology brings public transit systems onto a new stage of electrification, automation, and rapidness. e U.S. Department of Transportation has painted a bright roadmap to enable automation for future transportation [4], where the automation of transit bus systems plays an important role. Reports published by FTA explored two major automation scenarios-low-speed shuttle buses [5] and automated transit lines [6]-which sketched the contours of the current techniques and future applications for transit automation.
e Chinese Ministry of Transport also issued the transitoriented cities action, which encourages cities to stimulate automated electric vehicles for bus rapid transit (BRT) systems. Considering the current safety and efficiency concerns, BRT with the exclusive right-of-way performs as the first playground for realizing automation. Cities in China, such as Harbin and Changsha, have approved the automated electric buses and deployed them to BRT for commercial operation from late 2018 to early 2019. e recent development of automated electric bus rapid transit systems brought new technical issues beyond the conventional transit planning and operation methodology. Ceder et al. concluded the four-step method for transit line designing, including (1) network and line planning, (2) timetabling according to demands, (3) vehicle scheduling for timetable, and (4) staff scheduling for vehicles [7,8]. e scheduling problems in transit operation had been studied for many years but are still a hot topic that attracts researchers to study [9,10].
For electrified buses, recharging scheduling arises beyond the four-step approach as a new issue. Existing studies had integrated the recharging requests into the timetables to schedule the electric vehicles more reasonably according to recharging and energy consumption features [11]. Li et al. proposed an integrated approach to planning the bus network scheduling considering the station chargers positioning [12]. Teng et al. modeled a multiobjective optimization problem of integrated timetabling and vehicle scheduling considering vehicle recharging [13]. One of their results is in Figure 1, which exports the service trips and charging requests.
A subsequent problem is how to allocate chargers within the depot according to the required recharging plans. e method in [12] can assign charge depots for vehicles but cannot specifically allocate chargers. Although the article [13] generates schedules including trip periods and recharging periods, the allocation and occupancy scheduling of the charging devices in the depot is beyond their concerns. Note that the vehicles requested charging periods overlap with each other, while it is possible to arrange the utility of chargers better, reduce the vacant period, and save investment on charging devices.
In-depot planning had not arisen as a problem for humandriven buses. In practice, the recharging procedure is manually scheduled and directed on the spot. However, the humanbased on-spot assignment is not as efficient as an algorithm and would be the gap toward the complete automation. e article [14] proposed a recharging devices planning method from the energy consumption perspective, which could allocate and schedule charging devices utilizing a logic-based assignment approach. One of the logic-based approaches is to adopt the first-come first-serve (FCFS) principle and model it via simulation. Besides the charger allocation, another problem is to plan paths for vehicles to designated chargers. Automated fleet requires routing and recharging in the depot automatically from its entry to exit. Hence, the in-depot routing and recharging scheduling (IDRRS) contributes to the complete automation for automated bus operation. e problem addressed in this paper is to decide the routing and recharging schedule for in-depot automation. At the current stage, vehicles can automatically operate on routes; and on the other end, the robotic devices can plug in the chargers. e in-depot automation would bridge the gap between the onroute automated driving and in-depot automatic plug-in recharger. is paper presents an integrated routing and charging scheduling problem, which is modeled as a flexible job-shop scheduling problem (FJSP) and is solved through a constraint programming (CP) with Boolean satisfiability conditions (SAT) approach. A case study is conducted in Shanghai, and the solutions of the FJSP model and FCFS method are compared. Finally, the paper provides suggestions on deciding the number of recharging devices and the application of FJSP vs. FCFS.

Problem Setting
For this problem, the prerequisite is that the timetables have been preplanned and the vehicles have been scheduled to fulfill the timetable [8].
e online time, off-line time, and recharging period should have been given by the operation plan. Electric buses will return to the depot for recharging after operation for several rounds. Although vehicles' schedule indicates the arrival time and departure time to and from the depot, the in-depot path selection, charging device assignment, sequencing, and scheduling according to the constraints of availability and capacity of space and devices have not been studied yet. is paper aims to solve the problem of in-depot routing and recharging scheduling (IDRRS), which decides the route arrangement and charger allocation and scheduling the recharging process within the depot.
Supposing a scenario that a depot of the transit line is divided into two major areas: a parking area and a charging area (as shown in Figure 2(a)). e parking area consists of several parking spaces, which allow vehicles to wait. e charging area consists of several parking spaces equipped with automated charging devices and enabling vehicles to be recharged.
e two sites are connected by two or more corridors such that vehicles can move from one area to the other. From the arrival of an automated electric bus at the depot to the departure of it, the automation recharging procedure can be divided into the following steps: (0) e vehicle finishes the previous round of operation and arrives at the parking lot waiting for recharging (1) e vehicle leaves the parking spaces and heading for the charging spaces through a path (path 1 or path 2 in this scenario) (2) e vehicle recharges at one of the charging spaces (3) e vehicle leaves the charging spaces and heading for the parking spaces through a path (path 1 or path 2 in this scenario) ( * ) e vehicle waits for the next round of operation Steps 1, 2, and 3 are the primary three steps that require occupancy allocation and scheduling. In this paper, we need to decide the moving path for steps 1 and 3 and the charging spaces for step 2 as well as the schedule for them. e following problems should be addressed, which are twofold: (1) Assignment problem: to decide the route of each vehicle (for instance, whether the vehicle will go through path 1 or path 2 when moving from the parking area to the charging area and vice versa); and to decide which charging space to recharge for each vehicle (2) Scheduling problem: to schedule the occupancy for charging spaces and paths, which determines the time that each vehicle leaves the parking space, the time that each vehicle starts recharging, the time that each vehicle finishes recharging, and the time that each vehicle returns to the parking space

e Model Based on Flexible Job-Shop Scheduling Problem (FJSP).
e IDRRS problem presents similar characteristics to the job-shop scheduling problem (JSP), which is a branch problem of the operation research area. JSP is widely applied in manufacturing [15], logistics [16], computer processor parallel scheduling [17], and transit, railway, and flight operation planning [18][19][20]. ere is a set of jobs in the JSP that consists of several steps, and a set of machines is to process the steps [21]. However, JSP is limited in customizing the differentiation on jobs, machines, and the processing sequence. Consequently, flexible JSP (FJSP) extends JSP where jobs can be heterogeneous on the time consumption of different processing steps, machines can be different in processing time for different job steps, and jobs can be processed on any one of the machines. FJSP is complex and continuously attracts researchers until now [22][23][24] though the problem had been proposed for many years. In this paper, the modeling of the IDRRS problem follows the representation manner of FJSP. In our problem, the set of vehicles can be regarded as the set of jobs in FJSP, the set of paths and charging spaces can be regarded as the set of machines, and the steps of moving-recharging-moving can be regarded as the processing sequence, where moving can only occupy the paths and the recharging can only happen at charging spaces. However, our problem shows many differences with the general FJSP on constraints and objectives. Follows depict the model for the IDRRS problem derived from FJSP considering the different characteristics of the problem to the general FJSP.
Given a set of recharging tasks of vehicles denoted as set V � V n , 1 ≤ n ≤ N . Note that one vehicle is possible to be planned several times of recharging tasks during a day (referring to Figure 1). A vehicle can be associated with one or several tasks, and a task in V is only bonded to one vehicle. Let set C � C m , 1 ≤ m ≤ M be the charging spaces. Let set P � P k , M < k ≤ M + K be the paths through which the vehicles can move from the parking area to the charging area, where k numbers the sequence of paths following the sequence of charging spaces. C and P can be regarded as the equal position of "service" and combine as the service set I � C ∩ P. Vehicles will go through a three-step procedure, including moving on one of the paths toward the charging spaces, recharging on one of the charging spaces, and moving on one of the paths back to the parking spaces (as shown in Figure 3). e preplanned timetabling and vehicle scheduling provides inputs, including the arrival time t 0n of V n at the depot, the required charging time length l nsm of V n at charging device m, the moving time length l nsk on path k, and the scheduled departure time t 1n for the next round of operation from the depot. Note that the recharging procedure deterministically consists of three steps as movingrecharging-moving, the parameters of time are also known as l n1k , l n2m , and l n3k . e representation of the parameters is also flexible and extensible for a larger problem with more routes and chargers.     Journal of Advanced Transportation e problem is to solve the following decision variables (binary): x nsi indicates the occupancy of the processing step s of vehicle V n on place (path or charging space) i, τ ns denotes the finish time of step s of vehicle V n , and T n denotes the time that all three steps of V n have been finished.
Note that the finish time T n is possible to be later than the originally scheduled departure time due to the number and capacity limitation of charging spaces, which causes the delay. For each V n , there is a delay d n � T n − t 1n , which could be either positive or negative. Positive means that the finish time of recharging is behind schedule and the next round of operation will be postponed. Negative means that the recharging is ahead of schedule, and the vehicle would wait for the next trip. In this paper, the objective is to finish all recharging tasks as early as possible, i.e., to reduce the total delay.

Modeling Based on FJSP.
is study was based on a constraint programming manner derived from the article [25]. e original version of the formulation of FJSP as constraint programming is described as follows.
Giving a set of n jobs as J � J i , 1 ≤ i ≤ n , a set of m machines as M � M k , 1 ≤ k ≤ m . Each job J i will be processed through n i steps by some of the machines on a given sequence. Let O ij denote the jth step of job J i , and let the set of machines be M ij ⊆M that ∀M k ∈ M ij is able to process job J i . e processing time (duration) for step O ij on machine M k is denoted as t ijk . Let C i be the time that all steps of job J i have been finished, and let C ij be the time that step O ij has been finished. e FJSP is to assign appropriate machines and to decide the starting time for each step of each job under the constraints of processing sequences and conflict of processing time on each machine, to minimize the makespan (the maximum processing time to finish all jobs). P1: k∈M ij where the decision variables are Objective (1) is to minimize the makespan of all jobs. Constraint equation (2) is to ensure that the finish time of the first step of each job should be later than the processing time of it (supposing the initial time of each job is 0). Equation (3) is the constraint of the processing sequence that the finish time of step O ij should be later than the finish time of the previous step O i(j−1) plus the processing time of the current step. Equation (4) is to determine the finish time of all steps of each job. Equation (5) is to ensure that one step of a job can only be assigned to at least one and only one machine. Equation (6) defines the decision variables as 0-1 variables.

Constraint Programming of IDRRS Based on FJSP.
e IDRRS problem under an FJSP modeling manner can be formulated as follows.
P2: Step S1 Step S2 Step S3  Journal of Advanced Transportation i∈I ns In this model, the decision variables are x nsi (equals 1 if O ns is processed at place i, and equals 0 otherwise) and τ ns (the time that step s of vehicle V n has been finished). Note that x nsn′s′i and T n are auxiliary variables in this model. Objective (7) is to minimize the total delay to the planned departure time for the next round of service for all vehicles. Constraint equation (8) ensures that the finish time of the first step (leaving the parking space and arriving at the charging space) of each vehicle should be later than the moving time consumption of it through one path. Equation (9) is the constraint of the processing sequence that the finish time of step O ns should be later than the finish time of the previous step O n(s−1) plus the processing time of the current step for each vehicle V n . Specifically, the finish time of O n(s−1) should be equal to the start time of O ns in this problem because the vehicle should instantly get into recharging after occupying the moving path and should instantly get into moving step once finishing recharging, while for typical FJSP, a job can be idled when waiting for subsequent processing steps. Equation (10) determines the finish time for each vehicle to be recharged and returned to the parking spaces. Equation (11) ensures that the following step at one place (either on a path or at a charger) can only start after the previous occupancy is finished. In other words, this constraint is also to avoid the time conflict that each space can only hold one vehicle at a time. Note that the constraint is formulated as a logical expression that binary variables multiply together. Equation (12) ensures that a vehicle should be assigned to at least one place and can only be assigned to one place during the three-step recharging procedure. Equation (13) establishes a connection between two occupancies at one place, which is to ensure that the processing sequence at a place should be unique. Supposing that a procedure O ns is processed at place i, there could be a procedure O n′s′ processed after or before O ns at place i. In the logical expression, "∨" is a logical operator that expresses "or" between two logic expressions. At least one of the two logic expressions should be satisfied in the model, which means an occupancy that happens at a place should be processed before or after another occupancy. And this is the Boolean satisfiability condition (SAT). Equation (14) is to specify that the starting time to process vehicle V n should be later than the time that vehicle V n arriving at the parking spaces of the depot. Equation (15) relaxes the constraint of finish time so that the finish time is allowed to be behind schedule for the next round operation, and the delay is captured by this equation.

Solution Approach.
e JSP has been mentioned as an NP-hard problem by literature [16,[26][27][28], as well as the problem proposed in this paper which can be reduced to an FJSP-like problem. Hence, recent studies mostly focus on improving the performance of solution algorithms. Heuristic approaches were widely tested to solve the FJSP and were reported as effective as applicable, e.g., the genetic algorithm [29,30], the tabu search algorithm [25], the particle swarm algorithm [22], the ant colony algorithm [31], and the whale algorithm [24].
ose studies aim to find feasible solutions for practice.
On the other hand, researchers [19,23,26] attempted to formulate the JSP through a mathematical programming approach, namely the mixed integer linear programming (MILP). MILP can be solved by many commercial solvers, e.g., CPLEX and Gurobi, and the optimal solution can be reached for problems at a limited scale. However, MILP requires strict constraints on processing sequences as inputs and loses flexibility on selecting jobs and machines, which results in difficulties in modeling FJSP as MILP. It was reported that the FJSP is hardly to avoid logic expressions with "AND" and "OR" operations, and the formulation of FJSP in MILP would be very complex [32].
Others modeled FJSP as a constraint programming (CP) manner with a simpler representation than mathematical programming [25,33,34]. It should be noted that the CP approach had been practiced in many transportation problems [35][36][37]. In our problem, the logic expressions (also known as Boolean conditions) such as equations (11) and (13) change the problem into a CP manner. ese equations introduce the Boolean satisfiability (SAT) conditions as constraints for the model. SAT is the problem to test the result of a group of Boolean expressions and find feasible Boolean solutions for a given result of the Boolean expressions [38]. SAT had been proved as the first NP-complete problem that any problem which can be reduced to SAT can be solved by SAT solvers, as long as there was a high-performance SAT solver.
In this paper, the integrated routing and charging schedule problem is formulated as CP with SAT constraints. To solve the problem, we introduced the Google's OR-Tools and applied their state-of-the-art CP-SAT solver [39] to this model. e solution approach is based on a CP solver, and the CP solver is on top of a SAT solver. We programmed this problem according to the JSP library of OR-Tools and the ongoing sources of FJSP and implemented the different major constraints for our problem. e solving case will be further presented in the case study section.

Minimum Number of Chargers.
e IDRRS based on FJSP requires a known number of chargers. In most circumstances, the number of utilized chargers is unknown. But it can be determined if all the charging requests can be satisfied. Investment in charger construction will be reduced if fewer chargers are required.
is section proposes a method to determine the minimum number of chargers that can satisfy the operation.
We propose an enumerative approach to determine the number of chargers. By increasing the number of chargers, we can observe the performance of the scheduling result. An appropriate standard to determine the number of chargers is that the chargers can be sufficiently utilized, no positive delay occurs, and the bus service trip punctuality can be guaranteed. e following algorithm (shown in Figure 4) is adopted in this paper. We explain this procedure as follows: (1) Initialization: let C � ∅. Initialize the IDRRS model with known inputs.

Description of the Scenario.
To test the method proposed in this paper, we selected an electric bus transit depot in Anting Town, Shanghai, China, as the case study. e depot serves two electric bus lines-Line A and Line B-which are illustrated in Figure 5. e depot is near the west terminal of the two lines. ere are 25 parking spaces for buses in the parking area of the depot. Other 15 places, most inside the depot, are available to install the charging devices. Figure 6 presents the timetables and vehicle assignment of Line A and Line B, where the dark bars show the prescheduled charging requests. Sixteen buses of Line A and seven buses of Line B align on the vertical axis, which would be deployed into operation. e vehicles will serve for several rounds and then return to the depot for recharging. Vehicles would be recharged once or twice per day according to the schedule. e horizontal axis of Figure 6 unfolds the period that is out of operation.
Our mission is to decide the in-depot routing and the time and space occupancy of recharging spaces. Each dark bar in Figure 6 is numbered as a charging request and indicates the time span to finish recharging the battery of the vehicle. Note that the recharging period can be flexible within the range from the arrival time to the departure time. If the recharging procedures' finish time were later than the departure time, the following service trip of the vehicle would be delayed. A realistic objective is to finish all the recharging tasks as early as possible and avoid the potential delay that would impact the periodic operation.      Figure 6: Timetables of two transit lines basing at the depot.

Results Presentation
Journal of Advanced Transportation 7 32 on path 2 following task 30. After that, tasks 19, 30, and 32 were allocated to chargers 4, 2, and 3, respectively. During the following schedule, some recharging requests come while the charging spaces have already been occupied, which let the following arrivals wait for clearance, e.g., task 28 waits until task 1 finishes. Some delays occur because of the unavailability of charging spaces, which let the following service trips fall behind the schedule. Note that six tasks in red (including tasks 42, 28, 3, 24, 6, and 25) are postponed. Supposing the scenario of eight charging spaces and two paths, a feasible solution presented in Figure 7(b) (B1) successfully assigned the 42 charging tasks to the charging spaces without any delay. All the tasks are finished before the next round of operation.

Comparison between FJSP and FCFS.
In this research, we nominate the FCFS (namely, first-come first-serve) principle as the benchmark to compare the routing and charging schedule results. e reason is that the FCFS is the briefest method to cope with the IDRRS problem. FCFS is a classic resource assignment method by which the incoming tasks will wait and be sequentially assigned to a vacant service. In this case, the vehicle arriving at the parking area will be assigned to a path if there is a vacant path and then a vacant charging device. Otherwise, the vehicle should be waiting at the parking area for clearance. After finishing moving on the path, the vehicle would be allocated to a charging space. e vehicle would be continuously idling at the parking space after finishing recharging until at least one of the paths is  clear to pass. All the vehicles will be served according to their arrival sequence. In this paper, we constructed a discrete event simulation (DES) program to model the FCFS principle. e results produced by the FCFS approach are also included in Figure 7, where A2 and B2 illustrate them. For the scenario of four charging spaces (shown in Figure 7(a) (A2)), the FCFS method produces heavier total delays than the FJSP method. e FJSP model leaves six tasks behind schedule, while the FCFS method let eight tasks be delayed.
is result suggests that FJSP performs better on reorganizing the service sequence to finish every recharging task as early as possible, while FCFS only serves as the order of arrival sequence. For the scenario of eight charging spaces and two paths (Figure 7(b)), the FCFS model successfully allocated all 42 tasks to charging spaces and paths without delay to the planned schedule as well as the FJSP.

Sensitivity Analysis for Different Numbers of Chargers.
e performances of the FCFS and FJSP are also different when searching for the minimum number of chargers using the enumerate algorithm. We started from one charger serving all the 43 charging requests and then added chargers until no delayed trip occurred (Figure 8). When the number of chargers is less than eight, the charging resources are limited, and the chargers cannot serve all charging requests punctually. However, FJSP reduced the number of delayed trips by improving resource allocation.
To evaluate the effectiveness of the FJSP model with CP-SAT solution approach, we adopt the delay of unpunctual vehicles, the conserved time of nondelayed vehicles, and the total delay (which is also FJSP's objective) as the indicators. Figure 9 reveals the performance comparison between FCFS and FJSP. FJSP performs better than FCFS overall. Figures 9(a)-9(c) imply the advantage of FJSP when charging resources are insufficient. FJSP reduces the total delay of the delayed vehicles (Figure 9(a)), which would mitigate the impacts to the following service trips when the number of chargers is not adequate. FJSP also can conserve more reconditioning time for vehicles in the depot (Figure 9(b)) by optimizing chargers allocation. From the perspective of total delay (the optimization objective of FJSP), FJSP achieves a lower curve than FCFS (Figure 9(c)), which indicates FJSP can reach better solutions. However, Figure 8 suggests that FJSP and FCFS are close when the chargers are adequate to serve the charging requests. Figure 9(d) shows the total delay when the number of chargers goes up to eight, where no delayed trip occurs. FJSP still achieves lower objective values than FCFS, though the relative difference is minor. For FJSP, the minimums do not drop since the number of chargers is nine, which implies that more chargers would not be utilized.

Performance of the Solution Approach.
e CP-SAT solver is a potent tool for solving the complex FJSP through constraint programming. Time consumption is a key performance indicator for practice. Figure 10 shows the contrast of computational time of FCFS and FJSP. Note that FCFS is to the left y-axis and FJSP is to the right. FCFS exports result in 12 seconds, and the time consumption drops with the increment of available chargers. e time consumption of FJSP is above hundred seconds when it exports the last found solution before the solving time expired. We set 1500 s as the maximum solving time. During the solving process, the optimal solution is not always guaranteed in a practically acceptable period. e number of chargers from 1 to 8 reported feasible solutions found until the maximum solving time, while the number of chargers from 9 to 12 reported optimum and terminated computing directly. FCFS presents higher efficiency than FJSP.
To see the convergence process to reach the minimum, in this study, we tested the scenarios with an increasing number of chargers from 1 to 12, and the dropping progresses of the objective total delay are captured in Figure 11. We present the dropping processes of the objective with the iteration steps and time-lapse in this figure. When the chargers are not adequate (e.g., from 1 to 8), the objective of total delay cannot reach the absolute minimum (Figure 9(d) also supports this). e solver spent more time seeking lower objective values (Figure 11(a)). It only reported feasible solutions when the process ended at a maximum compute time of 1500 seconds. However, if the number of chargers is sufficient, the objective values drop to near optimum very soon (Figure 11(b)) in about 0.2 seconds. If the absolute minimum is not compulsory, the CP-SAT solver can achieve high-quality solutions for practice. Note that the solutions around 0.2 seconds are not optimum. e solver reported optimal solutions found is around 200-400 s according to Figure 10.

Pressure Test
We conducted multiple random input tests to examine the feasibility of FCFS and FJSP under complex scenarios. is test exports the minimum number of chargers for different random charging requests. In the previous study, we applied 42 charging requests from 23 vehicles. In this section, we simulated several groups of random charging requests from 10 to 100. Each group contains ten randomly generated charging requests. Figure 12 shows the results in the boxplots.
e number of chargers increases with the increment of the number of charging requests. We set 50 chargers as the maximum condition. In the scenario of 10 random demands, both FCFS and FJSP require 2-3 chargers. In the scenario of 60 demands, FCFS requires 13 chargers on average, while FJSP requires 10. It suggests that FJSP can perform better than FCFS toward stochastic requests. However, the results jump to 50 chargers rapidly at 70 for FCFS and at 80 for FJSP. We found that the capacity of paths became the bottleneck that limits the utility of newly added chargers. Vehicles kept delaying, and new chargers were vacant if the paths were blocked, which let the algorithm go for more chargers, but it cannot avoid delayed trips.
After enlarging the number of paths to four, the system can handle demands from 70 to 100. e number of chargers below 18 is adequate for 100 charging requests in our case. Note that FCFS and FJSP presented nonsignificant differences in predicting the number of chargers in this scenario.

e Solution Feasibility of CP.
Multiple tests in sensitivity analysis suggest that the CP-SAT solution algorithm might not always accomplish the optimum. For instance, in scenario A1 in Figure 7(a), task 10 arrives earlier than task 13, and task 10 will leave earlier than task 13, but task 10 was arranged later than task 13. Other better solutions might exist, and the current results may not be the local optimal. e solver also did not report optimum when the number of chargers is not adequate. e tests under different scenarios were also reported as feasible instead of optimal. Our study reveals that the CP-SAT for FJSP converges to high-quality feasible solutions slowly if the charging resources are not enough. Still, it is fast to get high-quality feasible solutions, or even optimum, if resources are abundant. e feasibility issue is mainly because the CP-SAT algorithm is based on an integer approach. e CP-SAT solves fast for small integer conditions, but in our problem, the time horizon would be discretized at a minute-level resolution, which causes the time integers up to 1440 minutes for a day.
e algorithm would traverse all integers and branches, which increases the computational consumption. A possible way is to sacrifice the time accuracy and aggregate the time resolution into 5 minutes or 10 minutes, which would be helpful to reduce the branches created by large integers. Nevertheless, the CP-SAT solver is already practicable to provide well-performed solutions within an acceptable period to predetermine in-depot routing and scheduling plan after the operation schedule had been decided.

e Application of FJSP vs. FCFS.
e FJSP model performs better than FCFS on reducing delays. e drawbacks of FCFS are twofold. One is that the sequential occupation of paths and charging spaces causes pauses and waiting. It results in the vacant interval that the charging space might be idled for a while between serving two charging tasks. is phenomenon causes a waste of time and delays the overall procedure. e other one is that FCFS serves according to the arrival sequence, while the FJSP rearranges the sequence to tightly satisfy vehicles, which reduces the overall timespan and interval time waste.
However, FCFS runs faster than FJSP and is logically simpler than FCFS for implementation. If the number of charging spaces is adequate or if the investment of automated charging devices is not an issue for the operator, the FCFS can produce solutions approximate to the FJSP (according to Figure 9(d)). However, for fewer charging spaces, the FJSP is preferred to improve the utilization of the devices and reduce delay. Hence, we suggest using FJSP to optimize the utility of resources if the number of chargers may not be enough. Since FJSP still finds close but better solutions than FCFS when the resource is enough, we also advise using FCFS to locate the best number of chargers rapidly and then use FJSP to optimize the schedule.

To Decide the Number of Charging Devices.
e investment in recharging space construction and device installation is also one consideration for automated electric bus depot management and operation. Overestimation of the number of charging devices causes waste of money and utilization, and the underestimation causes a delay that impacts the on-time operation and limits the overall capacity.
Our pressure test study presents a viable performance of our method to decide the number of chargers ( Figure 12) under stochastic charging requests. e method can generate a robust number of chargers to fulfill randomly occurred demands from a simulation approach. e minimum number of chargers is also feedback to the planning of the line's operation and charging schedule, which requires avoiding intensive charging tasks.

Conclusions
e operation of electric bus transit systems requires scheduling for battery recharging. e existing studies on timetabling and vehicle scheduling for electric buses provide a timetable for each vehicle on operation trips and recharging periods but could not provide a detailed schedule on charging device allocation and charging sequence assignment in the depot. Current technical progress could realize automated bus vehicle driving for an exclusive bus rapid transit scenario and the robotic plug-in recharging in the depot. At the same time, the in-depot routing and recharging scheduling are still the obstacles to the complete automation of bus transit operation. In this paper, we concern about the integrated routing and recharging scheduling in the depot to implement the overall automation. e problem presents similar characteristics to the flexible job-shop scheduling problem but is with more substantial constraints and a different objective. Based on the FJSP model, the paper formulates the problem as a constraint programming problem and adopts Google's CP-SAT solution approach to solve the model. e feasible solution of the FJSP model with CP-SAT solver shows good performance on reducing the total time span and reorganizing the sequence of routing and charging. is paper may also contrast the proposed FJSP with the first-come first-serve method and reveals that the FJSP model could shorten the delay and increase the time conservation for future rounds of operation than FCFS, while FCFS presents the simplicity of programming and better computational efficiency. For FJSP vs. FCFS, we discovered that the result of FCFS approximates FJSP if the number of recharging spaces is adequate, while the FJSP is quite helpful to maximize the utilization of recharging devices and reduce the investment in the construction of automated recharging machines.
is study performed the model and algorithm on a realistic depot with two paths and several charging spaces for two electric bus lines in Shanghai. Future studies may consider depots with more complex structures and procedures, e.g., considering more complex routing conflicts or involving maintenance and cleaning jobs for the vehicles. e method of this paper is subject to the predetermined operation and recharging plans by the existing timetabling and vehicle scheduling. However, existing methods can hardly consider the constraints of availability, capacity, and time occupancy of the charging devices. With the recharging device constraints known, the overall operation plan could be rescheduled and further optimized to utilize vehicles and recharging devices better.