*2.1. Method*

The TCO model is built in Matlab [19], which is a software that integrates computation, visualization, and programming in an environment where problems and solutions are expressed in mathematical notation. The model is based on a direct step by step calculation of the results starting only from the parameters describing the route and the timetable, as well as the bus and cost parameters. This direct calculation method is possible since the calculations have been broken down in steps which can calculate their respective outputs while only knowing input parameters and intermediate results calculated in previous steps. All the equations have been solved analytically before creating the TCO calculation program. Furthermore, the order of the calculations has been carefully selected so that there is no need to feed results back to previous calculation steps, avoiding the need for numerical solvers in the program. This leads to a quick program that is easy to follow, despite having a significant number of steps in the calculations.

Another key part of the method is to avoid calculating more details than needed. This is done by, as far as possible, directly calculate energies and bus time for the whole fleet of buses, rather than for each individual bus. Furthermore, the smallest step in the calculation of a whole day of bus traffic is the single bus trip. No finer time step is analysed, which means that there is no need to simulate the individual buses, which also ensures a quick calculation.

Since the purpose is to find and model the general mechanisms which influence the TCO, it is important to only include the important factors and exclude all minor effects that will mainly show up as a noise in the calculation of the cost. The way we do this is to start from the end result, the TCO equation, and derive the model backwards from there. This ensures that we only include things that can influence the TCO, while all other aspects of buses will automatically be excluded. Later in this section, we also discuss how the model avoids factors which can cause small variations up and down in cost when timetable and route parameters only slightly change. These are therefore seen as noise, which is not a part of the overall trend in the cost variations.

### *2.2. Output of the Total Cost of Ownership Model*

In this paper, the TCO will be presented either as a total cost per year for the investigated route, or as the route's total cost per trip kilometre. The cost per trip kilometre is the TCO per year divided by the total distance all the buses drive in service. Cost of driving outside the timetable, such as driving to or from the depot and driving between different routes, is included in both cost measures, but when the specific cost per km is calculated, the cost is only divided on the kilometers driven during the trips. This is important since driving to and from the depot adds nothing to the value of the route, while it adds to the cost of operating the route.

The total cost per year is obviously a good measure of how cost effective a certain bus type is for a specific route. However, it is not so useful for general conclusions and comparisons of different bus routes which have very different bus traffic density and different lengths. Then, the total yearly cost will be very different and does not clearly illustrate which system is more cost-effective. When comparing different routes and different bus traffic volume, it is often better to compare cost per trip (km) instead. Even if bus lines can have total yearly costs which are different by an order of magnitude, a comparison of their cost per trip (km) will be revealing. The difference in costs per trip (km) then indicates why one of the routes is more cost-effective than the other.

### *2.3. Parameters Used to Determine Total Cost of Ownership*

The TCO is calculated as the sum of operating cost and investment-related costs. In this model, the operating cost is the sum of driver cost, energy cost, maintenance and insurance and electric grid fees. The cost of the investment is determined from the depreciation of the chargers, batteries and buses. The final calculation steps of the TCO are shown in Figure 1.

**Figure 1.** The calculation steps of the TCO model, its nine input variables in the white boxes at the top and its eight cost parameters as inputs from the left and right side of the model.

There are, of course, other costs for a route, such as the cost of depots (excluding chargers), ticket systems, etc. In this analysis it is assumed that such costs are the same for all the investigated bus types and therefore will not be important when comparing different bus types with each other. However, when cost differences between the alternatives are small, minor variations in these other costs can very well be what tips the scale in favour of one bus type or another, and that is why a final decision on what type of buses to use for a route should always be conducted based on a detailed bus-planning and cost analysis tool.

To determine these seven costs, the model use nine intermediate variables which are calculated for the analysed routes and timetables. These are:


These nine variables, together with eight cost parameters, determine the seven parts that make up the TCO. The TCO per year is the sum of the seven costs, and the TCO per trip kilometre is the TCO per year divided by the number of trip kilometres per year.
