Resources: Nocedal-Wright2006_Book_NumericalOptimization.pdf Chapter 15.4
Inequality constraints on states may imply that for some , there are no solutions to the MPC QP. We solve this by adding a slack variable .
Consider a Normal QP, we then modify it
Where is now a linear weight. We also implement an Exact Penalty, which means that if the normal problem is feasible, then we set (no need for slack).
In some practical implementations you add a quadratic term to the objective function, .