We study the problem of π production in heavy-ion collisions in the context of the isospin-dependent Boltzmann-Uehling-Uhlenbeck transport model. We generated nucleon densities using two different models, the Skyrme-Hartree-Fock (SHF) model and the configuration interaction shell model (SM). Indeed, inter-nucleon correlations are explicitly taken into account in SM, while they are averaged in the SHF model. As an application of our theoretical frameworks, we calculated the π − and π + yields in collisions of nuclei with A = 30-40 nucleons. We used different harmonic oscillator lengths b HO to generate the harmonic oscillator basis for SM in order to study both theoretical and experimental cases. It is found that the SM framework with b HO = 2.5 fm and SHF can be distinguished by the yield of π mesons, in this case the density distribution calculated by the SM produces more π in the collision. In comparison, SM with b HO = 2.0 fm is distinguished from SHF by the double π − /π + ratios with different large impact parameters, from which one can find that the double π − /π + ratios of SM change smoother and are less than those of SHF.