Can you point me at a tutorial, article, PhD that describes the technique you are using here? One with plenty of mathematical formula, or links, is best. I'm a pure maths type of person.
I fear I can't do that because I have not taken it out of one.
It is somewhat related to differential equations and a predict-correct numerical integration scheme but not quite because I work with integers and there is no need for 100% accuracy (and an iterative algorithm to converge the solution of an implicit formulation would be too expensive).
So what I do is the following:
For ease of explanation lets leave out interactions for now and lets only use plots. Consider one property that has a value on all those plots. Now you can have any number of sources and propagators active on those plots.
A source can be considered a differential equation, that defines how the value of the plot should change depending on the value of the plot.
dx/dt = g(x)
Since we are turn based and not continuous, we use
Dx = f(x)
where Dx is the change to this property from this source in this turn given by a function depending on the current value.
The easiest source is the unlimited constant source that is just defined by a constant change each turn
f(x) = iAmountPerTurn
We have more than one source though. In the case of the constant unlimited source that is easy, we just sum up all the Dx and have the actual change of that property in this turn. But we have other source types as well. Among them decay.
f(x) = - iPercent * x / 100
Decay is supposed to always get the value towards 0 but if we have two decays on the same plot that each do a decay of 60%, then a simple sum would add up to 120% and make our value negative.
Another example are limited sources. If you have two constant sources that should be limited to 100 on the same plot and you are already close to 100, then while each of them would keep under 100, just adding them up would get you over 100. The limit is an important property though, so something more should be done to keep it.
Now an easy fix would be to just apply the sources in a certain order. This is done between sources, propagators and interactions (first propagators, then interactions, then sources). Unfortunately that means the result depends on that order.
So instead within the categories we first make a prediction by summing up the value that would result if a source were the only source on that plot. Then we give each source a chance to correct its prediction by giving it the prediction sum. Only that result is then used.
So if a limited source sees that the prediction got over the limit, then it reduces its output proportionally.
With propagators it is similar but instead of only changing the property on the plot it is on, instead it can also change the property on a number of target plots. Lets take the diffusion propagator with only two plots, the one it is on (x) and the one it has as target (y):
Dx = - iPercent * (x - y) / 100
Dy = iPercent * (x - y) / 100