  We evaluate the effects of preequilibrium dynamics on observables in
ultrarelativistic heavy-ion collisions. We simulate the initial nonequilibrium
phase within A MultiPhase Transport (AMPT) model, while the subsequent
near-equilibrium evolution is modeled using (2+1)-dimensional relativistic
viscous hydrodynamics. We match the two stages of evolution carefully by
calculating the full energy-momentum tensor from AMPT and using it as input for
the hydrodynamic evolution. We find that when the preequilibrium evolution is
taken into account, final-state observables are insensitive to the switching
time from AMPT to hydrodynamics. Unlike some earlier treatments of
preequilibrium dynamics, we do not find the initial shear viscous tensor to be
large. With a shear viscosity to entropy density ratio of $0.12$, our model
describes quantitatively a large set of experimental data on Pb+Pb collisions
at the Large Hadron Collider(LHC) over a wide range of centrality: differential
anisotropic flow $v_n(p_T) ~(n=2-6)$, event-plane correlations, correlation
between $v_2$ and $v_3$, and cumulant ratio $v_2\{4\}/v_2\{2\}$.
