Skip to content

Commit

Permalink
prima instantiate
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Mar 15, 2024
1 parent 37d6959 commit 6cf34e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OptimizationPRIMA/src/OptimizationPRIMA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Optimization.OptimizationCache(prob::SciMLBase.OptimizationProblem,
throw("We evaluate the jacobian and hessian of the constraints once to automatically detect
linear and nonlinear constraints, please provide a valid AD backend for using COBYLA.")
else
f = Optimization.instantiate_function(prob.f, reinit_cache, prob.f.adtype, num_cons)
f = Optimization.instantiate_function(prob.f, reinit_cache.u0, prob.f.adtype, reinit_cache.p, num_cons)
end

return Optimization.OptimizationCache(f, reinit_cache, prob.lb, prob.ub, prob.lcons,
Expand Down

0 comments on commit 6cf34e5

Please sign in to comment.