Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharrow performance in non-mandatory disaggregate accessibility #12

Open
jpn-- opened this issue May 2, 2024 · 0 comments
Open

Sharrow performance in non-mandatory disaggregate accessibility #12

jpn-- opened this issue May 2, 2024 · 0 comments
Assignees

Comments

@jpn--
Copy link
Member

jpn-- commented May 2, 2024

In this expression (and others like it)

Distance_female,"@_DIST.clip(0,20) * df.female * np.where(df.get('tour_category', default=False) == 'joint', 0, 1)",coef_zero,coef_distfemale_shopping,coef_zero,coef_zero,coef_zero,coef_distfemale_disc

the term df.get('tour_category', default=False) == 'joint' is resolved by sharrow to be df['tour_category'] == 'joint' when the tour_category column is present in the input data.

Currently, in disaggregate accessibility, this expression is not further compiling down to use a categorical dtype from tour_category to convert the string comparison to an integer comparison. This might be a bug in sharrow (fails to use categorical dtype inside .get terms) or a bug in ActivitySim (tour_category isn't correctly encoded as categorical at this point in the model).

@jpn-- jpn-- self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant