Reputation: 103
Is there a way to stop a run in Netlogo when the system reaches equilibrium? The ticks just keep running and I would like my simulation to automatically stop when a near-equilibrium change is reached, i.e. when the system is close to 95% equilibrium.
Upvotes: 1
Views: 100
Reputation: 4168
I have a similar situation where I've taken two approaches. When there is a variable for which stability indicates quasi-equilibrium, I keep a history of that variable in a list and check the standard deviation of the most recent "n" values. If that variance falls below a given value, I stop the simulation. For you, that might be concentration. Of course if the variable is moving smoothly in one direction or another you might get a false positive, so as a check, I've also regressed the most recent values to see if the slope is "close" to zero. I'd be hard put to put a percentage on closeness- that will depend on the situation. But, something like this might do.
Hope this helps, Charles
Upvotes: 1