jmejia8/Metaheuristics.jl

User-defined random number generator

mohamed82008 opened this issue ยท 2 comments

Thanks for this amazing package. It would be nice if every rand call inside the package used a random number generator rng that can be passed by the user. This allows maximum reproducibility of results instead of relying on Julia's global random number generator.

Thank you for the important comment! The next releases will include this.

Possible implementation:

options = Options(rng=Random.default_rng())
.
.
.
optimize(f, bounds, OPTIMIZER(;options))

Suggestions are welcome :)

Sounds like a good implementation approach.