From 264256e206266b92698dae9ba72a022df134784c Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Thu, 8 Jun 2023 18:50:57 -0400 Subject: [PATCH 1/3] assign capacity for ft 99, set default trantime to zero --- tm2py/components/network/create_tod_scenarios.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tm2py/components/network/create_tod_scenarios.py b/tm2py/components/network/create_tod_scenarios.py index f6a2d8b0..8b5aa870 100644 --- a/tm2py/components/network/create_tod_scenarios.py +++ b/tm2py/components/network/create_tod_scenarios.py @@ -342,6 +342,8 @@ def _create_transit_scenarios(self): link["@trantime"] = ( 60 * link.length / speed + link.length * 5 * 0.33 ) + else: + link["@trantime"] = 0 else: link["@trantime"] = 60 * link.length / speed # set TAP connector distance to 60 feet @@ -517,6 +519,8 @@ def _set_capclass(network): area_type = link["@area_type"] if area_type < 0: link["@capclass"] = -1 + elif (link["@ft"] == 99) & (link["@assignable"] == 1): + link["@capclass"] = 10 * area_type + 7 else: link["@capclass"] = 10 * area_type + link["@ft"] From 0ba6b172395ff030cc9bde260163a77c5fd5d98d Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Mon, 12 Jun 2023 11:09:51 -0400 Subject: [PATCH 2/3] add missing fd6 --- tm2py/components/network/create_tod_scenarios.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tm2py/components/network/create_tod_scenarios.py b/tm2py/components/network/create_tod_scenarios.py index 8b5aa870..a30fe58c 100644 --- a/tm2py/components/network/create_tod_scenarios.py +++ b/tm2py/components/network/create_tod_scenarios.py @@ -173,6 +173,7 @@ def _create_highway_scenarios(self): "fd3", "fd4", "fd5", + "fd6", "fd7", "fd9", "fd10", From f3887256fb304d9d4a90a09c69f4b9c465f188a6 Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Mon, 12 Jun 2023 12:23:42 -0400 Subject: [PATCH 3/3] calc bus time for links not assigned in the hwy net --- tm2py/components/network/transit/transit_network.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tm2py/components/network/transit/transit_network.py b/tm2py/components/network/transit/transit_network.py index d004d332..906c8d16 100644 --- a/tm2py/components/network/transit/transit_network.py +++ b/tm2py/components/network/transit/transit_network.py @@ -328,13 +328,17 @@ def _get_highway_travel_times( _highway_net = _highway_scenario.get_partial_network( ["LINK"], include_attributes=False ) - travel_time_attributes = {"LINK": ["#link_id", "auto_time"]} + travel_time_attributes = {"LINK": ["#link_id", "auto_time", "@lanes"]} self.emme_manager.copy_attribute_values( _highway_scenario, _highway_net, travel_time_attributes ) # TODO can we just get the link attributes as a DataFrame and merge them? + # if the link does not have meaningful travel time in highway assigned network + # such as bus only link, managed lanes, etc. + # assume default bus speed of 30 mph auto_link_time_dict = { - auto_link["#link_id"]: auto_link.auto_time + auto_link["#link_id"] : ( auto_link.auto_time + if auto_link["@lanes"] > 0 else 60*auto_link["length"]/30 ) for auto_link in _highway_net.links() } return auto_link_time_dict