Within the framework of a thermal model with its parameters fitted to the
results from an isospin-dependent Boltzmann-Uehling-Uhlenbeck (IBUU) transport
model, we study the pion in-medium effect on the charged-pion ratio in
heavy-ion collisions at various energies. We find that due to the cancellation
between the effects from pion-nucleon s-wave and p-wave interactions in nuclear
medium, the \pi^-/\pi^+ ratio generally decreases after including the pion
in-medium effect. The effect is larger at lower collision energies as a result
of narrower pion spectral functions at lower temperatures.Comment: 4 pages, 4 figures, 1 table, minor modifications, version to appear
in Physical Review