For any class/teacher/subject or student you can specify a maximum number of different buildings it or he/she can be in on any given day.
Use the cardrelationships #58:
The above picture says that class 1.A can be in no more than 2 different buildings on any day.
But please keep in mind that this doens't tell how many transits the kids can have. They can have 2 buildings, but 4 transits per day. For teacher there is a special setting for the maximum number of transits. For students, they by default cannot transfer during day, so you need to allow this.
Also you can specify a time map for this cardrelationships. So for example this cardrelationship says that students can only be in one building on periods 3,4,5. In other words they cannot transit between 3/4 and 4/5:
This article was viewed 32331 times.28057 / 32331