dynamics of urban bike sharing systems.pdf

Upload: gabriel-souza-pontes

Post on 02-Jun-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    1/28

    Dynamics of Urban Bike Sharing Systems

    Katarzyna Samson Claudio Durastanti

    Supervisors: Rene Doursat Hiroki Sayama

    Second Annual French Complex Systems Summer School, ISC-PIF, August 2008

    First Draft

    ABSTRACT

    Bike sharing is becoming an increasingly popular means of transport in many cities around the

    world. Considering its pro-ecological value and the rapidly growing price of gas it is of utmost

    importance to understand and predict the behavior of such system. In this pilot study we apply and

    compare two different approaches to simulating a bike sharing system. The statistical analysis

    conducted in Matlab showed that not only it is possible to realistically simulate such systems in the

    present but also draw some conclusions concerning its future behaviour. It concentrates on a

    mathematical description of the system and its time evolution. The agent-based approach study

    reflects the behaviour of single bikes in the system. Deriving from few general assumptions about

    the network topology and both the logic and randomness of users behaviour we obtained a model

    of a hypothetical city where such bike sharing system had been introduced. The results of our

    simulations are qualitatively in line with the real-life data from the Velov system in Lyon.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    2/28

    2

    1. INTRODUCTION

    The increasing popularity of bike sharing systems in various cities around the globe reflects the

    overall traffic congestion as well as the state of public transportation systems and the demand for a

    means of communication not only more comfortable but also time efficient, healthy and pleasant.

    Such solutions are also ecological and economical and these characteristics of a commuting system

    are of growing importance. They are only one of many expressions of a more general transition that

    our world is undergoing, a turn back to nature and away from the overwhelming consequences of

    urbanization and technocracy. In this exact historical moment simulating bike sharing systems is

    especially important in order to understand the revolution that is taking place and be able to

    precisely predict its future direction and consequences.

    The aim of this work is to simulate the behavior of a bike sharing system such as, for instance, the

    Vlov in Lyon and the Vlib in Paris. The working of a bike sharing system can be described in

    the following way: N bike stations are distributed around the city, each composed of a various

    number of towers (places). Each station contains a certain number of bikes, each one attached to

    one of the towers. The remaining towers, if there are any, are the empty places where it is possible

    to attach other bikes. A registered client (the biker) can pick up a bike at a station, use it to go

    somewhere else and, once somewhere else, find another station with a vacant tower to leave the

    bike. If the reattachment of bike is done before thirty minutes have passed since the bike was first

    taken, he does not pay anything for using it. Such behavior is repeated a number of times daily by

    various registered clients and the distribution of bikes around the city constantly changes.

    Trying to find some regularities in the behavior of the whole system (all stations + all bikes) is not

    only an interesting and curious challenge, but also a means to fix some general optimization rules

    for this kind of systems. In our work we tried two different ways of simulating this system with the

    purpose of comparing the different simulations and finding similarities and differences between

    them and also the strengths and weaknesses of each. One is an agent-based model performed by

    Netlogo 4.0.2, where we studied a fully connected network forced to respect fixed constraints, while

    the other is a statistical model performed by Matlab 7.1. The heuristics of the model were developed

    through simulating successively more complicated systems in Matlab, in order to check the

    plausibility of the work and to generate consistent matrices and data also necessary to perform the

    simulations in NetLogo.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    3/28

    3

    After only ten days the work is still rudimental and surely full of mistakes and ingenuities but we

    are already able to define various methods, define some rules and show more advanced ideas and

    topics that could become the basis for future work.

    In this draft we will first describe the basic assumptions on which we based the construction of our

    ideal city and ideal bike sharing network. Then we will show how these assumptions become

    mathematical and computational statements. Afterwards we will describe the main results obtained

    and finish off with a series of open problems and our intuitions about increasing the plausibility of

    the simulation as well as some critical remarks.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    4/28

    4

    2. THE MODEL

    2.1Statistical Approach

    Initial assumptions

    Creating an ideal city means fixing a priori some statements to maintain resemblance to reality

    and putting in evidence the main constraints that the simulated system has to respect to be

    considered valid. Those are the principal axioms defined while building the city.

    - Uniform distribution of the stations Principle

    The first strong assumption concerns the distribution of stations around the city, which isconsidered uniform (fig. 1).

    Fig. 1:comparison between the real and the ideal distribution of stations in the city.

    - Biker will Axiom

    Let us suppose a biker is leaving from station x. It is reasonable to suppose a low probability of his

    destination being in a station y located very close to x because it is simpler to move on foot. In the

    same way stations located too far from the initial station x are not probable destinations because

    going there by bike means paying for the trip (and everybody prefers to save money!). Therefore we

    consider more probable the stations located near to the average distance from x to any other station

    within the city limits.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    5/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    6/28

    6

    From theory to practice

    Fig.2: the functional structure of the Matlab program

    Starting from these rules, we can now deduce our mathematical system. Since the network is fully

    connected and moreover our ideal city is built on a plain, we can consider our city a homogenous

    space in which the bikes move freely between stations. This consideration means that the only

    spatial constraint for the movement of bikers is the distance from the center. Having fixed the

    number of stations, Cartesian coordinates inside the city-space are generated randomly for each one.

    The stations are described inside Matlab by a structure stat composed of:

    - N: number of stations (scalar)

    -

    pos: Cartesian coordinates of the stations (matrix 2xN)

    - link : number of the neighbors within a threshold, "centrality" index (vector)

    -

    param: parameter that describes closeness of each station to the center of the city (vector)

    - bikes: number of bikes for each station at the instant 0 (vector)

    - threshold: total number of bikes allowed in each station (vector)

    -

    mean: distance mean from the other stations, weighted (vector)

    - var: the corresponding variance (vector)

    -

    sd: square root of the variance (vector).

    Velov

    Create_transition_matrix2

    Exp_factor

    Thr_bike

    Move_bike

    Create_transition_matrix

    Time_step

    Check_bikesDislocation

    Perturbation

    Initialize

    Iteration

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    7/28

    7

    This structure contains all the possible information about the bike system. The param vector needs

    a more precise explanation. We defined two different parameters in order to define the importance

    of the stations: one is based on the connectivity matrix, which computes the number of stations

    contained inside a circle with a fixed radius. Better connected stations have a higher value of this

    parameter (it depends on the link vector). Another way to fix this parameter is to compute the

    Cartesian coordinates of the center of the system then calculate the distance between each station

    and the center and normalize the obtained vector.

    It is now possible to compute the NxN Euclidean distance matrix D(i,j): the distance matrix will be

    used to compute all the transition matrices. Our purpose is to obtain two different transition

    matrices: on one hand a matrix associated with the biker will axiom, on the other hand one

    deriving from the city centralityaxiom. These matrices play the role of defining the time evolution

    of the system in a manner as simple as possible: we will define them to obtain a discrete linear

    system:

    ( ) ( )=+j

    jiji tnWtn 1

    with the normalization property:

    1=jijW

    Let us start to describe the derivation of the biker will transition matrix. In order to respect the

    precepts of the axiom, this matrix has to contain small values for the nearest and the farthest stations

    from the station of origin. It is therefore natural to choose a Gaussian distribution over the distance

    values, standardized with respect to the mean distance to the other stations and the corresponding

    standard deviation, successively normalized.

    The second matrix has to be deduced from merging the distance to the destination station x and

    station of origin y with the importance of station x. There are two different methods to obtain

    these values: the first one is to simply multiply the distance matrix by the importance of the

    destination station, the second is to divide the previous result by the sum of the importance of x

    and y.

    Before continuing with the description of the simulation, it is now opportune to specify some

    computational tricks to save the discreteness of the system and avoid the consequent problems

    with the Conservation of the Number of BikesLaw. Since the time evolution of the system at time i

    is obtained by multiplying the not integer matrix ijW by the (integer) number of bikes for each

    station at the time i 1, the computational operation furnishes us with a not integer vector of bikes.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    8/28

    8

    Since it is obviously impossible that only a part of a bike arrives at station x while another part of

    the same bike goes to station y, we round the number of bikes to an integer, which in consequence

    raises the problem of the total number of bikes being in circulation in respect to their expected

    number. Given that the difference between the bikes expected and obtained amounts survived to

    the time evolution and the initial number of bikes, the function check_bike randomly allocates (or

    deletes) the missing (or excessive) bikes. It is a very rough way to save the Conservation of the

    Number of Bikes Law but the huge number of conducted simulations shows that the overbike

    parameter tends to stay below 5 bikes.

    What if the destination station is already full?

    The main particularity of this system is undoubtably given by the Neighbor selection Principle,

    solved overall by applying the Non Stupidity of the BikersCorollary. Let us suppose that a biker

    arrives at a station x which is already full. It is worth precising that thr_bike, subfunction of

    initialize, defines the threshold at 20 bikes for the stations closer to the center of the city and 10 or

    15 for the farther ones. The biker therefore decides to go to the closest to x station y, the first

    neighbor identified by the neighborhood matrix computed inside the initialize function. If the

    station has empty places, the problem is solved, but if also the station y is full, the biker must find

    another station. Since the biker is now in y, the choice should be addressed at the closest station to y,

    z. The procedure is reiterated until the biker is finds an empty place to leave his bike. During this

    procedure a problem can arise: what if the closest to station y is again station x? The system could

    fall into an infinite loop in which our poor biker continues moving restlessly from x to y and from y

    to x, moreover spending a lot of money. TheNon Stupidity of the BikersCorollary furnishes us with

    a possible solution. We can optimistically suppose that the biker is able to remember the stations

    already visited during this journey and to move directly from station y to station z, also if this

    station is located farther than x. It is important to specify that his memory has to cover all thestations already visited for each time step (long term memory), because it is also possible to

    imagine also the birth of infinite loops between three or more stations.

    In our simulation this procedure is described by the interaction of the functions dislocation and

    move_bike. While the dislocation function finds the stations where the number of bikes has

    exceeded the threshold and for each of them gives the start to a while cycle that contains the

    move_bike function. This function first checks if the first neighbor has not been already visited,

    only then whether this station is full or not. If there is a vacant place, it is taken by the bike, if not

    the memory vector that memorizes the visited stations adds another station and move_bike is

    restarted.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    9/28

    9

    The time evolution of the linear system

    We can now start to reiterate the single time step procedure to obtain some descriptive results. In

    order to predict the behavior of the system by applying both the matrices, we can study the

    eigenvalues associated. Since the system is discrete it is necessary for the eigenvalues to be smaller

    or at least equal to 1 to make the system convergent to a stable equilibrium. Both our matrices have

    all the eigenvalues smaller than 1, except one, that is equal to 1. Describing the system by the

    corresponding eigenvectors: we can see that the normal modes of the system, for any given initial

    conditions, collapse to zero in a few cycles, except one that remains constant. In our station-based

    we see that after few cycles each station approaches its limit-value.

    Looking at the two different transition matrices, we can find a substantially different behavior. For

    the station-centered matrix transition, all the stations have, more or less, the same number of bikes.

    This conclusion is not surprising: if the stations are uniformly distributed and their preferred

    destination stations are situated on the average distance from them, it is easy to suppose that after a

    few cycles all the station will have a similar number of bikes (Fig. 3).

    Fig. 3: Station-based time evolution, with 80 stations and 962 bikes

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    10/28

    10

    On the other hand, the city-centered matrix transition divides the stations more distinctively into a

    central group of stations in which the number of bikes is close to the threshold and another group of

    stations with few bikes.

    Fig. 4: City center-based time evolution, with 80 stations and 962 bikes

    It is now the moment to use the World-rotation dependence Postulate to give a meaning to the

    different behaviors given by the two axioms. In fact, it is reasonable to consider the behavior

    dictated by the first transition typical for that of the night time, in which many bikers come back

    home to sleep, while the one fixed by the second transition means that people are going to thecenter, to work or to study - a typical day time behavior.

    What consequences does this drastic consideration bring to our simulation?

    We now have to find a way to alternate day and night in order to realistically simulate our city. The

    solution we found is the following:

    ( ) ( ) ( ) ( )( ) ( ) +++=+k

    k

    night

    ik

    j

    j

    day

    iji tnWttnWttn 1111

    where is the following periodic time-dependent parameter:

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    11/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    12/28

    12

    ( ) ( ) ( )111 ++=+ tnNBttn dunperturbeitotonperturbati

    i

    perturbed

    i ,

    where

    ( )( )perti

    onperturbati

    i xxdistB ,exp ,

    and the parameter [ ]1,0 is defined as:

    ( ) ( ) = dtttt onperturbati 0 ,

    where [ ]1,00 is usually close to 1 (Fig. 6).

    We have to add this term to the non-perturbed equation, obtaining:

    ( ) ( ) ( )( ) ( )( )11111 ++++=+ tntNBttn dunperturbeitotonperturbatiiperti

    Obviously, we have to round the number obtained and to reiterate the check_bike procedure.

    Fig. 6: Perturbed time evolution, with 80 stations and 962 bikes

    We would like to highlight one important consideration concerning our definition of perturbations.

    The distribution of the bikes during the perturbation is independent of their position in the previous

    time step. This assumption is very strong, because it means the bikers are going to the perturbation

    center independently of everything they were doing before. It should therefore be adjusted to reality

    in the future.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    13/28

    13

    2.2Agent Model Approach

    The model

    The NetLogo model of a bike-sharing system was built in order to observe the dynamics of traffic

    flow on such network given some fixed constraints. Having to choose between a city-specific and a

    generizable model we decided on the latter leaving only very few basic assumptions.

    The model consists of 3 basic elements:

    - Bikes

    A single bike is the agent in our system. It is born when the simulation is initialized and considered

    immortal. A bike can move around the city within its limits from station to station or stay

    motionless for a period of time.

    -

    Stations

    Stations are the parking lots for bikes. Their locations are fixed. A hypothetical biker going from

    location ito locationjpicks a random bike from stationNi, the closest to location i, and after having

    reached locationj, leaves the bike at closest to J stationNj.

    - Links

    Links symbolically represent the system of streets in a city. They are shortest-path connections

    between stations along which bikes move. Each link between any two stations has a weight thatrepresents the probability of a biker in location i choosing j as their destination. The links are

    directed so the probability of going from station ito stationjcan be different that the probability of

    going fromjto i.

    Basic Assumptions

    Given these three basic elements we built a bike-sharing model governed by the following rules.

    First of all, the number of bike stations scattered around every city is fixed. In each case it can be

    adjusted depending on the size of a city, its geographical location and lay of the land, characteristics

    of public communication system and transportation habits of its habitants, but once decided upon,

    the number of stations is constant.

    Secondly, the number of bikes can be manipulated but once chosen stays fixed until the end of

    simulation (Conservation of the number of bikes Law). Keeping in mind the user-registration

    process of every biker, the bikes neither disappear from the system nor appear miraculously. Every

    bike that has left a station will reach another station. We assume that a broken bike is immediately

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    14/28

    14

    fixed or replaced by the owner/manager of such network. We also optimistically assume that neither

    the bikes not the stations are of any interest to thieves or hooligans.

    Distribution of the stations around a city is an extremely specific issue. Not only does it depend on a

    measure of centrality but also on local points of interest such as institutions or historical sites and on

    top of that it undergoes temporal variations when specific events of common interest take place

    (The football match effect Law). Therefore in this model we decided on a more general lattice

    distribution in which the stations are randomly assigned to locations and the importance of each

    station is defined by the weights of links that connect it with the rest of the stations.

    The stations form a fully connected network i.e. from every station you can theoretically reach any

    other station. But since the weights on the links differ the probability of going from one station to

    its nearest neighbor is very low. Same happens with a distant station after reaching a certain

    threshold the probability of going to a lonesome destination is inversely proportional to the distance

    between stations.

    Movement rules

    In this NetLogo model the movement rules for the bikes are much simpler than in the Matlab model.

    Neither the Biker Will Axiom nor the Neighbor Selection Principle apply here. At every timestep

    each bike will either move to one of the other stations or not move at all depending on the result of

    a comparison between a randomly generated number and the weight of a link in one of the weight

    matrices. There is no threshold set for the number of bikes at each station, theoretically all the bikes

    could at some point end up in one station.

    Consistently with The World-Rotation Dependency Postulate we assume a different commuting

    behavior during daytime and nighttime and thus differentiate between a daytime and nighttime

    weights matrices. Except the assumption that at night some people tend to stay home sleeping

    instead of riding bikes around the city no beliefs concerning human nature are implied in themovement rules therefore the bikes (bikers) have no memory of previously visited stations and their

    behavior is entirely determined by the weight matrices.

    The weight matrices can be set according to individual preferences but the default weight

    distributions are results of performed Matlab calculations.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    15/28

    15

    3. RESULTS

    3.1Matlab simulations

    Preliminary investigation

    Let us first describe the important parameters for the understanding of the simulation. Note that the

    following graphs, describing the number of bikes per station, are supposed to give only a general

    idea on the dynamics of the system.

    - N: the number of stations

    It is estimated that in Lyon there are about 450 stations. For the computational limits, it is our aim

    to find a threshold above the behavior of the system maintains the same properties (Fig.7)

    Fig. 7:System evolution with different number of bikes.

    We can deduce from the figure that the system (N = 30) starts to show the expected behavior. The

    system (N = 50) evolution is very similar to the evolution of the bigger systems, so we choose to

    simulate systems (N = 50)

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    16/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    17/28

    17

    Fig. 9: Presence or absence of constraints on the system.

    The city

    In the fig.10 the map of our ideal city is shown. Note that the perturbations emerge randomly in the

    city: it is possible to consider these different centers as different real important points in the city(auditorium, stadium). While the coordinates of the stations are generated randomly, the center

    of the city is computed as:

    =

    =

    i

    icenter

    i

    icenter

    yN

    y

    xN

    x

    1

    1

    where N is the total number of stations.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    18/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    19/28

    19

    Fig.11:Visualization on the different behaviors generated by the program

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    20/28

    20

    Simulation analysis

    Having fixed the parameters, we run the simulations changing only the initial positions of stations:

    Fig.12 shows a selection of them. The behavior described by the time evolution is more or less the

    same. All the simulations are starting at the beginning of the day, therefore for the first 12 hours

    there is a very large range of numbers of bikes per station. After a few cycles, at the beginning of

    the night, bikers start to distribute themselves homogeneously around the city, except a few stations

    in which the number of arriving bikers is equal to the number of leaving bikers. If peaks appear, it

    means that a perturbation is activated: where the peak is more accentuated the station is farther from

    the center of the perturbation. It is interesting to note that different stations seem to have different

    periodic behavior.

    Fig.12:Showing different simulations only by changing initial parameter

    The stations

    Now we are going to examine the distribution of some stations randomly chosen in a simulation in

    order to give an idea of the different behavior that they can have (Fig.13) . It is important to specify

    that this kind of description could be generalized to each simulation. In various stations we can

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    21/28

    21

    observe a periodic behavior: for instance station 2 is always already full and its number of bikes

    oscillates between 17 and 20 (remember that 20 is the maximum of bikes allowed). It is immediate

    to deduct that station 2 is a central station. Also the station 7 shows a similar behavior, but during

    the day the bikes in the station are 10, and during the night they are 12: station 7 is therefore a

    peripherical station. Instead stations 16, 32, 48 and 49 show a deformation in their plot,

    consequence of a perturbation: we can imagine that these station are far (16 and 32) from or close

    (48 and 49) to the perturbation center.

    Fig.13:Number of bike per station time evolution.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    22/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    23/28

    23

    Initiating the simulation begins the movement of bikes around the city in daytime mode. At each

    timestep some of the bikes change location according to the input weight matrix generated in the

    Matlab simulation and the symbolic representation of each station (circle) changes size (radius) to

    reflect the number of bikes currently at that station. The duration of each journey is equal. After a

    given number of time steps (here 20) the matrix changes to night time weights and the behaviour of

    the bikes adjusts accordingly. The transition from daytime to night time matrix happens at regular

    time intervals. Halting of the simulation is done manually (Figg.15, 16).

    Fig. 15:The system after 480 timesteps. Note the central stations 16 and 23

    The transition from daytime to night time matrices results in an interesting pattern of bikers

    behavior. During night time the number of bikes moving around the city is almost stable but when

    the daytime matrix is introduced a sudden movement of a large number of bikes can be noticed but

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    24/28

    24

    then it slowly decreases to an average level, yet still higher than the night time movement level. The

    pattern is reproduced independently of the number of bikes in the system (Fig.16). This can be

    explained in terms of real-life commuting habits of the bikers. While almost every-working-one

    starts the day at a similar hour, the time of their returns tend to vary significantly. This behavior of

    the system was not included in the constraints while generating the matrices and thus can be

    considered an emergent characteristic of the system, especially given its stability regardless of the

    number of bikes in the system.

    Fig. 16:Moving bikes per timestep

    Since in this simulation we did not define the Cartesian location of the important stations, theimportance of certain nodes comes from the matrices the weights of the links leading towards

    central stations is higher. These stations are consistently fuller than the non-central stations (Figg.

    17, 18, 19). Stations 16 and 23 can also be easily identified on Fig.15.

    Fig.17: Behavior of station 6 peripherical

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    25/28

    25

    Fig.18:Behavior of station 23 central

    Fig.19:Behavior of station 16 - central

    The stations in this NetLogo simulation do not have a set threshold of the maximum number of

    bikes in them. This allows us to notice that given the Matlab-generated matrices, allowing for a

    natural behavior of the system would result in a lot greater number of bikes on the central stations

    (Fig.20). The average number of bikes at central stations is as much as 5 times greater than the

    average number of bikes on peripherical stations and regardless of the initial distribution of bikes in

    the stations the central stations are strong attractors of the system. The daytime-night time patterns

    of behavior are very stable in time and largely dependent of the size of the station.

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    26/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    27/28

  • 8/11/2019 Dynamics of Urban Bike Sharing Systems.pdf

    28/28

    is still qualitative) and adding more terms to the studied equation, beyond improving the ones

    already studied. Finding an optimal parameter alpha could be an example of optimization of

    parameters, making the perturbation effects acting only in a part of the city as big as the perturbing

    event is important could represent an example of the increasing the proficiency of the simulation;

    adding for instance of a long time decay coefficient of damaged bikes plus one impulsive term of

    substituting bikes could be new term to consider in the simulation. All these ingredients will give

    back a more realistic portrait of the city.

    BIBLIOGRAPHY

    Data sources:

    - http://en.wikipedia.org/wiki/Community_bicycle_program

    - http://fr.wikipedia.org/wiki/Vlov