Optimizing control of multivariable system by sequential selection of control inputs