# Data-Driven Approach for Defining Demand Scenarios for Shared Autonomous Cargo Bike Fleets +
## 4 Demand Scenario Generation
### Temporal Disaggregation
#### 4.4.2 Cluster Analysis  
To enable temporal disaggregation, an alternative approach could have been to directly apply the results of our regression analysis to the previously determined OSABS base demand. However, as we aimed to provide hourly demand data for a time period of one year for two different scenarios (i.e., low and high scenario), this would have led to two datasets each containing hourly rentals for 52.143 individual weeks (or 52 weeks plus one day). Thus, for reproducing the annual OSABS traffic flows within a simulation model, it would be required to simulate 8760 h (52.143 weeks \(\cdot\) 7 days \(\cdot\) 24 h) of OSABS usage for each scenario. Since this would involve an unreasonable computational effort, we applied a cluster analysis to the representative bike sharing dataset. Within the analysis, we used the k-medoids clustering technique proposed by [PERSON] and [PERSON] [78], as it is more robust to noise and outliers than standard k-means clustering. For the technical implementation in R, we used the cluster package [79]. The aim of this analysis was to identify similarities in demand profiles of certain weeks and to group them into clusters accordingly. We associated each calendar week with the number of the cluster \(i=1\ldots k\) in which it was located. Instead of the individual week numbers, we then used the cluster numbers as categorical input variables for our regression model. In order to find the optimal number of clusters, we conducted several regression models using different cluster sizes and compared them to the initial model. For comparing the models, we used the Akaike information criterion (AIC) [80] and root mean square error (RMSE). Table 2 shows that the optimal cluster size is eight, since the performance of the according regression model is quite similar compared to the initial model. In addition, as shown in Table 2 (Appendix A.2), the \(i=8\)-regression model provides a very high fit with a Pseudo-R\({}^{2}\) of 0.94235. The performance of our models is further illustrated in the following charts. Figure 8 compares the observed hourly bookings (representative BSS dataset) for different weekdays, namely, Monday to Thursday, Friday, and Saturday to Sunday, against the values determined from the regression models. The diagram effectively demonstrates that these models are highly proficient in replicating the daily fluctuations in hourly bookings. Nonetheless, it is worth noting that while these models are largely accurate, they have a slight tendency to underestimate peak demand and overestimate periods of lower demands. Figure 9 additionally demonstrates that both the Full Model and the Cluster Model accurately represent the annual patterns. While the Full Model slightly outperforms in reflecting short-term changes, it is noteworthy that the overall course is well reproduced by both models. Notably, the less precise representation of short-term fluctuations by the Cluster Model is not inherently disadvantageous. These fluctuations vary across different years, indicating that a perfect replication may not be necessary or even desirable for accurate modeling. Thus, the Cluster Model efficiently balances simulation effort with quality of results. As we could prove that it is sufficient to model annual patterns using only eight representative weeks, we used the results from the \(i=8\)-regression model for the temporal disaggregation of OSABS base demand. An overview of the assignment of the clusters to the actual calendar weeks is presented in Table 3. \begin{table}
\begin{tabular}{c c c} \hline
**Cluster Size \(i\)** & **AIC** & **RMSE** \\ \hline Initial model & 92,400.79 & 66.36 \\
2 & 96,453.37 & 83.44 \\
3 & 99,898.74 & 109.57 \\
4 & 98,627.99 & 102.34 \\
5 & 98,641.62 & 102.41 \\
6 & 97,688.59 & 92.40 \\
7 & 97,098.78 & 90.04 \\
8 & 92,635.94 & 66.27 \\
9 & 96,912.45 & 88.81 \\
10 & 96,914.27 & 87.62 \\
11 & 96,853.32 & 87.95 \\
12 & 96,794.50 & 87.32 \\ \hline \end{tabular}
\end{table}