A numerical model for describing the counterpropagation of one-dimensional waves in a nonlinear medium with an arbitrary power law absorption and corresponding dispersion is developed. The model is based on general one-dimensional Navier-Stokes equations with absorption in the form of a time-domain convolution operator in the equation of state. The developed algorithm makes it possible to describe wave interactions in the presence of shock fronts in media like biological tissue. Numerical modeling is conducted by the finite difference method on a staggered grid; absorption and sound speed dispersion are taken into account using the causal memory function. The developed model is used for numerical calculations, which demonstrate the absorption and dispersion effects on nonlinear propagation of differently shaped pulses, as well as their reflection from impedance acoustic boundaries.