
Free and Open Source Software for Geospatial (FOSS4G) Conference Proceedings Volume 14 Portland, Oregon, USA Article 6 2014 UrbanSim2: Simulating the Connected Metropolis Fletcher Foti University of California, Berkeley (USA) Paul Waddell Follow this and additional works at: https://scholarworks.umass.edu/foss4g Part of the Geography Commons Recommended Citation Foti, Fletcher and Waddell, Paul (2014) "UrbanSim2: Simulating the Connected Metropolis," Free and Open Source Software for Geospatial (FOSS4G) Conference Proceedings: Vol. 14 , Article 6. DOI: https://doi.org/10.7275/R5JQ0Z61 Available at: https://scholarworks.umass.edu/foss4g/vol14/iss1/6 This Paper is brought to you for free and open access by ScholarWorks@UMass Amherst. It has been accepted for inclusion in Free and Open Source Software for Geospatial (FOSS4G) Conference Proceedings by an authorized editor of ScholarWorks@UMass Amherst. For more information, please contact [email protected]. UrbanSim2: Simulating the Connected Metropolis UrbanSim2: Simulating the Connected Metropolis by Fletcher Foti and Paul Waddell in a metropolitan region in order to predict demand for public infrastructure such as transportation, en- University of California, Berkeley (USA). fscot- ergy and water. It has been most widely used for re- [email protected] gional transportation planning, to assess the impacts of transit and roadway projects on patterns of urban Abstract development, and the indirect effects these have on UrbanSim is an open source software platform for travel demand. In recent years, urban models are in- agent-based geospatial simulation, focusing on the creasingly used to understand how to reach sustain- spatial dynamics of urban development. Since its ability goals, including reducing resource use and creation UrbanSim has been used in the official plan- land consumption, and how best to substitute sus- ning processes for at least a dozen regional govern- tainable modes like transit, walking, and biking for ments which were used to help allocate billions of increasing automobile use. dollars in regional investments in transportation in- UrbanSim was first conceptualized and imple- frastructure. mented almost 15 years ago (Waddell, 2000, 2002). UrbanSim was first conceptualized in the late The initial implementation was in Java, and for per- 1990’s and implemented using the Java program- formance reasons it used an approach of ’exploded ming language. The technology landscape for scien- objects’ to represent the millions of agents in its sim- tific computing changed dramatically after that, and ulation, to minimize object overhead (Noth et al., by 2005 UrbanSim was converted to Python, mak- 2003). By 2005, a decision was made to re-implement ing heavy use of Numpy to vectorize calculations. the UrbanSim platform in Python, taking advan- By 2014, it became clear that UrbanSim should be tage of the rapid advances made in the scientific reimplemented again to take advantage of signifi- Python community, most notably Numpy for multi- cant advances in the libraries available for scientific dimensional array computations. This version was Python. The new version of UrbanSim, called Urban- referred to as the Open Platform for Urban Simula- Sim2, makes extensive use of community-supported tion (OPUS), and intended to stimulate broad col- scientific Python libraries to reduce the amount of laboration as an open source project among inter- domain-specific customized code to a minimum. national research teams working on urban modeling UrbanSim is an excellent case study for the power (Waddell et al., 2005). of leveraging the work of the scientific programming Since its creation and release on the web as an community as scaffolding for a domain-specific ap- open source project in 1998, UrbanSim has been in- plication, as opposed to building an extensive cus- creasingly used in the official planning processes for tomized solution in each domain. Additionally, the at least a dozen Metropolitan Planning Organiza- open and participatory nature inherent in nearly all tions (MPOs), which use UrbanSim and their travel of the open source projects described here has been model platforms to evaluate the planning of billions particularly embraced by governments, who are of- of dollars in regional investments in transportation ten reticent to support large commercial institutions infrastructure. By the end of its first ten years, Ur- and balkanized and private data formats and soft- banSim had become the most widely used land use ware tools. modeling platform for regional planning by MPOs Keywords: Open Source; Regional Planning; (Lee, 2009), although a variety of other models have City Planning; Transportation Planning;. been used by MPOs, including ’home-grown’ mod- els (Hunt and Abraham, 2005; Wegener, 2004). UrbanSim has grown over the past two decades 1 Introduction to become a robust open source software platform, and its history closely parallels the history of many UrbanSim is an open source software platform for other open source projects, including the Python li- agent-based geospatial simulation, focusing on the braries on which it has grown to depend. Python spatial dynamics of urban development. It simulates was introduced by Guido van Rossum in 1991 and the choices of locations of households and businesses began to rapidly gain popularity. A key Python li- OSGEO Journal Volume 14 Page 9 of 48 UrbanSim2: Simulating the Connected Metropolis brary -the vector and matrix manipulation library This paper will outline this process and the ar- NumPy -was first released in 2006. When UrbanSim gument for refactoring large domain-specific appli- was reimplemented in Python beginning in 2005, a cations to rely more extensively on well-supported great deal of code was created using Numpy to build open source libraries such as exist in the scientific statistical models for estimating the parameters of Python community. We begin by giving a brief his- regression and discrete choice models, and for effi- tory of urban modeling, followed by a discussion ciently simulating using the fitted models. In order of the theory and implementation needs of Urban- to manage data effectively, the research team devel- Sim, a description of the implementation efficien- oped a heavyweight DataSet Class, to make sets of cies gained between the two versions of UrbanSim Numpy arrays behave more like relational database made by leveraging current open source geospatial tables, with relational joins and a variety of query projects, and closing with a discussion of future work operations. In order to make the code more acces- on the topic. sible to modelers, a domain-specific expression lan- guage was created (Borning et al., 2008). And in order to create a graphical user interface, an exten- 2 A Brief History of Urban Model- sive PyQt infrastructure was built to auto-generate GUI elements from an XML file manipulated by the ing GUI. In short, a large volume of domain-specific, cus- Urban modeling began as economic theory, as early tomized code accumulated as the project met a vari- as 1826 in Von Thünen’s “The Isolated State” (trans- ety of needs. It eventually grew to over 150K lines lated in Von Thünen and Hall, 1966), in which he of code, and debugging became more complex due outlined how in a “featureless plain” different crops to the many levels of indirection in the Python trace- would be grown in concentric rings around the city backs whenever an error occurred. In other words, depending on their market value and cost of trans- UrbanSim had become a large domain-specific ap- portation. High value crops like vegetables and also plication with a large customized code base to solve heavy crops like firewood would both be grown near several of the problems that were eventually taken to the town while grain and ranch animals could be up by the scientific programming community as a grown far from the city. whole. As a result, it was becoming a challenge to Walter Christaller then expanded these ideas maintain. to the urban context in Central Place Theory In 2010, the Pandas data analysis library was re- (Christaller, 1968) by proposing that while some leased. Its user community has grown rapidly, and it products known as comparison goods —e.g. auto- has become a standard part of many scientific Python mobiles or appliances— would be consumed only bundles. Pandas has implemented in a more gen- rarely, other products known as convenience goods eral way most of the functionality that the UrbanSim —e.g. food— would be consumed repeatedly. He team had developed in the UrbanSim DataSet class proposed a geometry within the city of nested and and the OPUS expression language. The new ver- overlapping hexagons in which vertices are shop- sion of UrbanSim, called UrbanSim2, is the result of ping nodes and convenience goods would occur a reassessment of the landscape of available scientific roughly 6 times as frequently within the city as com- Python libraries, and completely eliminates most of parison goods. its legacy customized data management and expres- The modern era of urban models probably be- sion language code, and its customized graphical in- gan with the exploration of the idea that increased terface. It replaced the UrbanSim DataSet class and transportation access leads to increased develop- expression language with Pandas, and replaced its ment intensity (a centralizing force), and that people GUI with Python, at least initially, with ongoing ex- tradeoff increased transportation costs to consume perimentation in
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages11 Page
-
File Size-