Reconstruction of dynamical equations for traffic flow