Practical approach to the optimization of large-scale switching networks