Skip to content

SeaCast Install

goreaditya edited this page Dec 16, 2024 · 3 revisions

The following steps must be performed before SeaCast can be run. This procedure should only be necessary to follow once for a new modeling machine.

Recommended hardware specifications

  • Windows-based operating system
  • 12 or more logical processors
  • 128 or more GB RAM
  • 150 GB hard disk space

City of SeaTac will run model in house. Local machines should be at configured with at least Windows and have 128 GB RAM, with Intel Xeon E5-2690V4 processors @2.60 GHZ.

Cloud servers are provided by AWS, which allow scalable machine power. An ideal AWS machine is "z1d-6xlarge," which provides 32 virtual CPUs and allows up to 244 GB of memory, at a cost of $3.60/hour (as of fall 2018). Lower-powered machines (such as c5.4xlarge [16 CPUs, 32 GB of memory, at $1.42/hour] have also been used, with a somewhat slower run time.

Clone SeaCast Repository

Download the code base as a ZIP file, or use a Git GUI or command line utility. For those unfamiliar with Git, we recommend downloading the code as a ZIP file for simplicity. For the setup purposes we will assume that the repository is downloaded in C:\users\jane\seacast_test\seacast-master directory.

NOTE: before unzipping any inputs or code, be sure the folder is "unblocked" by right-clicking the downloaded, zipped folder to access "Properties" -> "General"; check the boxed labeled "Unblock" in the Security section at the bottom of the window.

Clone SeaCastScenarioInputs Repository

Use a Git GUI or command line utility. This repository is in the Git Large File Storage format. It will need git LFS that can be downloaded from here. Please follow the instructions listed on the Git Page to install Git LFS. For the setup purposes we will assume that the scenario inputs repository is downloaded in C:\users\jane\seacast_test\seacastscenarioinputs-master directory.

Virtual Environment Setup

SeaCast is designed to run in a virtual environment, which maintains a consistent set of Python library versions separate from other Python installations. Due to library dependency issues, two virtual environments are used for different purposes. To setup a new virtual environment for SeaCast on a new machine:

  • Download and install the Anaconda python library set. Here is a download link to install Python 3 Anaconda version 2021.11 for SeaCast. Here is a link to the page that contains all the Anaconda versions in case you need them.

    • When prompted:
      • Install for single user only to avoid admin issues
      • The default install path is long. You may prefer to change it to a simpler path like C:/Anaconda
      • Add Anaconda to the PATH and register Anaconda as default Python 3.8
  • After installed, open an Anaconda prompt and navigate to the downloaded/cloned SeaCast repository. (e.g., cd C:\users\jane\seacast_test\seacast-master)

  • Run the following command to build a virtual environment called "model_py3" for running SeaCast: conda env create -f inputs\model-spec.yml

  • This could take several minutes. If you need to uninstall the "model_py3" environment at any point, you can use the command: conda env remove -n model_py3

  • This newly-created virtual environment must be activated to run SeaCast. To activate it run: activate model_py3

  • Every time a new prompt is opened, the virtual environment must be activated as above. This ensures that Python is using the correct set of libraries to run SeaCast.

  • Run the following command to build a virtual environment called "summary" for running SeaCast summaries: conda env create -f inputs\summary-spec.yml

  • Run the following command to build a virtual environment called "seatac_airport" for running Airport sub-model: conda env create -f inputs\airport_model_env.yaml

  • SeaCast will automatically switch between these three environments as necessary.

Emme Setup

The current version of SeaCast (v3.0 and later) relies on Python 3, and thus requires a Python 3 based version of Emme. PSRC uses Emme version 4.5.1.1. All future releases of Emme will use Python 3 so more recent releases should work as well.

After installing Anaconda, change Emme's settings to use the Anaconda installation by default. Otherwise, scripts that interact with Emme will use another Python install without the necessary libraries. To change the Python version used by Emme, select Tools (from the main taskbar) and click 'Application Options'.

Under the Modeller tab, replace the "Python path" field with the path to your Anaconda virtual environment. The virtual environment is always stored in the env\model_py3 directory of the Anaconda install. For instance, if Anaconda is installed at C:\Anaconda, the virtual environment path is C:\Anaconda\env\model_py3.

Click "Apply" and "Install Modeller Package". If installed properly, the button should change to "Update Modeller Package." This process is copying a path file to redirect your Anaconda library to search for libraries in the Emme install when not found in Anaconda.

Additionally, it's recommended to change the following paths for Toolboxes in the Application Options windows from above:

- %<$ProjectPath>%\standard.mtbx
- %<$EmmePath>%\toolboxes\agent.mtbx (if available)
- %<$EmmePath>%\toolboxes\manual.mtbx

To check that Emme is working properly for the "model" environment, open an Anaconda prompt and try the following commands:

     > activate model_py3
     > python
     >>> import inro
     >>> import inro.emme.desktop.app

These commands import Inro's Python libraries into the "model" environment; if all is well, there should be no error messages.

Set up Environment Variables

Since we are using an Anaconda install with out own libraries for SeaCast, some additional steps may be required to avoid conflicts with Emme's Python libraries. If you are having issues opening the Modeller GUI or experiencing any issues related to Modeller (but can import INRO libraries), the issue is likely with the environment variable definitions.

Best practice is to do the following after the above steps are complete.

  • add the sub-folder Library\bin of the model_py3 environment's folder to the system PATH environment variables (under System Properties -> Environment Variables)
  • for example, if the Anaconda environment is installed in this folder C:\Anaconda\env\model_py3, add the following to the PATH variable: C:\Anaconda\env\model_py3\Library\bin
  • Make sure this is at the top of the list of system environment variables.

.NET Framework

The Daysim demand model is built within the .NET framework. The correct version of .NET is required for all Daysim libraries to function properly. Currently, Visual Studio 2015 contains the correct framework. If an error occurs regarding a dll file (such as HDFDotNet), check that your Visual Studio version is correct.


----> Next Install Step: Setup

The wiki describes the basic theory and process to use SeaCast for travel modeling applications.

Calibration and Testing

Utilities

Release Notes

  • Notes on Latest Code and Inputs
Clone this wiki locally