The latest versions of Artelys Knitro and CasADi are now compatible!
What is CasADi?
CasADi initially focused on using a syntax akin to Computer Algebra Systems (CAS) and has now encapsulated this expertise in a general-purpose tool for gradient-based numerical optimization. The user can set up, solve, and perform forward and adjoint sensitivity analysis for systems of Ordinary Differential Equations (ODE) or Differential-Algebraic Equations (DAE) as well as formulate and solve Non-Linear Programs (NLP, MINLP) and Optimal Control Problems (OCP) using the derivative information generated by AD.
It facilitates rapid and efficient implementation of various methods for numerical optimal control, both in an offline context and for Non-linear Model Predictive Control (NMPC).
CasADi’s backbone is a symbolic framework implementing forward and reverse mode of ADon expression graphs to construct gradients, large-and-sparse Jacobians and Hessians.
Interface with Artelys Knitro
For each problem mentioned above, CasADi is able to call relevant solvers, such as Artelys Knitro, a high-performance tool dedicated to NLP/MINLP. This is especially useful to solve high-dimensional nonlinear problems that occur in robotics, for example when performing trajectory planning.
For instance, in a previous news we mentioned an article from the Biomimetic Robotics Lab of the Massachusetts Institute of Technology (MIT) where the authors use CasADi and Knitro for real-time control of their legged robots: the MIT Mini Cheetah and the MIT Humanoid.
The great news is: versions v3.6.2 and higher of CasADI are now compatible with the latest version of Knitro (v13.2)!
Version 13.2 of Artelys Knitro offers many improvements compared to the last version supported in CasADi, some of which are especially relevant in this context:
- Many NLP/MINLP improvements
- New parallelism features on Branch-and-Bound and linear solvers
- Improved presolve including bound tightening and detection of redundant constraints
- New MIP cuts and improved cut generation and selection strategies
- Improved multi-start heuristics
Applications
The applications of CasADi in science and engineering involve system design, parameter estimation, Model Predictive Control (MPC) or Moving Horizon Estimation (MHE) in many fields, either directly or embedded in software packages.
In The MIT Mini Cheetah use case mentioned earlier, the authors implemented a NMPC to find optimal landing postures, requiring nonlinear trajectory optimization with contact complementary constraints. Because real-time performance is so important in the short duration of a fall, Knitro was used for its speed, reliable convergence and ability to handle complementarity constraints.
In this article, the authors tackle the topical problem of trajectory generation for autonomous Micro-Aerial-Vehicles. A new formulation is proposed for multirotors trajectory generation that, unlike previous formulations, takes into account gravity, aerodynamic drag as well as obstacles and path constraints. The result is an NLP modeled in CasADi and solved with Knitro. Thanks to their approach and to Knitro, the authors are now able to cold start their optimization and converge to an optimal solution.
This use case also resorts to CasADi to plan multi-contact motions for legged robots to traverse uneven surfaces. Due to perturbations that may arise in real world (e.g. environment changes), online motion planning becomes essential. To this end, the authors use Receding Horizon Planning (RHP) which aims at constantly updating the motion plan. RHP requires the resolution of trajectory optimization problems, which are high-dimensional nonlinear problems, hence why Knitro was chosen as solver.
In this thesis, the race strategy of FIA Formula E is optimized. In this series, energy management is crucial. Defining the best trajectory using only GPS data of the track boundaries is a highly nonlinear problem. Therefore, CasADi and Knitro have been used to compute the optimal energy distribution in a single lap first, and then over the entire race.
Discover more Artelys Knitro use cases on this page and more applications of CasADi in this article.
If you want to know more about Artelys Knitro, check out our dedicated webpage.
Knitro 14.2 solve your toughest nonlinear non-convex models in seconds
— We are pleased to announce that Artelys Knitro 14.0 is now available! This new version enables compagnies to solve complex non-linear optimization problems with unprecedented efficency and precision.
Artelys Powers the Launch of CorNet’s Common Grid Model (CGM) Service
Artelys has been selected to develop computation engine modules for the Common European Merging Function (EMF) used in the core of the CorNet program’s RCC Service Platform, enabling pan-European operational power grid coordination and security analysis.
Driving Renewable Energy Integration: Advanced Solutions to increase the existing power grid’s renewable hosting capacity
Artelys proposes a methodology based on Artificial Intelligence to evaluate the increase of hosting capacity of variable Renewable Energy Sources (vRES) in electrical networks thanks to Grid Enhancing Technologies (GETs). .
Artelys Participates in the European HyNet Project to Optimize Hybrid AC/DC Power Grids
As part of the Horizon Europe program, Artelys is participating in the HyNet project. This initiative aims to study and optimize the operation of hybrid AC/DC power grids in the context of the rapid growth of power electronics-based technologies and the widespread deployment of distributed energy resources.
subscribe to our newsletters
© ARTELYS • All rights reserved • Legal mentions