Closed rakshith95 closed 5 months ago
Hi Rakshith, thanks for the comment! My strong guess is that your function is somehow incompatible with ReverseDiff, which is a common Julia automatic differentiation library that I also use in LFPSQP here. Without seeing the function, I would also guess that you may have some vector / storage you're using inside that function that isn't typed appropriately (check out this link: https://juliadiff.org/ReverseDiff.jl/limits/). If you can fix the function and test it successfully with ReverseDiff, I would recommend that. Otherwise, if you can obtain the gradient/Hessian of the function in another manner, you can feed that into LFPSQP. Hope this helps!
Hello @ksil , thanks for the hint. I call the LinearAlgebra.norm()
function in my objective, so that could be causing the problem. I will try it without the function call, and let you know if it works.
I was also wondering on what happens if I have a constrained optimization problem, and my initial guess is infeasible. Does the solver fail, or does it start from some other initial point? (zeros / closest feasible point / something else? )
Thank you for your work!
Theoretically, you should always start LFPSQP with a feasible point. That being said, because every step involves a solve, in practice, I have found that it works if the starting point is decently close to the constraint manifold. So, your mileage may vary. If you have issues, you can always perform one robust function solve in order to get an initial point for LFPSQP that is feasible.
If you have issues, you can always perform one robust function solve in order to get an initial point for LFPSQP that is feasible.
This is sort of what I want to do with LFPSQP. I'm trying to get a feasible point closest ( by Frobenius norm) to my initial data. What do you mean by
one robust function solve ?
For example, if you're trying to minimize f(x) over constraints c(x) = 0, but you don't have an x that satisfies c(x) = 0, you can first solve for c(x) = 0 with some nonlinear solver or even with LFPSQP by minimizing || c(x) ||^2. Then, you could start the original optimization routine with the feasible point that was found.
Hello,
I'm trying to run an equality-constrained problem, but I get the following error:
Do you have any idea why this would happen?