1. A method for controlling a machine by 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 indicating desired behavior of the machine include a linear subspace constrained variable vector and a set constrained variable vector, wherein constraints include the set of linear inequalities in each scenario and the set of non-anticipativity constraints on the non-anticipativity constrained variables, comprising: solving, using a processor, 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, using the processor, 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; repeating for a next iteration of the StQP until either a termination condition for a feasible solution is satisfied or a termination condition for an infeasible solution is satisfied to produce a StQP solution, wherein the StQP uses the ADMM with a conjugate gradient (CG) process (ADMM-CG), wherein the ADMM-CG is called after a predetermined number of iterations, further comprising: identifying a subset of linear inequalities that hold as equalities at a solution; performing the predetermined number of iterations of the CG process on a CG-linear system; performing 2 iterations of ADMM using the solution identified by CG process to determine if sufficient progress is made toward solving StQP; if sufficient progress is achieved, continuing with additional CG interations, and if sufficient progress is not achieved, then terminating the CG process; and controlling the machine using the StQP solution.