Skip to content

Remove Sample Rate Rounding#1073

Open
i-am-sijia wants to merge 2 commits intoActivitySim:mainfrom
wsp-sag:remove-sample-rate-rounding
Open

Remove Sample Rate Rounding#1073
i-am-sijia wants to merge 2 commits intoActivitySim:mainfrom
wsp-sag:remove-sample-rate-rounding

Conversation

@i-am-sijia
Copy link
Copy Markdown
Member

@i-am-sijia i-am-sijia commented Apr 30, 2026

This pull request makes a small but important change to the calculation of sample_rate in the households table logic. Instead of rounding sample_rate to three decimal places, which can result in a value of 0 for small sample sizes, the code now preserves the full precision of the division. This ensures meaningful values (not NaN or Inf) in trip matrices that use the inverse of the sample rate in their calculations.

Code changes: a simple change in the households.py.

Test updates:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant