## 3 Modelling of the Bus Transportation Network
### Simulation of the Operation of Buses  
The operation of bus trips is defined by timetables, which are provided by urban transport organizing authorities to bus operators. Bus operators determine which bus will perform which trip to complete their daily service. This step is called the \"vehicle scheduling problem\" and EB services which are gathered as the output of scheduling problem are used as the inputs of the presented simulations in this paper. Simulation inputs are the transport network modelling (GTFS data) and the bus fleet operation (bus services). The distance that a bus has to travel from each stop to the next charging station can be calculated for each bus service. The energy needed to reach the next charging station can be calculated based on this distance. Therefore, it is possible to ensure that a bus does not leave a charging station until it has enough energy to complete its service. The procedure of calculation of bus power consumption on a transportation network is presented in the flow chart in Figure 5. Inputs are first initialized such as bus services, trips, and routes. Then, for each time step of the simulated period, the status of each bus is determined successively: its position, speed, acceleration, service, trip, route, energy consumption, charged energy (if the bus is at a charging station), remaining dwell time (if the bus is at a stop), and battery SoC. Figure 4: Path between two bus stops generated using Open Street Map with intermediate points. The process to compute the new status of a specific bus depends on the inputs. If the bus was previously being charged or stopped, it continues this way until its dwell time reaches zero. However, if the bus has to run at this time step (it was running previously or its dwell time at a bus stop is over), then its position and speed need to be assessed. When the bus starts running between two stops, its maximal speed and acceleration on the current segment are computed and its trapezoid-shaped speed profile is deduced. Then, the bus energy consumption is assessed for all the time steps. If the bus arrives at a stop at the next time step, its dwell time must be computed considering the required energy needed to reach the next charging station. The dwell time is computed in two different ways depending on whether the bus is charging or not. The passengers boarding/alighting time \(t_{passagers}\) is defined as the time taken by the passengers to board or alight from the bus. The minimal dwell time \(t_{min}\) is defined as a necessary idle time for transportation reasons (e.g., to change driver). The theoretical dwell time \(t_{schodule}\) is the difference between the time when the bus arrives at a stop and the theoretical time at when it is supposed to leave according to the timetable. In the case when the bus is not charging, dwell time is the maximal value among \(t_{passagers}\), \(t_{min}\), and \(t_{schodule}\). In the case when the bus is charging, the dwell time additionally depends  
Figure 5: Flow chart of the simulation of the bus fleet operation. on the time necessary to charge the battery to a sufficient level to travel to the next charging station \(t_{necessary\_charge}\). This case requires computing the distance to the next charging station and assuming an average consumption for the following trip. Bus delay can be computed in two manners: charging delay and scheduling delay. The charging delay \(delay_{charge}\) is the additional dwell time of a bus due to charging the bus battery, and the scheduling delay \(delay_{schedule}\) occurs because of other reasons which cause the bus to leave a bus stop late.