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

Authors: Lei Wang; Wanjing Ma; Ling Wang; Yongli Ren; Chunhui Yu
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

The 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. This 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). The model is converted to a flexible job-shop problem (FJSP) and is feasible to be solved by a CP-SAT solver for the optimal solution or feasible solutions with acceptable performance. This paper also presents a case study in Shanghai and compares the results from the FJSP model and the first-come first-serve (FCFS) method. The result demonstrates the allocation of routes and chargers under multiple scenarios with different numbers of chargers. The 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. The multiple random input test suggests that the proposed approach can decide the minimum number of chargers for stochastic charging requests. The proposed method can conserve the investment by increasing the utilization of automated recharging devices, improving vehicles’ in-depot efficiency.


---

## Body

## 1. 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–3]. The application of new technology brings public transit systems onto a new stage of electrification, automation, and rapidness. The 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. The Chinese Ministry of Transport also issued the transit-oriented 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.The 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]. The 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.Figure 1
Timetable and vehicle schedule of transit No. 750 in Shanghai (result from reference [13]).A subsequent problem is how to allocate chargers within the depot according to the required recharging plans. The 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 human-driven buses. In practice, the recharging procedure is manually scheduled and directed on the spot. However, the human-based on-spot assignment is not as efficient as an algorithm and would be the gap toward the complete automation. The 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.The 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. The in-depot automation would bridge the gap between the on-route automated driving and in-depot automatic plug-in recharger. This 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.


## 2. 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]. The 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. This 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 Figure2(a)). The parking area consists of several parking spaces, which allow vehicles to wait. The charging area consists of several parking spaces equipped with automated charging devices and enabling vehicles to be recharged. The 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)
The vehicle finishes the previous round of operation and arrives at the parking lot waiting for recharging(1)
The vehicle leaves the parking spaces and heading for the charging spaces through a path (path 1 or path 2 in this scenario)(2)
The vehicle recharges at one of the charging spaces(3)
The vehicle leaves the charging spaces and heading for the parking spaces through a path (path 1 or path 2 in this scenario)(∗)
The vehicle waits for the next round of operationFigure 2
Problem setting of integrated routing and charging scheduling problem. (a) Assignment problem: to assign passing route and charging spaces. (b) Scheduling problem: to schedule the occupancy of paths and charging spaces.
(a)(b)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.The 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


## 3. Method

### 3.1. The Model Based on Flexible Job-Shop Scheduling Problem (FJSP)

The 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–20]. There 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–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 setV=Vn,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=Cm,1≤m≤M be the charging spaces. Let set P=Pk,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).Figure 3
Flowchart of procedures to recharge vehicles.The preplanned timetabling and vehicle scheduling provides inputs, including the arrival timet0n of Vn at the depot, the required charging time length lnsm of Vn at charging device m, the moving time length lnsk on path k, and the scheduled departure time t1n for the next round of operation from the depot. Note that the recharging procedure deterministically consists of three steps as moving-recharging-moving, the parameters of time are also known as ln1k, ln2m, and ln3k. The representation of the parameters is also flexible and extensible for a larger problem with more routes and chargers.The problem is to solve the following decision variables (binary):xnsi indicates the occupancy of the processing step s of vehicle Vn on place (path or charging space) i, τns denotes the finish time of step s of vehicle Vn, and Tn denotes the time that all three steps of Vn have been finished.Note that the finish timeTn 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 Vn, there is a delay dn=Tn−t1n, 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.


### 3.2. Modeling Based on FJSP

This study was based on a constraint programming manner derived from the article [25]. The original version of the formulation of FJSP as constraint programming is described as follows.Giving a set ofn jobs as J=Ji,1≤i≤n, a set of m machines as M=Mk,1≤k≤m. Each job Ji will be processed through ni steps by some of the machines on a given sequence. Let Oij denote the jth step of job Ji, and let the set of machines be Mij⊆M that ∀Mk∈Mij is able to process job Ji. The processing time (duration) for step Oij on machine Mk is denoted as tijk. Let Ci be the time that all steps of job Ji have been finished, and let Cij be the time that step Oij has been finished. The 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:(1)minF=max1≤i≤nCi,(2)s.t.Ci1≥∑k∈Mi1ti1kxi1k,∀i=1,…,n,(3)Cij−Cij−1≥∑k∈Mijtijkxijk,∀j=2,…,ni,∀i=1,…,n,(4)Cini≤max1≤i≤nCi,∀i=1,…,n,(5)∑k∈Mijxijk=1,∀j=1,…,ni,∀i=1,…,n,where the decision variables are(6)xijk=1,Oijis processed onMk0,otherwise∀i=1…n,∀j=1…ni,∀k∈Mij.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 Oij should be later than the finish time of the previous step Oij−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.


### 3.3. Constraint Programming of IDRRS Based on FJSP

The IDRRS problem under an FJSP modeling manner can be formulated as follows.P2:(7)minF=∑n=1Ndn,(8)s.t.τn1≥∑i∈In1ln1ixn1i,∀n=1,…,N,(9)τns−τns−1=∑i∈Inslnsixnsi,∀s=2,…,Sn,∀n=1,…,N,(10)τnSn≤max1≤n≤NTn,∀n=1,…,N,(11)τn′s′−τns−lnsixnsixn′s′ixnsn′s′i≥0,∀s=1,…,Sn,∀s′=1,…,Sn′,∀n,n′=1,…,N,∀i∈Ins∩Ins′,(12)∑i∈Insxnsi=1,∀s=1,…,Sn,∀n=1,…,N,(13)∑n′=1N∑s′=1Sn′xnsn′s′i=xnsi∨∑n′=1N∑s′=1Sn′xn′s′nsi=xnsi,∀s=1,…,Sn,∀n=1,…,N,∀i∈I,(14)τn1−ln1i≥t0n,∀n=1,…,N,∀i∈I,(15)dn=Tn−t1n,∀n=1,…,N.In this model, the decision variables arexnsi (equals 1 if Ons is processed at place i, and equals 0 otherwise) and τns (the time that step s of vehicle Vn has been finished). Note that xnsn′s′i and Tn 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 Ons should be later than the finish time of the previous step Ons−1 plus the processing time of the current step for each vehicle Vn. Specifically, the finish time of Ons−1 should be equal to the start time of Ons 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 Ons is processed at place i, there could be a procedure On′s′ processed after or before Ons 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 Vn should be later than the time that vehicle Vn 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.


### 3.4. Solution Approach

The JSP has been mentioned as an NP-hard problem by literature [16, 26–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]. Those 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–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. These 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. The 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. The solving case will be further presented in the case study section.


### 3.5. Minimum Number of Chargers

The 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. This 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. The following algorithm (shown in Figure4) is adopted in this paper. We explain this procedure as follows:(1)
Initialization: letC=∅. Initialize the IDRRS model with known inputs.(2)
Adding charger: add a charger intoC and update other parameters related to the number of chargers.(3)
Execute the model: execute the IDRRS model with known inputs and the current number of chargers.(4)
Export delays: if∃dn>0,∀n=1,…,N, go back to step (2); else, go to step (5).(5)
Get the current number of chargers inC as the appropriate number of chargers.Figure 4
Flowchart to enumerate the minimum number of chargers.


## 3.1. The Model Based on Flexible Job-Shop Scheduling Problem (FJSP)

The 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–20]. There 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–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 setV=Vn,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=Cm,1≤m≤M be the charging spaces. Let set P=Pk,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).Figure 3
Flowchart of procedures to recharge vehicles.The preplanned timetabling and vehicle scheduling provides inputs, including the arrival timet0n of Vn at the depot, the required charging time length lnsm of Vn at charging device m, the moving time length lnsk on path k, and the scheduled departure time t1n for the next round of operation from the depot. Note that the recharging procedure deterministically consists of three steps as moving-recharging-moving, the parameters of time are also known as ln1k, ln2m, and ln3k. The representation of the parameters is also flexible and extensible for a larger problem with more routes and chargers.The problem is to solve the following decision variables (binary):xnsi indicates the occupancy of the processing step s of vehicle Vn on place (path or charging space) i, τns denotes the finish time of step s of vehicle Vn, and Tn denotes the time that all three steps of Vn have been finished.Note that the finish timeTn 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 Vn, there is a delay dn=Tn−t1n, 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.


## 3.2. Modeling Based on FJSP

This study was based on a constraint programming manner derived from the article [25]. The original version of the formulation of FJSP as constraint programming is described as follows.Giving a set ofn jobs as J=Ji,1≤i≤n, a set of m machines as M=Mk,1≤k≤m. Each job Ji will be processed through ni steps by some of the machines on a given sequence. Let Oij denote the jth step of job Ji, and let the set of machines be Mij⊆M that ∀Mk∈Mij is able to process job Ji. The processing time (duration) for step Oij on machine Mk is denoted as tijk. Let Ci be the time that all steps of job Ji have been finished, and let Cij be the time that step Oij has been finished. The 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:(1)minF=max1≤i≤nCi,(2)s.t.Ci1≥∑k∈Mi1ti1kxi1k,∀i=1,…,n,(3)Cij−Cij−1≥∑k∈Mijtijkxijk,∀j=2,…,ni,∀i=1,…,n,(4)Cini≤max1≤i≤nCi,∀i=1,…,n,(5)∑k∈Mijxijk=1,∀j=1,…,ni,∀i=1,…,n,where the decision variables are(6)xijk=1,Oijis processed onMk0,otherwise∀i=1…n,∀j=1…ni,∀k∈Mij.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 Oij should be later than the finish time of the previous step Oij−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.


## 3.3. Constraint Programming of IDRRS Based on FJSP

The IDRRS problem under an FJSP modeling manner can be formulated as follows.P2:(7)minF=∑n=1Ndn,(8)s.t.τn1≥∑i∈In1ln1ixn1i,∀n=1,…,N,(9)τns−τns−1=∑i∈Inslnsixnsi,∀s=2,…,Sn,∀n=1,…,N,(10)τnSn≤max1≤n≤NTn,∀n=1,…,N,(11)τn′s′−τns−lnsixnsixn′s′ixnsn′s′i≥0,∀s=1,…,Sn,∀s′=1,…,Sn′,∀n,n′=1,…,N,∀i∈Ins∩Ins′,(12)∑i∈Insxnsi=1,∀s=1,…,Sn,∀n=1,…,N,(13)∑n′=1N∑s′=1Sn′xnsn′s′i=xnsi∨∑n′=1N∑s′=1Sn′xn′s′nsi=xnsi,∀s=1,…,Sn,∀n=1,…,N,∀i∈I,(14)τn1−ln1i≥t0n,∀n=1,…,N,∀i∈I,(15)dn=Tn−t1n,∀n=1,…,N.In this model, the decision variables arexnsi (equals 1 if Ons is processed at place i, and equals 0 otherwise) and τns (the time that step s of vehicle Vn has been finished). Note that xnsn′s′i and Tn 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 Ons should be later than the finish time of the previous step Ons−1 plus the processing time of the current step for each vehicle Vn. Specifically, the finish time of Ons−1 should be equal to the start time of Ons 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 Ons is processed at place i, there could be a procedure On′s′ processed after or before Ons 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 Vn should be later than the time that vehicle Vn 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.


## 3.4. Solution Approach

The JSP has been mentioned as an NP-hard problem by literature [16, 26–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]. Those 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–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. These 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. The 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. The solving case will be further presented in the case study section.


## 3.5. Minimum Number of Chargers

The 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. This 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. The following algorithm (shown in Figure4) is adopted in this paper. We explain this procedure as follows:(1)
Initialization: letC=∅. Initialize the IDRRS model with known inputs.(2)
Adding charger: add a charger intoC and update other parameters related to the number of chargers.(3)
Execute the model: execute the IDRRS model with known inputs and the current number of chargers.(4)
Export delays: if∃dn>0,∀n=1,…,N, go back to step (2); else, go to step (5).(5)
Get the current number of chargers inC as the appropriate number of chargers.Figure 4
Flowchart to enumerate the minimum number of chargers.


## 4. Case Study

### 4.1. 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. The depot serves two electric bus lines—Line A and Line B—which are illustrated in Figure5. The depot is near the west terminal of the two lines. There 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 5
Directions of the lines and design of the depot.Figure6 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. The 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. The horizontal axis of Figure 6 unfolds the period that is out of operation.Figure 6
Timetables of two transit lines basing at the depot.Our mission is to decide the in-depot routing and the time and space occupancy of recharging spaces. Each dark bar in Figure6 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.


## 4.1. 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. The depot serves two electric bus lines—Line A and Line B—which are illustrated in Figure5. The depot is near the west terminal of the two lines. There 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 5
Directions of the lines and design of the depot.Figure6 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. The 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. The horizontal axis of Figure 6 unfolds the period that is out of operation.Figure 6
Timetables of two transit lines basing at the depot.Our mission is to decide the in-depot routing and the time and space occupancy of recharging spaces. Each dark bar in Figure6 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.


## 5. Results Presentation

The results are presented in the Gantt chart, where the vertical axis represents the charging spaces and the paths in numbering, and the horizontal axis represents the time span. The bars in the chart represent the occupation of the charging spaces and the paths on a timespan horizon.For instance, in Figure7(a) (A1), positions #1, #2, #3, and #4 denote the charging spaces, and positions #4 and #5 denote the paths. The numbers marked on the bars denote the ID of charging requests/movements. There are 42 charging tasks with different charging time lengths for the 23 vehicles in this case. The relationship of the 23 vehicles with the 42 charging tasks can be mapped through Figure 6. The 42 charging tasks are rearranged to charging spaces due to the availability of the spaces. The models consequently determine the routings between the parking area and charging area for each vehicle. The length of bars of the paths indicates vehicle occupancy on the path with a minimum time length for conflict avoidance. The length of the bars for charging space indicates the occupancy of the charging device correspondingly.Figure 7
Charging scheduling comparison under different scenarios. (a) Scheduling results of the scenario of 2 paths and 4 charging spaces. (b) Scheduling results of the scenario of 2 paths and 8 charging spaces.
(a)(b)Figure7(a) (A1) shows a feasible solution of routing and recharging scheduling, which is produced by the FJSP model and solved by the CP-SAT solver in the circumstance of four charging spaces and two paths. All of the 42 tasks are assigned to the chargers as well as their associated routing paths. The time occupancies of the chargers are also scheduled for the recharging tasks. For instance, tasks 19 and 30 arrive at 10 : 00 simultaneously, while task 32 arrives 10 minutes later; the solution of CP-SAT arranged task 19 on path 1 (position #5) first, task 30 on path 2 (position #6) subsequently, and then task 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 Figure7(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.


### 5.1. 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. The 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. The 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.The results produced by the FCFS approach are also included in Figure7, 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. The FJSP model leaves six tasks behind schedule, while the FCFS method let eight tasks be delayed. This 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.


### 5.2. Sensitivity Analysis for Different Numbers of Chargers

The 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 (Figure8). 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.Figure 8
Appropriate number of chargers when no delay occurs.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. Figure9 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.Figure 9
Performance comparison between FCFS and FJSP: (a) delay reduction when adding chargers, (b) nondelayed vehicles save time, (c) total delays drop, and (d) contrast for more chargers.
(a)(b)(c)(d)


### 5.3. Performance of the Solution Approach

The CP-SAT solver is a potent tool for solving the complex FJSP through constraint programming. Time consumption is a key performance indicator for practice. Figure10 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.Figure 10
Computational time comparison.The 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. The 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 Figure11. 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). The 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. The solver reported optimal solutions found is around 200–400 s according to Figure 10.Figure 11
Convergence iteration of CP-SAT solver for FJSP: (a) computational time of FJSP-CP-SAT solver and (b) zoomed computational time.
(a)(b)


## 5.1. 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. The 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. The 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.The results produced by the FCFS approach are also included in Figure7, 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. The FJSP model leaves six tasks behind schedule, while the FCFS method let eight tasks be delayed. This 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.


## 5.2. Sensitivity Analysis for Different Numbers of Chargers

The 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 (Figure8). 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.Figure 8
Appropriate number of chargers when no delay occurs.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. Figure9 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.Figure 9
Performance comparison between FCFS and FJSP: (a) delay reduction when adding chargers, (b) nondelayed vehicles save time, (c) total delays drop, and (d) contrast for more chargers.
(a)(b)(c)(d)


## 5.3. Performance of the Solution Approach

The CP-SAT solver is a potent tool for solving the complex FJSP through constraint programming. Time consumption is a key performance indicator for practice. Figure10 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.Figure 10
Computational time comparison.The 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. The 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 Figure11. 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). The 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. The solver reported optimal solutions found is around 200–400 s according to Figure 10.Figure 11
Convergence iteration of CP-SAT solver for FJSP: (a) computational time of FJSP-CP-SAT solver and (b) zoomed computational time.
(a)(b)


## 6. Pressure Test

We conducted multiple random input tests to examine the feasibility of FCFS and FJSP under complex scenarios. This 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. Figure12 shows the results in the boxplots.Figure 12
Minimum number of chargers for the larger scale of charging requests: (a) FCFS, two paths; (b) FJSP, two paths; (c) FCFS, four paths; (d) FJSP, four paths.
(a)(b)(c)(d)The 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. The 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.


## 7. Discussions

### 7.1. The 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 Figure7(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. The solver also did not report optimum when the number of chargers is not adequate. The 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.The feasibility issue is mainly because the CP-SAT algorithm is based on an integer approach. The 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. The 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.


### 7.2. The Application of FJSP vs. FCFS

The FJSP model performs better than FCFS on reducing delays. The 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. This phenomenon causes a waste of time and delays the overall procedure. The 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 Figure9(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.


### 7.3. To Decide the Number of Charging Devices

The 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 (Figure12) under stochastic charging requests. The method can generate a robust number of chargers to fulfill randomly occurred demands from a simulation approach. The minimum number of chargers is also feedback to the planning of the line’s operation and charging schedule, which requires avoiding intensive charging tasks.


## 7.1. The 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 Figure7(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. The solver also did not report optimum when the number of chargers is not adequate. The 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.The feasibility issue is mainly because the CP-SAT algorithm is based on an integer approach. The 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. The 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.


## 7.2. The Application of FJSP vs. FCFS

The FJSP model performs better than FCFS on reducing delays. The 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. This phenomenon causes a waste of time and delays the overall procedure. The 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 Figure9(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.


## 7.3. To Decide the Number of Charging Devices

The 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 (Figure12) under stochastic charging requests. The method can generate a robust number of chargers to fulfill randomly occurred demands from a simulation approach. The minimum number of chargers is also feedback to the planning of the line’s operation and charging schedule, which requires avoiding intensive charging tasks.


## 8. Conclusions

The operation of electric bus transit systems requires scheduling for battery recharging. The 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.The 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. The 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. This 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.This 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. The 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.



---

*Source: 5531063-2021-10-23.xml*