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

fix: random seeds in secondary location model #246

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

**Under development**

- fix: secondary location model used same random seed in every parallel thread
- feat: add a new method for attributing income to housholds using the bhepop2 package
- fix: fixed special case in repairing ENTD for completely overlapping trips
- feat: make it possible to disable the test run of MATSim before writing everything out
Expand Down
2 changes: 1 addition & 1 deletion synthesis/population/spatial/secondary/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def process(context, arguments):
df_trips, df_primary, random_seed, crs = arguments

# Set up RNG
random = np.random.RandomState(context.config("random_seed"))
random = np.random.RandomState(random_seed)
maximum_iterations = context.config("secloc_maximum_iterations")

# Set up discretization solver
Expand Down
4 changes: 2 additions & 2 deletions tests/test_determinism.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def _test_determinism(index, data_path, tmpdir):
}

REFERENCE_GPKG_HASHES = {
"ile_de_france_activities.gpkg": "f8a4138f0dc92802d36ae30e449bfc74",
"ile_de_france_activities.gpkg": "9cf9a5fd8927c709927f7a940f86efbf",
"ile_de_france_commutes.gpkg": "5a4180390a69349cc655c07c5671e8d3",
"ile_de_france_homes.gpkg": "033d1aa7a5350579cbd5e8213b9736f2",
"ile_de_france_trips.gpkg": "5248a832eb56797b6f298c5aeb653dac",
"ile_de_france_trips.gpkg": "d0aec4033cfc184bf1b91ae13a537ef8",
}

generated_csv_hashes = {
Expand Down
Loading