A Cognitive Model of Crowd Behavior Based on Social Comparison Theory