# Research on the Optimization Method of Bus Travel Safety Considering Drivers' Risk Characteristics
## 2 Driver Scheduling Model
### Optimization of Driver Scheduling Based on Bus Operation Safety  
The scheduling of bus drivers differs from that of regular vehicle drivers. Bus drivers cannot switch shifts along the route but must complete the entire bus route and change shifts at designated starting and ending stations. Figure 2 illustrates the hierarchy of daily bus operations. From the figure, it can be observed that a vehicle enters a rest period after completing a route and undergoes a change in direction during this rest period. Since the departure and return vehicles are equivalent in this problem, to simplify matters, this paper only considers the scheduling of drivers departing from a single station. Building upon the analysis of individual driver characteristics, this paper focuses on enhancing the driving safety of a bus route as the primary objective. Simultaneously considering requirements such as economic efficiency and fairness, the study conducts an optimization combination for driver scheduling. 1. Objective Function This paper aims to maximize the overall safety of the bus schedule as the optimization objective. In other words, it establishes a 0-1 programming model to maximize the sum of safety evaluations for all shift chains in the schedule. \[\max z=\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k}f_{ij}^{k},x_{ij}^ {k}\in\{0,1\},x_{ij}^{k}\in Z^{+}\] (7) where \(x_{ij}^{k}\) is whether the driver dk is included in the shift chain \(s_{ij}\) (1 if yes, 0 if no), and \(f_{ij}^{k}\) is the safety estimation value for driver \(d_{k}\) under the shift chain \(s_{ij}\). 2. Constraint Conditions This paper, driven by actual data, establishes safety-oriented rules for bus scheduling management. The specifics are as follows:  
Figure 2: Hierarchy diagram of daily bus operations. 1 Independent full coverage constraint: each driver must be able to cover all assigned shift chains, and each shift chain should be completed by only one driver. \[\sum\limits_{k=1}^{n}x_{ij}^{k}=1 \tag{8}\]  
2 Nonoverlapping time constraint: the working hours of drivers should not overlap during the optimization process of driver scheduling. \[\sum\limits_{i=\max\{1,h-m\}}^{\min\{h+m,u\}}x_{ij}^{k}\leq 1 \tag{9}\]  
where \(h\) is the row index indicating any shift chain. 3 Labor regulation constraint: safety-oriented and aimed at preventing bus drivers from fatigue driving and illegal overtime, it is necessary to limit the working hours of drivers. \[\text{L}<\sum\limits_{i=1}^{u}x_{ij}^{k}\leq\text{U}or\sum\limits_{i=1}^{u}x_{ ij}^{k}=0 \tag{10}\]  
where U is the maximum number of shifts a driver can work in a single day; L represents the minimum number of shifts a driver must undertake if they work; otherwise, they do not work on that day. 4 Labor fairness constraint: the sum of working shifts for drivers should be approximately equal over a sufficiently long scheduling period, or the sum of working shifts for drivers should be exactly equal within a long scheduling cycle. \[\lim\limits_{v\to u}\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k}-\frac {1}{n}\sum\limits_{k=1}^{n}\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k }=0 \tag{11}\]  
\[\left|\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k}-\frac{1}{n}\sum \limits_{k=1}^{n}\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k}\right|\leq\theta \tag{12}\]  
where M is a very large number or a long scheduling period, and \(\theta\) is the tolerance for fairness within a short period; empirically, it is generally chosen from the range \(\theta\in[0,5/T]\), where T is the number of weeks. 5 Risk balancing constraint: to ensure the safety of individual drivers, it is necessary to consider the balance of driving risks. \[\left|1-\frac{\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_{ij}^{k}r_{ij}^{k} }{\frac{1}{n}\sum\limits_{k=1}^{n}\sum\limits_{i=1}^{u}\sum\limits_{j=1}^{v}x_ {ij}^{k}r_{ij}^{k}}\right|<\varphi \tag{13}\]  
where \(\varphi\) is the tolerance for risk balance.