Skip to content

Commit

Permalink
Merge pull request #15 from i-am-sijia/patch-1
Browse files Browse the repository at this point in the history
Remove problem code for sharrow load
  • Loading branch information
jpn-- authored Aug 8, 2024
2 parents 8bcb63d + 21619b3 commit 9ce544e
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions activitysim/core/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ce544e

Please sign in to comment.