diff --git a/src/ensemble/ensemble_problems.jl b/src/ensemble/ensemble_problems.jl index 4ad493495..a7d45ef6f 100644 --- a/src/ensemble/ensemble_problems.jl +++ b/src/ensemble/ensemble_problems.jl @@ -50,17 +50,6 @@ function SciMLBase.EnsembleProblem(prob::AbstractSciMLProblem, u0s::Vector{Vecto return SciMLBase.EnsembleProblem(prob; prob_func, kwargs...) end -#only makes sense for OptimizationProblem, might make sense for IntervalNonlinearProblem -function SciMLBase.EnsembleProblem(prob::OptimizationProblem, trajectories::Int; kwargs...) - if prob.lb !== nothing && prob.ub !== nothing - u0s = QuasiMonteCarlo.sample(trajectories, prob.lb, prob.ub, QuasiMonteCarlo.LatinHypercubeSample()) - prob_func = (prob, i, repeat = nothing) -> remake(prob, u0 = u0s[:, i]) - else - error("EnsembleProblem with `trajectories` as second argument requires lower and upper bounds to be defined in the `OptimizationProblem`.") - end - return SciMLBase.EnsembleProblem(prob; prob_func, kwargs...) -end - struct WeightedEnsembleProblem{T1 <: AbstractEnsembleProblem, T2 <: AbstractVector} <: AbstractEnsembleProblem ensembleprob::T1