I'm working on a problem considering two events (W
, M
) and try to calculate the time decay from W
to M
using Gillespie. This is pictorial representation of the problem.
I solved this using these code:
RMW = 1
RWM = 0.35
t = []
for i in range (0,10000):
if (i%2) == 0: #W present
tM = 0
dt = expon.rvs(RWM, size=1)
tM += dt
else:
tW = 0
dt = expon.rvs(RMW, size=1)
tW += dt
t.append(dt)
Now I'm moving to a more complicated problem where there are three events (W
, M1
and M2
). The rates are also different like RWM1=0.35
and RWM2=0.1
. This is the pictorial representation.
Now I'm not able to understand from where I should start. It will be very helpful if someone can give me some suggestion based on the previous code to approach this kind of problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…