This paper describes a model for simulating crowds of humans in real time. We deal with a hierarchy composed of virtual crowds, groups, and individuals. The groups are the most complex structure that can be controlled in different degrees of autonomy. This autonomy refers to the extent to which the virtual agents are independent of user intervention and also the amount of information needed to simulate crowds. Thus, depending on the complexity of the simulation, simple behaviors can be sufficient to simulate crowds. Otherwise, more complicated behavioral rules can be necessary and, in this case, it can be included in the simulation data in order to improve the realism of the animation. We present three different ways for controlling crowd behaviors: 1) by using innate and scripted behaviors, 2) by defining behavioral rules, using events and reactions, and 3) by providing an external control to guide crowd behaviors in real time. The two main contributions of our approach are: The possibility of increasing the complexity of group/agent behaviors according to the problem to be simulated and the hierarchical structure based on groups to compose a crowd.