Reputation: 13
I have 2048 master equations, dp/dt = Tj - Ti(p) for 2048 states of a network where p is the probability at a specific time. Initial p of all the states is 1/2048. All the Tj and Ti values are given for all the equations. I need to solve all these master equations using the iterative method until the probability of each state does not change. What approach should I take? I am applying simple iteration using the for loop. What will be the code of the condition to stop the loop of each of the equation differently when their respective values are not changing?
Upvotes: 0
Views: 129
Reputation: 133
The simplest approach can be to check the change in probability in every iteration by subtracting the new probability from the previous one and exiting the loop once this change goes below a threshold.
Upvotes: 0