  The spatial and temporal invariance in the spectra of energetic particles in
the gradual solar events is reproduced in the simulations. Based on a numerical
solution of the focused transport equation, we obtain the intensity time
profiles of solar energetic particles (SEPs) accelerated by an interplanetary
shock in the three-dimensional interplanetary space. The shock is treated as a
moving source of energetic particles with a distribution function. The time
profiles of particle flux with different energies are calculated in the
ecliptic at $1$ AU. According to our model, we find that shock acceleration
strength, parallel diffusion and adiabatic cooling are the main factors in
forming the spatial invariance in SEP spectra, and perpendicular diffusion is a
secondary factor. In addition, the temporal invariance in SEP spectra is mainly
due to the effect of adiabatic cooling. Furthermore, a spectra invariant
region, which agrees with observations but is different than the one suggested
by Reames and co-workers, is proposed based on our simulations.
