2.1. Notation Definition
Let the set of EBs be , the set of CBs be , and the set of drivers be . A service trip refers to a round-trip operation of the bus between the departure and terminal stations of the route. A driving trip is defined as a driver driving a designated bus from the departure station to the terminal station and then returning to the departure station. The I service trips within the daily operating time are labeled in turn according to the timetable, and service trips i and j are two adjacent trips that a certain bus needs to run. The numbers of each driving trip correspond to those of service trips. EBs use their idle time to recharge during the day. The time from the beginning of charging to the end of charging constitutes a charging trip, and the set of charging trips is recorded as . The route has a single depot for electric buses to charge, and for drivers to rest during shift changes, assuming that the number of charging facilities in it is adequate.
We define a binary variable if service trips i and j are adjacent trips run by EB k, ; otherwise . We define a binary variable if service trips i and j are adjacent trips run by CB h, ; otherwise, . The variable represents whether the driver g drives EB k to complete the service trip i. Variable represents whether the driver g drives CB h to complete the service trip i. Let indicate that EB k is charged during charging trip r; otherwise, .
Aiming at the collaborative scheduling problem of vehicles and crew in mixed bus fleets, we designed a bi-level multi-objective programming model, as shown in
Figure 1. The upper layer is the vehicle-scheduling model for a bus fleet mixed with EBs and CBs that minimize the operation cost and carbon emissions [
15,
16]. The lower layer is the crew-scheduling model that minimizes the wages of drivers [
21,
27] and maximizes the degree of driver–bus specificity. The degree of driver–bus specificity of the entire fleet is quantified by the variance of the number of possible vehicle swaps of drivers. In the upper-layer model, the connecting time between trips should be considered when arranging service trips for electric buses and traditional buses, and the time-of-use (TOU) power price policy and the energy consumption demand of subsequent service trips should be taken into account when arranging charging trips for electric buses. In the lower-layer model, the driver’s working hours should comply with labor regulations.
Appendix A introduces the meaning of the main notation used in the mathematical model.
2.3. Crew Scheduling (Lower Layer)
For a bus fleet where EBs and CBs are mixed, the daily service time of each bus varies greatly, and it is difficult for drivers to continuously drive the same bus. This has a great impact on the convenience of operation and management of public transit companies and the reliability of public transport services. The crew-scheduling problem addressed in this section is to comprehensively consider labor regulations and reasonably arrange drivers to complete the driving trips for minimizing driver wages and maximizing driver–bus specificity.
2.3.1. Objective Functions
Driver wages are determined by the hours a driver works daily, including base wage and overtime pay. Effective working hours refer to the driving time of the driver, which only includes the running time on the route and does not include the time when the vehicle stops at the stations. On-duty time refers to the time duration from the start of the driver’s check-in at work to the time of check-out after getting off work. The driver’s base wage is calculated cumulatively based on the effective labor cost of a single driving trip. When the driver’s on-duty time is longer than the specified working time, the overtime pay needs to be calculated additionally. Then, one of the optimization objective functions of the lower layer optimization model, the calculation method of the driver’s one-day wage, is shown in Equation (11).
where
and
are the effective working hours, respectively, of CB
h and EB
k on driving trip
i, h;
and
are the driver’s base wage coefficient and overtime pay coefficient, RMB/h;
is the prescribed working time limit for driver
g, h; and
is the on-duty time of driver
g, h.
A driver may complete multiple driving trips with the same CB or EB or may drive multiple CBs and EBs to complete operational tasks throughout the day. Thus, the number of buses that driver
g needs to drive every day
is shown in Equation (12).
When CB h has been driven by the driver g at least once, namely , then = 1. Otherwise, = 0. Similarly, when EB k has been driven by the driver g at least once, i.e., , then = 1. Otherwise, = 0.
We expect that in a mixed fleet of EBs and CBs, drivers serve the same bus as much as possible. Additionally, we choose to minimize the variance of the number of possible vehicle swaps of drivers
, as in Equation (13), to maximize the driver–bus specificity of the entire fleet.
where
is the number of drivers required for daily operations, people.
2.3.2. Constraints
Crew scheduling needs to meet some labor regulations, such as limited continuous driving time, mandatory rest periods, and limited extra work hours. Let binary variable
denote whether the driver
g continuously performs driving trips
i and
j.
is a constant, and
and
are dwell times of CB
h and EB
k on service trip
i, respectively. When
, it is considered that driver
g continuously executes driving trip
j after the driving trip
i, i.e.,
= 1; otherwise,
= 0. The continuity between any driving trips of driver
g is calculated in turn, and multiple continuous driving trip chains of driver
g are obtained indirectly during the all-day operation time. Let driving trips
u and
v be denoted as the first and the last trip of the continuous driving trip chain, respectively.
Constraint (15) stipulates that the same driver shall not drive for more than the specified time continuously. The driver must rest after the specified time and rest at least (h) each time, as shown in Equation (16). Constraint (17) ensures that the driver does not work overtime more than the prescribed time every day.
In order to ensure the fairness of the effective working hours and labor income of drivers, constraint (18) shows that the number of daily driving trips of driver
g should be greater than or equal to
times of the average number of trips of all drivers and less than or equal to
times of the average number of trips.
where,
is the average number of driving trips per driver per day, equal to the ratio of the total number of trips
I to the number of drivers required for daily operation.
Similar to the vehicle-scheduling problem, crew scheduling must ensure that only one driver can drive the EB or CB on each driving trip, and each vehicle needs to be driven by a human.
2.4. Solution Algorithm
In this paper, a bi-level multi-objective optimization model is developed for the collaborative scheduling problem of vehicles and drivers of mixed fleets. The upper-layer model is a single-objective integer programming model that optimizes the vehicle-scheduling scheme of the mixed fleet with the objective of minimizing the operation cost and the economic cost of carbon emissions. The lower-layer model is a multi-objective integer programming model, which optimizes the crew-scheduling scheme with the objective of minimizing the driver’s wages and the variance of the number of possible vehicle swaps of drivers.
The multi-objective programming problem is solved by an improved multi-objective particle swarm algorithm [
34,
35,
36] based on the
-constraint processing mechanism (
-TMOPSO). In the processing of constraints, a constraint processing mechanism similar to reference [
37] is adopted, which comprehensively weighs the feasibility of the solution and the degree of violation of the constraints. In the early stage of the algorithm, infeasible solutions with a violation degree not larger than
are treated as (pseudo)feasible solutions. As the number of iterations increases, the parameter
gradually decreases, fewer infeasible solutions are regarded as (pseudo)feasible solutions. In the iterative process, the calculation method of parameter
changing with time
a is shown in Equations (20) and (21):
where
A is the time duration of constraint processing;
is the initial value of
, which is equal to the average value of the violation degree of infeasible solutions in the initial population;
is the degree to which the
d-th mixed fleet vehicle-scheduling and crew-scheduling schemes violate the
l-th standard constraint
, in which
,
,
.
The specific steps of the -TMOPSO algorithm are as follows:
Step 1: Set the number of iterations o = 1. Determine the basic parameters of the algorithm, including the particle population size nPop, the size nRep of the external archive set Up, and the maximum number of iterations Maxgen.
Step 2: Initialize particle position and velocity. The location determines which service trip or driving trip is assigned to which bus and which driver. The discrete variables are encoded by the classical sigmoid function, and the velocity is mapped to the interval [0, 1], as shown in Equation (22). Then, compare
with the random number
, and obtain the value of the position
by Equation (23).
Step 3: Initialize , select particles according to , and calculate the fitness value of each particle by solving the model. The fitness function is shown in Equations (1), (11), and (13), and the non-inferior solution is added to the external archive set. A strategy based on crowding distance is used to maintain the external archive set. When the number of solutions in the archive exceeds its size, the solutions with smaller crowding distance are deleted.
Step 4: Determine the initial optimal position of the particle , and then use the three-point random selection strategy to select a suitable group optimal position for each particle. Three points refer to the three non-inferior solutions in the external file set, whose Euclidean distances between the particle are smallest, largest, and in the middle.
Step 5: Update the velocity and position of the particles according to Equations (24) and (25) while ensuring that the particles do not cross the bounds.
where
is the velocity of the particle
d at the
o+1-th iteration;
is the inertial weight;
and
are the acceleration factors;
,
, and
are the random numbers generated between 0-1.
Step 6: Use Formula (20) to update , let o = o + 1. If the number of iterations is greater than Maxgen, stop and output the external archive set; otherwise, return to Step 4.