Skip to content

Commit

Permalink
Merge pull request #217 from SANDAG/ABM3_hwytcad
Browse files Browse the repository at this point in the history
Drop fields from hwytcad
  • Loading branch information
bhargavasana authored Oct 18, 2024
2 parents 34ff5bf + 6b2fcda commit 2a60647
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
51 changes: 0 additions & 51 deletions src/main/emme/toolbox/export/export_data_loader_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,35 +176,12 @@ def export_traffic_attribute(self, base_scenario, export_path, traffic_emmebank,
("Length", "length"),
("Dir", "is_one_way"),
("hwycov-id:1", "@tcov_id"),
("ID:1", "@tcov_id"),
("Length:1", "length_feet"),
("QID", "zero"),
("CCSTYLE", "zero"),
("UVOL", "zero"),
("AVOL", "zero"),
("TMP1", "zero"),
("TMP2", "zero"),
("PLOT", "zero"),
("SPHERE", "@sphere"),
("RTNO", "zero"),
("LKNO", "zero"),
("NM", "#name"),
("FXNM", "#name_from"),
("TXNM", "#name_to"),
("AN", "i"),
("BN", "j"),
("COJUR", "zero"),
("COSTAT", "zero"),
("COLOC", "zero"),
("RLOOP", "zero"),
("ADTLK", "zero"),
("ADTVL", "zero"),
("PKPCT", "zero"),
("TRPCT", "zero"),
("SECNO", "zero"),
("DIR:1", "zero"),
("FFC", "type"),
("CLASS", "zero"),
("ASPD", "@speed_adjusted"),
("YR", "@year_open_traffic"),
("PROJ", "@project_code"),
Expand All @@ -216,37 +193,18 @@ def export_traffic_attribute(self, base_scenario, export_path, traffic_emmebank,
("PMTRUCK", "@truck_pm"),
("EVTRUCK", "@truck_ev"),
("SPD", "@speed_posted"),
("TSPD", "zero"),
("WAY", "way"),
("MED", "@median"),
("COST", "@cost_operating"),
]
directional_attrs = [
("ABLNO", "@lane_md", "0"),
("ABLNA", "@lane_am", "0"),
("ABLNP", "@lane_pm", "0"),
("ABAU", "@lane_auxiliary", "0"),
("ABPCT", "zero", "0"),
("ABPHF", "zero", "0"),
("ABCNT", "@traffic_control", "0"),
("ABTL", "@turn_thru", "0"),
("ABRL", "@turn_right", "0"),
("ABLL", "@turn_left", "0"),
("ABTLB", "zero", "0"),
("ABRLB", "zero", "0"),
("ABLLB", "zero", "0"),
("ABGC", "@green_to_cycle_init", "0"),
("ABPLC", "per_lane_capacity", "1900"),
("ABTMO", "@time_link_md", "999"),
("ABTMA", "@time_link_am", "999"),
("ABTMP", "@time_link_pm", "999"),
("ABTXO", "@time_inter_md", "0"),
("ABTXA", "@time_inter_am", "0"),
("ABTXP", "@time_inter_pm", "0"),
("ABCST", "zero", "999.999"),
("ABVLA", "zero", "0"),
("ABVLP", "zero", "0"),
("ABLOS", "zero", "0"),
]
for key, name, default in directional_attrs:
hwylink_attrs.append((key, name))
Expand All @@ -270,7 +228,6 @@ def export_traffic_attribute(self, base_scenario, export_path, traffic_emmebank,
("ABH2CST", "hov2_total_gencost", ""),
("ABH3CST", "hov3_total_gencost", ""),
("ABSTM", "auto_time", ""),
("ABHTM", "auto_time", ""),
]
periods = ["_ea", "_am", "_md", "_pm", "_ev"]
for column in time_period_atts:
Expand Down Expand Up @@ -305,14 +262,6 @@ def export_traffic_attribute(self, base_scenario, export_path, traffic_emmebank,
hwylink_attrs.append((key, name))
if key.startswith("AB"):
hwylink_attrs.append(("BA" + key[2:], (name, default)))
for period in periods:
for key, name, default in vdf_attrs:
name = name + period if name.startswith("@") else name
default = default or "0"
hwylink_attrs.append((key + period.upper(), name))
if key.startswith("AB"):
hwylink_attrs.append(("BA" + key[2:] + period.upper(), (name, default)))

network = base_scenario.get_partial_network(["LINK"], include_attributes=True)

#copy assignment from period scenarios
Expand Down
9 changes: 0 additions & 9 deletions src/main/python/hwyShapeExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ def export_highway_shape(scenario_path: str) -> geopandas.GeoDataFrame:
usecols=["ID", # highway coverage id
"NM", # link name
"Length", # link length in miles
"COJUR", # count jurisdiction code
"COSTAT", # count station number
"COLOC", # count location code
"FC", # initial functional class
"HOV", # link operation type
"EATRUCK", # truck restriction code - Early AM
Expand Down Expand Up @@ -387,9 +384,6 @@ def export_highway_shape(scenario_path: str) -> geopandas.GeoDataFrame:
hwy_tcad = hwy_tcad[["ID",
"NM",
"Length",
"COJUR",
"COSTAT",
"COLOC",
"FC",
"FC_Desc",
"HOV",
Expand Down Expand Up @@ -488,9 +482,6 @@ def export_highway_shape(scenario_path: str) -> geopandas.GeoDataFrame:
hwy_tcad.rename(columns={"ID": "hwycov_id",
"NM": "link_name",
"Length": "len_mile",
"COJUR": "count_jur",
"COSTAT": "count_stat",
"COLOC": "count_loc",
"FC": "fc",
"FC_Desc": "fc_desc",
"HOV": "hov",
Expand Down

0 comments on commit 2a60647

Please sign in to comment.