Installing ABM3 v15.3.1 ¶
This page describes how to install and run ABM3, including hardware and software requirements. In general, a powerful server is required to run the model. The main software required for the model includes EMME, Python, and Java. EMME is a commercial transportation modeling platform that must be purchased separately and requires a computer with a Windows operating system. Python is an open-source cross-platform programming language that is the core language of ActivitySim. Java is an open-source programming language required for certain bespoke non-ActivitySim model components.
System Requirements ¶
ABM3 runs on a Microsoft Windows workstation or server, with the minimum and recommended system specification as follows:
Minimum specification:
-
Operating System: 64-bit Windows 7, 64-bit Windows 8 (8.1), 64-bit Windows 10, 64-bit Windows Server 2019
-
Processor: 24-core CPU processor
-
Memory: 1 TB RAM
-
Disk space: 500 GB
Recommended specification:
-
Operating System: 64-bit Windows 10
-
Processor: Intel CPU Xeon Gold / AMD CPU Threadripper Pro (24+ cores)
-
Memory: 1 TB RAM
-
Disk space: 1000 GB
In general, a higher CPU core count and RAM will result in faster run times as long as ActivitySim is configured to utilize the additional processors and RAM.
Note that the model is unlikely to run on servers that have less than 1 TB of RAM, unless chunking is set to active and in explicit mode (requires an upcoming version of ActivitySim 1.3)
Software Requirements ¶
To run ABM3, there are certain software that should be installed on your workstation including: EMME, Python2.7 package manager Anaconda2, Python3 package manager Anaconda3, and Java.
The ABM3 model system is an integrated model that is controlled by and primarily runs in the EMME transportation planning software platform. EMME is used for network assignment, creating transportation skims, and the model’s Graphical User Interface (GUI). The software also provides functionality for viewing and editing highway and transit network files and viewing of matrix files. The Bentley CONNECTION Client software (the license manager for EMME) will need to be logged into and activated prior to running the model.
A Python package manager is software that creates an environment for an instance of Python. ActivitySim and related Python processes in the model are executed in an environment that is setup with a specific version of Python and specific library versions. This ensures that changes outside of the Python environment will not cause errors or change model results, and additionally ensure that the specific version of Python and specific libraries needed by the model do not cause errors or changes to other Python software installations on the server. The libraries needed by ActivitySim extend the base functionality of Python.
Java is required in order to create bicycle logsums, run the taxi/TNC routing model, and run the intra-household autonomous vehicle routing model. The model has been tested against Java version 8 (i.e., 1.8) and is therefore the recommended version to be used when running the SANDAG ABM.
Installing ABM3 ¶
Setting up the Python Environments ¶
As noted above, the user needs to install Anaconda2 and Anaconda3 on the workstation they intend to install ABM3 on. The Anaconda2 software is utilized to create a Python2-based environment required to interface with a specific version of EMME (4.3.7) whereas Anaconda3 is utilized to create environments to run ActivitySim.
Python2 Environment ¶
After Anaconda installation, the following step is to create the Python2-based environment, which can be done via the following steps:
- Create a directory called python_virtualenv on the server’s local drive and copy in the following files:
- Open EMME Shell (likely as Administrator)
- Navigate (via cd command) to wherever add_python_virtualenv.bat was copied to
- Execute add_python_virtualenv.bat
- Copy python_virtualenv.pth to EMME’s site-packages directory
- For example, C:\Program Files\INRO\Emme\EMME 4\Emme-4.3.7\Python27\Lib\site-packages
If installation was succesfully completed, you will have created an environment at e.g., C:\python_virtualenv\abm14_2_0. Ensure relevant libraries were installed under the environment’s site-packages directory.
Python3 Environments ¶
The following step is creating two Python3-based Activitysim environments: one for running ActivitySim and the other specificallly for running the ActivitySim-based Commercial Vehicle Model (CVM).
ActivitySim Environment ¶
SANDAG Users ¶
To create the ActivitySim (asim_140) environment:
- Open Anaconda3 Prompt as Administrator
- Execute the following commands:
conda update -n base conda
net use T: \\sandag.org\transdata
cd T:\ABM\dev\ABM3\src\asim\scripts
T:
conda env create --file=environment.yml -n asim_140
conda activate asim_140
pip install -r requirements.txt
External Users ¶
To create the ActivitySim (asim_140) environment:
- Download the following ABM3 v15.3.1 environment package files:
- Save somewhere on your machine’s local drive
- Open Anaconda3 Prompt (likely as Administrator)
- Execute the following commands:
conda update -n base conda
cd {path-to-directory-with-environment-packages}
conda env create --file=environment.yml -n asim_140
conda activate asim_140
pip install -r requirements.txt
Environment Variables ¶
During an ABM3 model run, there are certain system environment variables that get referenced. These variables must be added to your workstation’s environment variables. To do so:
- Navigate to your workstation’s System Properties > Advanced > Environment Variables
- Under System variables, using the New… button, add the following variables:
- CONDA_PREFIX={path to Anaconda3}
- e.g., C:\Anaconda3
- CONDA_TWO_PREFIX={path to Anaconda2}
- e.g., C:\Anaconda2
- CONDA_PREFIX={path to Anaconda3}
- Under System variables > Path, using the Edit… button, add (if not already present) the following variables to Path:
- {path to Anaconda2}
- {path to Anaconda2}\Scripts
- {path to Anaconda2}\Library\bin
- {path to Anaconda3}
- {path to Anaconda3}\Scripts
- {path to Anaconda3}\Library\bin
Azure Environment Variables ¶
Note: This section mainly relevant to SANDAG users.
When an ABM3 scenario finalizes, it loads onto Azure for post-processing. There are a number of system environment variables necessary to establish a connection to the Azure system.
To create those Azure system environment variables:
- Open PowerShell as Administrator
- Navigate (via cd command) to T:\ABM\software\PS1
- Execute .\ABM_Variables.ps1
- If you encounter an error message indicating the .ps1 file is not digitally signed, you may bypass the execution policy for your current PowerShell session by running:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen, re-execute ABM_Variables.ps1.
- If you encounter an error message indicating the .ps1 file is not digitally signed, you may bypass the execution policy for your current PowerShell session by running:
SQLCMD ¶
Note: This section mainly relevant to SANDAG users.
An installation of the sqlcmd utility is necessary to execute Transact-SQL statements directly in the command line. Within the ABM3 modeling framework, it is utilized to execute a command that identifies the next available Azure scenario ID in preparation for loading a finalized ABM3 scenario onto Azure.
To install the sqlcmd utility, download and execute the latest Microsoft Software Installer (i.e., .msi) file from the Microsoft sqlcmd GitHub repository (hint: sqlcmd-amd64.msi)
To verify successful installation of sqlcmd utility on your workstation:
- Copy GetScenarioId.bat somewhere onto your workstation
- Open command prompt
- Navigate (via cd command) to location where GetScenarioId.bat was copied to
- Execute the following command:
GetScenarioId.bat 9999 sqlcmdTest "dev"- Note: The steps under Azure Environment Variables must be executed beforehand
- If installation and command execution were successful, you should see the following:
SQLCMD Utility Test
Installing Java ¶
Java version 1.8 needs to be installed on the workstation. SANDAG servers usually have this version of Java already installed on them.
Alternatively, the exact version may be found on Oracle’s Java SE 8 Archive Downloads site. (hint: jre-8u162-windows-x64.exe)