You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am new to Julia and Optim.jl. I am trying to figure out how to make my constrained NLP problem work within this package. I am getting the following error:
`ERROR: LoadError: MethodError: no method matching Optim.BarrierLineSearchGrad(::Vector{Float64}, ::Matrix{Float64}, ::Optim.BarrierStateVars{Real}, ::Optim.BarrierStateVars{Real})
Closest candidates are:
Optim.BarrierLineSearchGrad(::Vector{T}, ::Matrix{T}, ::Optim.BarrierStateVars{T}, ::Optim.BarrierStateVars{T}) where T at C:\Users\dhs0020.julia\packages\Optim\Zq1jM\src\multivariate\solvers\constrained\ipnewton\interior.jl:153
sol = solve(problem, IPNewton(); maxiters = 1, show_trace = true, show_every = 1)
return sol
end
`
my constraints function is setting the constraints vector to a Vector{Real} element, so I am not sure why IPNewton method is thinking that the constraints vector type is Vector{Float64}, which is what is I believe the cause of this error is.
I am absolutely stuck and I would appreciate any help provided to get over this issue.
Thanks,
Dhathri
The text was updated successfully, but these errors were encountered:
Hello, I am new to Julia and Optim.jl. I am trying to figure out how to make my constrained NLP problem work within this package. I am getting the following error:
`ERROR: LoadError: MethodError: no method matching Optim.BarrierLineSearchGrad(::Vector{Float64}, ::Matrix{Float64}, ::Optim.BarrierStateVars{Real}, ::Optim.BarrierStateVars{Real})
Closest candidates are:
Optim.BarrierLineSearchGrad(::Vector{T}, ::Matrix{T}, ::Optim.BarrierStateVars{T}, ::Optim.BarrierStateVars{T}) where T at C:\Users\dhs0020.julia\packages\Optim\Zq1jM\src\multivariate\solvers\constrained\ipnewton\interior.jl:153
function optimizer(X0, params, lb, ub)
objective = OptimizationFunction(cost, Optimization.AutoForwardDiff(), cons = constraints)
collocation_params = create_common_parameters_for_collocation()
merge!(params, collocation_params)
lcons, ucons = get_constraint_bounds(params)
problem = OptimizationProblem(objective, X0, params, lb = lb, ub = ub, lcons = lcons, ucons = ucons, sense = Optimization.MinSense)
end
`
my
constraints
function is setting the constraints vector to a Vector{Real} element, so I am not sure why IPNewton method is thinking that the constraints vector type is Vector{Float64}, which is what is I believe the cause of this error is.I am absolutely stuck and I would appreciate any help provided to get over this issue.
Thanks,
Dhathri
The text was updated successfully, but these errors were encountered: