- qspec.simulate.ct_markov_analytic ( t , n , rates , r = 1.0 )[source]
Computes the analytic solution of the evolution of a linear continuous-time markov chain. CAUTION! Computation of analytic solution problematic (Multiplication of very small numbers with very large numbers).
- Parameters:
-
- tarray_like
The time at which the probability is returned (us).
- narray_like
The number of the state for which the probability is returned. The first state corresponds to 'n' = 0.
- ratesarray_like
The rate(s) at which the markov chain is transferring population from state i to state i + 1. If 'rates' is a scalar, this rate is assumed for all 0 ≤ i ≤ 'n'. If 'rates' is an Iterable, it must have length max('n') + 1 and individual rates 'rates[i]' are assumed for the states 0 ≤ i ≤ 'n'.
- rarray_like
The ratio of the population which is transferred from state i to state i + 1. Then 1 - r is the ratio of the population that is lost during the transition from state i to state i + 1.
- Returns:
-
- outNone
The probability for the markov chain to be in state 'n' after the time 't' for P(t=0, n=0) = 1. The normalization condition is sum_n(P(n, t0)) = 1 for every single point in time t0. If 't' and 'n' are Iterables, a 2-d array is returned with shape (t.size, n.size), containing all probabilities P(t, n).