According to Psychoanalytic theory of Sigmund Freud, our personality has three elements known as the id, ego, and superego.
The id strives for immediate gratification of our wants, needs, and desires. We can simply address this as the pleasure principle.
The ego is responsible for reality principle. Meaning, it weighs the pros and cons of an action before it satisfy or abandon an impulse or drive.
The superego acts for the perfection of one's behavior. It suppresses the urges of id that are unacceptable, and makes ego act based on idealistic principle rather than realistic.
In Deanne's situation, she wants to drink a glass of wine. That's the id acting. This shows that there's an impulse of drinking and needs to be satisfied immediately. However, Deanne knows that drinking wine will make her sleepy. This shows how ego acts in the situation. The impulse of drinking wine will only be resolved through delayed gratification. Thus, Deanne decides to save the glass and drink it when her research paper is done.