Keywords

1 Introduction

The academic community has reported the correlation between human mobility and crime from different perspectives. Examples of this are the works by Felson [11] that found a relationship between the occurrence of crimes and the convergence of routines between offenders and unprotected victims, Brantingham and Brantingham’s [35] works on environmental criminology and, most recently, Caminha et al. [17], found that the relationship between clusters of floating population and crimes against property within a large metropolis follows a power law.

Despite the fact that the correlation between mobility and crime is widely recognized and studied, few quantitative studies have been developed to understand the impact of crime on the mobility of people in large cities. However, digitized data on the movement of people are increasingly abundant, opening up the possibility of elaborating more complete social models that can be used in validation.

Our research in this context focuses on data on the movement of people in buses in a large Brazilian metropolis, the city of Fortaleza. These are data concerning one million people who daily use buses on their journeys, which characterizes this mode of transportation as the most important form of city displacement (the total population of the city is 2.4 million people).

In previous studies, we have studied the impact of the movement of people on the occurrence of crime [17] as well as on police allocation strategies [36]. In this article we will follow a different strategy, as we will investigate the impact that crime distribution in the city can have on the choice of bus routes made by people. We have developed a software platform that enables us to use data of movement and crime in the city to simulate the impact on the public transportation system. In particular, we simulate the negative effects that this can have on the behavior of bus users leading them to choose clearly less efficient routes in terms of travel time, comfort and/or distance traveled. In addition, it was possible to estimate the impact on the public bus transportation system in general by evaluating indicators such as the passenger’s waiting time at bus stops and bus overcrowding.

The methodology that we followed was to compare two models of bus routes. Firstly, based on the real world data provided on the paths of the users, we evaluated the system of when the users make their actual routes. Then we investigated how the Public Transport System (PTS) would behave if users chose to take more efficient routes in terms of time. In order to achieve this goal, users are likely to seek to make bus line changes in order to minimize route time since many origin-destination routes are impossible to complete from a single direct route. This strategy, favoring the time of the journey, is not necessarily the most efficient in terms of security, since bus stop connections can be criminal hot spots. In fact, It has been found that, in Fortaleza, the bus stops that are more suitable for commuters are significantly more insecure than the places that the users actually use. This result raises the possibility that users of the Fortaleza bus system may be taking more inefficient routes to escape crime.

2 Related Work

Agent-based modeling provides a simplified simulation of the reality, but it is also a powerful technique to replicate social phenomena. The agent-based model uses a bottom up approach simulating the individual behavior of multiple agents in order to predict complex phenomena. These general characteristics allow for a large number of applications in a diverse range of areas, such as: archaeology [1, 2]; biological models of infectious diseases [3]; growth of bacterial colonies [4]; alliance formation of nations during the Second World War [5]; modeling economic processes as dynamic systems of interacting agents [6]; and size-frequency distributions for traffic jams [7]. In this work our main interest is in simulations of crime and urban mobility dynamics. In criminology, the role of urban space and its social relations have been previously emphasized to explain the origin of crime [8, 9]. In particular, the routine activity theory, proposed by Cohen and Felson [8], states that crimes, and more specifically property crimes such as robbery and theft, occur through the convergence of the routines of an offender, motivated to commit a crime, and an unprotected victim. The dynamics of crime and the impact of social relations on the increase of violence has been the object of study in several areas such as Social Sciences [10], Criminology [8, 9, 11], Computing [12,13,14,15,16,17], Economics [18] and Physics [19,20,21,22,23,24,25]. There are also a number of papers that use simulations in Criminology in order to test theories [26]; to study burglary including transportation networks and statistically based human mobility patterns along the network [27]; and to analyze police patrol routes [28].

There is a vast literature on human mobility [29,30,31,32,33], however, less attention is given to its possible connection with crime. Some new researches have shown that human mobility is a key factor in understanding the spatial distribution of crime in the urban landscape [17, 34] yet, works on how crime can affect human mobility are scarce.

3 Data Sets

We used user routes and a bus travel time network produced in a Data Mining project executed on mobility data in the city of Fortaleza [17, 31, 37]. A user’s route on a bus network is defined by bus stops visited in sequence by that user within one or more buses. This is defined as: a user route Ru, is a set containing n ({p1, p2, p3, …, pn}) bus stops visited in sequence by a set of bus lines, Lu = {l1, l2, l3, …, lm, used by u in its course. Furtado et al. [37] estimated these routes from the actual origin of each user to the actual destination, see [31] for details. For each origin and destination, two routes were estimated; one that the authors consider to be the actual route of the user and the other is an optimal route in time. In total, 294870 origins and destinations (representing an average behavior for business days in Fortaleza) were estimated, starting from these origins to their respective destinations, the same number of real and optimal routes was estimated.

Access was obtained to the scheduled route of the city buses, if there is a certain quantity of vehicles available on a weekday for each bus line, capacity of each vehicle, departure time for each trip of each vehicle and the expected arrival time.

Also from [37], a network of time was obtained, where the nodes represent bus stops and the links are the average time between these two bus stops. Each link was assigned a probability function that is based on the mean time (μ) and standard deviation (σ) calculated from the actual GPS data of the buses. Thus the time of an edge at time x is obtained by the function:

$$ f\left( {x,\mu ,\sigma } \right) = {1 \over {\sqrt {2\pi {\sigma^2}} }}{e^{\left( {{{ - {{\left( x\, -\, \mu \right)}^2}} \over {2{\sigma^2}}}} \right)}},\;\; - \infty < x < \infty ,\sigma > 0 $$
(1)

Crime data refers to crime against property (theft, robbery and burglary) occurring between 9/23/2014 and 10/4/2016 in the city of Fortaleza and metropolitan region. In total, this dataset has 98431 crimes. Figure 1 shows the density map of these crimes in Fortaleza.

Fig. 1.
figure 1

Density map for property crime in Fortaleza from 2014 to 2016.

4 Simulation

The simulator was developed using Repast, a java multi-agent simulation framework. This simulator handles events whose management and execution of actions is done by a clock, which has a tick as a measure of time. The tick is incremented when all scheduled actions are performed.

The main elements of this tool are: Bus; Line; Route; Passenger; Stops; and Crimes. Buses behave like agents in the simulation, their behavior is stopped by the stops and making trip connections. They have as main attributes the current stop (corresponds to the stop it is at or the last stop it has visited), the next stop to be visited, the time needed to reach the next stop, the list of passengers in the vehicle, the current line and a hash that commits the trips that the bus will make in one day. Passengers, in turn, have information regarding the route they will take, i.e. they have a list with the lines that they will use and another one regarding the stops where they will board and disembark. Passengers are agents who board and disembark from buses when vehicles pass through their initial and destination stops. The lines have a list with all the stops on their route. The crimes include the information of where they occurred (latitude and longitude) and their type.

It was defined that the simulation start time would be two o’clock in the morning, because it is the time when there are fewer buses in circulation and fewer passengers using the system. This minimizes the effect of the simulation starting with empty buses. The simulation closes at two o’clock in the afternoon because of technical limitations, so it is possible to evaluate the system in its peak hours, from 5:00 am to 8:00 am, as well as at low usage times, for example in the early morning. Each minute is called a bus dispatch event, in this event it is checked if the time of departure of each bus has already been reached, if positive, the bus enters the simulation, at the end of this event one minute is increased in the time of the simulator.

Each bus has an event called move, it consists of the logic that makes the buses follow the network. This event is triggered after the dispatch event. After all buses run their event, the process will be finalized and will only start again at the next tick. As already mentioned a bus has a current stop and the next stop, the time in which the bus will take to reach the next stop will be calculated using the average time in which the buses of this line take to pass through this stretch and the standard deviation of those times. These are the input data to apply to the normal or Gaussian distribution so as to get the time in which the bus will take to go along an edge.

Each tick represents one minute in the time of the simulator, if the time for the bus to cross the edge is greater than sixty seconds, the bus will not be able to complete this stretch still within this tick, so the time for it to arrive at the next stop will only be decreased from sixty seconds. If the time is exactly equal to sixty seconds, it will travel this edge still in this movement and will arrive at the next stop. The last case that can occur is the time being less than sixty seconds, that is, one bus will arrive at the next stop and will continue towards another.

Whenever a bus arrives at a stop, it is checked to see if there are passengers intending to disembark or board the vehicle. A bus in Fortaleza has 80 passengers, so if its capacity is reached and some passenger wants to embark, it will have to wait for the next vehicle of that line to pass.

When the bus of a certain line reaches the end of its route, it is checked to so see if there are still trips for that vehicle to carry out, if there is a check that the line is maintained or if there is a line change, the trip changes are made and the bus starts a new trip. When there are no more trips for that bus to perform, it will be removed from the simulation. The simulator closes at 2 o’clock in the morning the next day or when all the buses finish all their trips.

5 Methodology and Empirical Evaluation

In this article, the bus system will be evaluated for waiting time for shipment, stocking of vehicles and safety at the point of transfer. The average waiting time for boarding is calculated by subtracting the time of boarding from the time that the passenger appeared at the stop, and the vehicle stocking distribution, which shows the quantities of vehicles with low occupancy (between 0 and 20 passengers), intermediate occupation (between 21 and 60 passengers) and high occupancy (between 61 and 80). Security was measured by the ratio of the number of crimes occurring in the vicinity of the transfer point divided by the number of users who are on-site, we call this Rate of Crime.

The behavior of the network with its natural operation was observed, i.e. when all users take their actual route. The behavior of the network was also evaluated in a hypothetical scenario, simulating a situation where all users take optimal routes of time. The contrasts between the values of the individual indicators adopted in this research can be observed in the panel of Fig. 2.

Fig. 2.
figure 2

Indicators of quality of use and safety for the bus network of Fortaleza.

Figure 2(A) shows the stocking of vehicles when all users take actual routes, while in Fig. 2(B) the vehicles are stocked for the optimal routes. It may be noted that when passengers take optimal routes there are less crowded buses. This is because Fortaleza’s transit network is not prepared for its users to take optimal routes in time, thus, many passengers are waiting for vacancies to appear on the few crowded buses. In Fig. 2(C) it can be seen that at the beginning of the day, where there are few buses running, the waiting time for the passengers is similar, regardless of the route (real or optimal). However, from the peak time onwards, the number of vehicles in circulation increases and the waiting time for those who take the optimal routes becomes longer than the waiting time for actual routes. This is because when everyone does the correct thing, there are not enough vehicles to meet the demand. In Fig. 2(D) it is possible to visualize the crime rate per stop at optimal and real p. It can be observed that the risk at optimal points of transfer is greater than at the points where users actually pay, especially outside the peak hours (from 5 am to 8 am), possibly the higher number of people on the street discourages criminals from committing crimes at that time. This result raises the possibility that people choose slower routes to escape the crime, essentially because the slower route has its point of transfer in a bus terminal, a place that offers, among other things, greater safety for users.

In Fig. 3 we show the relationship between crimes and the urban public transportation network. Recently, an extensive analysis conducted with real crime data related to a large Brazilian metropolis [38] demonstrated that the spatial distribution of crimes such as robberies, theft, and burglaries follows a power law, more specifically, a Zipfian distribution [39]. We see in Fig. 3A that the distribution of crimes occurring close to bus stops visually follows a power law, with an exponent close to −2.0 as shown by the red guideline. The power law distribution indicates that we can find bus stops with a much larger number of crimes when we compare with an exponential distribution. In order to see the effect of crimes on the usage of the urban transportation system, we computed the number of crimes that occurred close to a bus stop which is used for a connection transfer in the optimal routes. As we already mentioned, a large part of the users do not use the optimal connection transfer, instead of this, they seem to choose a safe route. In Fig. 3B we show that a large percentage of connection transfers on the optimal route (98%) have more than 10 crimes close. This is an indication that the users prefer to go by a safe but longer trajectory.

Fig. 3.
figure 3

Histograms of crimes. (Color figure online)

6 Conclusion

In this paper we describe a simulation platform that supports studies on the impact of crime on urban mobility. We present an example of how this can be achieved by seeking to understand the effect on the public transport system, if travelers decide to choose optimal routes of time between origins and destinations. Based on real data from a large Brazilian metropolis, we found that when a bus transfer is necessary, the percentage of users who follow this policy is small. Most prefer to follow less efficient routes by making bus transfers at terminals. This can be understood as an indication that the users of the transport system favor the security factor. This indication is corroborated by the fact that 98% of the optimal routes pass through unsafe bus stops (more than 10 crimes).

Our research is ongoing and new tests are necessary to detail the features that passengers consider the most important. The simulation environment must also be improved to help this process, however, this first work has already shown to us that it is an important to tool to help understand the impact of crime on urban mobility. Based on real data describing the geographical space, we intend to further investigate particular, new and different policies based on features like comfort and overcrowding in order to improve the simulation.