Abstract

Vehicle and crew scheduling is vital in public transit planning. Conventionally, the issues are handled sequentially as the vehicle scheduling problem (VSP) and crew scheduling problem (CSP). However, integrating these planning steps offers additional flexibility, resulting in improved efficiency compared with sequential planning. Given the ever-growing market share of electric buses, this paper introduces a new model for integrated electric VSP and CSP, called EVCSPM. This model employs the minimum cost flow formulations for electric VSP, set partitioning for CSP, and linking constraints. Due to the nonlinear integer property of EVCSPM, we propose a method that hybrids a matching-based heuristic and integer linear programming solver, GUROBI. The numerical results demonstrate the efficiency of our methodology, and the integrated model outperforms the sequential model in real-life scenarios.

1. Introduction

Developing public transit is the fundamental way to achieve sustainable urban development [1], which has been a widely discussed topic since the 1960s. Specifically, vehicle and crew scheduling are two major planning problems in public transport scheduling [2]. These problems aim at minimizing the operational costs associated with the fleet size and crew size required to ensure timely trips and compliance with labor crew regulations for efficient vehicle blocks and crew shifts [3]. Typically, these problems are approached separately, with the vehicle scheduling problem being addressed first, followed by the crew scheduling problem [4].

Ball et al. [5] contend that scheduling vehicles independently of the crew is not ideal for urban transportation, as crew cost typically outweighs vehicle operating cost. It is well established that integrating planning steps reveals more options and increases the solution space, leading to greater efficiency gains [6].

Furthermore, public transport operators face challenges transitioning from conventional diesel to electric vehicles (EVs) powered by batteries [7]. In recent years, the market share of EVs has experienced a significant increase [810]. On the 27th of January 2022, the Ministry of Transport issued the “14th Five-year Development Plan for Green Transportation,” which includes a goal of reaching 72% of EVs in urban public transport and making fully EVs the mainstream option in the bus market by 2025 [11]. Hence, we address the electric VSP (EVSP) and CSP simultaneously. The combination of these two problems is called the electric vehicle and crew scheduling problem (EVCSP).

Resource-constrained VSPs, including EVSP, are known to be NP-hard [12]. In addition, the single-based CSP is also NP-hard due to complex constraints arising from wage agreements and internal regulations [13]. The EVCSP falls into the category of NP-hard problems. It is considerably more challenging than the isolated problem [14], and it takes more time to solve optimally, particularly for real-world and large-size applications [15].

Only a few papers tackle the integrated vehicle and crew scheduling problem (VCSP) [4], and several discussions concern the electric version (EVCSP). Existing literature on VCSP (including EVCSP) models and algorithms is summarized in Table 1. To our knowledge, all models proposed in the literature fall into one of two classes [55]: (i) partial integrations and (ii) complete integrations that require decisions to be taken simultaneously.

Some early papers deal with partial integration [33]: (1) schedule vehicles using a heuristic approach in CSP, (2) include crew considerations in VSP, and (3) change vehicle schedules in CSP. Most of the procedures fall under the first category and are based on a heuristic procedure proposed by Ball and Bodin [5]. The solution procedure is decomposed into three components, emphasizing the CSP: a piece construction component, a piece improvement component, and a shift generation component. Similar heuristic approaches in the first category are proposed by Tosini and Vercellis [23]; Falkner and Ryan [21]; and Patrikalakis and Xerocostas [22]. All these approaches use a similar set covering formulations as in Ball et al. [5]. Afterward, the approach that solves CSP incorporates side constraints for the vehicles that appear [4]. Scott [18] first proposed approaches for the second category by heuristically determining vehicle schedules that account for crew costs using the linear programming dual of the HASTUS CSP model. The third category has far fewer fruits than the first two, with Gintner et al. [26] proposing a time-space network formulation for CSP that allows vehicles to have more autonomy during the crew scheduling phase, ultimately leading to selecting the most consistent vehicle schedule that aligns with the objectives of CSP. We refer to Freling et al. [28] for an overview of these papers.

The state-of-the-art complete integration models for VCSP fall into three main categories [50]: (1) network-flow-based formulation, (2) constraint-based model, and (3) maximum covering model. The earliest and most successful category is the network-flow-based formulation. These models mainly comprise time-space/multicommodity/quasi-assignment [2, 4, 38] network flow formulations for VSP, a set partitioning/covering for CSP, and additional linking constraints to ensure the compatibility of vehicle and crew schedules [14]. Freling [29] introduces the first integrated VCSP model using quasi-assignment-based formulations, while Huisman [27] provides the initial general formulations for VCSP by extending the single-depot model of Freling [29] to the multidepot case. The second category of models can refer to Laurent and Hao [53] who present an integrated model based on constraint satisfaction that is intuitive and natural [3]. Prata et al. [5658] propose the maximal covering model under the third category, which generates potential blocks, shifts directly over the timetabled trips, and then covers all trips with available resources (vehicles and crews). For an overview of complete integration, we can refer to Steinzen et al. [42].

To the best of our knowledge, only two papers address the issue of EVCSP: Perumal et al. [7] and Sistig and Sauer [34]. Perumal et al. [7] modify the mathematical model proposed by Friberg and Haase [20] to explain VCSP as a set partitioning problem by adding additional constraints that link vehicle and crew schedules. They incorporate the crucial constraints of EVs, including limited driving range and lengthy recharging times [60, 61], into the VCSP, thereby increasing operational complexity. Their research suggests resolving EVCSP using a branch-and-price heuristics method coupled with an adaptive large neighborhood search (ALNS). However, the model referred to by Perumal et al. [7] is partially integrated and only considers a constant driving range for EVs. Yet, the actual driving range can be influenced by various factors such as air density, driving speed, air conditioning usage, and complex road surfaces [11]. Then, Sistig and Sauer [34] avoid this flaw, and the integrated model they refer to is initially proposed by Freling [29]. This paper aims at an innovative, low-complexity model for the integrated issue and advocates for energy consumption and recharging strategies that are more practical to include in the scheduling process.

The minimum cost flow (MCF) is a common type of network flow that can be extended in various ways [62]. This paper presents a complete integration model for EVCSP, which is based on the MCF. Specifically, the model involves MCF formulations for EVSP, set partitioning for CSP, and linking constraints that guarantee compatibility of EV and crew schedules. The outcomes of MCF can be useful for addressing various network-related issues, including maximum flow, assignment, shortest path, transshipment, and transportation problems [63]. Successful integration requires a practical design of the key MCF components.

Furthermore, it is imperative to customize EVs’ energy consumption and charging strategy for accurate modeling. In practice, EVs spend significant time at multiple intermediate stops, waiting at red lights, and navigating through traffic jams. Thus, we divide the EV operation into prevailing driving and standstill. Fontana [64] demonstrates that the energy consumption of an EV is modeled using engineering principles and supported by analytics. We utilize the mentioned model to calculate the EV energy consumption of prevailing driving and standstill states. Typically, EV charging strategies include battery swaps, slow recharge, and fast recharge [60, 61]. The current mainstream strategy in bus operation enterprises is to perform slow recharge at night and fast recharge during daily operations [11].

The contributions of this research are fivefold: (a) A novel EVCSP model based on MCF is proposed with an integrated design for nodes, directed arcs, cost, and constraints; (b) the exact minimum fleet size for VCSP is derived, and furthermore, the lower bound of both fleet and crew sizes for EVCSP is discussed since minimizing fleet and crew sizes are the primary task; (c) time compatibility and energy compatibility of any two spells or trips are defined for arc generation; (d) an approach hybrids a matching-based heuristic method, and integer linear programming (ILP) solver is derived for our integrated model; and (e) a series of numerical examples are provided to illustrate the performance of the model and the approach developed.

The remainder of the paper is structured as follows. Section 2 elaborates on the concepts related to EVCSP. Section 3 suggests an integrated design for the problem based on MCF. Section 4 presents the EVCSP model and provides some statements. Section 5 presents the hybrid heuristic method for the model. Section 6 displays the numerical experimental results and sensitivity analyses based on a realistic dataset. Finally, Section 7 provides concluding remarks and suggests future work.

2. Electric Vehicle and Crew Scheduling Problem

The EV and crew Scheduling can be clarified more clearly by breaking it into subproblems and giving an integrated description. We initially establish the concepts by introducing the following terminologies [1, 65]:Trip: A trip refers to the task unit, which includes a start time at the departure point, an end time at the arrival point, and a duration known as trip time.Block: A block is a vehicle’s task to start from a depot, followed by a sequence of trips, and ends at the depot.Relief opportunity (RO): RO is a time/location pair where crews can be relieved. The time is a relief time, and the location is a relief point. EVs use only some ROs to relieve crews. Crews are required to take relief at specific relief points, usually determined by public transport companies. Depending on the circumstances, the crew’s movement between these relief points can be organized by the transportation enterprise or the crew itself.Piece: A piece is a work done between two consecutive ROs during which crews do not have an RO.Spell: A spell consists of multiple consecutive pieces within a vehicle block, all handled by a single crew without relief from other crews.Shift: A shift refers to the assignment of multiple spells to a single crew. A crew’s task starts from a depot, followed by several spells, and ends at the depot. Shifts encompass split, straight, and tripper shifts. The split shift has a long length and a long break, while the tripper shift has a short length but no break. The straight shift has a short break.Idle time: Idle time refers to the waiting time between two consecutive trips.Deadhead: Deadhead is the empty movement between any two consecutive trips of a vehicle.

2.1. Electric Vehicle Scheduling Problem

Compared to the traditional VSP for fueled vehicles, the EVSP is more intricate because an EV’s battery capacity is restricted, requiring specific recharging points that involve a prolonged time.

The EVSP involves generating several blocks and assigning each to an EV. The blocks are constructed by organizing the EV’s daily work, starting from a pull-out from a depot, followed by a sequence of trips, and ending at a pull-in to the same depot. The objective is to minimize fleet size and variable operating costs, which include trip times, idle times, and deadheads [66]. The optimization is subject to three constraints:(a)Each trip can only be assigned to one EV(b)Each EV must begin and end its daily work with a pull-out from and pull-in to the same depot, respectively(c)Two consecutive trips for each EV must be time- and energy-compatible

Figure 1 depicts the EVSP in a time-space network. The trips comprise three departure (or arrival) points, namely P1, P2, and P3. D represents the set of depots, and R represents the set of recharge points. There are four types of arcs in the network: a pull-out arc connects a depot to a trip, a pull-in arc connects a trip to a depot, a trip-link arc connects two trips, and a recharge-link arc connects a trip to another trip through a visit to a hidden recharge point. An EV has to temporarily return to a depot, also known as a depot return when the gap between two consecutive trips is significant. Maintaining the EV’s energy during scheduling via recharging is imperative.

2.2. Crew Scheduling Problem

Crew scheduling aims to create a feasible schedule (several shifts) to cover all tasks within a single day of vehicles (all blocks). The objectives of CSP are twofold: minimize both the crew size and the total wage costs while adhering to the following constraints:(a)Each trip is assigned to a single shift(b)Each crew’s relief occurs at the specified RO(c)Each shift must confirm all operational requirements and labor laws, known as a legal shift

The labor laws pertaining to the CSP are intricate and multifaceted. Below, we provide a summary of typical constraints that restrict the efficacy of shifts:(1)The length of a spell must not exceed the stipulated upper limit(2)The length of a shift should not surpass the maximum length designated for the respective shift type(3)The working hours for a shift must fall within the minimum and maximum limits specified for the corresponding shift type(4)The driving time during a shift should not exceed the minimum and maximum driving time allowances set for the respective shift type(5)During a straight shift, meal breaks must be taken at the designated time and location(6)For split shifts, check-in and check-out times must not occur earlier than the earliest check-in time nor later than the latest check-out time prescribed

Figure 2 details the composition of three 2-spell shifts pertaining to some EV work.

2.3. Integrated Electric Vehicle and Crew Scheduling Problem

EVCSP aims to generate a feasible schedule for EVs and crews to cover all tasks, i.e., all trips. The objectives of EVCSP are to minimize fleet size and crew size, deadheading time, idle time, and wage costs. The crews are permitted to carry out crossovers at relief points. The schedule is subject to complex constraints [67]. In particular, the following universal constraints must be satisfied:(a)Each trip must be covered by only one EV(b)Each EV must be handled by only one crew simultaneously, but another crew can replace the crew(c)Each EV must start its first trip from a depot and end its daily work there(d)The connection of any two consecutive EV trips must be compatible regarding time and energy(e)Each crew’s relief must be carried out at the specified RO(f)Each shift must comply with all operational constraints and labor laws

This paper is dedicated to addressing the single depot EVCSP, where EVs are responsible for both pull-out and pull-in operations at a single depot. Figure 3 illustrates the EV blocks and crew shifts simultaneously from integrated EV and crew scheduling for executing the timetabled trips as shown in Figure 4.

2.4. Related Assertions of Fleet Size and Crew Size

Let T = {1, 2, …, n} denote the set of timetabled trips. This section introduces the notions related to time compatibility.

Definition 1. (). Let and denote the start and end time of trip i, and DHij refers to the deadheading time from trip i to trip j. Bertossi et al. [68] define the compatibility of any two trips, i and j, asOtherwise, trip i is time incompatible with trip j ().

Definition 2. (Incompatible set). If , , , then U is an incompatible set.

Definition 3. (Incompatible degree, ID). Suppose U is an incompatible set of T, then the number of trips in U is the incompatible degree, i.e., .

Definition 4. (Maximum incompatible degree, MID). MID represents the largest ID among all incompatible sets of T, i.e., .
By referring to the decomposition theorem [69], we derive the theoretical minimum fleet size (TMF) for the VCSP.

Theorem 6. Let T be the set of timetabled trips. Then, the TMF for the VCSP is equal to MID(T).

Proof. It is reasonable to assume that the set T, equipped with the time compatibility relation, forms a partially ordered set (poset). For a poset P, elements a and b are comparable only if either a ≤ b or b ≤ a; otherwise, they are noncomparable. A subset S of P is called a chain if every two elements in S are comparable. A subset S of P is independent if every two elements in S are noncomparable. For the VCSP, we define a trip as an element in the poset and use the time compatibility of trips to establish the comparability relation. Then, a block corresponds to a chain. Dilworth’s decomposition theorem states that the minimum number of chains partitioning a poset P equals the maximal number of independent elements. Consequently, the TMF for the VCSP is equivalent to MID(T). Theorem 6 is true.

Corollary 7. For the EVCSP, MID(T) provides a lower bound for the fleet size.

Proof. Since EVs have limited battery capacity, we need to consider both the nodes’ time and energy compatibility (see Section 3.3). As a result, its fleet size is not less than that of VCSP.

Proposition 8. The EVCSP requires a crew size that is no less than L = W/(S-A-B-C), where W is the total working time needed for timetabled trips, S is the maximum length of the spread over for a normal shift stipulated in the labor laws, and A and B denote the time allowances for crews to sign on and sign off at depot respectively, while C denotes the specified minimum meal break.

Proof. The daily working time of a crew cannot exceed S-A-B-C. Hence, Proposition 8 is straightforwardly correct.

3. Integrated Design for Electric Vehicle and Crew Scheduling Based on Minimum Cost Flow

In graph theory, MCF is a network with direct arcs and nodes. It requires a least-cost path starting from a given node, followed by several nodes connected by directed arcs, and ending at a specified node.

Let G(N, A) be a directed network consisting of the arc cost cij and capacity (upper bound, , and lower bound, lij) associated with every arc (i, j) belonging to A. Each node possesses several resources bi. The MCF model (MCFM) can be formulated as follows:

The objective is to minimize the total cost, with the capacity constraint and conservation of flows represented by (3) and (4), respectively. If arc (i, j) is selected, xij > 0; otherwise, xij= 0. We now develop an integrated design for EVSP and CSP based on the MCF.

3.1. Integrated Design for EVCSP

We design four critical elements to transform EVCSP into an MCF problem: nodes, directed arcs, cost, and constraints.

Incorporating both the EV and crew constraints, along with their associated limitations, into the EVCSP model presents significant complexity, and thus, building the model directly becomes difficult. As a result, we employ a design based on a set of predetermined potential shifts, which act as the precondition for the integrated EVCSP model (EVCSPM).

Statement 9. The potential shifts are legal, i.e., each potential shift complies with various labor laws, and all its spells are time-compatible.

3.1.1. Design of the Nodes

Suppose T is the set of timetabled trips, D is the set of depots, and W is the set of feasible spells. We define two types of nodes.(1)The depot node d, .(2)The spell node w, . The related nodes for represent one or more feasible spell nodes in the same potential shift.

Statement 10. Defining the shift as a node is infeasible.
If the shifts are defined as nodes, EVCSP can be illustrated in Figure 5. However, it is not feasible since the cost of the shift nodes needs to be defined in EVCSPM, which becomes a set partitioning CSP model and is incapable of handling EVSP.

3.1.2. Design of the Directed Arcs

Given the existence of two types of nodes, five directed arcs follow:(1)A pull-out arc connects a depot to a spell.(2)A pull-in arc connects a spell to a depot.(3)A spell-link arc connects two spells.(4)A recharge-link arc connects a spell to another spell through a hidden recharge point.(5)A depot-return arc connects two spells with a temporary depot stop if the time gap between the consecutive spells is large enough (e.g., 3 h). An EV does not recharge in a depot-return arc.

The spell node consists of multiple trips connected by trip-link arcs. We define the trip-link arc as an implicit arc, while the pull-out, pull-in, spell-link, and recharge-link arcs are explicit.

A spell is feasible if all implicit arcs within it are time- and energy-compatible. An explicit arc is also feasible, provided that its compatibility is met (see Section 4.3 for the definition of arc compatibility).

3.1.3. Design of the Cost

We present the arc cost and shift cost below. The arc cost represents the connection cost between consecutive nodes, which comprises deadheading time, idle time, and recharge cost (if recharging is required). The shift cost includes the trip connection cost within each spell included in the shift and the total wage cost.

Specifically, the arc cost Cij between nodes i and j is defined as follows:where R denotes the set of recharge points and Cr represents the fixed recharge cost. DHij is the deadheading time between the arrival point of trip i and the departure point of trip j, DHir (DHid) is the deadheading time between the arrival point of trip i and a recharge point r (depot d), DHrj (DHdj) is the deadheading time between a recharge point r (depot d) and the departure point of trip j, IDij stands for idle time for a spell-link arc (i, j), and IDirj denotes the idle time for recharge-link arc(i, j). IDij and IDirj are given as follows:where represents the end time of trip i, is the start time of trip j, and Trt is the recharging time.

The shift cost Cs of shift s is defined as follows:where Ct represents the trip connection cost of spell t included in s, comprising the idle time and deadheading time between adjacent trips. The total wage cost of s is represented by h(s).

For a viable integrated schedule, both Cij and Ct constitute elements of the vehicle schedule cost, whereas h(s) contributes to the crew schedule cost.

Statement 11. Adding the fixed trip cost to the arc and shift costs is unnecessary.
Since a feasible schedule must cover all the timetabled trips, the trip cost remains constant regardless of the selected schedule.

3.1.4. Constraints on the Paths

To satisfy the complex constraints associated with EVCSP for a chosen path, we impose the following constraints on the EV flow: constraint (1) ensures the path’s integrity, while constraints (2) and (3) aim to create integrated schedules, .(1)Each path must start from a source node di, followed by a sequence of feasible nodes connected by directed arcs, ending at a sink node dj. i = j, when the path needs to return to the home depot(2)Each node in a selected path can be covered by only one selected shift(3)The selected paths and shifts should cover each timetabled trip precisely once

3.2. Compatibility of Arcs

Creating explicit arcs, including pull-out, pull-in, spell-link, and recharge-link arcs, is crucial to EVCSP, while forming implicit arcs, i.e., trip-link arcs, serves as the foundation for the spell node. An arc is present only if it satisfies both time and energy compatibility.

3.2.1. Time Compatibility

Two consecutive trips, i and j, within a spell are considered time-compatible if formula (1) is satisfied. This definition can be extended to spell link. Suppose the last trip in spell p is denoted as trip i, and the first trip in spell q is denoted as trip j. If formula (1) is met, the spell-link arc (p, q) is time-compatible. Similarly, the recharge-link arc (p, q) is time-compatible if formula (10) is satisfiedwhere DHir represents the deadheading time from the arrival point of trip i to the recharge point r and DHrj denotes the deadheading time from r to the departure point of trip j.

3.2.2. Energy Compatibility

The energy consumption for executing trip i is denoted by ei, and the EV energy left before serving trip i is denoted by . If trip-link arc(i, j) exists and is selected in a spell, then , where DEij represents the deadhead energy consumption from the arrival point of trip i to the departure point of trip j.

The energy consumption for executing spell p is denoted by , and the EV energy left before serving spell p is . The energy left after serving spell p is noted as , which is equal to . If a spell-link arc (p, q) exists and is selected, then , where DEpq signifies the deadhead energy consumption from the arrival point of the last trip in p to the departure point of the first trip in q.

We set a threshold, Emin, to avoid EV breakdown during the spell (trip) serving. For two consecutive trips, i and j, in a spell, only those that are time-compatible can be evaluated for energy compatibility. The trip-link arc (i, j) exists if the following formula (11) is satisfied.where DEjr is the deadhead energy consumption from the arrival point of trip j to r.

Similarly, for two spells, p and q, we can only discuss their energy compatibility if they are time-compatible. Let us assume that p and q are time-compatible for a trip link. The spell-link arc (p, q) exists if they are energy-compatible, which defined aswhere DEqr is the deadhead energy consumption from the arrival point of the last trip in q to r. Assume that spells p and q are time-compatible for recharge link. If formula (12) is not fulfilled but conforms to formula (13) represented below, a recharge-link arc (p, q) existswhere DEqr signifies the deadhead energy consumption from the arrival point of the last trip in q to r. In all cases, the EV can reach the recharging station before reaching Emin.

3.3. Recharging and Discharging of EV Batteries

Given the limitation of EV battery capacity, it is crucial to develop effective recharging strategies and monitor the EV’s energy consumption.

3.3.1. Energy Consumption of an EV

We calculate the energy consumption during the trip and deadhead while considering the states of prevailing driving and standstill.

Urban EVs in the bus market are generally required to operate at a relatively stable speed. Fontana [64] demonstrates that the net energy consumption linked to acceleration is almost zero along a specific path under certain simplifying assumptions. In calculating the prevailing driving energy consumption, we applied the following formula proposed by Fontana [64], which accounts for various factors, including air density, driving speed, air conditioning usage, and complex road surfaces.

The formula consistently measures the energy consumption per unit distance under the driving speed, . Within the formula, the symbol η represents the efficiency parameter, ρ (kg/m3) is the air density, Cω is the EV’s drag coefficient, Af (m2) refers to the frontal area, μ represents the friction coefficient, m (kg) is the EV’s mass, is the gravitational constant, and α(radians) measures the road angle, whereas Pacc(W) represents the energy consumption used up by accessory loads, including air conditioners, headlights, and EV management systems.

Proposition 12. EV’s per-distance energy consumption is minimized if .

Proof. Let be the first derivative of with respect to . . If , , . If , , then steadily decreases in the interval. If , , then steadily increasing. Therefore, is minimized at .
Tang et al. [70] set the parameters as ρ = 1.2 kg/m3, Cω = 0.29, Af = 2.27m2, η = 0.9, , α = 0, and μ = 0.012. The air conditioner consumes 7000 W of power Pacc if turned on and 2000 W otherwise. Let mEV denote the weight of the EV, cp denote the passenger capacity, and denote the average adult weight. Then, the total weight of the EV under the crew-only scenario is , whereas the total weight under the fully loaded scenario is . Proposition 12 shows that in the absence of air conditioning, the function for the EV’s energy consumption per unit distance is minimized when , while in the presence of air conditioning, it is minimized when . However, in practice, the speed of EVs is often limited to 25∼40 km/h for safety reasons. Therefore, we set .
The energy consumption of an EV during a standstill is approximately equal to Pacc.
Let Di and Dij be the fixed distances traveled for trip i and deadhead from i to j (), respectively. The energy consumption ei and eij for trip i and deadhead from i to j, respectively, can be calculated as follows:where Ti is the trip time taken for trip i.

3.3.2. Recharging Strategy

We employ the current mainstream recharge strategy, which involves slow recharging at night and fast recharging during daily operations. Prior to initiating daily operations, the EVs undergo full charging.

For the recharge-link arc(p, q) to exist, spells p and q must be time-compatible for the recharge link, and , which taking into consideration the EV energy left after serving spell p (), the energy consumption of spell q (Eq), and the deadhead energy consumptions (DEpq, DEqr, and DEpr).

Assuming the EV battery capacity is denoted as Efull (kW), the fast-recharge power as Pf (kW), and the recharge time as Trt (min). Let the updated EV energy after recharging at recharge point r be denoted as E, which is given by

Thus, the EV energy left before serving spell q is .

The determination of whether the connection arc between spells complies with the energy constraint cannot be made in advance. It can only be ascertained once the EV’s completed spells are known during the scheduling process. This will indicate whether the EV can execute subsequent spells using either the spell-link arc or the recharge-link arc. If the remaining energy of an EV cannot support the execution of a spell during the scheduling process, then the spell will not be considered for selection. However, the spell may still be selected if the EV goes to the recharge point for recharging, and the recharge link between the spell and the last spell currently selected by the EV is compatible in terms of time.

4. Integrated Model for Electric Vehicle and Crew Scheduling

As described in Section 3, the EVCSP involves identifying the optimal sequence of feasible nodes connected by directed arcs to cover all tasks at minimum cost. Each path must originate from and terminate at a node within the depot set D. The sequence of intermediate nodes must be feasible and connected by directed arcs. Table 2 lists the symbols used in EVCSPM, where , and .

The EVCSPM is formulated below based on the expressions and symbols.

The decision variable xij takes a value of 1 if the arc (i, j) is selected. Similarly, ys takes a value of 1 if the shift s is selected and 0 otherwise. Formula (17) aims to minimize the total cost comprising operating and wage costs. This is achieved through the cost definitions in formulas (6)–(9). Formulas (18)–(20) represent the conservation of flows, which ensures that each selected spell node is covered by only one EV. Formula (21) represents the conservation of depots, which ensures an equal fleet size to pull-out from and pull-in to a depot. Formula (22) represents the constraint of trips, which ensures that each trip is covered by only one crew. Formula (23) represents the energy state transition of EVs. Formula (24) represents the remaining energy constraint of EVs, which must always be kept above Emin. Finally, formulas (25)–(28) represent the value constraints of the decision variables. We have assessed the feasibility of the EVCSPM by solving an instance for which the optimal schedule is known in advance, using the GUROBI solver.

Research on EVCSP is extremely limited. Our model’s complexity is compared to the only two EVCSP models, EVCSPM-1 [7] and EVCSPM-2 [34], using two indicators: the number of variables and constraints. Table 3 displays the results, where B represents the set of blocks and S represents the set of shifts, .

In Table 3, the inequality n2 + m + 4n < 2pq + q2 +m << r + m holds. The EVCSPM-2 has the fewest decision variables compared to other models, while the EVCSPM model maintains a reasonable number of variables. In practice, the feasibility of spells is restricted by various labor regulations. Consequently, 5q + p + n << n2 + 2n < 2n + n2. As a result, the EVCSPM imposes the fewest constraints. Overall, the EVCSPM demonstrates a low level of complexity.

Efficient resource utilization is the main objective of scheduling.

Statement 13. To limit the fleet and crew size, substitute formula (17) with (29), where Cveh and Ccrew refer to the fixed cost of EV and crew, respectively, while represent adjustment parameters.Choosing a pull-out arc represents selecting an empty EV that must be utilized. Consequently, if a pull-out arc is chosen as part of the path, a significant enough cost of αCveh is added as a penalty that could reduce the fleet size. Similarly, selecting a shift s requires a crew to be available. Therefore, if a shift s is chosen as part of the path, a cost of βCcrew is added as a penalty that could reduce the crew size.
Typically, an EV requires depart from and return to the same depot.

Statement 14. Assuming that each path must cover a maximum of two spells (constrained by formula (30)), the subsequent formula (31) ensures that the path returns to the home depot.

5. Solution Method

This section proposes a hybrid approach for the EVCSP that integrates both the heuristic method and ILP. The fundamental approach is compiling the potential shifts using a matching-based heuristic and subsequently solving EVCSP iteratively with an ILP solver named GUROBI.

The heuristic method, employing a matching-based approach, generates shift set to comply with a range of labor regulations and restrains the crew size through a set of “soft constraints” represented as filter conditions. The heuristic methodology comprises three steps: tier-partitioning, spell-constructing, and shift-generating. Algorithm 1 of the tier-partitioning step splits the timetabled trips T = {1, 2, …, n} into several nonoverlapping incompatible sets labeled as S0, S1, …, SK, with T arranged in ascending order by departure time. Here, Si = {j|jϵT & tier(j) = i}, with tier(j) representing the tier number for trip j, i = 0, 1, …, K.

(1)T ⟵ {1,2,3, …, n}, {tier(1), tier(2), …, tier(n)} ⟵ {0, 0, …, 0), i ⟵ 1
(2)while i < n + 1 do
(3)j ⟵ i + 1
(4)while j < n + 1 do
(5)  if or then tier(j) = tier(i) + 1
(6)  j ⟵ j + 1
(7)end while
(8)i = i + 1
(9)end while
(10)return {tier(1), tier(2), …, tier(n)}

We construct the spells with partitioned trip tiers S0, S1, …, SK. However, generating all feasible spells can be challenging when solving realistic EVCSP. Thus, to address this issue, we use Algorithm 2 to find the spells led by each trip of each tier in turn. Specifically, the algorithm applies the following restrictions: (1) the spell comprises l pieces (spell_l) where the linking arcs are the edges of the maximum cardinality matching between adjacent tiers, p ≤ l ≤ q, and (2) the feasible length of the spell is limited to [len_Min, len_Max], as specified in labor regulations. Here, spell_S represents the set of spells, and len_spell corresponds to the spell’s length, defined as the time interval between the end time of the preceding trip and the start time of the initial trip within the shift.

(1)S0, S1, …, SK,
(2)while t < K do
(3) maximum cardinality matching for St and
(4)t ⟵ t + 1
(5)end while
(6)t ⟵ 0
(7)while t < K do
(8)for each jϵStdo
(9)  select the matched edges to construct all executable spells led by j
(10)  if len_Min ≤ len_spell ≤ len_Max && p ≤ l ≤ q then spell_S ⟵ spell_S ∪ {spell}
(11)end for
(12)t = t + 1
(13)end while
(14)return spell_S

The shift-generating Algorithm 3 generates shift set referred to as PS. Considering labor regulations, Algorithm 3 restraints the minimum and maximum break and work times. Here, break_MinStr and break_MaxStr denote the minimum and maximum break times, respectively. Similarly, work_Min and work_Max represent the minimum and maximum work times, where the work duration is calculated as the difference between the shift’s time span and the break time. sTi and eTi signify the start and end times of spelli, and the twij indicates the work time of a straight shift (i, j).

(1)
(2)while i< nS do
(3)j ⟵ i + 1
(4)while j < nS + 1 do
(5)  
(6)  if break_MinStr ≤ tij ≤ break_MaxStr, work_Min ≤ twij ≤ work_Max, & ValidStraight (i, j) = = TRUE
(7)  then PS ⟵ PS∪Straight (i, j)
(8)  j ⟵ j + 1
(9)end while
(10)end while
(11)return PS

Each straight shift generated by Algorithm 3 consists of two spells. PS is constructed to include all tripper shifts to ensure that they cover all timetabled trips. Each tripper shift in PS only comprises one spell. The schedule-producing Algorithm 4 updates the optimal integrated schedule by circularly solving the EVCSP subproblem, where F represents the iteration threshold, #shift represents the number of shifts, and EVCSP_shift_S′ is the EVCSP with the potential shifts set shift_S′.

(1)PS, i ⟵ 1, F, n,
(2)while i < F do
(3) call GUROBI to find a minimal #shift crew schedule shift_S for the CSP with PS as the potential shifts
(4) randomly selecting n shifts from PS and incorporating them into shift_S to create
(5) call GUROBI to find an integrated schedule for the
(6)if
(7)then
(8) aim at the blocks in , construct a new shift set to extend to PS
(9)i ⟵ i + 1
(10)end while
(11)return SC

The framework of the hybrid approach is illustrated in Figure 6, where T is the timetabled trips.

6. Experiments and Results

A series of experiments are conducted based on a case study of bus route 2 in Xiaogan, Hubei, China (XGR2), which operates pure EVs. The XGR2 route spans 12.7 km and has 30 stops, servicing 270 trips daily. The EVs maintain a consistent departure interval of 5∼8 min throughout the day. The EVs used are of the pure EV type XML6105, with a weight of 11,000 kg, rated capacity for 40 passengers, and battery capacity of 140 kWh. The average weight of an adult passenger is 62 kg. The fast- and slow-recharge power is 160 kW and 60 kW, respectively. We obtain eight variant instances (T1∼T8) from XGR2 to test our method and model. The distribution of timetabled trips for each instance is illustrated in Figure 7.

In Section 6.1, we implement orthogonal experiments to determine the optimal parameter settings for our hybrid heuristic method and EVCSPM. In Section 6.2, we compare our method with GUROBI via comparative experiments. Subsequently, we test the performance of EVCSPM versus the sequential model in Section 6.3. Lastly, we conduct a sensitivity analysis on the parameters in Section 6.4.

6.1. Experiments for Optimal Parameter Settings

Table 4 displays the guidelines for work assignments for various shift types in the test instances. #spell indicates the number of spells. A 1-spell shift unequivocally consists of only one spell, whereas a 2-spell shift includes two consecutive spells with an intervening break.

We assigned a cost of 1,000 for the utilization of each EV or crew, denoted as Cveh = Ccrew = 1,000. Additionally, there is a small variable cost of 1 for every minute an EV operates outside the depot and a cost of 0.1 for each minute, the crew works. The fixed recharge cost, Cr, is set at 15, recharge time Trt at 30 min, and energy threshold Emin at 10 kW. EVCSPM relies on four crucial parameters: coefficients α and β in equation (29), and p and q in Algorithm 2 line 10. We use the Taguchi orthogonal method with orthogonal table L9(34) to evaluate the most appropriate parameter settings. The selected levels are shown in Table 5. We ran tests on T1 and T2 to evaluate the performance. Table 6 lists the test results, with cost representing the total operating cost of the EV and the crew working time.

Based on Table 6, the range analysis results are shown in Table 7, where Rf, Rcr, Rfcr, and Rc are the extremum differences (EDs) corresponding to the fleet size, crew size, fleet and crew size, and cost, respectively.

Table 7 indicates the minimum fleet sizes for T1 in terms of α, β, p, and q are , , , and , respectively, and the minimum fleet sizes for T2 are , , , and , respectively. The optimal combination for fleet size is α2β2p1q2. The EDs hold . Accordingly, p has the most significant effect on fleet size. Similarly, the optimal combination for crew size is α1β3p1 (or p2) q3. The parameters affect crew size in order: (main) p ⟶ q ⟶ α(β) (minor). The optimal combination for fleet + crew size is α3β1p1q3. The parameters affect the fleet + crew size in order: (main) p ⟶ q ⟶ α(β) (minor). The optimal combination for the cost of T1 is α3β1p1 (or p2) q2, while that of T2 is α2β2p3q2. The parameters affect the cost in order: (main) q ⟶ p ⟶ α (β) (minor). Prioritizing the minimization of fleet + crew size, it is evident that p1(or p2) q3 is the most competitive option. α and β have a marginal influence on all four items. Thus, we select α2 and β2 based on their higher frequency of occurrence. The optimal factor level is α2β2p2q3, which implies α = 2, β = 2, p = 2, and q = 6.

6.2. Experiments on Hybrid Heuristic Method and GUROBI

This section aims to verify the effectiveness of the proposed heuristic method by comparing it to GUROBI using problems T1∼T8. GUROBI solves the EVCSP with PS generated by Algorithms 13 as the potential shifts. The results are presented in Table 8, where #recharge refers to the number of recharges and the relative percentage deviations (RPDs) over the schedule produced by GUROBI are provided.

Table 8 shows that GUROBI cannot solve problems T1∼T6. The sizes of the fleet and crew and the number of recharges generated by the hybrid heuristic method for T7 and T8 are the same as those produced by GUROBI. The average RPD in terms of cost for T7 and T8 is only 0.3%, but the average time taken by the heuristic method is only one-sixth of GUROBI’s. Therefore, we employ this method, as the results produced are sufficiently good and efficient to evaluate EVCSPM.

6.3. Experiments on EVCSPM and Two-Stage Sequential Model

The section compares the proposed EVCSPM with the two-stage sequential model (TSM). TSM comprises the EVSP model, followed by the CSP model. We formulate the EVSP model by incorporating EV energy state transfer and energy threshold constraints into the traditional VSP model [71]. We adopt the classic set covering model [65] for crew scheduling.

Ideally, the same algorithm should be used to evaluate the performance of both models, but our heuristic method is tailored to EVCSPM and not easily adaptable to TSM. To ensure fairness to TSM, we solve it by sequentially processing the EVSP and CSP models with GUROBI. Moreover, because of the NP-hard property of EVCSPM and the limitations imposed by GUROBI’s problem-solving capabilities, the energy constraint of EVSP is disregarded during the scheduling process for TSM. As a result, TSM can only provide a lower bound for EVSP’s optimal EV schedule. We enumerate all feasible spells with the generated EV schedule and then generate potential shifts for the succeeding CSP model using Algorithm 3.

The comparison of schedules for problems T1∼T8 is conducted using EVCSPM with the heuristic approach and TSM with GUROBI. Table 9 presents the relevant data on the number of tiers for timetabled trips and the resulting spells and shifts for both models. Specifically, #tier indicates the count of tiers, while #spell_i (i = 2, 3, 4, 5, 6) signifies the count of spell_i. The counts of spells (#spell) and shifts (#shift) overall are also included in the table. Table 10 presents additional details on the resulting schedules for both models. The RPDs, computed over the schedule proposed by TSM, are also included.

Table 9 shows that EVCSPM produces an average of 2322.75 spells and 132599.75 shifts, while TSM generates an average of 654.5 spells and 13696.63 shifts. The potential shifts generated by TSM are only one-tenth of those generated by EVCSPM. This difference may be explained by the obtained EV schedule limiting the construction of TSM’s potential shifts. The results in Table 10 indicate that EVCSPM and TSM exhibit similar performance in terms of the number of recharges. Both models propose schedules with the same fleet size for problems T1∼T2 and T4∼T8. However, for T3, the schedule obtained by EVCSPM has a fleet size of three greater than that of TSM. Overall, TSM outperforms EVCSPM in terms of fleet size. For crew size, both models propose schedules with the same crew size for problems T7-T8. However, for problems T1–T6, EVCSPM outperforms TSM regarding crew size, with RPDs ranging from −2.5% to −5.1%. Regarding fleet + crew size, the schedule obtained by EVCSPM surpasses TSM only for T3, with a positive RPD of 3.6%, while the average RPD is −1.3%. EVCSPM also outperforms TSM in terms of fleet + crew size. For cost, EVCSPM outperforms TSM in terms of cost only for T6, with a positive RPD of 3.4%. However, the average RPD for cost is −8.7%. Finally, the average elapsed time for solving EVCSPM is 96.78s, while TSM requires 2371.75s, even without considering the energy constraint. Therefore, EVCSPM outperforms TSM regarding crew size, fleet + crew size, cost, and elapsed time.

To gain a deeper understanding of the performance of EVCSPM and TSM, we illustrate the schedules pertaining to fleet size, crew size, fleet + crew size, and cost in Figure 8.

The results illustrated in Figure 8 indicate EVCSPM’s superior performance across the three subgraphs, except subgraph (a), as evidenced by the positioning of the EVCSPM polylines below corresponding TSM polylines. It has been confirmed that, in terms of crew size, fleet + crew size, and cost, EVCSPM outperforms TSM. Given the priority of minimizing fleet and crew size, we assert that EVCSPM is generally superior to TSM in EV and crew scheduling.

6.4. Sensitivity Analysis

This section conducts a sensitivity analysis of EVCSPM by examining the impact of critical parameters on fleet size, crew size, number of EV recharges, and cost. Specifically, we investigate the effects of battery capacity Efull, recharging time, and recharging power in equation (16) on these performances while considering the influence of coefficients α and β in equation (29). The aim is to provide a comprehensive understanding of the sensitivity of the EVCSPM model.

The impact of coefficients α and β on EVCSPM regarding fleet size and crew size is determined by analyzing T7 with various values of α and β in the [0, 0.06] range. The result is illustrated in Figure 9.

Figure 9 shows that the crew size declines as the value of either α or β increases. This suggests that the fleet size required decreases as α or β becomes larger. When α is held constant, the graph reveals a high absolute slope value for the first surface at β values between 0 and 0.02. This denotes that alterations in β within the given interval significantly influence crew size. Conversely, for α values between 0.02 and 0.06, the first surface displays smoothness, and its slope is zero when beta values exceed 0.03. Consequently, within the range of β ≥ 0.02, any changes made to β basically have no impact on the crew size. Similarly, the second surface displays continuous steepness between 0 and 0.04 for α and β, hence implying that alterations made to both α and β in the given interval have a considerable effect on fleet size. However, when α, β ≥ 0.04, the graph takes a straight line form, indicating that changes made to α and β are incapable of revising the fleet size. To sum up, α perturbs the fleet size, while β affects both the fleet and crew sizes. Nonetheless, these influences vanish when α, β ≥ 0.02, which results in the fleet size and crew size remaining at 17.

The impact of battery capacity Efull on the fleet size, crew size, and the number of recharges is analyzed by conducting tests on T1 under fast recharge with varying Efull 120∼160 kWh, as depicted in Figure 10.

Figure 10 shows that the crew size always remains at 39, regardless of the increase in Efull. The changes in Efull do not impact the crew size. Moreover, when Efull ≥130 kWh, the fleet size remains constant at 19, while it slightly fluctuates between 19 and 20 in the range of 120∼130 kWh. The effect of changes in Efull on the fleet size decreases as the capacity takes a smaller value (120∼130 kWh), and this effect completely vanishes when Efull ≥ 130. Additionally, along with the increase in Efull, #recharge shows a consistent downward trend. The larger the battery capacity, the fewer recharges are required. #recharge has a relatively slow decline within either 120∼135 or 140∼160 kWh. However, the number of recharges sharply shrinks from 11 to 5 with an increase in Efull from 135 to 140 kWh. Therefore, the changes in Efull significantly influence the number of recharges, especially when 135 ≤ Efull ≤ 140 kWh. Consequently, it can be inferred that the number of recharges is susceptible to any changes in Efull, while the fleet size and crew size remain insensitive. It is worth noting that EVCSP degenerates into VCSP when Efull ≥ 160 kWh.

Finally, we investigate the impact of recharge power and recharge time on fleet size, crew size, and the number of recharges. To do so, we conduct tests on T1 with various recharge times under Efull = 140 kWh, fast-recharge power of 160 kW, and slow-recharge power of 60 kW. We present the findings in Figures 11 and 12.

From Figures 11 and 12, the fleet and crew sizes remain at 19 and 39, respectively, indicating that they are not influenced by recharging power and time. The fleet size displays a decreasing pattern with an increase in recharging time, irrespective of recharging power, whereby fast-recharge power 160 kW or slow-recharge power 60 kW is utilized. The higher the recharging power, the lower the fleet size required. For fast-recharge power 160 kW, the fleet size fluctuates by a maximum of two every 5 min, remaining at 9, 5, and 3 during the time intervals [10, 15], [25, 35], and [50, 60], respectively. Similarly, for slow-recharge power 60 kW, the fleet size varies by a maximum of two every 5 min, remaining at 3 and 1 during the time intervals [50, 60] and [65, 80], respectively. Under the same recharging time, the fleet size remains identical between the two recharging powers, indicating its sensitivity to recharging time and insensitivity to recharging power. However, the cost increases proportionally with an increase in recharging time, irrespective of the recharging power used, whether 60 or 160 kW. The cost increases with an increase in recharging power. For the same recharging time, the cost difference between the two recharge powers is negligible, particularly when 30 ≤ Trt≤40 min, indicating that the cost is generally insensitive to recharging time. In conclusion, changes in recharging power and time merely influence the frequency of EV recharges.

7. Conclusions

This paper proposes a complete integrated model, namely EVCSPM, for the electric vehicle (EV) and crew scheduling. EVCSPM is derived based on minimum cost flow. For modeling, we integrate design nodes, directed arcs, cost and constraints, and time and energy compatibility of nodes. A case study has been reported on the real instance of bus route 2 of Xiaogan in Hubei, China (XGR2).

As for comparing EVCSPM with the two-stage sequential model (TSM), it involves the EV scheduling model first and then followed by the crew scheduling model. Based on several problem instances derived from XGR2, EVCSPM outperforms TSM regarding crew size, fleet + crew size, and cost. The average RPDs of crew size, fleet + crew size, and cost are −2.9%, −1.3%, and −8.7%, respectively. Additionally, the average solving time of EVCSPM is approximately one-twentieth of TSM, even the latter overlooks EV energy constraints. The integrated model outperforms the sequential model as it possesses additional flexibility.

None of the integer linear programming (ILP) solvers can be directly used to solve the integrated model since it is the integer nonlinear caused by EV energy constraints and NP-hard for even both sequential subproblems. Therefore, this paper develops a hybrid method that comprises a matching-based heuristic and GUROBI for EVCSPM. Our method approaches the theoretical optimum, but the elapsed time is reduced to 1/60 compared to the ILP solver. Future work involves further exploration of the proposed method and its ability to efficiently overcome larger real-life instances.

Data Availability

All the data included in this study are available upon request by contact with the corresponding author ([email protected]).

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was supported by the National Natural Science Foundation of China (Grant nos. 71571076 and 72071087) and the CAAI-Huawei MindSpore Open Fund (CAAIXSJLJJ-2022-034A).