4.6. Merging Schedules in Swarms

As mentioned above, there can be buildActions methods in many different classes. Since each one can create action groups and schedules, it is important that all of these activities are coordinated in a logical way. One of the strengths of the Swarm toolkit is that it maintains a coherent, master schedule. The schedules of each sub Swarm are merged into the schedule of next higher level. Finally all schedules are merged in the top level Swarm. This synchronization is managed by the Swarm Activity library when the activateIn:method is called in each successive element of the hierarchy.

This multi-level integration of swarm schedules means that the model can indeed be thought of as a nested hierarchy of models.

Figure 4-1. Nested hierarchy of Swarms

A Swarm as a Virtual Computer

Figure 4-2. Swarm virtual computer

At an even more abstract level, the Swarm libraries can be thought of as a layer on top of the operating system's kernel. This notion is especially relevant when the user can pause a simulation and individually interact with agents, reviewing and changing their internal values.