You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do we need to remove N from the events in equationsToTransitions method:
equationsToTransitions
"This is only working for status ODE equations, not general ODE equations"
| events |
events :=self generateEvents.
"Remove N variable in events rate. Why?"
events do: [ :e |
e fromStatus =#emptyifTrue: [
e rate: (e rate removeVariable: (KEVariablenewsymbol:#N)) ] ].
events do: [ :each |
selfaddTransitionFrom: { (#status-> each fromStatus) }
to: { (#status-> each toStatus) }
probability: each rate ].
"Why initializing equations at the end?"
equations :=OrderedCollectionnew
The text was updated successfully, but these errors were encountered:
Because in the equation of S, dS/dt = muN - lambdaS, we have the transition: empty — mu —> S
however the rate extract from the equation is muN, and we store only per capita transition rate, so to obtain the rate mu, we remove N.
Maybe a correct way to do it, is to store only per capita transition rate when we generate the events (in method generateEvents), so don't have to deal with that later.
Why do we need to remove N from the events in equationsToTransitions method:
The text was updated successfully, but these errors were encountered: