There are a couple ways of doing it, but one of the easiest might be to have an "agent" scheduled at the end / start of each time step that is responsible for gathering information about the model state. MASON has a scheduleOnce method that only invokes the agent once, but you can then reinsert the agent after you've done your work. Assuming it is the last thing you schedule upon initialization, it should be the last thing called each time step.