A relativistic effective interaction for heavy-ion collisions