Skip to content

Commit be43c17

Browse files
authored
fix: random seeds in secondary location model (eqasim-org#246)
* fix: random seeds in secondary location model * update hashes
1 parent f74bd98 commit be43c17

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
**Under development**
44

5+
- fix: secondary location model used same random seed in every parallel thread
56
- feat: add a new method for attributing income to housholds using the bhepop2 package
67
- fix: fixed special case in repairing ENTD for completely overlapping trips
78
- feat: make it possible to disable the test run of MATSim before writing everything out

synthesis/population/spatial/secondary/locations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def process(context, arguments):
131131
df_trips, df_primary, random_seed, crs = arguments
132132

133133
# Set up RNG
134-
random = np.random.RandomState(context.config("random_seed"))
134+
random = np.random.RandomState(random_seed)
135135
maximum_iterations = context.config("secloc_maximum_iterations")
136136

137137
# Set up discretization solver

tests/test_determinism.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def _test_determinism(index, data_path, tmpdir):
7575
}
7676

7777
REFERENCE_GPKG_HASHES = {
78-
"ile_de_france_activities.gpkg": "f8a4138f0dc92802d36ae30e449bfc74",
78+
"ile_de_france_activities.gpkg": "9cf9a5fd8927c709927f7a940f86efbf",
7979
"ile_de_france_commutes.gpkg": "5a4180390a69349cc655c07c5671e8d3",
8080
"ile_de_france_homes.gpkg": "033d1aa7a5350579cbd5e8213b9736f2",
81-
"ile_de_france_trips.gpkg": "5248a832eb56797b6f298c5aeb653dac",
81+
"ile_de_france_trips.gpkg": "d0aec4033cfc184bf1b91ae13a537ef8",
8282
}
8383

8484
generated_csv_hashes = {

0 commit comments

Comments
 (0)