1. A method for formulating and optimizing a quadratic programming problem including the steps of: a) in each of a plurality of time steps, formulating a problem of achieving a desired dynamic response for a window spanning multiple time steps as a solution to a quadratic programming problem; b) solving the quadratic programming problem in each time step using an iterative algorithm which searches for an optimal active set; c) in each subsequent time step of the plurality of time steps, initializing a search for the best active set based on a final active set of a prior time step of the plurality of time steps.