The nonstationary problem of the evolution of perturbation and its transformation into nonlinear wave structure in dusty plasmas is considered. For this purpose two one-dimensional models based on a set of fluid equations, Poisson's equation, and a charging equation for dust are developed. The first (simplified) model corresponds to the case [Popel et al., Phys. Plasmas 3, 4313 (1996)] when exact steady-state shock wave solutions can exist. This simplified model includes variable-charged dust grains, Boltzmann electrons, and inertial ions. The second (ionization source) model takes into account the variation of the ion density and the ion momentum dissipation due to dust particle charging as well as the source of plasma particles due to ionization process. The computational method for solving the set of equations which describe the evolution in time of a nonlinear structure in a charge-varying dusty plasma is developed. The case of the evolution of an intensive initial nonmoving region with a constant enhanced ion density is investigated on the basis of these two models. The consideration within the ionization source model is performed for the data of the laboratory experiment [Luo et al., Phys. Plasmas 6, 3455 (1999)]. It is shown that the ionization source model allows one to obtain shock structures as a result of evolution of an initial perturbation and to explain the experimental value of the width of the shock wave front. Comparison of the numerical data obtained on the basis of the ionization source model and the simplified model shows that the main characteristic features of the shock structure are the same for both models. Nevertheless, the ionization source model is much more sensitive to the form of the initial perturbation than the simplified model. The solution of the problem of the evolution of perturbation and its transformation into shock wave in charge-varying dusty plasmas opens up possibilities for description of the real phenomena like supernova explosions as well as of the laboratory and active space and geophysical experiments.