-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction and methodology
"All models are wrong, but some are useful." - George E.P. Box
In early 2024, we embarked on a project that could potentially help the general public better understand the city of Colombo and impacts of various urban design interventions.
The underlying idea was derived from our experiences at Watchdog. We wrote a massive chonker of a piece a while back, spanning 13,000 words, about how transport works in Sri Lanka.
While there is professional expertise out there, that expertise tends to be usually in academic papers and reports, and visualizing things is often quite difficult. If we want everyday citizens to understand some of the problems that we face and to be better able to judge the impact of different decisions, then we need to build something that is a little bit friendlier and more visual.
Usually, the software used for these kinds of analysis are complex heavyweight creations, such as CUBE or OpenPaths.
Hence, Cities Skylines. For those who are new to it: Skylines is a game. It is a piece of software that heavily focuses on agent-based simulation of urban design and of traffic and of city management by individually simulating citizens who go about making decisions in a city.
Almost immediately on release, it developed a reputation for being one of the most complex and flexible simulations available to the public - such that people almost immediately began building real cities, such as Chicago, Hong Kong and Beunos Aires within the game itself. Over the years, a thriving scene of modifications, usually called mods, has developed allowing users to push the abilities of the game and its underlying engine further.
Therefore, we decided to use this as a base to help our readers better visualize the existing city, as well as potential social impacts of different infrastructure propositions.
Choices were also dictated by cost, ease of use and visual ability. CUBE, the de-facto standard in Sri Lankan academic modeling, costs $6,000 – 8,600 for an annual license, and requires expertise to handle. Skylines costs $19.99 for a perpetual license for something that’s designed for the general public to interact with. In addition, the visualization capability of Cities Skylines far exceeds that of CUBE, allowing us to create cities that actually mimic the visual characteristics of real life.
Of course, this comes with trade-offs. Skylines comes with a hard limit on the virtual populations that it can support. When modified to the limit, the salient ones, for us, are:
- 298.6 sq km
- 1,048,576 citizens
- 49,152 individual buildings
- 65,636 vehicles at motion
- 65,636 parked vehicles
- 256 transport lines (bus routes, train routes)
So, everything we had to do had to fall within these limits. Thus we begin.
There's a particular flow of building something in Skylines. First comes the arrangement of natural and very physical features upon the surface of the land. This includes waterways, and also, roads.
To do this, we first studied the general layout of Colombo. Colombo Municipal Council, Colombo DSD and Colombo Metropolitan Area are distinct entities: our focus is on the CMC.
For this project, we settled on the year of 2020. Various reasons exist, including availability of data, as well as the fact that COVID and the economic crisis stalled growth and introduced disruptions that have still not been completely mapped and studied.
Key to our study were the following resources:
- The UN State of Sri Lankan Cities report from 2018 (https://unhabitat.lk/projects/active-projects/state-of-sri-lankan-cities-report/)
- The CoMTrans report and its associated Home Visit Survey (https://openjicareport.jica.go.jp/pdf/12176665.pdf)
- City development plans from 2021-2030 by the Urban Development Authority, as well as older version (https://www.uda.gov.lk/development-plans.html)
- Maps of wards and administrative divisions from the Colombo Municipal Council (https://www.colombo.mc.gov.lk/admin-districts.php)
- Satellite imagery from the Google Earth Pro and the Sentinel-2 project by the European Space Agency
- OpenStreetMaps
- Road classification data and the National Master Plan from the RDA (http://www.rda.gov.lk/source/rda_roads.htm, http://www.rda.gov.lk/supported/noticeboard/publications/NRMP_2021-2030/Natinal%20Road%20Master%20Plan%202021-2030%20Main%20Report.pdf)
- Sector assessment from the Sri Lanka: National Highways Sector Project by the Asian Development Bank (https://www.adb.org/sites/default/files/linked-documents/38357-043-sri-ssa.pdf)
As a visual base, we first acquired OpenStreetMap data for Colombo's road network, covering an area from Wattala to Dehiwala and from Colombo Port City to Maharagama.
Sri Lankan roads follow the Road Development Authority's typology (Class A to E), but in practice, little distinguishes these classes functionally or geometrically. A trunk can be identical in size - or even smaller than - a main road. No standardization of lanes or features seem to exist between these classes. The sector assessment by the Asian Development Bank once noted much the same, complaining that traveling on the roads reveals little functional hierarchy.
The hierarchy of roads in OSM, in order, are motorway, trunk, primary, secondary, tertiary, unclassified, residential, service, track, path. A full import of all this data would break the limits of Skylines: we therefore decided to proceed by importing types of roads piecemeal and testing each: motorways, trunk roads, primary roads, secondary roads and tertiary roads, as well as linking nodes (ramps and access points).
OpenStreetMap's data does not necessarily function perfectly in Cities Skylines. For example, this is what the Dehiwala highway turns into:
However, when combined with satellite imagery, we were able to use this information as markers to more precisely sculpt features such as the green spaces, water bodies, canals and the general geography of the land itself, and the shape and nature of other prominent geographical features.
We then built more detailed maps from administrative maps from the CMC and from Google Maps, and individually rebuilt each visible road. The end result was this:
This map is 7728 m long (the real city is 7780m) and 4585.6 m its widest (reality is 4611.2m): a greater than 99% match. Broadly, we were successful in establishing a 1:1 parity between the roads, parks and water bodies and their representations in Cities Skylines. Notably, even intersections like these we managed to model with success, preserving directionality.
Skylines uses the concept of zoning to define what types of buildings can exist per 8m x 8m plot of land. Simulated citizens then enter the city and set up homes, businesses and so on.
Zoning definitions in a city change wildly. Some cities have very strict financial districts, very strict residential districts.
Colombo city development plans consist of mixed proportions of mixed development lots: thirteen "character zones" that, as presented, did not give us enough information to actually model the present day use of land in cities. As in: at no point do these aspirational diagrams and sheets in any way resemble reality.
However, we were able to extract this land-use map from the Colombo city development plan PDF, which gives us the more granular view we need. Using image overlays, we first laid this map precisely on top of our existing infrastructure, and then mapped the categories found here to the internal representations that Skylines uses.
Cities Skylines uses slightly different categories from the Urban Development Authority. The UDA counts all residential buildings as a single type: residential. The same goes for commercial buildings. Skylines gives us a little more granularity. We can define blocks as low density or high density, commercial or residential, and offices are a different type altogether. However, while we can certainly model wetlands and parks, Skylands does not give us the ability to add religious or government institutions.
We therefore followed a three-stage approach.
Firstly, we zoned each 8x8 block of the entire city using low-density residential and commercial buildings. Government offices were also zoned as commercial buildings, as ultimately the use patterns of these two types are very similar. People arrived there to work in the mornings and leave in the evenings. Religious institutions were zones as parks, as parks give happiness to neighboring citizens and allow anyone to walk in and out at any time.
To examine density, we obtained high-resolution population data from Meta's Data for Good program. The Data For Good program uses satellite imagery and machine learning, calibrated against surveys from Columbia University’s Center for International Earth Science Information Network, to generate the most granular global population map available to us (30-meter resolutions). We visualized the data in a manner we could use (brighter colors = higher density). We then re-zoned the high-density areas thus outlined using high-density commercial and high-density residential zone categories from Skylines.
To more accurately fill in all these areas, we had to create numerous additional small lanes branching off from the primary road structure. As much as possible, this tertiary road structure conforms to our overlay maps, but we have had to add in minor ways. These are what we might call Mawathas or Avenues. They exist because Skyline zones along 8x8m grids and requires adjacent roads for a building to be placed.
Having assigned the zones for the less recognisable buildings of the city, we used maps from the Colombo Municipal Council to identify major schools and hospitals as well as universities in the city of Colombo so that we could manually, we could manually place these hotspots of citizen interaction and traffic generation.
We then allowed the first version of the city to develop while we worked on invisible infrastructure, water, electricity, garbage collection, firefighting and crime.
Administrative divisions are not strictly a necessary thing for these types of cities in virtual space. However, to maintain fidelity, we used the maps from the Colombo Municipal Council to partition our city into 15 districts. Doing this also allows us to observe statistics from each individual district so that when we calibrate populations, we can do it at a slightly more granular degree.
Cities Skylines is an agent-based simulation. That is to say, that while the designer has significant control over the environment, the key interactions come from simulated citizens within the game environment. Citizens move into cities, they grow up, they go to school, they go to university, they get jobs, they travel back and forth from work and eventually they die and their corpses must be collected. The decisions that they make are based on a complex internal matrix of needs and desires.
From the official documentation:
Clicking on a citizen as they walk around your city will bring up the citizen information window with some basic information about them:
- Name (which you can change)
- Level of education
- Life stage
- Place of residence
- Place of employment or education. Citizens not in work or education will be reported as "unemployed"
- Current activity. This will report their destination if they're currently traveling.
The game also associates individual citizens with health and wealth values, although these are not viewable without mods. Similarly the game also associates citizens with cohabiting family units, relationships which are very hard to track without dedicated mods.
Education allows your citizens to work better jobs with higher educational requirements. Industry, commerce and office buildings will only be able to level up if they can employ sufficiently educated workers. The level of residential buildings are also partially dependent upon the smarts of their occupants. Education is provided to the city's youth via schools and universities.
With age, citizens in the game progress through five life stages:
1. Children - will go to elementary schools if there is capacity for them.
2. Teens - will go to high schools if there is capacity for them.
3. Young Adults - will either attend universities or Campus Areas, or join the jobs market like adults. The 'Education Boost' policy will make them more likely to choose education and the 'Schools Out' policy will make them more likely to choose employment.
4. Adults - On becoming adults, citizens will move out of their parent's homes and find new ones. Adults will partner with other adults and have children. Adults will form the bulk of your city's workforce.
5. Seniors - On becoming seniors citizens will retire from their jobs. They will continue to shop and use your city's services.
So getting us our little toy universe model here working involves getting virtual people to live in our city in a manner that’s broadly consistent with how reality works.
The UN state of Sri Lankan cities 2018 report estimates a little over 561,314 people as a population of the Colombo Metropolitan Area. Comtrans report puts the population at 318,397 for 2012. This means the population increases by 40486 per year. We checked this against the 2021 Household Income and Expenditure Survey (HIES) which records 41k births in 2021, so this is broadly accurate. For 2020, using linear regression, this gives us 642,286 people in the city of Colombo, with about 742,916 people coming in to work in the city from the outskirts.
To obtain the more granular information we needed for the CMC, we consulted Professor Amal S. Kumarage, Senior Professor at the Department of Transport and Logistics Management at the University of Moratuwa.
The Colombo Municipal area, which is what we are building, spans the Colombo DSD and Thimbirigasyaya DSD. We were given statistics for 2014 and 2035 projects; deriving from that, we arrive at the following statistics for 2020:
1,048,000 total people - coincidentally near the exact upper bound of what Skylines can handle 555,300 of these are night time population (which is our best assumption for people who actually live here). 492,700 people commuting in during the day These figures match the statistics provided by the Colombo Municipal Council: 555,031 residents and a floating population of “nearly 500,000”.
Key to making this distribution better mirror reality is in understanding where that commuting population arrives from. The CoMTrans plan (Analysis of Transport Corridors) and the work of the University of Moratuwa show seven major entry points into the city.
From this we were able to extract the following percentages of traffic flow:
Corridor Name | 2013 commuter | 2035 commuter population projection | 2020 derived | Percentage (2020) |
---|---|---|---|---|
Negombo road | 245,880 | 761,493 | 409,939 | 16.73% |
Kandy road | 437,120 | 966,101 | 605,432 | 24.71% |
Low level Rd | 150,000 | 201,779 | 166,475 | 6.80% |
Malabe Rd | 348,000 | 656,040 | 446,013 | 18.21% |
High level Rd | 174,000 | 397,561 | 245,133 | 10.01% |
Horana Rd | 130,000 | 448,505 | 231,343 | 9.44% |
Galle Rd | 298,000 | 447,518 | 345,574 | 14.11% |
Total | 1,783,000 | 3,878,997 | 2,449,909 | 100.00% |
Using traffic flow ratios as a base, we distributed the citizens coming in from outside the city by adding population centers along the extended edge of these corridors according to this ratio. These population centers are high-rise apartments from where virtual citizens need to commute into the city to work, to learn, and then return home.
Next, we had to dial in behaviour. Cities Skylines makes certain assumptions about the nature of populations. We use two specific mods here to allow us to customize the nature of our population Realistic Population 2 2.2.2.4 and Lifecycle Rebalance Revisited 1.6.8
The first mod allows us to change the numbers of households and jobs in buildings to more accurately reflect real-world values. It lets us calculate building floorspace and use that as the basis of assigning a population (households, workplaces, or students).
The second allows us to adjust school eligibility ages, lifespans and ageing milestones, ageing speed (compared to game time), transport preferences, and the education levels of people migrating into the city.
This allows us to mimic the transient nature of a floating population. Virtual citizens now commute into the city and commute out after work.
From our data gathering, we also estimated the population spread at 14742 people per square kilometer, or 0.0147 per square meter.
Note that the actual population estimate varies widely. The density of the city of Colombo is estimated at 13364 persons per square kilometer by FAO. Using data from Meta, we were able to examine multiple custom patches ranging from 50 sq.km to 88 sq.km and derive a median of 9582 persons per square kilometer.
Colombo Municipal Council gives us a figure of 14,742 people per square kilometer - a resting population of 550,030 divided by 37.31 square km. Using these figures and others from our data gathering, we use the settings we've described in the Population section of this wiki. We verified these changes against the population maps that we had built with data from Mera. This allowed us to verify that areas of high population density did in fact have larger numbers of citizens in them and areas of low population density followed likewise.
None of this is perfectly representative, but we've managed to have a population of over 1 million 20 thousand here. This number will fluctuate, usually in about a +/- 10,000 range, in the normal functioning of the city.
Transport in Cities Skylines takes on two forms. Public transport happens along routes and timetables and infrastructure designed and set by us. Private transport happens on the part of the citizens. When a citizen unit requires movement from one place to another and when that distance is too far to be traveled using purely public transport, the citizen spawns a vehicle. We can control this behavior by setting citizen preferences at a high level.
We replicate here the three main lines that enter and leave the CMC area.
- Main Line: Fort - Maradana - Ragama
- Coastal Line: Fort - Ratmalana
- Kelani Valley Line: Maradana - Padukka
Implemented six key bus routes:
- Route 100: Dehiwala - Pettah
- Route 103: Pettah - Park Road via Narahenpita
- Route 104: Ja-Ela - Bambalapitiya
- Route 120: Piliyandala - Pettah
- Route 138: Maharagama - Pettah
- Route 174: Kottawa - Borella
Tracks, route markets and stations were placed to match real world routes and locations, using Google Maps and Routemaster.lk as data sources. We have approximated real-world schedules, speeds, and passenger capacities.
However, there is a key limitation here. Unlike in the real world, these routes work not on schedules, but on demand - the stations generate numbers of vehicles that inhabit the routes. Unlike in the real world, trains and buses in our model run like clockwork; they do not make sudden stops. It's possivle to dial in this behaviour more precisely by setting the exact limits of passenger capacity, vehicle speeds and tinkering with citizen transport preferences via Lifecycle Rebalanced, but that's work for the future.
The RDA's National Master Plan gives us a table of the vehicle composition at various entry points to the Colombo Municipal Council area.
We used these numbers to loosely set the vehicle spawn criteria for private transport to percentages that mimic the data here for motorcycles, three wheelers, cars and vans.
Of course, Cities Skylines also makes assumptions about how traffic behaves, which is not necessarily how traffic behaves in Sri Lanka. For example, vehicles in Skylines follow road rules perfectly and do not park along the sides of the road.
To modify these, we use the TM:PE mod.
- Buses may ignore lane arrows.
- Vehicles may enter blocked junctions.
- Vehicles may do U-turns at junctions.
- Vehicles going straight on may change lanes at junctions.
- 10% of drivers are reckless.
- Vehicles may park on the sides of streets. This is done by enabling more realistic parking.
Cities Skylines has limits on how many vehicles can be active at any given moment. We have modified these limits to the highest possible level. A little over 65,000 vehicles can be moving at any time and a further 65,000 can be parked, for a total of 135,000 vehicles.
In Sri Lanka, it is commonly held that there is one vehicle for every 14 people. Colombo, as seen from the CoMTrans data, 206 vehicles are present for every 1000 people in Colombo. This is a 1 to 5 ratio. In Skylines, at maximum, the ratio is roughly 1 to 7.7. In our testing, at various population counts, we saw a roughly roughly 1:10 ratio.
This is another key limitation in our toy universe model. Vehicle to population ratios mimic national statistics rather than more granular municipality statistics. Because of the agent based nature of vehicle spawning, these ratios are not easily malleable without tweaking the underlying population dynamics first. Because of the computational limit of the number of vehicles that can be handled here, it is impossible for us to establish a one-to-one match in an area of this size.
After all this setup, we burned everything to the ground and started over again. While at this point the simulation is technically accurate, it is not visually comparable. Skylines has a default set of 3D assets that it uses for various buildings. These assets do not look very Sri Lankan.
So, we curated thousands of individual 3D assets and began the work of replacing parts of the city and buildings therein to more closely match the visual feel of Colombo. In some cases, such as with the Nelum Kuluna, we built these 3D models ourselves.
After testing the assets that we wanted, we used Google Street View to identify building types and curated a combination of assets that would appear for each of the districts that we had demarcated.
Some assets we placed by hand, some we allowed to be rebuilt with our newly designated combinations. 3D assets like those used for trains and buses and three wheelers were selected so that they would better match what we see every day on the streets of Colombo.
It's still not very Sri Lankan: zoom right in and you'll see plenty of assets that look like a generic European blend. Unfortunately, with the time that we have, this is the best we could do. Assets can be swapped out in groups, so if you're interested, it can be made to look much closer to reality.
This then is our virtual city of Colombo. It is a nearly faithful replica of all major routes, the skyline of the city of Colombo and its land use. Within this city, virtual citizens are born, they go to school, they get education, they find jobs and they navigate their way back home. In the more computational subfields of policy study, this is called a Digital Twin.
To get this set up, and for specific settings and configs, please see the rest of this Wiki. We've done as much as we could to make everything replicable.
This is a project by Watchdog Sri Lanka (team-watchdog). Watchdog is a multidisciplinary team of journalists, researchers and software engineers, operating under the Appendix umbrella. We hunt misinformation, investigate matters of public welfare, and build software tools.
We began in April 2019, days after the Easter Sunday bombings in Sri Lanka, as a group of concerned citizens trying to counter misinformation. We did this amidst government crackdowns on freedom of expression and mass hysteria caused by fake news and rumors, building a mobile app that was used by over 200,000 people to verify information and counteract rumors in their own networks.
We've been called an “open-source intelligence research collective”, and that's fairly accurate. We use a lot of OSINT techniques - a combination of data scraping, analysis of publicly available documents and datasets, paired with old-school boots-on-the-ground journalism.