Skip to content

Commit

Permalink
Add solve
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Nov 7, 2023
1 parent e85bdb3 commit 145f495
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ function solve(prob::OptimizationProblem, alg, args...;
end
end

function SciMLBase.solve(prob::EnsembleProblem{T}, args...; kwargs...) where {T <: OptimizationProblem}
return SciMLBase.__solve(prob, args...; kwargs...)
end

function _check_opt_alg(prob::OptimizationProblem, alg; kwargs...)
!allowsbounds(alg) && (!isnothing(prob.lb) || !isnothing(prob.ub)) &&
throw(IncompatibleOptimizerError("The algorithm $(typeof(alg)) does not support box constraints. Either remove the `lb` or `ub` bounds passed to `OptimizationProblem` or use a different algorithm."))
Expand Down

0 comments on commit 145f495

Please sign in to comment.