Optimization flow control. I. Basic algorithm and convergence

Optimization flow control. I. Basic algorithm and convergence