activity algorithm simulation 589591