Tools for optimal operation and planning or urban distribution systems