GepocUS / Spcies

Suite of Predictive Controllers for Industrial Embedded Systems. A Matlab toolbox for automatic code generation of solvers for MPC controllers.
Apache License 2.0
14 stars 2 forks source link

Improve case in which all penalty parameters are the same #9

Closed pablokrupa closed 3 years ago

pablokrupa commented 3 years ago

Right now, in the ellipMPC and laxMPC solvers, the penalty parameter rho is always an array, even if the user selects it a a constant value for all the constraints. If it is a single value, it would be best to use a "define" of a scalar "static const double" in place of an array.

pablokrupa commented 3 years ago

This enhancement has been added to commit 3d91a40d00a1da2ba752a2a7fbcb1950f5c480c0, only for the ellipMPC and laxMPC solvers. It still needs to be added to the MPCT solver. I don't know if it is worth it for the MPCT solver, because it works much better if certain constraints are penalized more than others. As such, I close this issue.