diff --git a/src/default_parameters.jl b/src/default_parameters.jl index 936f388..85928f9 100644 --- a/src/default_parameters.jl +++ b/src/default_parameters.jl @@ -32,9 +32,6 @@ const DefaultParameters = ParamsDict( :CallbackFunction => x -> x, # Function to callback to, here just the identity function. :CallbackInterval => -1.0, # Minimum number of seconds between consecutive callbacks. If <0.0 we never callback (which is the default). - :RandomizeRngSeed => true, # Randomize the RngSeed value before using any random numbers. - :RngSeed => 1234, # The specific random seed to set before any random numbers are generated. The seed is randomly selected if RandomizeRngSeed is true, and this parameter is updated with its actual value. - :PopulationSize => 50 ) diff --git a/src/opt_controller.jl b/src/opt_controller.jl index 7baf92c..8c4d097 100644 --- a/src/opt_controller.jl +++ b/src/opt_controller.jl @@ -439,10 +439,11 @@ function update_parameters!(oc::OptController, parameters::Parameters = EMPTY_DI end function init_rng!(parameters::Parameters) - if parameters[:RandomizeRngSeed] - parameters[:RngSeed] = rand(1:1_000_000) + if haskey(parameters, :RandomizeRngSeed) + warn("Parameter RandomizeRngSeed is obsolete and no longer have an effect; you need to set the seed yourself before calling into BlackBoxOptim.") + elseif haskey(parameters, :RngSeed) + warn("Parameter RngSeed is obsolete and no longer have an effect; you need to set the seed yourself before calling into BlackBoxOptim.") end - Random.seed!(parameters[:RngSeed]) end """