synthpop/make/
mod.rs

1//! <https://a-b-street.github.io/docs/tech/trafficsim/travel_demand.html> for context.
2
3use rand::{RngCore, SeedableRng};
4use rand_xorshift::XorShiftRng;
5
6pub use self::generator::{BorderSpawnOverTime, ScenarioGenerator, SpawnOverTime};
7
8mod activity_model;
9mod generator;
10
11/// Need to explain this trick -- basically keeps consistency between two different simulations when
12/// each one might make slightly different sequences of calls to the RNG.
13pub fn fork_rng(base_rng: &mut XorShiftRng) -> XorShiftRng {
14    XorShiftRng::seed_from_u64(base_rng.next_u64())
15}