1. A method for solving a control problem for an application, comprising the steps of: formulating, over a predetermined time interval, the control problem with a quadratic cost function, linear state equations and control constraints as a quadratic program for the application; and applying, an update law to an optimization variable vector, starting from a positive initial estimate to obtain control actions for the application, wherein the update law is constructed from the quadratic program based on y i ← y i ⁡ [ h i - + ( Q - ⁢ y ) i h i + + ( Q + ⁢ y ) i ] , wherein i th element y i of the optimization variable vector y starting from the positive initial estimate, Q is a square matrix, Q + =max (Q, 0)+diag(r), Q − =max (−Q, 0)+diag(r); h + =max (h, 0); h − =max (−h, 0), diag (r) is a diagonal matrix formed from a nonnegative vector r, max is a function that returns a maximum, wherein the steps are performed in a processor.