Optimization of locating problems in urban contexts