A variational model for equilibrium problems in a traffic network