Modeling the Effects of Emotion on Cognition