  We have implemented a Langevin approach for the transport of heavy quarks in
the UrQMD hybrid model. The UrQMD hybrid approach provides a realistic
description of the background medium for the evolution of relativistic heavy
ion collisions. We have used two different sets of drag and diffusion
coefficients, one based on a $T$-Matrix approach and one based on a resonance
model for the elastic scattering of heavy quarks within the medium. In case of
the resonance model we have investigated the effects of different decoupling
temperatures of the heavy quarks from the medium, ranging between
$130\,\text{MeV}$ and $180\,\text{MeV}$. We present calculations of the nuclear
modification factor $R_{AA}$, as well as of the elliptic flow $v_2$ in Au+Au
collisions at $\sqrt{s_{NN}}=200\,\text{GeV}$ and Pb+Pb collisions at
$\sqrt{s_{NN}}=2.76\,\text{TeV}$. To make our results comparable to
experimental data at RHIC and LHC we have implemented a Peterson fragmentation
and a quark coalescence approach followed by the semileptonic decay of the D-
and B-mesons to electrons. We find that our results strongly depend on the
decoupling temperature and the hadronization mechanism. At a decoupling
temperature of $130\,\text{MeV}$ we reach a good agreement with the
measurements at both, RHIC and LHC energies, simultaneously for the elliptic
flow $v_2$ and the nuclear modification factor $R_{AA}$.
