System Design - tlumip/CALM GitHub Wiki

The CALM model mixes the JEMnR demand model with the turnkey model design from Southern Oregon Activity-based Model (SOABM) utilizing PTV Visum for the network supply model. A single batch file runs all model components.

Model Flow

As shown in this diagram, the batch file coordinates model flow across software and manages the feedback loop. The Visum Python API is used by the Visum Runner script (VISUM_Runner.py) to run Visum procedures and an R Model Runner script is used to run components of the JEMnR model. Matrix data is written to OMX, which can be read into Visum.

  1. The batch file first gets initial skims using the Visum Runner. Skims are saved as OMX files in outputs/matrices.
  2. The batch file begins the feedback loop and launches JEMnR (modelModules.R).
  3. JEMnR reads in input files, settings, and the OMX skims.
  4. If enabled, the University model is called.
  5. If enabled, the Commercial Vehicle Model is called.
  6. If the University model is not enabled, the Pre-Generation step is run.
  7. The household trip generation, distribution, and mode choice steps are run.
  8. The external model is run, with inputs from SWIM if enabled.
  9. Demand matrices (RData files) are written to OMX. (writeToOMX.R)
  10. Visum reads in the demand matrices and performs assignment by time period (daily and PM peak).
  11. If the model is not converged and the maximum number of iterations have not yet run, the loop begins again (#3) using the congested travel time skims.
  12. After the final iteration, the JEMnR Reporting script is run.

Software Dependencies

This model uses the same software dependencies as SOABM, which are:

  • Java JDK 1.8.0_111
  • Pandoc (SOABM visualizer requirement, but not used in CALM)
  • Python 2.7.3
  • Python 3.7.4
  • R 3.4.1

Instructions for obtaining the dependencies are in the Getting Started guide.

Additional Software

7-zip is required to be installed in order to generate ZMX matrix files for the University model. The path to the 7-zip executable is specified in the Settings.csv file.

Visum Version Files

All Visum operations start with the input version file, which contains all network objects but has no matrices or procedures loaded. When needed by the Visum Runner script, procedure sequences for skimming and assignment are loaded from XML files and matrices are loaded from OMX files.

Loaded networks by time period are saved to:

/scenario/outputs/networks/Assignment_daily.ver
/scenario/outputs/networks/Assignment_peak.ver - Always auto, transit if enabled

JEMnR

The JEMnR model includes several components that can be enabled/disabled via settings, including the Commercial Vehicle Model, External Model, and University Model. Inputs are typically in CSV format, intermediate and final data is written to RData files. In inputsSave.R, the .OMX files are read in and converted to .ZMX. Then they are further processed and saved as .RData. In writeToOMX.r, the RData files are read in, processed and written out as .OMX files.

Commercial Vehicle Model

The Commercial Vehicle Model is responsible for modeling non-household commercial vehicles, including four-tire commercial vehicles (FTCVs), Single-unit Trucks (SUT) and Multi-unit Trucks (MUT). These vehicles have different travel patterns than household vehicles. The CVM is run within JEMnR as an R script.

University Model

The University Model is a Java-based program implemented with the Common Modeling Framework run from within the JEMnR R scripts. It is a tour-based model that estimates the travel behavior of OSU students, faculty, and staff.

External Model

The External Model applies link flows from the Statewide Integrated Model (SWIM) to the model's external stations.