Skip to content

Commit

Permalink
maz treated as regular drive
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlan-git committed Aug 14, 2024
1 parent df424f9 commit d017d70
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lasso/emme.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ def prepare_table_for_drive_network(

drive_links_df = links_df[
(
~(links_df.A.isin(parameters.taz_N_list + parameters.maz_N_list)) &
~(links_df.B.isin(parameters.taz_N_list + parameters.maz_N_list)) &
# just Remove taz connectors, maz connectors / nodes will remain as regular nodes
~(links_df.A.isin(parameters.taz_N_list)) &
~(links_df.B.isin(parameters.taz_N_list)) &
( # ft <= 7 should be kept in the nework
(
(links_df.drive_access == 1) &
Expand All @@ -363,8 +364,8 @@ def prepare_table_for_drive_network(

if not regenerate_connectors:
model_tables["connector_table"] = links_df[
(links_df.A.isin(parameters.taz_N_list + parameters.maz_N_list)) |
(links_df.B.isin(parameters.taz_N_list + parameters.maz_N_list))
(links_df.A.isin(parameters.taz_N_list)) |
(links_df.B.isin(parameters.taz_N_list))
].to_dict('records')
else:
# check ranch is installed
Expand All @@ -381,14 +382,12 @@ def prepare_table_for_drive_network(
ranch_roadway = ranch.Roadway(nodes_df, links_df, shapes_df, ranch_params)
ranch_roadway.build_centroid_connectors(build_taz_active_modes=True, build_maz_drive=True)
model_tables["connector_table"] = ranch_roadway.links_df[
(ranch_roadway.links_df.A.isin(parameters.taz_N_list + parameters.maz_N_list)) |
(ranch_roadway.links_df.B.isin(parameters.taz_N_list + parameters.maz_N_list))
(ranch_roadway.links_df.A.isin(parameters.taz_N_list)) |
(ranch_roadway.links_df.B.isin(parameters.taz_N_list))
].to_dict('records')





model_tables["link_table"] = drive_links_df.to_dict('records')

drive_nodes_df = nodes_df[
Expand Down

0 comments on commit d017d70

Please sign in to comment.