Speeding up stochastic and deterministic simulation by aggregation: An advanced tutorial