Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the LTN impact prediction work off autogenerated home-to-work sc…
…enarios too. Most of the work is moving proletariat robot to synthpop, so the LTN crate doesn't depend on sim. That was a refactor that needed to happen anyway.
- Loading branch information
1 parent
5722c67
commit 3fa6aba
Showing
11 changed files
with
53 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
//! Everything needed to setup a simulation. | ||
//! <https://a-b-street.github.io/docs/tech/trafficsim/travel_demand.html> for context. | ||
|
||
use rand::{RngCore, SeedableRng}; | ||
use rand_xorshift::XorShiftRng; | ||
|
||
pub use self::generator::{BorderSpawnOverTime, ScenarioGenerator, SpawnOverTime}; | ||
pub use self::load::SimFlags; | ||
pub(crate) use self::spawner::{StartTripArgs, TripSpec}; | ||
|
||
mod activity_model; | ||
mod generator; | ||
mod load; | ||
mod spawner; | ||
|
||
/// Need to explain this trick -- basically keeps consistency between two different simulations when | ||
/// each one might make slightly different sequences of calls to the RNG. | ||
pub fn fork_rng(base_rng: &mut XorShiftRng) -> XorShiftRng { | ||
XorShiftRng::seed_from_u64(base_rng.next_u64()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ mod borders; | |
mod counts; | ||
mod endpoint; | ||
mod external; | ||
pub mod make; | ||
mod modifier; | ||
mod scenario; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! <https://a-b-street.github.io/docs/tech/trafficsim/travel_demand.html> for context. | ||
|
||
use rand::{RngCore, SeedableRng}; | ||
use rand_xorshift::XorShiftRng; | ||
|
||
pub use self::generator::{BorderSpawnOverTime, ScenarioGenerator, SpawnOverTime}; | ||
|
||
mod activity_model; | ||
mod generator; | ||
|
||
/// Need to explain this trick -- basically keeps consistency between two different simulations when | ||
/// each one might make slightly different sequences of calls to the RNG. | ||
pub fn fork_rng(base_rng: &mut XorShiftRng) -> XorShiftRng { | ||
XorShiftRng::seed_from_u64(base_rng.next_u64()) | ||
} |