Closed RaulGDiaz closed 4 days ago
According to the NLOPT website, there is no NLOPT_LN_SLSQP
algorithm. That could be why you are getting a NULL; there is no such algorithm in the library. I would recommend closing this as unaccepted as this is outside the scope of NLOPTr. You would need to ask the NLOPT team to add the algorithm to the library.
Indeed, I do not understand this PR. The documentation of nlopt on SLSQP explicitly says it is a gradient-based method specified as NLOPT_LD_SLSQP
.
@RaulGDiaz : before closing this PR, would you like to explain more?
No news from @RaulGDiaz. I am closing this. Feel free to reopen if you still have unresolved issues.
I tried to get slsqp to work with the nloptr wrapper when no gradient is provided as this functionality is available in the native slsqp function. I created a separate algorithm label called "NLOPT_LN_SLSQP" to stick with the convention already used and prepared other areas of the codebase to also account for this change.
Sadly, I did not manage to fully enable this functionality as this commit produces the following exception: Error in nloptr(x0 = initialization, eval_f = cost_function, lb = lower_bound, : STRING_ELT() can only be applied to a 'character vector', not a 'NULL'
I believe this error is originating around the status objects in nloptr.c, but I have not managed to identify exactly what the issue is or how to solve it.
Apologies in advance should I have made any mistakes with these commits or when creating this pull request, this is my first time trying to do this. Please feel free to leave any advise for the future.