stream-based simulation function defined, handling delay+loop constructor