Closed artgoldberg closed 3 years ago
Done.
Existing dependency analysis already ensured that "Given a reaction x modeled by NRM, the propensity calculation for x depends on all reactions that consume x's reactants." Specifically, for every reaction x, the dependency analysis in DynamicModel.obtain_dependencies() finds every expression that depends on a species whose population is modified by x.
Ensure that propensities used by stochastic submodels (SSA, NRM) evaluate to 0 when the population of any reactant is less than its stoichiometry.