Newer systems know where and how many people are at a location for what reasons?
Another way to prevent this issue is to treat everyone travelling from one floor to another as one group and to allocate only one car for that group.