From 21619b35c6ee6a5b20f474898c157e248fe0e2f0 Mon Sep 17 00:00:00 2001 From: Sijia Wang Date: Thu, 8 Aug 2024 11:08:18 -0400 Subject: [PATCH] remove problem code for sharrow load --- activitysim/core/simulate.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/activitysim/core/simulate.py b/activitysim/core/simulate.py index 2472f076c..fcffcf606 100644 --- a/activitysim/core/simulate.py +++ b/activitysim/core/simulate.py @@ -809,16 +809,20 @@ def eval_utilities( ) print(f"{sh_util.shape=}") print(misses) - _sh_flow_load = sh_flow.load(sh_tree) - print("possible problematic expressions:") - for expr_n, expr in enumerate(exprs): - closeness = np.isclose( - _sh_flow_load[:, expr_n], expression_values[expr_n, :] - ) - if not closeness.all(): - print( - f" {closeness.sum()/closeness.size:05.1%} [{expr_n:03d}] {expr}" - ) + # load sharrow flow + # TODO: This block of code is sometimes extremely slow or hangs for no apparent + # reason. It is temporarily disabled until the cause can be identified, so + # that model does not hang with sharrow enabled. + # _sh_flow_load = sh_flow.load(sh_tree) + # print("possible problematic expressions:") + # for expr_n, expr in enumerate(exprs): + # closeness = np.isclose( + # _sh_flow_load[:, expr_n], expression_values[expr_n, :] + # ) + # if not closeness.all(): + # print( + # f" {closeness.sum()/closeness.size:05.1%} [{expr_n:03d}] {expr}" + # ) raise except TypeError as err: print(err)