Zaslat SMS: Iterative algorithms for multilayer optimizing control