Modelling of User Behaviour for Static Rebalancing of Bike Sharing System: Transfer of Demand from Bike-Shortage Stations to Neighbouring Stations
Algorithm 1
Algorithm for lost demand evaluation considering user behaviour.
Input: The initial station status (), the interstation acceptance rate matrix (), the interstation distance matrix ()
Output: Total lost demand
Begin
For all station do
End for
While and do
//Calculation of residual stock () of stations
//Calculation of residual demand () of stations
//Calculation of (i) backlog demand () of the target stations after transferring users from source stations which have a residual demand () not null, (ii) lost demand of each station (), and (iii) global lost demand ()
For all station do
End for
For all station such as do
Let be a nonempty station (such as ), which is acceptable (such as ) and the closest, in the sense of the matrix (if there are several stations at the same distance, the smallest index station is chosen).