ActivitySim / sandag-abm3-example

BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Sharrow `test` crashes with `utility not aligned` error #18

Closed i-am-sijia closed 1 month ago

i-am-sijia commented 1 month ago

Describe the bug Benchmarking run crashes when setting sharrow to test instead of require

To Reproduce Steps to reproduce the behavior:

  1. Change require to test in exercise.py https://github.com/ActivitySim/sandag-abm3-example/blob/f0fbc8fb9e2020b76dbe5decff405c8a169e134c/exercise.py#L149
  2. Run exercise.py
  3. See error

Expected behavior The utility with vs without Sharrow should be the same or within the tolerance.

Screenshots image

Additional context ActivitySim: d98f776af559038e1588c7f07d58df7151965cb3 Sharrow: 5b968ae86a632ea2751ce46f251f83e5f00d05d8 ABM3: f0fbc8fb9e2020b76dbe5decff405c8a169e134c

i-am-sijia commented 1 month ago

The problem is in expressions with (df.get('num_escortees', 0)>0), there are 14 of them in the tour mode choice UEC.

https://github.com/ActivitySim/sandag-abm3-example/blob/f0fbc8fb9e2020b76dbe5decff405c8a169e134c/configs/resident/tour_mode_choice.csv#L133

By the way, the sharrow utility debugging is not working in simulation.py. It makes it harder to find the problematic expression with sharrow. I opened issue https://github.com/ActivitySim/activitysim/issues/874