Made sure that the model RNG is used throughout
Using the GLOBAL_RNG introduces global state, which must be avoided to preserve reproducibility. Therefore, all Persephone code must use `model.rng` whenever calling `rand()`/`shuffle!()`/etc.
Showing
- Project.toml 4 additions, 0 deletionsProject.toml
- src/Persephone.jl 2 additions, 0 deletionssrc/Persephone.jl
- src/core/input.jl 4 additions, 2 deletionssrc/core/input.jl
- src/core/simulation.jl 14 additions, 5 deletionssrc/core/simulation.jl
- src/crop/crops.jl 1 addition, 1 deletionsrc/crop/crops.jl
- src/nature/nature.jl 3 additions, 1 deletionsrc/nature/nature.jl
- src/nature/species/wolpertinger.jl 1 addition, 1 deletionsrc/nature/species/wolpertinger.jl
- test/io_tests.jl 3 additions, 1 deletiontest/io_tests.jl
- test/landscape_tests.jl 2 additions, 1 deletiontest/landscape_tests.jl
- test/nature_tests.jl 9 additions, 5 deletionstest/nature_tests.jl
- test/runtests.jl 5 additions, 4 deletionstest/runtests.jl
- test/simulation_tests.jl 16 additions, 11 deletionstest/simulation_tests.jl
Loading
Please register or sign in to comment