Tools - bellevuewa/BKRCast GitHub Wiki

If BKRCast_Toolbox.mtbx (EMME Modeller toolbox) does not exist (check the project folder), you need to create one through the following command under the model's root directory.
python build_toolbox.py

Then you can manually add BKRCast_Toobox.mtbx into modeller. Only need to do it once.

EMME Modeller Tools

Assignment

  1. Path based assignment on multiple scenarios

  2. SOLA based assignment on multiple scenarios

  3. run transit assignment
    based on current transit trip tables.

Land Use

  1. import land use Import number of jobs and households by TAZ into mo matrices. Create a data table to present the total jobs, total hhs, job density and hh density. Meanwhile, four worksheets are created to visually display the four mo matrices.
    Worksheets are saved in Worksheets/Tables/Landuse folder.

  2. import land use growth Import growth of jobs and household by TAZ into mo matrices. Create a data table to present the growth. Two worksheets (for jobs and households) are created to visually display growth.
    Worksheets are saved in Worksheets/Tables/Landuse Growth folder.
    image

Model Outputs

  1. Export intersection plots
    Export intersection volume plot in batch mode. Use a node file as the input file. This file has only one column, with attribute name node, one node id per line.

Matrix

  1. Compare Matrix
    Compare one selected matrix in current databank with another selected matrix from an external databank. Importing external matrix into current databank is not necessary.
  2. Compare All Trip Tables
    Compare all trip tables (mf1 .. mf25) between current databank and the selected external databank. There is no need to import external matrices into current databank. 
  3. Export Matrices
    Export selected matrices to an external excel spreadsheet. Each matrix takes one worksheet. List of the matrices with descriptions are exported to readme tab as well.
  4. Auto Trip Ends Density
    Calculate auto trip ends per square file. Generate worksheet to show the visual. Generate data table and mo matrices for easy data processing in EMME.

Network

  1. Generate a list of bus stop
  2. TM611
    Export turning movement volumes in table format, one intersection per line.
  3. Auto Terminal Time
    Display auto terminal time at origin and destination. Terminal time are imported to mo and md matrices. Two worksheets are created and saved in Worksheets/terminal_time/ folder.

Scripts on Console Mode

For the tools below, use -h option to read short help description.

  1. reset_project_folders.py
    Located in project root folder. After a model is copied to different location, EMME databanks are still linked to the old locations in EMME project files. This tool is able to update project files with correct EMME databank locations by rebuilding project files.

  2. reset_model_structure.py
    Located in project root folder.
    Reset the model file structure to the minimal by removing all files and folders created by model,

  3. build_toolbox.py
    Located in project root folder.
    Build the modeller toolbox through the command line. The toolbox may need to be manually linked to the Modeller.

  4. calculate_daily_VMT.py
    Located in scripts/summarize/standard folder.
    This script is used to calculate VMT, VHT and VDT in different time of day and then aggregated to daily metrics. The metrics are aggregated to subareas flagged by an extra link attribute. The default attribute is @bkrlink. User can define own attribute to tag links.
    In addition, VMT, VHT and VDT are also aggregated by link speed in 5mph interval, to match emission factors from Move. The output file is saved in outputs/network/system_metrics.txt.

    python calculate_daily_VMT.py -h -t extra_link_attribute_tag  
    where:
      -h: help  
      -t: customized extra link attribute for link tagging
    
  5. landuse_summary.py
    Located in scripts/summarize/standard folder.
    Summarize number of jobs by category and jurisdiction, subarea, and BKRCastTAZ; summarize number of households and persons by jurisdiction, subarea, BKRCastTAZ, and census block group. The outputs are exported to land_use_summary_report.xlsx. Summary of public off street parking spaces and cost are also generated.

      landuse_summary.py -hp
      where:
        -h: help
        -p: export households and persons to csv file
    
  6. network_volume_validation.py
    Located in scripts/summarize/standard folder.
    This program will save model volumes and counts at screenline locations to external Excel file, and save scatter plots and calculate linear regression as well. Screenlines and counts are defined in a json file, which usually resides in the root project folder.
    Two predefined json files are for 2014 and 2018 base year.

    python network_volume_validation.py -h -i <input_json_file>')
    where:
      -h: help
      -i: json file for screenline and count definition. Default is screenline_2014.json. 
    
    
  7. pacalculator.py
    Located in scripts/summarize/standard folder.
    This program is used to calculate person trip ends aggregated by origin and destination taz. The results are saved in an outputs/named scenario_name_daily_person_trips_by_OD.txt.

    Inside the output file:  
      Three columns are associated with each purpose. They are production, attraction, and total trip ends for each purpose.
        for example: 
          all_prod: production of all purposes
          all_attr: attraction of all purposes
          all:      all_prod + all_attr
          others: trip ends sum of four purposes: escort, shopping, personal_biz, social
    
    python pacalculator.py -h -f <trip_filename.tsv>
    where:
      -h: help
      -f: name of a file equivalent to _trip.tsv
    
  8. summarize_daysim_hhs_and_persons.py
    Located in scripts/summarize/standard folder.
    Summarize demographic information (household and person) in standard locations and customized locations using finalized synthetic population output from daysim.
    Household summary always includes jurisdiction, subarea and TAZ level report. If any option is used, it is an addition to the household summary report. Person summary only includes regional and Bellevue, plus customized location if it is specified in the option.

    summarize_daysim_hhs_and_persons.py -h -f <file name> -m <subarea code> SubareaName
    where:
      -h: help
      -f: customized location file path. It should have only one column named BKRCastTAZ
      -m: subarea code (1-14)
      SubareaName:
            BelDT
            Redmond
            Kirkland
    
  9. tour_mode_share_calculator.py
    Located in scripts/summarize/standard folder.
    Calculate mode share from tours in a defined subarea and time period. Region wide is the default if no subarea is specified. Daily is the default if no time period is specified.

    tour_mode_share_calculator.py -h -o <output_file> -s <subarea_definition_file> -t <time period> --stime <start_time> -- etime <end_time> subarea_code
    where:
       -h: help
       -o: output file name. This file is saved in outputs folder.
       -s: subarea definition file name. This file needs absolute file path.
       -t: time period. Can only be either of 'daily, 'am', 'md', 'pm', 'ni'. This predefined time period is superior to the user defined time period.")
       --stime: start time in number of minutes from midnight.
       --etime: end time in number of minutes from midnight.
       subarea_code: 
          'Region':    the whole region
          'Bellevue':  Bellevue
          'BelDT':     Bellevue downtown
          'Kirkland':  Kirkland
          'Redmond':   Redmond
    
  10. trip_mode_share_calculator.py
    Located in scripts/summarize/standard folder.
    Calculate mode share from trips in a defined subarea and time period. Region wide is the default if no subarea is specified. Daily is the default if no time period is specified.

    trip_mode_share_calculator.py -h -i <input_file> -o <output_file> -s <subarea_definition_file> -t <time period> --stime <start_time> -- etime <end_time> subarea_code
    where:
      -h: help
      -i: input file name. This file is saved in outputs folder.
      -o: output file name. This file is saved in outputs folder.
      -s: subarea definition file name. This file needs absolute file path.
      -t: time period. Can only be either of 'daily, 'am', 'md', 'pm', 'ni'. This predefined time period is superior to the user defined time period.
      --stime: start time in number of minutes from midnight.
      --etime: end time in number of minutes from midnight.
        subarea_code: 
           'Region':   the whole region
           'Bellevue': Bellevue
           'BelDT':    Bellevue downtown
           'Kirkland': Kirkland
           'Redmond':  Redmond
    
  11. equity.py
    Located in scripts/summarize/calibration folder.
    This script is used to generate demographic report and equity report. Demographic data is saved in demographic_report.xlsx. Equity data is saved in equity_report.xlsx. Both files are located in outputs/summary folder.
    The following files are used in generating reports.
    *_household.tsv
    *_person.tsv
    *_trip.tsv

    scripts/summarize/calibration/equity.py -h -i trip_file_name
    where:    
      -h: help
      -i: name of an alternative trip file to be used in this tool. Default file path is outputs/daysim.
    
  12. network_summary.py
    Located in scripts/summarize/standard folder.
    The script generates intrazonal volumes, lane-miles/VMT/VHT/VHD by jurisdiction, facility type, and user class. It also generates transit OD trip table for selected transit lines, daily boarding by stops and by selected lines, daily boarding by LRT, transit transfer, and number of household/jobs within 1/4 mile radius of transit stops.

    scripts/summarize/standard/network_summary.py
    
  13. emissions.py
    Located in scripts/summarize/standard folder.
    Vehicle emission calculation is only limited to the Cities of Bellevue, Kirkland, Redmond and rest of King County area. Output files are saved in outputs/emissions folder. Need to run network_summary.py first to ensure model outputs are updated. Link attribute @facility_moves is required for this script.

    scripts/summarize/standard/emissions.py -h -f
      -h: help
      -f: output file name (Excel file).
    
  14. create_extra_attributes.py Located in scripts/utils folder.
    This script adds extra attributes to all TOD databanks in LoadTripTables (EMME) project. The attributes are either specified in a JSON file, or attribute punchout file from EMME containing the attribute headers.

    scripts/create_extra_attributes.py -h -s -d -f
      -h: help
      -s: scenario id. Default is 1002.
      -d: dict file (json file)
         [{'type':'LINK', 'name': '@studyarea', 'description': 'flag for study area', 'overwrite': 'True', 'file_name':'inputs/extra_attributes/@studyarea.txt'},
          {'type':'LINK', 'name': '@studyarea405', 'description': 'flag for I405 and ramps in study area', 'overwrite': 'True', 'file_name':'inputs/extra_attributes/@studyarea405.txt'}]
      -f: attribute punchout file from EMME with attribute headers.
    
⚠️ **GitHub.com Fallback** ⚠️