1. A method for solving a stochastic quadratic program (StQP), wherein the StQP enumerates scenarios, wherein the StQP is multi-stage, stochastic and convex, wherein constraints of the StQP include a set of linear equalities for each scenario, a set of linear inequalities for each scenario, a set of non-anticipativity constraints for the scenarios, wherein the solving uses non-anticipativity constrained variables for each scenario and an Alternating Direction Method of Multipliers (ADMM) wherein the ADMM is applied to a model predictive controller (MPC) for a machine governed by a dynamical system, wherein variables of the StQP include a linear subspace constrained variable vector and a set constrained variable vector, wherein the constraints include the set of linear inequalities in each scenario and the set of non-anticipativity constraints on the non-anticpativity constrained variables, comprising iterative steps: solving the linear subspace constrained variable vector while keeping the set constrained variable vector fixed using an optimal step size for each scenario and a Lagrangian multiplier; solving the set constrained variable vector while keeping linear subspace constrained variable vector fixed using the optimal step size and the Lagrangian multiplier, wherein the non-anticipativity constrained variables satisfies the set of non-anticipativity constraints for the scenarios; updating the Lagrangian multiplier; outputting a feasible solution if a termination condition for the feasible solution is satisfied; signaling an infeasible solution if a termination condition for the infeasible solution is satisfied; and otherwise repeating the steps for a next iteration, wherein the steps are performed by a processor.