3.4.2. Operational Analysis

In addition to the statistical analysis, we perform a second validation on the results of the classification of trips. In this case, we focus on the docking stations that generated or absorbed most of the trips of each kind.

Figure 4 shows the top 10 docking stations that acted as origin (red circles) or destination (green squares) of leisure (Figure 4a) and transport (Figure 4b) trips. Leisure trips have destinations located in Madrid's historic center and some important tourist sites like Puerta de Alcalá (right most green square); Madrid Río (left most green square), a 7-kilometers linear park along the Manzanares river; Matadero de Madrid (bottom most green square) that offers avant-garde cultural exhibitions and performance; or Mercado de Maravillas (top most green square), one of the biggest markets in Europe. On the other side, leisure trips have origins at docking stations mainly located on the historic center and close surroundings. This matches a typical behavior of tourists, who often choose accommodations close to the tourist sites. However, 40% of the top origins and destinations of leisure trips do not share a common docking station; this means that they can be seen as one-way trips. This behavior is opposite to what we observe in transport trips (Figure 4b), where we find 9 docking stations that are simultaneously origin and destination. This matches the usual commuter behavior: from residence to work and back.

We recognized this same behavior on the docking stations activity profile [34], i.e., the net flow of bicycles. Selecting 2 as the number of groups to be generated by the proposed clustering algorithm resulted in two distinct classes of docking stations corresponding to commuter and non-commuter behaviors. In the present work, we reach analogous profiles facing the problem from a different perspective: trajectories instead of docking stations.

This operational analysis confirms that the classification effectively separates trips of either category.

(a) Leisure trips.

(b) Transport trips.

**Figure 4.** Main origins (red circles) and destinations (green squares) of trips.

#### **4. Underlying BSS Public Transport Network**

A public transport system relies on a multiplex network in which different transport modes complement one another. An optimally designed public transport network should provide full coverage, which ideally would connect any pair of points in the space [35]. BSSs provide a public transport network with virtually full coverage, as users can travel the city in a single transport mode. In addition, it may contribute to reduce the travel time avoiding traffic congestions and crowded stops [36]. Furthermore, BSSs add a second functionality to the network: leisure, which is not found in other transport modes.

However, the flexibility in choosing routes throughout a BSS complicates the extraction of its underlying network. The classification methodology we propose allows us to identify the set of trips that were performed using the BSS as a transport mode or just for leisure. Consequently, we can derive the underlying BSS public transport network from the trajectories of these trips and study their fundamental purpose.

Figure 5 shows the trajectories of the 50 OD pairs that account for the greater number of leisure and transport trips. Leisure trips (Figure 5a) required 61 docking stations in order to reach this top 50 OD pairs, while transport trips (Figure 5b) needed only 40. Merging these two particular networks, we can infer the overall BSS transport network.

As we can observe, leisure and transport networks show significant differences in structure: dispersion, compactness, loose links, etc. To highlight these differences, let us consider the complete set of leisure and transport trips, which form the underlying network of each category. These two networks can be analyzed as graphs, calculating their density. The corresponding results are shown in Table 4.

(a) Leisure trips.

(b) Transport trips.

**Figure 5.** Main leisure and transport trajectories.


**Table 4.** Comparison of Networks.

Every docking station in the BSS (169) act as origin or destination of trajectories in both networks. Consequently, their density must be lower than that of the total network. As we can observe, the variation in density of the leisure network to the total network is significantly higher (−66.25 %) than the one corresponding to the transport network (−3.75 %). This fact demonstrates the distinct underlying structure of both networks.

Let us now focus on the underlying network induced by transport trips. Figure 6 shows the sequential formation of this network considering an increasing percentage of trips. Observing Figure 6d we can clearly state that BiciMAD's underlying public transport network provides almost full coverage (most blank spaces correspond to parks). In addition, this analysis provides meaningful information about the importance of every route in the network. This information could build a solid basis for support decision tools that would help municipalities in the design of new infrastructures or changes in the urban regulation to promote the use of BSSs.

**Figure 6.** Formation of BiciMAD public transport network.

Finally, we can conclude that 90.60% of BiciMAD's trips were performed as a public transport mode, which highlights the significant contribution of BSSs to public transport in a city.

#### **5. Conclusions and Future Research**

This work proposes a methodology to classify trips depending on their intrinsic purpose: transport or leisure. This classification is based on the trip index, which measures the actual travel distance versus the available shortest path. In a BSS, this is not a straightforward measure given that cyclists may use shortcuts that are not contemplated in the underlying network (streets and bicycle lanes) and the regulatory restrictions. In addition, these shortcuts have a time-to-live. Consequently, we constructed a mathematical framework to estimate the heterodox trajectory and take it as the reference for the trip index.

We validated the classification methodology empirically, using data from BiciMAD and analyzing the results from both statistical and operational perspectives.

The analysis of trajectories in BSSs opens a set of future research lines. First, in our study we have found trip indexes greater than 1. This implies that some users achieved trajectories that showed a deviation from the linear path below the Fréchet distance of the orthodox trajectory. This means that under certain circumstances, we can find shortcuts to reduce the traveled length in a BSS. The detailed study of the spatio-temporal existence of these short cuts will be addressed in a specific research.

This analysis will use the Fréchet distance to show the deviation of each actual trip to the linear path between origin and destination. The resulting set of deviations will form a probability distribution, which will eventually model the overall *directivity* of trajectories in a particular BSS. This new concept embeds information regarding both the user and the underlying topology. Thus, using the proposed methodology to restrict the analysis to transport trips will lead us to a global characterization of BSS networks. The resulting methodology will then be applied to datasets of BSS trajectories in different cities to compare their relative performance as a public transport mode.

In addition, trajectories will also be used to predict future occupancy levels in docking stations. This research will be based on a metaheuristic approach based on swarm intelligence, which will characterize how groups of bicycle users flow from one docking station to another.

On the other hand, identifying users' behavior plays a key role in understanding their needs to provide them with optimized services. Companies invest huge amounts of money a year for this type of findings. Public institutions such as municipalities find this knowledge even more important, given that they must select where to invest public money so that they provide the best services to their citizens. Importantly from our perspective, it provides foundation information for planning and design, which will lead to optimization of the deployment of this type of transport mode. Our work provides mathematical and empirical evidence on the type of users a BSS has. This allows municipalities to configure tariffs to promote this type of transport, invest in new bicycle lanes that follow the actual routes users are traveling, etc.

In this respect we have demonstrated that BSSs are a form of public transport not only for the last mile, but in its own right. Consequently, municipalities may start considering them in more depth as a solution for urban transport. Our methodology provides a framework to generate meaningful information to be employed as a decision support tool to the process of reengineering the bicycle infrastructure and the corresponding regulation. This information builds a solid ground of knowledge for BSS managers and municipalities.

**Author Contributions:** Conceptualization, M.R.W., J.J.V.D., R.F.P. and A.B.R.G.; Formal Analysis, J.M.V. and C.S.Á.; Investigation, J.J.V.D., A.B.R.G.; Writing—Original Draft Preparation, M.R.W. and R.F.P.; Writing—Review & Editing, J.M.V. and C.S.Á.; Funding Acquisition, J.J.V.D. and A.B.R.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was developed within the project Co-Mov, co-funded by Comunidad de Madrid (Spain), the European Social Fund, and the European Regional Development Fund, with gran<sup>t</sup> number [Y2018/EMT-4818].

**Acknowledgments:** The authors would like to thank the contributions and support from: Empresa Municipal de Transportes de Madrid (EMT) and Sociedad Ibérica de Construcciones Eléctricas (SICE).

**Conflicts of Interest:** The authors declare no conflict of interest.
