WHITE PAPER

ActivitySim

An Advanced Activity-Based Travel Demand Model Built by and for Users

Introduction

Trip-based models have been around for over half a century. In that time, they have improved in many ways. But their primary shortcoming—that they model trips independently of each other and not the people who make trips—can limit their ability to answer complex transportation planning questions.

 

Activity-based models address this core limitation through microsimulation of individuals and generation of daily travel diaries and activity schedules. However, user concerns about activity-based models’ cost, complexity, and support have limited their wider adoption.

 

ActivitySim is different. It is an open source and purpose-built activity-based model grounded in the principles of collaboration and modern software engineering. It is the product of a consortium of member agencies overseen by the Association of Metropolitan Planning Organizations (AMPO). Most importantly to users, it is a state-of-the-practice modeling platform that is always improving.

 

What Tesla has done for the electric vehicle industry, ActivitySim does for the modeling industry by bringing activity-based modeling to more practitioners while simplifying the overall user experience and improving performance. This results in a product that is both practical and advanced.

 

ActivitySim deployments employ an open, unified code. This addresses the “black box” criticism, which has frustrated some model users and stakeholders who must rely on and interpret modeling outputs. ActivitySim’s common and freely available codebase also means that agencies can benefit from improvements made elsewhere while retaining their own customizations.

 

But it is membership in the ActivitySim consortium that differentiates ActivitySim from its predecessors. Members of the consortium gain access to a growing community of modeling experts and practitioners who helped build ActivitySim. As members, they can also contribute to the direction of ActivitySim and guide its evolution.

 

Recent applications of ActivitySim have proven that it works, saves time/money for consortium members, and delivers real-world modeling benefits while furthering the state of the practice. As the ActivitySim user community grows, so, in turn, will its value to practitioners looking to adopt next-generation modeling solutions.

ActivitySim is an Advanced Activity-Based Travel Demand Model

At its core, ActivitySim is an advanced activity-based travel demand model. It also includes a state-of-the-practice population synthesizer. Importantly, it will be in use by at least five agencies and three universities in the United States in 2021. These uses demonstrate that ActivitySim has progressed beyond the developmental phase and offers agencies the tools they need to plan for the future.

More Capable than Trip-Based Models

Like previous activity-based models, ActivitySim offers more advanced capabilities when compared to standard trip-based models. Most of these capabilities stem from the fact activity-based models use a disaggregate simulated population rather than aggregate trips to forecast travel.

 

As described in Activity-Based Travel Demand Models: A Primer, activity-based models feature “explicit representation of realistic constraints of time and space, as well as the linkages among activities and travel both for an individual person and across multiple people in a household.” The result? More realistic travel estimates and policy responsiveness.

 

Figure 1 illustrates how activity-based models like ActivitySim produce travel estimates by first processing long-term choices. These are choices an individual makes over time. Examples include work and school location choices, the decision to own a household vehicle, and personal mobility attributes such as free onsite job parking.

Figure 1. An Example Activity-Based Model and Submodel Structure

Example Activity-Based Model and Submodel Structure

Source: ActivitySim on GitHub

After assigning these long-term choices, activity-based models like ActivitySim process coordinated daily activities for each household member. The model then considers characteristics such as travel frequency, scheduling (when the activity occurs), mode of travel, and frequency of stops on tours.

 

The results (model outputs) are made available in the form of trip tables. These tables contain information about trip purpose, destination, scheduling, and mode. Aggregating these results produces travel demand matrices. These can then be used for network loading (i.e., assignment).

 

Activity-based models like ActivitySim offer more functionality than standard trip-based models. This is made possible by explicit representation of individual travel patterns and the granularity of model outputs.

Why ActivitySim?

ActivitySim—and activity-based models in general—excel in four areas:

Icon_Pricing

Pricing. Toll roads and congestion pricing require an understanding of how these charges will affect regional travel. Activity-based models like ActivitySim simulate individual members of a population. As a result, practitioners can use these models to test how individuals will respond to tolls and congestion pricing. They can also analyze what secondary effects such charges may produce. Activity-based models have already been used in this capacity in regions such as New York City and San Francisco to study tolls and area- and cordon-based pricing, respectively. Congestion pricing has yet to gain a strong foothold in the United States, but that may change. It is still viewed as an important policy tool that more cities and regions may consider if/when traffic returns to (or exceeds) prepandemic levels.

Icon_Equity

Equity. Activity-based models like ActivitySim simulate each member of a population. They are fully disaggregate, meaning that individuals are not grouped together. Due to this structure, the model produces outputs that can be used to gauge the impact of policy changes on populations of interest, including historically marginalized/ environmental justice groups such as low-income communities. Knowing this can help agencies and policymakers adjust strategies to improve equity outcomes among specific groups.

Icon_Active Transportation

Active transportation. Active modes of travel are mostly used for short-distance trips and are important to understanding public health. Activity-based models can represent space (and short trips) at a more detailed scale than trip-based models. This is because the number of calculations in the model depends more on the number of persons represented than the number of zones. This distinction is increasingly important as micromobility services grow in many cities and regions. Data from Strava have shown large upticks in bike trips during 2020 as the pandemic changed commuting and exercise behaviors. Activity-based models like ActivitySim can help better forecast future use of these modes across a region’s population.

Icon_New Mobility Services

New mobility services. Transportation network companies (e.g., Uber, Lyft) and automated vehicles have already reshaped travel in many regions. Activity-based models like ActivitySim can help practitioners plan for the arrival and growth of these services. Since these models simulate travel at an individual level, they can account for time savings and value-of-time incentives inherent in shared or automated modes. For example, the Sacramento Area Council of Governments implemented an auto ownership model and a “paid rideshare” mode as part of their existing activity-based model. This allowed them to forecast the effects of these technologies on regional travel.

ActivitySim offers even more benefits to its users than traditional activity-based models (Table 1). As a unique and purpose-built modeling platform, it gives its users access to an array of support tools and resources.

 

Table 1. Capabilities and Features Matrix

Table 1_Capabilities and Features Matrix

*Requires annual membership in the ActivitySim consortium; members pay nothing to download the software, which is open source, but are asked to contribute an annual fee that supports continued model improvements and administrative tasks

These capabilities benefit the practitioners who use the model and want to further their own knowledge and expertise. With ActivitySim, they can still more effectively forecast and plan for possible futures as transportation technology changes how, where, and why people move. But unlike traditional activity-based models, ActivitySim also offers users a growing community of users, a best practice model design, and an integrated state-of-the-practice population synthesizer.

Integrated Population Synthesizer

ActivitySim includes PopulationSim, an open source population synthesizer that was first created for the Oregon Department of Transportation; this integration is unique among activity-based models. ActivitySim uses PopulationSim to create the synthetic population to forecast travel patterns. Like other population synthesizers, PopulationSim requires a population sample (also called a seed or reference sample) and marginal distributions (also called controls or targets). Population samples can come from Census Public Use Microdata Sample (also called PUMS) or household travel survey data. Marginal distributions can be specified at multiple geographic levels.

 

The synthesis part of a population synthesizer occurs when the model is run to match the population sample to the marginal distributions. This is where PopulationSim differs from traditional population synthesizers. It uses new and improved methods for synthesizing a population that better utilize information from the initial sample while also reducing errors.

 

PopulationSim was officially introduced into the ActivitySim platform in early 2020. Since then, it has been successfully developed in regions such as Seattle, San Francisco, Minneapolis, Detroit, Philadelphia, and Jacksonville. It has also been used at a statewide level in both Oregon and Florida.

Developed for Real World Conditions

ActivitySim was first developed for and applied in the Metropolitan Transportation Commission (MTC) modeling region in the San Francisco Bay Area (Figure 2). The MTC modeling region is large. It spans nine counties, is home to 7.4 million residents, and includes nearly 7,000 square miles. It also has 43,000 lane-miles of streets and roads. Its size, diversity, and complexity of modes made it an ideal test bed for ActivitySim.

 

Figure 2. ActivitySim Timeline as of January 2021

The first release of ActivitySim converted MTC’s existing activity-based model from the CT-RAMP Java platform to the ActivitySim Python platform. This effort produced the first working version of ActivitySim in the fall of 2019.

 

ActivitySim has been improved upon by consortium members since then. Improvements have included input and output enhancements, support for ride-hailing modes, improved tutorials and notebooks, and integration of PopulationSim. ActivitySim has also received initial support for the ability to easily estimate submodels, a command line interface to create and run models, and improvements based on concurrent ActivitySim implementations in the Southeast Michigan Council of Governments (SEMCOG) and Atlanta Regional Commission (ARC) model regions.

 

The following improvements were subsequently integrated into the shared ActivitySim codebase through contributions from SEMCOG and ARC:

 

  • Improved parallelization and stability on Windows.
  • Improved network skim reloading to reduce start-up time.
  • Improved flexibility in defining user expressions files.
  • Improved flexibility in configuring submodels.
  • Additional models: parking location choice, trip scheduling choice, trip departure choice, telecommute frequency.

ActivitySim is Especially Performant, Cost Effective, and Practical

While the cost of activity-based models has been comparable to trip-based models for years, other factors have limited wider adoption. Electric cars faced a similar quandary until Tesla demonstrated the technology could be made user friendly while eliminating the perceived challenges (e.g., speed, performance, range anxiety) that limited its predecessors.

 

Similarly, with ActivitySim, the activity-based modeling calculus changed. ActivitySim addresses many previous concerns about activity-based models—all while running faster. Moreover, it is part of an extensible modeling platform where improvements are collectively funded and shared with a community of users.

Performant

Activity-based models like ActivitySim differ from traditional trip-based models in how they process more detailed household- or person-level characteristics. Whereas trip-based models require more trip matrices to produce different market segments (which lengthens run times), activity-based models use lists of households, persons, tours, and trips. This provides more information and allows them to answer more complex questions. ActivitySim built upon these established strengths of activity-based models, improving model run times when compared to similarly segmented models. The result? Superior performance.

 

And ActivitySim is especially performant. It has been purpose-built to run faster than its predecessors. It is parallelized, using all available machine central processing units (CPUs) to maximize performance. This significantly reduces model run times. With these performance enhancements, ActivitySim runs quickly on enterprise computing resources available to most agencies.

 

ActivitySim uses Python, but it overcomes speed issues by using the latest scientific computing libraries (e.g., pandas and NumPy) that use underlying efficient C/C++. In addition, the parallelization architecture is not hardwired. This means users can configure the models to be run in parallel and specify how many processors to use via the model’s config file. This customization affords ActivitySim the flexibility to tackle new and diverse problems.

 

ActivitySim’s "model estimation mode" allows users to read-in household travel survey files, formatted in ActivitySim format. These can then be run through ActivitySim’s models to refresh model coefficients with the latest data. This procedure joins the model data to the household travel survey files and writes out all the required data for model estimation. This allows the user to re-estimate the model in their tool of choice.

 

As a result, users can estimate, for instance, an auto ownership model using ActivitySim’s understanding of all the data. These results can then be read back into ActivitySim. This helps users build an ActivitySim model and update the estimation based on local data in a consistent, error-free way.

 

Moreover, ActivitySim’s "command line interface" allows it to be run through quick DOS commands. This function gives users a better way to distribute multiple examples/run the model, which runs on Linux, Windows, and macOS. The estimation integration also benefited from this functionality because it required new, sufficiently high-quality, and large enough examples for the estimation results to be meaningful.

Cost Effective

In the early days, activity-based models required more resources to develop than trip-based models. These higher costs were attributable to the development of new software and methodologies for each individual application. However, even before ActivitySim, costs had come down significantly and were close to traditional trip-based models.

 

Where cost has still entered the equation, however, is around staff time/training and initial model development costs. As many model users already know, activity-based models generally require more staff knowledge and expertise to maximize their benefits. Like any tool, more complex ones require more user knowledge but produce more detailed information.

 

Then there are model updates, which agencies often fund entirely on their own. Fortunately, ActivitySim modernizes the update process, thereby reducing the cost to individual users. When Tesla introduced its over-the-air updates and encouraged vehicle owners to submit suggestions for updates, owners rejoiced. Not only did this approach eliminate costly and time-consuming trips to a dealer for recalls and software fixes, but it gave vehicle owners a say in future updates. Similarly, with ActivitySim, user-community updates are shared back to GitHub, which is the industry standard for open source software development. Users can receive and install these updates from GitHub at no direct cost and with minimal effort.

Practical

ActivitySim further lessens the barrier to entry for activity-based modeling through its ease of use and gives its users greater modeling flexibility. It does this in several ways.

 

First, ActivitySim is an open source and collaborative platform. Open source software offers users many benefits, including lower cost, shared risk, more robust code, faster bug fixes, no vendor lock-in, transparency, and collaboration. Any field—modeling included—advances faster when people work together and share ideas instead of working alone and in separate corporate silos. Troubleshooting and development are done in unison.

Second, agencies that adopt the ActivitySim modeling platform and join its community of users can also pool their resources to fund future travel demand model enhancements. In this way, the costs for individual model improvements are shared by members and not borne by any one agency.

 

Moreover, ActivitySim also includes a contributed “recipe book” so users can learn more and share. It uses Jupyter notebooks, which are interactive, easy-to-use learning tools for Python community practitioners. Jupyter further supports and enhances the ability of ActivitySim users to experiment and share ideas with the community.

 

Finally, as noted, ActivitySim users directly benefit from improvements made by other agencies when each new model update project is completed. The SEMCOG experience with ActivitySim implementation (see case study on next page) showcases how these model development projects by individual agencies translate into gains for all ActivitySim users.

Case Study: SEMCOG ActivitySim Development

SEMCOG (Southeast Michigan Council of Governments) is the metropolitan planning organization for the region of Southeast Michigan that includes Detroit. The area includes approximately 1.9 million households and has a population of approximately 4.7 million.

 

SEMCOG wanted a practical and functional activity-based travel demand model capable of robust policy analyses. This was important to them given the size and diversity of the region they oversee, which includes several colleges and universities. Crucially, SEMCOG wanted a model that could help answer questions unique to their region and one that provided greater demographic, spatial, and temporal detail than their trip-based model.

 

After carefully evaluating the marketplace of alternatives, SEMCOG decided to join the ActivitySim consortium in 2018. They chose ActivitySim because of its unique advantages, which first and foremost for them meant the platform’s coordination among participating members in its development process. SEMCOG also appreciated how ActivitySim incorporated the latest best practices from other member users and used modern software design in Python.

 

By the time SEMCOG and RSG began work on the model in the fall of 2019, ActivitySim had advanced to the point where it could be used as the base model for the region. SEMCOG was the first agency to opt for a full model conversion to ActivitySim.

 

After transferring the model design from the MTC region, SEMCOG found that it produced reasonable results in Phase I with only minor region-specific adjustments, relied on typical data, and had reasonable run times. They also found it required minimal data preparation. They did note, however, that select travel markets (e.g., university students) still required special attention, which is not uncommon.

 

SEMCOG is confident they will continue to benefit from the development expertise and experience that comes with being a part of the ActivitySim consortium. They also look forward to sharing their model enhancements and tools, such as a telecommute model and model results visualizer, with the ActivitySim community.

 

“SEMCOG benefitted from being a member of the ActivitySim community as we developed our first activity-based model. Membership broadened our knowledge and prepared us for the challenges of both the model’s development and its application,” said Jilan Chen, who is the lead modeler at SEMCOG for the ActivitySim model development project.

 

SEMCOG is following a two-phase approach to get the model up and running quickly and help train staff on its use and functions. Phase I was completed in 2020 and Phase II is currently underway at the time of this writing and expected to be completed by the spring of 2022.

ActivitySim is Not Just Modeling Software—It is a Network of Users

ActivitySim is more than just state-of-the-practice travel demand software. Though it is that, too. Some of the most successful tools and technologies do more than solve a problem. They connect users and offer robust and user-friendly support networks along the way. This is especially true for new or advanced technologies, which often first gain a following among enthusiasts knowledgeable and interested in the technology.

 

Tesla knew this when they began building electric vehicles, which is why they also constructed a network of charging stations just for Tesla owners. Likewise, ActivitySim offers users access to a growing brain trust of fellow travel demand modelers and experts in activity-based modeling. As noted, because ActivitySim is open source, anyone is free to use it. But where it really stands out is in bringing together its users who can then share their expertise and collectively guide its improvements.

Collaborative

The ActivitySim consortium is a partnership among equals. By joining, members advance activity-based models in their respective regions and for the entire modeling industry. At the time of this writing, eight agencies are members of the consortium (Figure 3). Agencies contribute funds to AMPO on an annual basis. AMPO facilitates coordination across agencies and provides all administrative support required for ActivitySim’s development. Current membership fees are set annually.

Figure 3. ActivitySim Consortium Members as of January 2021

ActivitySim_Consortium Members

Agenda setting and budgeting are done collaboratively and through consensus on a periodic basis. These project administration meetings also help guide future phases of work.

 

Members of the consortium become part of the Project Management Committee. The Project Management Committee gives consortium members a say in ActivitySim project priorities. This includes adding advanced, state-of-the-practice features and selecting capabilities that would allow current and future ActivitySim users to respond to new policy and investment analysis needs as these arise.

 

The Project Management Committee is egalitarian in its design and function. This is intentional and helps to foster a productive and ongoing model development dialogue. Each committee member (regardless of model region size) receives an equal say. For maximum transparency, all notes and improvements are also shared to Activity’s GitHub page.

Extensible

ActivitySim takes into consideration future growth, whether that be growth originating with the Project Management Committee or consortium members. As described, ActivitySim allows users to develop and contribute back to the common codebase any region-specific model enhancements. This has been done already across at least two model regions (Table 2).

Table 2. Example Features Added to ActivitySim by Consortium Members as of January 2021

Table 2_Example Features

Furthermore, and as noted, work on ActivitySim occurs via GitHub, which gives developers the ability to create code (like the code used in ActivitySim) in a collaborative, documented, and repeatable fashion while tracking changes. GitHub also hosts related documentation, tests, and examples while providing an online platform for users to post issues, feature requests, bug fixes, and participate in ActivitySim's development process.

 

For instance, SEMCOG, which recently completed Phase I of their model development process, developed and contributed back to the ActivitySim consortium (via GitHub) the ability to build trip matrices for assignment from the synthesized travel diaries.

Constantly Improving

Trip-based models can answer many of today’s questions, but activity-based models can also answer tomorrow’s questions. Transportation technology is rapidly changing. It is no longer just a question of trips.

 

New technologies such as automated vehicles and shared vehicle services are changing the central calculus for personal vehicle ownership and travel. And active modes of transportation are increasingly popular. Case in point: Simply adding lithium-ion batteries and electric motors to bicycles and scooters has made them attractive to more users and more suitable for long trips. This simple advancement, in turn, has made them viable as commute modes for many more people.

 

Moreover, the pandemic has likely forever changed how people live, work, and shop. These effects will extend beyond simple adjustments in trip-making; they will be rooted in changes in how individuals act. All these changes are rooted in human behavior, which is where activity-based models like ActivitySim excel.

 

As a collaborative, extensible, and constantly improving platform, ActivitySim is designed to change with the times. And as more regions choose ActivitySim, their applications contribute to the platform’s overall stability. Bug fixes, high-quality and thorough documentation, and ease-of-use enhancements (e.g., making configuration files as smart as possible) will all contribute to ActivitySim’s advancement and longevity.

Conclusion

Activity-based models have been popular among “early adopters.” Or agencies that have faced an immediate need to answer the policy or planning questions that only the latest models can answer.

 

To the casual observer, or to someone who favors a wait-and-see approach, this has made these advanced models seem niche. The perception, for better or worse, is that they are solely the province of forward-looking agencies with deep pockets and ample staff support.

 

But the decision to develop an activity-based model is no longer a question of sacrifice or compromise with an unproven technology, nor is it out of reach. ActivitySim is purpose-built, in use, and constantly improving. This is no beta version, with millions of people now living in regions that use ActivitySim.

 

Those who join the ActivitySim consortium become co-architects of the platform and can help guide future model enhancements. This, in turn, can lessen the individual-agency cost that has historically attached to users who shouldered the full price of completing model updates alone.

 

As ActivitySim continues to improve and the user community grows, new and current members will also benefit from past work, research, and expertise. Over time, this will lead to greater innovations and lower upfront costs for users.

 

After several model development projects, the results are in: ActivitySim works. New users will immediately receive a working, state-of-the-practice travel demand model. This will allow them to answer the most vexing policy and planning questions now and for years into the future.

We're activity-based modeling experts and the lead developers and architects of ActivitySim.

We built it. We use it. And we would love to chat with you more about the ways ActivitySim may be able to help you get the answers you need.

Ben Stabler

SENIOR DIRECTOR

Joel Freedman

SENIOR DIRECTOR

Want to stay in the loop on RSG + ActivitySim?

Get updates on what we're working on with ActivitySim right to your inbox.

*