Skip to content

ETN Module

ccai-cmap edited this page Oct 2, 2025 · 3 revisions

The HN module refers to modules/ETN.py. The file contains the EmmeTravelNetwork class, which describes the attributes and methods for an EmmeTravelNetwork object. It contains functionality for creating transaction files for EMME.

Attributes

4 attributes are defined. There are 4 final attributes which do not change.

Final Attributes

  1. mhn_out_folder: the absolute path to the mfhrn_programs/output/1_travel folder.
  2. years_list: a list of the years that were passed into input_years.csv.
  3. years_dict: a dictionary of the years that were passed into input_years.csv and their corresponding scenarios.
  4. hwymode_dict: a dictionary relating restricted EMME modes to the highway modes.

Methods

These are the building blocks for the rest of the scripts. There is 1 main method (which are used in other scripts) and 3 helper methods (which are called by the main methods).

Main Methods

  1. generate_hwy_files: generates the highway transaction files for modeling in EMME.

Helper Methods

  1. create_directional_records: creates directional records of the highway links.
  2. write_ln_files: writes the link and node files (files with the extension l1, l2, n1, n2) for the requested scenarios.
  3. write_linkshape_file: writes the linkshape files for the requested scenarios.

Clone this wiki locally