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 3.1.

Weighted ensemble.

Pick initial parents and weights (ξ0i,ω0i)i=1,,Ninit with i=1Ninitω0i=1, choose a collection B of bins, and define a final time T. Then for t ≥ 0, iterate the following:
 • (Selection step) Each parent ξti is assigned a number Cti of children, as follows:
  In each occupied bin uB, conditional on Ft, let (Cti)i:bin(ξti)=u be Nt(u) samples from the distribution {ωti/ωt(u):ξtiu}, where Nt(u)uB satisfies (3.2). The children (ξ^ti)i=1,,N are defined by (3.1) with weights
  
ω^ti=ωt(u)Nt(u)ifξ^tiu. (3.3)
  Selections in distinct bins are conditionally independent.
 • (Mutation step) Each child ξ^ti independently evolves one time step as follows.
  Conditionally on F^t, the children (ξ^ti)i=1,,N evolve independently according to the Markov kernel K, becoming the next parents (ξt+1i)i=1,,N, with weights
  
ωt+1i=ω^ti,i=1,,N. (3.4)
  Then time advances, tt + 1. Stop if t = T, else return to the selection step.
Algorithm 5.1 outlines an optimization for the allocation Nt(u)uB, and a procedure for choosing the bins B is in Algorithm 5.2. For the initialization, see Algorithm 5.3.