The daily number of larvae surviving is drawn from a binomial distribution, where survival probability is given by $$(1-\mu_{aq}) * F(L)$$. F(L), the density dependence is calculated as $$F(L[t])=\Bigg(\frac{\alpha}{\alpha+\sum{\overline{L[t]}}}\Bigg)^{1/T_l}$$. See parameterizeMGDrivE for how these parameters are derived. Pupation has no parameters, so the final day of larvae naturally enter the pupal state.

oneDay_larvaDM_stochastic_Patch()