How to code SIR system to see state after time of each individual?
Let we have N individiviaduals in a system, out of which a random number of infividual are infected (say N/10) and the rest are susceptible. each suscptible can become infected with probability p_i and each infected can recover with probablity q_i. How can we code it to see the state after time t.
e.g let initially S=[0 1 1 1 1 1 1 1 1 1], I=[1 0 0 0 0 0 0 0 0 0] and R=[ 0 0 0 0 0 0 0 0 0 0].
I try to use Gillespie algorithm but its not working.Let we have N individiviaduals in a system, out of which a random number of infividual are infected (say N/10) and the rest are susceptible. each suscptible can become infected with probability p_i and each infected can recover with probablity q_i. How can we code it to see the state after time t.
e.g let initially S=[0 1 1 1 1 1 1 1 1 1], I=[1 0 0 0 0 0 0 0 0 0] and R=[ 0 0 0 0 0 0 0 0 0 0].
I try to use Gillespie algorithm but its not working. Let we have N individiviaduals in a system, out of which a random number of infividual are infected (say N/10) and the rest are susceptible. each suscptible can become infected with probability p_i and each infected can recover with probablity q_i. How can we code it to see the state after time t.
e.g let initially S=[0 1 1 1 1 1 1 1 1 1], I=[1 0 0 0 0 0 0 0 0 0] and R=[ 0 0 0 0 0 0 0 0 0 0].
I try to use Gillespie algorithm but its not working. sir model, code, gilliespie, stochastics MATLAB Answers — New Questions