# Smart Recommendations for Renting Bikes in Bike-Sharing Systems
## 6 Recommendation Based on Local and Global Utility
### Recommendation Based on Expected Cost and Future Impact  
We calculate the global cost of renting at a station by combing its local cost with the impact on the overall system in the next given timeframe:  
\[ \begin{array}{c}globalRentCost(s_{i},\ rent_{k},tf,RentFailCost,FRentFC,FReturn FC)\ =\\ localRentCost(s_{i},\ rent_{k},RentFailCost)\ +\ f\text{-}bikeProb(s_{i},\ rent_{k})\.\\ (ehfIm^{rent}(u_{k},s_{i}tf)\ \cdot rentCost(s_{i},\ l_{k},tf,FRentFC)\ +\\ erfIm^{rent}(u_{k},s_{i},tf)\ \cdot returnCost(s_{i},\ l_{k},tf,FReturn FC))\end{array}  \tag{34}\]  
\[ \begin{array}{c}globalRentCost(s_{i},\ rent_{k},tf,RentFailCost,FRentFC,FReturn FC)\ =\\ localRentCost(s_{i},\ rent_{k},ReturnFailCost)\ +\\ f\text{-}slotProb(s_{i},\ rent_{k})\ \cdot(ehfIm^{return}(u_{k},s_{i},tf)\ \cdot rentCost(s_{i},\ h_{k},tf,FRentFC)\ +\ effIm^{return}(u_{k},s_{i},tf)\ \cdot\ returnCost(s_{i},\ h_{k},tf,FReturn FC))\end{array}  \tag{35}\]  
\(f\) is a parameter that assigns more or less importance to the local cost versus the global impact. \(rentCost\) and \(returnCost\) represent the cost associated with the number of extra future rental and return failures, respectively. This cost should depend on whether a potential user who arrives at a station and fails to rent or to return a bike has some alternative to rent or return a bike at a station nearby. With this idea, we define:  
\[\begin{array}{c} rentCost(s_{i},l_{k},tf,FRentFC)\ =\\ \left\{\begin{array}{c}\min\limits_{s_{j}\in S\ \wedge\text{dist}(s_{i},s_{j})\leq\text{$\text{$\text{$\text{$ \text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$ $\text{$\text{$\text{\text{\text{\texttexttexttext{\text{\text{\text{\text{\text  
Analysing the results presented in the table, we can observe that, in general, higher penalization costs lead to lower dropout rates but longer travel times, whereas lower costs have the opposite effect: more abandonments and shorter travel times. A good combination of both metrics can be obtained with values close to the following: \(RentFailCost\)= 3000, \(ReturnFailCost\) = 2500, \(FutRentFailCost\) = 3000, and \(FutReturnFailCost\) = 1000. In particular, the abandonment rate can be reduced considerably if a recommendation considers not only the local cost for a user (to rent or return a bike), but also the impact on potential users in the future. For example, the strategy with the penalization schema 3000/2500/3000/1000, as compared to _EC (70,000/2000)_, reduces the number of abandonments from 240 to 15 by maintaining the same travel time (21.6 min). In Section 5, the _EC (70,000/2000)_ strategy showed a good behaviour in terms of abandonment rate and low travel time. Using the penalization cost pattern 3000/2500/3000/1000, and fixing the factor \(f\) = 1, in Figure 5 we analyse the influence of the prediction timeframe in the results. Figure 5 indicates that, as expected, short prediction timeframes present higher abandonment rates but faster travel times. It is more likely that future users will not find an available bike or slot, but users are sent to \"closer\" stations since the considered future impact will be lower. At some point, the values for dropout rate and travel time tend to