KMC algorithm

  • Form and maintain a list of all possible rates rj in system

    rjfor allj=1,2,,M

    M – number of possible events

  • Calculate the cummulative function

    Rm=mj=1rj,for allm=1,2,,M
  • Generate random number ρ1[0,1)

  • Select event i

    Ri1ρ1RM<Ri
    images/kmc_cdf_invert.png
  • Carry out event i

  • Generate random number ρ2(0,1)

  • Compute time increment Δt

    Δt=ln(ρ2)RM
  • Update time: t=t+Δt

  • Update list of events and goto next step