All population-wide transitions essentially do the same, so it makes sense to unify their interface. I have implemented that here (in Main.jl, Utilities.jl and socialTransition.jl): A function applyTransitions (for now in Utilities.jl, should maybe be in some sort of Population module) applies a transition function (which operates on Person) and the usual parameters (model, verbose, parameters, etc.) to all elements of an iterable. The specific simulation module (in this case for example socialTransition) also provides a predicate (here selectSocialTransition) to select the agents the transition needs to be applied to.
All population-wide transitions essentially do the same, so it makes sense to unify their interface. I have implemented that here (in Main.jl, Utilities.jl and socialTransition.jl): A function applyTransitions (for now in Utilities.jl, should maybe be in some sort of Population module) applies a transition function (which operates on Person) and the usual parameters (model, verbose, parameters, etc.) to all elements of an iterable. The specific simulation module (in this case for example socialTransition) also provides a predicate (here selectSocialTransition) to select the agents the transition needs to be applied to.