1. An apparatus for solving a constrained optimization problem, comprising: a processor; and a memory containing instructions that, when executed by the processor, cause the processor 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, wherein the constrained optimization problem cannot be appropriately represented by an analytical expression in terms of a parameter of interest, the first long run average function is not represented in terms of the parameter of interest, and the second long run average function is not represented in terms of the parameter of interest, and iteratively estimate 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 for the parameter of interest that may lead to an extreme value for the Lagrange equation is identified.