A Byte of my 2.2-lb Brain

Just sharing stuff…

Agent-based modeling of urban complexity

Note: This write-up appears in Issue 5 of the Nanyang Technological University Complexity Institute Newsletter. Click on the chosen pages above for a preview.

Agent-based modeling of urban complexity

By Dr. Christopher Monterola & Dr. Erika Fille Legara

Urbanism is the process through which cities grow. Wordwide, in 1950, about 30% of the population resided in urban locations; by 2009 urban folks formed the majority as compared to rural dwellers. Crude estimates put that by 2050 about 70% of the population will be in cities and by the turn of the 21st century almost everyone will be in cities (Figure 1). Such growth certainly makes sense if one argues based on the economies of scale, since providing transportation, energy, water, housing, accessible amenities and entertainment for a densely populated area is normally cheaper than similar access for a dispersed rural population. However, a simplistic application of the concept of scalability to cities is bound to fail since the interaction of many city components may lead to properties that cannot simply be deduced from the dynamics of the individual constituent. Simply put, cities are complex systems.


Figure 1. Historical and projected growth of urban vs rural areas. (Data Source: World Bank)

Cities as complex systems

Complex systems have a few quantifying features. They are composed of many (1) agents/entities that are (2) strongly interacting. The interactions are (3) nonlinear and non-reductionist. And, as a result of these interactions, there are (4) emergent phenomena or multiple phases. Finally, the systems are in (5) non-equilibrium and are constantly adapting, evolving.

Cities possess all these features. A typical city, for example, has the same order-of-magnitude of land-use entities as its population. Singapore itself has more than 2.6 million residential, business and industry units for its 5.6 million inhabitants. All these entities are strongly interacting, connected by people of different demographics, complementing each other in a nonlinear manner and resulting in non-reductionist behavior, like crowd dynamics. Adaptations to new behavior lead to changes in economic activities, capacity, growth targets and even people’s aspirations.


Figure 2. Poisson distribution vs. power law. The image is taken from The Architecture of Complexity: From Network Structure to Human Dynamics by Albert-László Barabási.

One significant empirical feature observed in cities and many other complex systems is the presence of a power law in structure, both in time and space (y ~ x-b), signifying the involvement of both long and short-range interactions. A power law distribution in time means that memory or historical features are critical in the evolution of the system’s dynamics. On the other hand, a power law in space, also referred to as self-similarity or fractality, means that long distance connections must be properly accounted for. The assumption that city structure follows a normal distribution—a bell curve, is arguably one of the biggest misconceptions in the conventional view of cities. Such an assumption can impact various urban models and performance metrics—from city responsiveness, to transport efficiency, to robustness, and even sustainability. This is especially critical since being able to accurately model cities is timely and consequential; UN Director John Wimoth considers that “managing urban areas has become one of the most important development challenges of the 21st century. Our success or failure in building sustainable cities will be a major factor in the success of the post-2015 UN development agenda.”

A methodology to understand urban complexity: Agent-based modeling

Cities, like any complex system, have multi-dimensional hierarchies, i.e. a system-of systems structure. Each component in the hierarchy can have its own structure and model representation. Consequently, to understand the complete system behaviour, the models are typically weaved together to reflect interrelationships. In traditional engineering, these systems are often represented as block diagrams showing the components as boxes and their relationships as connections. While this is intuitive from a more theoretical standpoint, understanding how to integrate the constituent models when the components are heterogeneous in their data representation and/or scales can be a challenge. The difficulty increases when a system is multi-dimensional, necessitating the integration of many models (each representing a constituent/sub-system using descriptions that may not be consistent in the representation).

The above points to one of the main challenges of creating a functional and predictive city model—proper representation; that is, properly capturing agent dynamics and incorporating constraints. Traditional methods of using coupled differential equations to represent multi-dimensional agents that have diverse sets of characteristics can be quite tedious, computationally expensive, and inaccurate. A preferred method, of which the authors are especially partial to, is developing agent-based models (ABM).

ABM is a bottom-up approach that allows one to model and simulate actions and interactions of autonomous agents with each other and their environments. The key term in ABM is “agent,” which is in direct analogy to a person working in an agency—an organization providing a particular service on behalf of another business, person, or group. Agents have diverse, dynamic, and interdependent behavior; they can be autonomous or adaptive, properly capturing with high granularity the dynamics that is most natural to the system. For urban modeling in general, agents can be humans, businesses, institutions or any other entity that pursues a goal at any given time in any given space. Further, through ABM, one can introduce heterogeneity in the models, getting rid of the age-old assumption of rational agents.

The use of ABM has an added advantage that various stakeholders and policymakers tend to participate more effectively in when creating real-world models since the dynamics and constraints are more intuitive and self-evident. In our experience, policymakers and a good portion of domain experts in the field of urban planning are averse to differential equations while ABM allows them to interact more confidently and proactively, especially in the setting-up of rules, parameters, and the environment. We provide two examples of our work on two main aspects of urban complexity modeling, one that is relatively simple to implement (few constraints) and another one with more than 100 parameters to tune.

On simple rules to model the emergence of land-use: an ABM example

We provide below a simple example that allows one to model the emergence of urban land use using a variant of ABM, cellular automata, in a given city. [2] Cellular automata modeling is agent-based, but one where agents are spatially constrained and wherein each component interacts with neighboring (spatial) entities. In this work, we are looking at three types of land-use entity pixel agents (the residential R, business B, and industrial I entities). We then look at the evolution of the entities given the spatial constraints of a city (e.g. non-developable lands such as roads and forests, see Figure 3). Starting from a single seed that is situated at the center of mass of the central business district, agents are allowed to evolve using two dynamics, namely: (1) diffusion (jump to distance l taken from C(l) ~ l-11/5 [Bettencourt, Science 2013]) and (2) aggregation (grow after jumping to some size S taking into account the size of land that can be developed). A cluster size S is also defined that serves as the fitting parameter that is optimized based on its similarity to the actual entropy and the level of mixing of R, B, and I entities. The simulation is then terminated once the actual number of R, B and I is achieved.


Figure 3. Model of land use emergence illustrated with Singapore as a test case (total S~2.6 million from SR~.97m, SB~.06m, SI~1.5m units). Image taken from [1].


Figure 4. A representative result capturing the emergence of land use for Singapore and Toronto based on a single growth seed at the central business district. Image taken from [1].

Such simple rules have allowed us to capture quite robustly the general features of many cities including Singapore and Toronto (Figure 4) and some other North American cities. Simultaneous recovery of six independently measured attributes (entropies and relative mixing of residential, business and industrial sectors) from only three parameters (aggregation sizes of R, B, I) points to the statistical accuracy of the ABM paradigm. Additionally, we have shown that a single growth seed emanating from the centre of a predefined central business district can sufficiently reproduce, in all simulated cities, a remarkable resemblance with actual land-use patterns. The example here demonstrates that in some level, urban complexity is possibly a result of a simple set of rules or growth mechanisms.


On accurate transport models: another ABM example

Transportation is arguably the single most important aspect of a city’s morphology. It serves as the skeleton of complex urban systems as it facilitates the interaction and movement of people and goods; consequently, impacting energy and resource consumptions. In the next example we discuss [2, 3], where the agents are trains, platforms, and commuters. Using existing timetables of trains and actual ridership data, we build a full-scale ABM of the Singapore rapid transit system (RTS) that accurately reconstructs actual travel time of commuters, among others.

In contrast with the previous example that only has a single constraint, which is the non-developable lands, our ABM for the train system has hundreds of constraints that deal with signaling, operation, and various other spatiotemporal variables. Incorporating such granular constraints would not have been possible if we did not work closely with domain experts who provided us with the necessary information at every step of the model construction. This is possibly one of the more critical perspectives in building useful complex urban models—it is important that stakeholders are working hand-in-hand in the development of a solution.



Figure 5. A full-scale agent based simulation of train-bus dynamics in Singapore [2]. The size of the entities quantify crowdedness. In the image, the agents are the trains and the commuters (small yellow and green dots flowing in and out of a station that is represented by a big circle).


Figure 6. A full-scale agent based simulation of train-bus dynamics in Singapore [2]. A good model allows accurate forecast of scenarios when there is no available data, like disruptions for instance.

The model demonstrated here has been well calibrated and validated and can be used to forecast the impact of disruptions and other scenarios such as surges in the number of passengers. This allows researchers to assess, for example, the mean travel time of commuters and estimate the number of passengers who are unable to board trains at certain times of the day. By using machine learning it is also possible to forecast the growth of transport demand with respect to some planned growth for the city [4]. Using the ABM built, we are also able to identify abrupt dynamical changes (phase transitions) in the system capacity for different population sizes of RTS users. That is, if the number of passengers using the existing infrastructure reaches three million (currently, it is at 2.3 million), and assuming that no changes/improvements are to be implemented in the transport system under study, a phase transition will be observed wherein a sudden surge of passengers who are unable to board trains is observed.

This work in particular has been well-appreciated by policymakers and stakeholders because of its flexibility to incorporate most, if not all, of the parameters they can think of. Again, this is one reason why ABM is quite suited for problems where multidisciplinary collaboration is strived for like understanding and modeling urban complexity; it is intuitive and straightforward to implement.

Key Challenges

In urban planning, implementing policies based on intuition alone can be expensive, time consuming, and sometimes catastrophic. This short piece provides a quick perspective on urban complexity and how ABM’s bottom-up approach can capture some of the dynamics that allows one to reconstruct observed statistics and even build scenarios. In addition, the ABM’s “intuitive feel” makes it a method of choice for interdisciplinary collaborations. To end the piece, we list below some questions related to urban complexity that are driven directly by our projects and interactions with various industry and government institutions in Singapore, looking at complex systems science as a tool to understand city dynamics.

  • On safety: Can we balance land use efficiency with safety? Higher buildings are more land use efficient, but will have narrower pathways; hence, the set-up becomes more prone to overcrowding/bottlenecks.
  • On social cohesiveness: Can we find a good balance between vibrancy vis-à-vis overcrowding? What is the optimal height and width of the building? What is the optimal layout? Where should we set-up the next residential, business, and/or industrial areas?
  • On energy efficiency: What is the optimal city configuration, taking into account urban heat island effect, various anthropogenic factors, thermal geometry, and scaling principles?
  • On economic activities: What kind of an environment makes it more conducive for a creative population, noting that new ideas/innovations vary superlinearly with population density?
  • On aging population: What is a good urban design for an aging population? As a case in point, the mixture of dementia and pre-dementia residents who have opposing needs.
  • On traffic congestion: how do we improve traffic conditions based on travel demands/patterns?


[1] J. Decraene, C. Monterola, KK Lee, GG Hung, M. Batty
The Emergence of Urban Land Use Patterns Driven by Dispersion and Aggregation Mechanisms PLoS ONE 8(12): e80309 (2013).

[2] NB Othman, EF Legara, V Selvam and C Monterola A data-driven agent-based model of congestion and scaling dynamics of rapid transit systems 
Journal of Computational Science 10,  September 2015, Pages 338–350.

[3] EF Legara, C Monterola, KK Lee, GG Hung Critical capacity, travel time delays and travel time distribution of rapid mass transit systems Physica A: Statistical Mechanics and its Applications 406, pp. 100–106, 15 July 2014.

[4] N Hu, EF Legara, GG Hung, KK Lee, and C Monterola, Impacts of land use and amenities on public transport use, urban planning and design Land Use Policy 57, pp. 356–367, 2016

Blog feature image credit: Andy Yeung (http://joshuatopolsky.com/image/140877095842)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


This entry was posted on October 31, 2016 by in Blog, Publications, Uncategorized and tagged , .
%d bloggers like this: