Getting Started

This page describes how to get started with ActivitySim.


ActivitySim is under active development


  1. Install Anaconda 64bit Python 3. It is best to use Anaconda as noted below with ActivitySim.

  2. If you access the internet from behind a firewall, then you need to configure your proxy server. To do so, create a .condarc file in your Anaconda installation folder, such as:

ssl_verify: false
  1. Create and activate an Anaconda environment (basically a Python install just for this project) using Anaconda Prompt or the terminal.

conda create -n asimtest python=3.8

activate asimtest

source activate asimtest
  1. Get and install other required libraries on the activated conda Python environment using pip:

# required packages for running ActivitySim
conda install cytoolz numpy pandas psutil pyarrow numba
conda install -c anaconda pytables pyyaml
pip install openmatrix zbox requests

# optional required packages for testing and building documentation
conda install pytest pytest-cov coveralls pycodestyle
pip install pytest-regressions
conda install sphinx numpydoc sphinx_rtd_theme

# optional required packages for example notebooks and estimation integration
conda install jupyterlab matplotlib geopandas descartes larch
  1. If you access the internet from behind a firewall, then you need to configure your proxy server when downloading packages.

For conda for example, create a .condarc file in your Anaconda installation folder with the following:

ssl_verify: false

For pip for example:

pip install --trusted-host  openmatrix
  1. Get and install the ActivitySim package on the activated conda Python environment:

#new install
pip install activitysim

#update to a new release
pip install -U activitysim


ActivitySim is a 64bit Python 3 library that uses a number of packages from the scientific Python ecosystem, most notably pandas and numpy.

The recommended way to get your own scientific Python installation is to install 64 bit Anaconda, which contains many of the libraries upon which ActivitySim depends + some handy Python installation management tools.

Anaconda includes the conda command line tool, which does a number of useful things, including creating environments (i.e. stand-alone Python installations/instances/sandboxes) that are the recommended way to work with multiple versions of Python on one machine. Using conda environments keeps multiple Python setups from conflicting with one another.

You need to activate the activitysim environment each time you start a new command session. You can remove an environment with conda remove -n asimtest --all and check the current active environment with conda info -e.

For more information on Anaconda, see Anaconda’s getting started guide.

Run the Primary Example

ActivitySim includes a Command Line Interface for creating examples and running the model.

To setup and run the primary example (see Examples), do the following:

  • Open a command prompt

  • Activate the Anaconda environment with ActivitySim installed (i.e. asimtest)

  • Type activitysim create -e example_mtc -d test_example_mtc to copy the very small MTC example to a new test_example_mtc directory

  • Change to the test_example_mtc directory

  • Type activitysim run -c configs -o output -d data to run the example

  • Review the outputs in the output directory


Common configuration settings can be overridden at runtime. See activitysim -h, activitysim create -h and activitysim run -h. ActivitySim model runs can be configured with settings file inheritance to avoid duplicating settings across model configurations. See Command Line Interface for more information.

Additional examples, including the full scale MTC regional demand model, estimation integration examples, multiple zone system examples, and examples for agency partners are available for creation by typing activitysim create -l. To create these examples, ActivitySim downloads the (large) input files from the ActivitySim resources repository. See Examples for more information.

Try the Notebooks

ActivitySim includes a Jupyter Notebook recipe book with interactive examples. To run a Jupyter notebook, do the following:

  • Open an Anaconda prompt and activate the Anaconda environment with ActivitySim installed

  • If needed, conda install jupyterlab so you can run jupyter notebooks

  • Type jupyter notebook to launch the web-based notebook manager

  • Navigate to the examples/example_mtc/notebooks folder and select a notebook to learn more:


The computing hardware required to run a model implemented in the ActivitySim framework generally depends on:

  • The number of households to be simulated for disaggregate model steps

  • The number of model zones (for each zone system) for aggregate model steps

  • The number and size of network skims by mode and time-of-day

  • The number of zone systems, see example_multiple_zones

  • The desired runtimes

ActivitySim framework models use a significant amount of RAM since they store data in-memory to reduce data access time in order to minimize runtime. For example, the example MTC Travel Model One model has 2.7 million households, 7.5 million people, 1475 zones, 826 network skims and has been run between one hour and one day depending on the amount of RAM and number of processors allocated.


ActivitySim has been run in the cloud, on both Windows and Linux using Microsoft Azure. Example configurations, scripts, and runtimes are in the other_resources\example_azure folder.


Anaconda Python depends on the Intel Math Kernel Library which multithreads some low level numpy and C/C++ functions used by ActivitySim. This low level threading can compete with ActivitySim’s multiprocessing and so it is recommended to turn off MKL threading when running multiprocessed with the intent to use all the available CPUs. To do so, set the MKL_NUM_THREADS environment variable at runtime to one. On Windows, this means running set MKL_NUM_THREADS=1 before running the ActivitySim Python process.