Hi Peter!
We have some in-house SQP implementations in CasADi. These are distributed with CasADi and need not be installed separately.
There is "sqpmethod", which is essentially a vanilla SQP method with L1 line-search. It also implements BFGS Hessian approximation. If you are considering writing your own SQP implementation, you could consider just having a look at that one and modify it as you see fit.
Feel free to fork and make pul requests if you fix/improve some feature. Anyway, the code should be clean and well commented. I would say that the main limitation of that code is the globalisation (L1 line-search is not great IMO) and the regularization (convexification). But that can be improved.
A second SQP implementation in CasADi is "scpgen". It's a structure exploiting SQP implementation which projects a block sparse QP to a smaller, dense QP. It relies heavily on C-code generation for efficiency and implements both exact Hessian SQP and a Gauss-Newton SQP approach for sum-of-squares objectives. You need to enter the problem in a special way, using CasADi's "lift" operator to use this method. The main limitation with this code, as with "sqpmethod", is the globalisation and regularization.
Finally, just added to CasADi (if you use CasADi 3.1rc1, you should be able to use it) is a fork of the code "blocksqp", which is an SQP method with filter line-search and a blockwise hybrid BFGS/SR1 Hessian approximation approach. This has shown very promising results in initial testing, but is still work in progress.
Or, you can of course write your own SQP code from scratch, but it's nontrivial of course to write a really good SQP code...
Best regards,
Joel