From dfcf88efcfad29f23af8ebbfb74127c8edbded7a Mon Sep 17 00:00:00 2001 From: Lachlan Perrier Date: Mon, 9 Sep 2024 17:35:28 -0400 Subject: [PATCH] updated maz connectors to only include drive access==1 --- lasso/emme.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lasso/emme.py b/lasso/emme.py index 19c2a8b..5a59fc0 100644 --- a/lasso/emme.py +++ b/lasso/emme.py @@ -388,15 +388,19 @@ def prepare_table_for_drive_network( ~(links_df.B.isin(parameters.taz_N_list)) & ( # ft <= 7 should be kept in the nework ( - (links_df.drive_access == 1) & - (links_df.ft <= maximum_ft) + (links_df.ft <= maximum_ft) & + (links_df.drive_access == 1) ) | ( # is a tollsegment, should be kept within the network (links_df.tollseg != 0) | (links_df.tollbooth != 0) ) ) - ) | links_df["has_bus_on_link"] | links_df["managed_lane_connector"] | (links_df["cntype"] == "MAZ") # Maz is filtered out by links_df.fg <= maximum_ft + ) | ( + links_df["has_bus_on_link"] | + links_df["managed_lane_connector"] | + ((links_df["cntype"] == "MAZ") & (links_df.drive_access == 1)) # Maz is filtered out by links_df.fg <= maximum_ft + ) ].copy() if not regenerate_connectors: