Towards a realistic optimization of urban traffic flows