The aim of this work is to improve urban traffic viability through an appropriate choice of yielding and stop signs or red and green phases for traffic lights in junctions with two entering and one exiting roads
(junctions of 2×1 type). We consider a macroscopic fluid-dynamic model able to capture the traffic evolution. We analyze different functionals measuring networks performance in terms of average velocity, average traveling time, total flux, density, stop and go waves, average traveling time, weighted with the number of cars moving on roads, and kinetic energy. Right of way parameters which optimize the latter two functionals are obtained. Simulations of simple junctions of 2×1type have been used to test the correctness of the analytical results. Then, global performance of optimization procedures has been investigated on Re di Roma Square, in Italy. In particular, we discuss cases in which the functionals are optimized locally at each junction for different values of right of way parameters. We show that for the chosen initial data the only algorithm for the maximization of velocity assures globally the best performance for the network, also in terms of average traveling times and kinetic energy.