Heavy quark dynamics within a Boltzmann transport model: Radiative vs collisional energy loss