Skip to main content
. Author manuscript; available in PMC: 2021 Aug 20.
Published in final edited form as: Multiscale Model Simul. 2020 May 6;18(2):646–673. doi: 10.1137/18m1212100

Algorithm 5.1.

Optimizing the particle allocation.

Given the particles and weights (ξ0i,ω0i)i=1,,Ninit at t = 0 or (ξti,ωti)i=1,,N at t ≥ 1:
 • Define the following approximate solution to (4.3):
  
N˜t(u)=Nωt(u)i:ξtiuωti[K˜h˜2(K˜h˜)2]p(ξti)uBωt(u)i:ξtiuωti[K˜h˜2(K˜h˜)2]p(ξti), (5.3)
  where p(ξti)MB is the microbin containing ξti.
 • Let N˜ count the occupied bins,
N˜=uB1ωt(u)>0.
 • Let Rt(u)uB be NN˜ samples from the distribution {N˜t(u)/N:uB}.
 • In Algorithm 3.1, define the particle allocation as
Nt(u)=1ωt(u)>0+Rt(u).
If the denominator of (5.3) is 0, we set Nt(u)=#{i:ξtiu}.