A direct method for the calculation of the equilibrium in the traffic network problem