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
András Retzler edited this page Oct 21, 2022
·
2 revisions
The NLP formulation is very general, and you can formulate any kind of problem with nlpsol that fits into it:
Of course a linear least squares problem also fits into this, and you can solve it with CasADi and Ipopt, but unless you have a good reason to do so, you should probably use A\b (see mldivide or numpy.linalg.lstsq).
For QPs, CasADi has a specific interface: qpsol, see here. It's then best to use any of the QP solvers available.
In general, use a solver specific for a problem type for best (and fastest) results. CasADi + Ipopt is nevertheless nice for quick prototyping, sometimes it's faster to implement a problem in Opti as an NLP than using the specific solver.