1. An apparatus for solving a constrained optimization problem, comprising: a transformer configured to formulate a Lagrange equation having incorporated a Lagrange parameter, a first long run average function for an objective associated with the constrained optimization problem, and a second long run average function for a constraint associated with the constrained optimization problem; and an iterative solver configured to iteratively calculate averages of the first long run average function and the second long run average function, estimate a gradient of the Lagrange equation, and update the Lagrange parameter, so that a parameter value that may lead to an extreme value for the Lagrange equation is identified.