Stable For Steps
A Predicate that tests if an environment's nodes (meaning their position and concentration) have remained unchanged for a certain amount of steps.
The check isn't performed on every step of a simulation, instead an interval that determines how many steps are to be skipped between each check is specified. For test to return true, an environment must remain unchanged for checkInterval * equalIntervals
steps. This result might not be entirely consistent, since the check isn't performed every step so as not to cause performance issues. Therefore it might happen that some changes occur in the environment but are reverted before the next check is performed.
test should be called at every step of the simulation in order to avoid missing checks.
Parameters
The recurrence of the test
The amount of checkInterval intervals that need to pass (during which the environment doesn't change) for test to return true
Constructors
Creates a new StableForSteps with the given values.